Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

54446 - Remove gutenberg from option name #1888

Closed
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function block_core_calendar_has_published_posts() {
}

// On single sites we try our own cached option first.
$has_published_posts = get_option( 'gutenberg_calendar_block_has_published_posts', null );
$has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
if ( null !== $has_published_posts ) {
return (bool) $has_published_posts;
}
Expand All @@ -103,7 +103,7 @@ function block_core_calendar_has_published_posts() {
function block_core_calendar_update_has_published_posts() {
global $wpdb;
$has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
update_option( 'gutenberg_calendar_block_has_published_posts', $has_published_posts );
update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
return $has_published_posts;
}

Expand Down