From 1b541a7e52060e2bdbe6e715e81a69f1a028a118 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sat, 11 Dec 2021 11:14:17 +0000 Subject: [PATCH] Docs: Docblock adjustments in some 5.9 block related functions. Adds missing `@since` mention to `wp_enqueue_block_style()` and `_wp_multiple_block_styles()`, and a few other minor changes. Follow-up to [52069]. See #53359. git-svn-id: https://develop.svn.wordpress.org/trunk@52354 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index a649bfe457..0f34aac1df 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -1191,15 +1191,16 @@ function get_query_pagination_arrow( $block, $is_next ) { } /** - * Enqueue a stylesheet for a specific block. + * Enqueues a stylesheet for a specific block. * * If the theme has opted-in to separate-styles loading, * then the stylesheet will be enqueued on-render, * otherwise when the block inits. * + * @since 5.9.0 + * * @param string $block_name The block-name, including namespace. * @param array $args An array of arguments [handle,src,deps,ver,media]. - * * @return void */ function wp_enqueue_block_style( $block_name, $args ) { @@ -1220,8 +1221,7 @@ function wp_enqueue_block_style( $block_name, $args ) { * @param string $content When the callback is used for the render_block filter, * the content needs to be returned so the function parameter * is to ensure the content exists. - * - * @return string + * @return string Block content. */ $callback = static function( $content ) use ( $args ) { // Register the stylesheet. @@ -1275,9 +1275,10 @@ function wp_enqueue_block_style( $block_name, $args ) { /** * Allow multiple block styles. * - * @param array $metadata Metadata for registering a block type. + * @since 5.9.0 * - * @return array + * @param array $metadata Metadata for registering a block type. + * @return array Metadata for registering a block type. */ function _wp_multiple_block_styles( $metadata ) { foreach ( array( 'style', 'editorStyle' ) as $key ) {