diff --git a/packages/block-library/src/archives/index.php b/packages/block-library/src/archives/index.php index 695affde760a8a..2846b6ca1a03e1 100644 --- a/packages/block-library/src/archives/index.php +++ b/packages/block-library/src/archives/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/archives` block on server. * + * @since 5.0.0 + * * @see WP_Widget_Archives * * @param array $attributes The block attributes. @@ -106,6 +108,8 @@ function render_block_core_archives( $attributes ) { /** * Register archives block. + * + * @since 5.0.0 */ function register_block_core_archives() { register_block_type_from_metadata( diff --git a/packages/block-library/src/avatar/index.php b/packages/block-library/src/avatar/index.php index 303b35458eb1ae..b2f8ecace75a69 100644 --- a/packages/block-library/src/avatar/index.php +++ b/packages/block-library/src/avatar/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/avatar` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -99,6 +101,8 @@ function render_block_core_avatar( $attributes, $content, $block ) { * Generates class names and styles to apply the border support styles for * the Avatar block. * + * @since 6.3.0 + * * @param array $attributes The block attributes. * @return array The border-related classnames and styles for the block. */ @@ -149,6 +153,8 @@ function get_block_core_avatar_border_attributes( $attributes ) { /** * Registers the `core/avatar` block on the server. + * + * @since 6.0.0 */ function register_block_core_avatar() { register_block_type_from_metadata( diff --git a/packages/block-library/src/block/index.php b/packages/block-library/src/block/index.php index 49b5786eacc79f..9403205c186596 100644 --- a/packages/block-library/src/block/index.php +++ b/packages/block-library/src/block/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/block` block on server. * + * @since 5.0.0 + * * @global WP_Embed $wp_embed * * @param array $attributes The block attributes. @@ -97,6 +99,8 @@ function render_block_core_block( $attributes ) { /** * Registers the `core/block` block. + * + * @since 5.3.0 */ function register_block_core_block() { register_block_type_from_metadata( diff --git a/packages/block-library/src/calendar/index.php b/packages/block-library/src/calendar/index.php index fd2914a7e88691..44b56af25e4662 100644 --- a/packages/block-library/src/calendar/index.php +++ b/packages/block-library/src/calendar/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/calendar` block on server. * + * @since 5.2.0 + * * @global int $monthnum. * @global int $year. * @@ -79,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( @@ -97,6 +101,8 @@ function 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() { @@ -120,6 +126,8 @@ 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. @@ -137,6 +145,8 @@ function block_core_calendar_update_has_published_posts() { /** * 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 ) { @@ -152,6 +162,8 @@ function block_core_calendar_update_has_published_post_on_delete( $post_id ) { /** * 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. diff --git a/packages/block-library/src/categories/index.php b/packages/block-library/src/categories/index.php index c35376505b134f..1a6e6f43b1d939 100644 --- a/packages/block-library/src/categories/index.php +++ b/packages/block-library/src/categories/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/categories` block on server. * + * @since 5.0.0 + * * @param array $attributes The block attributes. * * @return string Returns the categories list/dropdown markup. @@ -63,6 +65,8 @@ function render_block_core_categories( $attributes ) { /** * Generates the inline script for a categories dropdown field. * + * @since 5.0.0 + * * @param string $dropdown_id ID of the dropdown field. * * @return string Returns the dropdown onChange redirection script. @@ -87,6 +91,8 @@ function onCatChange() { /** * Registers the `core/categories` block on server. + * + * @since 5.0.0 */ function register_block_core_categories() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-author-name/index.php b/packages/block-library/src/comment-author-name/index.php index d3cd68c0dfbfc6..2f9227964ad448 100644 --- a/packages/block-library/src/comment-author-name/index.php +++ b/packages/block-library/src/comment-author-name/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comment-author-name` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -53,6 +55,8 @@ function render_block_core_comment_author_name( $attributes, $content, $block ) /** * Registers the `core/comment-author-name` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_author_name() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-content/index.php b/packages/block-library/src/comment-content/index.php index 50bca402acf034..3f7f5e1f4083ba 100644 --- a/packages/block-library/src/comment-content/index.php +++ b/packages/block-library/src/comment-content/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comment-content` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -69,6 +71,8 @@ function render_block_core_comment_content( $attributes, $content, $block ) { /** * Registers the `core/comment-content` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_content() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-date/index.php b/packages/block-library/src/comment-date/index.php index 0f9c18bf2c0068..f5876bb237b67d 100644 --- a/packages/block-library/src/comment-date/index.php +++ b/packages/block-library/src/comment-date/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comment-date` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -46,6 +48,8 @@ function render_block_core_comment_date( $attributes, $content, $block ) { /** * Registers the `core/comment-date` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_date() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-edit-link/index.php b/packages/block-library/src/comment-edit-link/index.php index ce7ad9bf207d43..53eaf9a2cda6c6 100644 --- a/packages/block-library/src/comment-edit-link/index.php +++ b/packages/block-library/src/comment-edit-link/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comment-edit-link` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -48,6 +50,8 @@ function render_block_core_comment_edit_link( $attributes, $content, $block ) { /** * Registers the `core/comment-edit-link` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_edit_link() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-reply-link/index.php b/packages/block-library/src/comment-reply-link/index.php index 3f7b6e48b617c8..7121b6f25a195e 100644 --- a/packages/block-library/src/comment-reply-link/index.php +++ b/packages/block-library/src/comment-reply-link/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comment-reply-link` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -70,6 +72,8 @@ function render_block_core_comment_reply_link( $attributes, $content, $block ) { /** * Registers the `core/comment-reply-link` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_reply_link() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comment-template/index.php b/packages/block-library/src/comment-template/index.php index 915c5880a8f962..ec462e6a050de2 100644 --- a/packages/block-library/src/comment-template/index.php +++ b/packages/block-library/src/comment-template/index.php @@ -92,6 +92,8 @@ function block_core_comment_template_render_comments( $comments, $block ) { /** * Renders the `core/comment-template` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -136,6 +138,8 @@ function render_block_core_comment_template( $attributes, $content, $block ) { /** * Registers the `core/comment-template` block on the server. + * + * @since 6.0.0 */ function register_block_core_comment_template() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments-pagination-next/index.php b/packages/block-library/src/comments-pagination-next/index.php index 51d1f75c58d477..cb8350e561b6e4 100644 --- a/packages/block-library/src/comments-pagination-next/index.php +++ b/packages/block-library/src/comments-pagination-next/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comments-pagination-next` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -48,6 +50,8 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo /** * Registers the `core/comments-pagination-next` block on the server. + * + * @since 6.0.0 */ function register_block_core_comments_pagination_next() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments-pagination-numbers/index.php b/packages/block-library/src/comments-pagination-numbers/index.php index b172e0c8d43f86..093a6450930f12 100644 --- a/packages/block-library/src/comments-pagination-numbers/index.php +++ b/packages/block-library/src/comments-pagination-numbers/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comments-pagination-numbers` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -50,6 +52,8 @@ function render_block_core_comments_pagination_numbers( $attributes, $content, $ /** * Registers the `core/comments-pagination-numbers` block on the server. + * + * @since 6.0.0 */ function register_block_core_comments_pagination_numbers() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments-pagination-previous/index.php b/packages/block-library/src/comments-pagination-previous/index.php index f194e8ab517f57..092a28da677922 100644 --- a/packages/block-library/src/comments-pagination-previous/index.php +++ b/packages/block-library/src/comments-pagination-previous/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comments-pagination-previous` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. @@ -40,6 +42,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content, /** * Registers the `core/comments-pagination-previous` block on the server. + * + * @since 6.0.0 */ function register_block_core_comments_pagination_previous() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments-pagination/index.php b/packages/block-library/src/comments-pagination/index.php index 2f9cef27f78cf6..1543fc04027eef 100644 --- a/packages/block-library/src/comments-pagination/index.php +++ b/packages/block-library/src/comments-pagination/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comments-pagination` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * @param string $content Block default content. * @@ -34,6 +36,8 @@ function render_block_core_comments_pagination( $attributes, $content ) { /** * Registers the `core/comments-pagination` block on the server. + * + * @since 6.0.0 */ function register_block_core_comments_pagination() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments-title/index.php b/packages/block-library/src/comments-title/index.php index 62119fc0c2ca88..130132ec3fa527 100644 --- a/packages/block-library/src/comments-title/index.php +++ b/packages/block-library/src/comments-title/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/comments-title` block on the server. * + * @since 6.0.0 + * * @param array $attributes Block attributes. * * @return string Return the post comments title. @@ -84,6 +86,8 @@ function render_block_core_comments_title( $attributes ) { /** * Registers the `core/comments-title` block on the server. + * + * @since 6.0.0 */ function register_block_core_comments_title() { register_block_type_from_metadata( diff --git a/packages/block-library/src/comments/index.php b/packages/block-library/src/comments/index.php index 69e0fec8108578..e776db9b18d9d5 100644 --- a/packages/block-library/src/comments/index.php +++ b/packages/block-library/src/comments/index.php @@ -16,6 +16,8 @@ * the block is in legacy mode. If not, the HTML generated in the editor is * returned instead. * + * @since 6.1.0 + * * @global WP_Post $post Global post object. * * @param array $attributes Block attributes. @@ -85,6 +87,8 @@ function render_block_core_comments( $attributes, $content, $block ) { /** * Registers the `core/comments` block on the server. + * + * @since 6.1.0 */ function register_block_core_comments() { register_block_type_from_metadata( @@ -100,6 +104,8 @@ function register_block_core_comments() { /** * Use the button block classes for the form-submit button. * + * @since 6.1.0 + * * @param array $fields The default comment form arguments. * * @return array Returns the modified fields. @@ -118,6 +124,8 @@ function comments_block_form_defaults( $fields ) { * Enqueues styles from the legacy `core/post-comments` block. These styles are * required only by the block's fallback. * + * @since 6.1.0 + * * @param string $block_name Name of the new block type. */ function enqueue_legacy_post_comments_block_styles( $block_name ) { @@ -143,6 +151,8 @@ function enqueue_legacy_post_comments_block_styles( $block_name ) { * The same approach was followed when core/query-loop was renamed to * core/post-template. * + * @since 6.1.0 + * * @see https://github.com/WordPress/gutenberg/pull/41807 * @see https://github.com/WordPress/gutenberg/pull/32514 */ diff --git a/packages/block-library/src/cover/index.php b/packages/block-library/src/cover/index.php index 5f6b2cadaaa570..2fca0b0374dd29 100644 --- a/packages/block-library/src/cover/index.php +++ b/packages/block-library/src/cover/index.php @@ -8,6 +8,8 @@ /** * Renders the `core/cover` block on server. * + * @since 6.0.0 + * * @param array $attributes The block attributes. * @param string $content The block rendered content. * @@ -66,6 +68,8 @@ function render_block_core_cover( $attributes, $content ) { /** * Registers the `core/cover` block renderer on server. + * + * @since 6.0.0 */ function register_block_core_cover() { register_block_type_from_metadata( diff --git a/packages/block-library/src/file/index.php b/packages/block-library/src/file/index.php index ba0343ae6b25c6..df19052b4dad6c 100644 --- a/packages/block-library/src/file/index.php +++ b/packages/block-library/src/file/index.php @@ -8,6 +8,8 @@ /** * When the `core/file` block is rendering, check if we need to enqueue the `wp-block-file-view` script. * + * @since 5.8.0 + * * @param array $attributes The block attributes. * @param string $content The block content. * @param WP_Block $block The parsed block. @@ -65,6 +67,8 @@ static function ( $matches ) { /** * Registers the `core/file` block on server. + * + * @since 5.8.0 */ function register_block_core_file() { register_block_type_from_metadata( diff --git a/packages/block-library/src/gallery/index.php b/packages/block-library/src/gallery/index.php index 292ddeaf32ee2b..10237b6bfe39c6 100644 --- a/packages/block-library/src/gallery/index.php +++ b/packages/block-library/src/gallery/index.php @@ -13,6 +13,8 @@ * we add a custom `data-id` attribute before rendering the gallery * so that the Image Block can pick it up in its render_callback. * + * @since 5.9.0 + * * @param array $parsed_block The block being rendered. * @return array The migrated block object. */ @@ -35,6 +37,8 @@ function block_core_gallery_data_id_backcompatibility( $parsed_block ) { /** * Renders the `core/gallery` block on the server. * + * @since 6.0.0 + * * @param array $attributes Attributes of the block being rendered. * @param string $content Content of the block being rendered. * @return string The content of the block being rendered. @@ -164,6 +168,8 @@ static function () use ( $image_blocks, &$i ) { } /** * Registers the `core/gallery` block on server. + * + * @since 5.9.0 */ function register_block_core_gallery() { register_block_type_from_metadata( diff --git a/packages/block-library/src/heading/index.php b/packages/block-library/src/heading/index.php index 5a7e8dbaab43cf..471e31f19f2ee9 100644 --- a/packages/block-library/src/heading/index.php +++ b/packages/block-library/src/heading/index.php @@ -14,6 +14,8 @@ * Would be transformed to: *