Changeset 52275 for trunk/src/wp-includes/blocks/calendar.php
- Timestamp:
- 11/30/2021 12:22:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/calendar.php
r52232 r52275 86 86 87 87 // On single sites we try our own cached option first. 88 $has_published_posts = get_option( ' gutenberg_calendar_block_has_published_posts', null );88 $has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null ); 89 89 if ( null !== $has_published_posts ) { 90 90 return (bool) $has_published_posts; … … 104 104 global $wpdb; 105 105 $has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" ); 106 update_option( ' gutenberg_calendar_block_has_published_posts', $has_published_posts );106 update_option( 'wp_calendar_block_has_published_posts', $has_published_posts ); 107 107 return $has_published_posts; 108 108 }
Note: See TracChangeset
for help on using the changeset viewer.