summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/calendar.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/blocks/calendar.php')
-rw-r--r--wp-includes/blocks/calendar.php17
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.