diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/blocks/calendar | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-upstream.tar.xz wordpress-upstream.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
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. |