diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
commit | fc0a79914946dac00ccd51b1aacffe267de7210e (patch) | |
tree | 1403384efbfe8f8776ff60aaa40f7d535c02c822 /wp-includes/blocks/calendar.php | |
parent | Releasing progress-linux version 6.5.5+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.tar.xz wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.zip |
Merging upstream version 6.6.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | wp-includes/blocks/calendar.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wp-includes/blocks/calendar.php b/wp-includes/blocks/calendar.php index 04b8889..44b56af 100644 --- a/wp-includes/blocks/calendar.php +++ b/wp-includes/blocks/calendar.php @@ -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. |