wp core update 6.6

This commit is contained in:
Tony Volpe
2024-07-17 03:05:30 +00:00
parent 8f93917880
commit 4950d23a30
912 changed files with 103325 additions and 124480 deletions

View File

@@ -8,6 +8,11 @@
/**
* Renders the `core/calendar` block on server.
*
* @since 5.2.0
*
* @global int $monthnum.
* @global int $year.
*
* @param array $attributes The block attributes.
*
* @return string Returns the block content.
@@ -76,6 +81,8 @@ function render_block_core_calendar( $attributes ) {
/**
* Registers the `core/calendar` block on server.
*
* @since 5.2.0
*/
function register_block_core_calendar() {
register_block_type_from_metadata(
@@ -94,6 +101,8 @@ add_action( 'init', 'register_block_core_calendar' );
* Used to hide the calendar block when there are no published posts.
* This compensates for a known Core bug: https://core.trac.wordpress.org/ticket/12016
*
* @since 5.9.0
*
* @return bool Has any published posts or not.
*/
function block_core_calendar_has_published_posts() {
@@ -117,6 +126,10 @@ function block_core_calendar_has_published_posts() {
* Queries the database for any published post and saves
* a flag whether any published post exists or not.
*
* @since 5.9.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return bool Has any published posts or not.
*/
function block_core_calendar_update_has_published_posts() {
@@ -132,6 +145,8 @@ if ( ! is_multisite() ) {
/**
* Handler for updating the has published posts flag when a post is deleted.
*
* @since 5.9.0
*
* @param int $post_id Deleted post ID.
*/
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
@@ -147,6 +162,8 @@ if ( ! is_multisite() ) {
/**
* Handler for updating the has published posts flag when a post status changes.
*
* @since 5.9.0
*
* @param string $new_status The status the post is changing to.
* @param string $old_status The status the post is changing from.
* @param WP_Post $post Post object.