Skip to content

Commit

Permalink
Remove reference to gutenberg_, swap with wp_ (#36652)
Browse files Browse the repository at this point in the history
  • Loading branch information
kebbet committed Nov 23, 2021
1 parent 31c4e2e commit fe7c3ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/calendar/index.php
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

0 comments on commit fe7c3ae

Please sign in to comment.