From d8065a7187fceb7f7d6241981f1da75a9f3ed2a1 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 29 Nov 2026 13:51:45 +0000 Subject: [PATCH 1/2] Docs: Fix PHPDoc tag order and @link URLs from Gutenberg PR 87624 --- src/wp-includes/block-supports/typography.php | 3 ++- src/wp-includes/blocks/comments.php | 4 +-- src/wp-includes/blocks/list.php | 2 +- src/wp-includes/blocks/loginout.php | 2 +- .../blocks/post-navigation-link.php | 4 +-- .../blocks/query-pagination-numbers.php | 4 +-- src/wp-includes/deprecated.php | 26 +++++++++---------- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/wp-includes/block-supports/typography.php b/src/wp-includes/block-supports/typography.php index 6204ed02b6f86..92e6298313d47 100644 --- a/src/wp-includes/block-supports/typography.php +++ b/src/wp-includes/block-supports/typography.php @@ -282,10 +282,11 @@ function wp_apply_typography_support( $block_type, $block_attributes ) { * * It is necessary to parse older blocks whose typography styles contain presets. * * It mostly replaces the deprecated `wp_typography_get_css_variable_inline_style()`, * but skips compiling a CSS declaration as the style engine takes over this role. - * @link https://github.com/wordpress/gutenberg/pull/27555 * * @since 6.1.0 * + * @link https://github.com/wordpress/gutenberg/pull/27555 + * * @param string $style_value A raw style value for a single typography feature from a block's style attribute. * @param string $css_property Slug for the CSS property the inline style sets. * @return string A CSS inline style value. diff --git a/src/wp-includes/blocks/comments.php b/src/wp-includes/blocks/comments.php index cb80352edca8e..33c4f0bde4a1c 100644 --- a/src/wp-includes/blocks/comments.php +++ b/src/wp-includes/blocks/comments.php @@ -153,8 +153,8 @@ function enqueue_legacy_post_comments_block_styles( $block_name ) { * * @since 6.1.0 * - * @see https://github.com/WordPress/gutenberg/pull/41807 - * @see https://github.com/WordPress/gutenberg/pull/32514 + * @link https://github.com/WordPress/gutenberg/pull/41807 + * @link https://github.com/WordPress/gutenberg/pull/32514 */ function register_legacy_post_comments_block() { $registry = WP_Block_Type_Registry::get_instance(); diff --git a/src/wp-includes/blocks/list.php b/src/wp-includes/blocks/list.php index 5a5aecfb28078..585a8dfd8b27a 100644 --- a/src/wp-includes/blocks/list.php +++ b/src/wp-includes/blocks/list.php @@ -12,7 +12,7 @@ * * @since 6.6.0 * - * @see https://github.com/WordPress/gutenberg/issues/12420 + * @link https://github.com/WordPress/gutenberg/issues/12420 * * @param array $attributes Attributes of the block being rendered. * @param string $content Content of the block being rendered. diff --git a/src/wp-includes/blocks/loginout.php b/src/wp-includes/blocks/loginout.php index a9e05f8630bfe..38342c780cc11 100644 --- a/src/wp-includes/blocks/loginout.php +++ b/src/wp-includes/blocks/loginout.php @@ -19,7 +19,7 @@ function render_block_core_loginout( $attributes ) { /* * Build the redirect URL. This current url fetching logic matches with the core. * - * @see https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528. + * @link https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528. */ $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; diff --git a/src/wp-includes/blocks/post-navigation-link.php b/src/wp-includes/blocks/post-navigation-link.php index a5c13b9719cd1..9553a9e938177 100644 --- a/src/wp-includes/blocks/post-navigation-link.php +++ b/src/wp-includes/blocks/post-navigation-link.php @@ -101,8 +101,8 @@ function render_block_core_post_navigation_link( $attributes, $content ) { * The dynamic portion of the function name, `$navigation_type`, * Refers to the type of adjacency, 'next' or 'previous'. * - * @see https://developer.wordpress.org/reference/functions/get_previous_post_link/ - * @see https://developer.wordpress.org/reference/functions/get_next_post_link/ + * @link https://developer.wordpress.org/reference/functions/get_previous_post_link/ + * @link https://developer.wordpress.org/reference/functions/get_next_post_link/ */ $get_link_function = "get_{$navigation_type}_post_link"; diff --git a/src/wp-includes/blocks/query-pagination-numbers.php b/src/wp-includes/blocks/query-pagination-numbers.php index 35016fb169c6d..0d726ce5111fe 100644 --- a/src/wp-includes/blocks/query-pagination-numbers.php +++ b/src/wp-includes/blocks/query-pagination-numbers.php @@ -69,10 +69,10 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo * is the same for all custom queries. This way the link is not empty and * preserves all the other existent query args. * - * @see https://developer.wordpress.org/reference/functions/paginate_links/ + * @link https://developer.wordpress.org/reference/functions/paginate_links/ * * The proper fix of this should be in core. Track Ticket: - * @see https://core.trac.wordpress.org/ticket/53868 + * @link https://core.trac.wordpress.org/ticket/53868 * * TODO: After two WP versions (starting from the WP version the core patch landed), * we should remove this and call `paginate_links` with the proper new arg. diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php index 1eac319870be2..969798c845e6a 100644 --- a/src/wp-includes/deprecated.php +++ b/src/wp-includes/deprecated.php @@ -4864,13 +4864,13 @@ function wp_img_tag_add_loading_attr( $image, $context ) { * Direct port of TinyColor's function, lightly simplified to maintain * consistency with TinyColor. * - * @link https://github.com/bgrins/TinyColor - * * @since 5.8.0 * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * * @param mixed $n Number of unknown type. * @param int $max Upper value of the range to bound to. * @return float Value in the range [0, 1]. @@ -4901,13 +4901,13 @@ function wp_tinycolor_bound01( $n, $max ) { * Direct port of tinycolor's boundAlpha function to maintain consistency with * how tinycolor works. * - * @link https://github.com/bgrins/TinyColor - * * @since 5.9.0 * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * * @param mixed $n Number of unknown type. * @return float Value in the range [0,1]. */ @@ -4929,13 +4929,13 @@ function _wp_tinycolor_bound_alpha( $n ) { * Direct port of TinyColor's function, lightly simplified to maintain * consistency with TinyColor. * - * @link https://github.com/bgrins/TinyColor - * * @since 5.8.0 * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * * @param array $rgb_color RGB object. * @return array Rounded and converted RGB object. */ @@ -4955,13 +4955,13 @@ function wp_tinycolor_rgb_to_rgb( $rgb_color ) { * Direct port of TinyColor's function, lightly simplified to maintain * consistency with TinyColor. * - * @link https://github.com/bgrins/TinyColor - * * @since 5.8.0 * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * * @param float $p first component. * @param float $q second component. * @param float $t third component. @@ -4994,13 +4994,13 @@ function wp_tinycolor_hue_to_rgb( $p, $q, $t ) { * Direct port of TinyColor's function, lightly simplified to maintain * consistency with TinyColor. * - * @link https://github.com/bgrins/TinyColor - * * @since 5.8.0 * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * * @param array $hsl_color HSL object. * @return array Rounded and converted RGB object. */ @@ -5038,15 +5038,15 @@ function wp_tinycolor_hsl_to_rgb( $hsl_color ) { * Direct port of TinyColor's function, lightly simplified to maintain * consistency with TinyColor. * - * @link https://github.com/bgrins/TinyColor - * @link https://github.com/casesandberg/react-color/ - * * @since 5.8.0 * @since 5.9.0 Added alpha processing. * @deprecated 6.3.0 * * @access private * + * @link https://github.com/bgrins/TinyColor + * @link https://github.com/casesandberg/react-color/ + * * @param string $color_str CSS color string. * @return array RGB object. */ From d1cf77060aacc41ce787d6bab650de5b90dd66ad Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 29 Nov 2026 14:04:05 +0000 Subject: [PATCH 2/2] Revert block-library files synced from @wordpress/block-library --- src/wp-includes/blocks/comments.php | 4 ++-- src/wp-includes/blocks/list.php | 2 +- src/wp-includes/blocks/loginout.php | 2 +- src/wp-includes/blocks/post-navigation-link.php | 4 ++-- src/wp-includes/blocks/query-pagination-numbers.php | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/blocks/comments.php b/src/wp-includes/blocks/comments.php index 33c4f0bde4a1c..cb80352edca8e 100644 --- a/src/wp-includes/blocks/comments.php +++ b/src/wp-includes/blocks/comments.php @@ -153,8 +153,8 @@ function enqueue_legacy_post_comments_block_styles( $block_name ) { * * @since 6.1.0 * - * @link https://github.com/WordPress/gutenberg/pull/41807 - * @link https://github.com/WordPress/gutenberg/pull/32514 + * @see https://github.com/WordPress/gutenberg/pull/41807 + * @see https://github.com/WordPress/gutenberg/pull/32514 */ function register_legacy_post_comments_block() { $registry = WP_Block_Type_Registry::get_instance(); diff --git a/src/wp-includes/blocks/list.php b/src/wp-includes/blocks/list.php index 585a8dfd8b27a..5a5aecfb28078 100644 --- a/src/wp-includes/blocks/list.php +++ b/src/wp-includes/blocks/list.php @@ -12,7 +12,7 @@ * * @since 6.6.0 * - * @link https://github.com/WordPress/gutenberg/issues/12420 + * @see https://github.com/WordPress/gutenberg/issues/12420 * * @param array $attributes Attributes of the block being rendered. * @param string $content Content of the block being rendered. diff --git a/src/wp-includes/blocks/loginout.php b/src/wp-includes/blocks/loginout.php index 38342c780cc11..a9e05f8630bfe 100644 --- a/src/wp-includes/blocks/loginout.php +++ b/src/wp-includes/blocks/loginout.php @@ -19,7 +19,7 @@ function render_block_core_loginout( $attributes ) { /* * Build the redirect URL. This current url fetching logic matches with the core. * - * @link https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528. + * @see https://github.com/WordPress/wordpress-develop/blob/6bf62e58d21739938f3bb3f9e16ba702baf9c2cc/src/wp-includes/general-template.php#L528. */ $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; diff --git a/src/wp-includes/blocks/post-navigation-link.php b/src/wp-includes/blocks/post-navigation-link.php index 9553a9e938177..a5c13b9719cd1 100644 --- a/src/wp-includes/blocks/post-navigation-link.php +++ b/src/wp-includes/blocks/post-navigation-link.php @@ -101,8 +101,8 @@ function render_block_core_post_navigation_link( $attributes, $content ) { * The dynamic portion of the function name, `$navigation_type`, * Refers to the type of adjacency, 'next' or 'previous'. * - * @link https://developer.wordpress.org/reference/functions/get_previous_post_link/ - * @link https://developer.wordpress.org/reference/functions/get_next_post_link/ + * @see https://developer.wordpress.org/reference/functions/get_previous_post_link/ + * @see https://developer.wordpress.org/reference/functions/get_next_post_link/ */ $get_link_function = "get_{$navigation_type}_post_link"; diff --git a/src/wp-includes/blocks/query-pagination-numbers.php b/src/wp-includes/blocks/query-pagination-numbers.php index 0d726ce5111fe..35016fb169c6d 100644 --- a/src/wp-includes/blocks/query-pagination-numbers.php +++ b/src/wp-includes/blocks/query-pagination-numbers.php @@ -69,10 +69,10 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo * is the same for all custom queries. This way the link is not empty and * preserves all the other existent query args. * - * @link https://developer.wordpress.org/reference/functions/paginate_links/ + * @see https://developer.wordpress.org/reference/functions/paginate_links/ * * The proper fix of this should be in core. Track Ticket: - * @link https://core.trac.wordpress.org/ticket/53868 + * @see https://core.trac.wordpress.org/ticket/53868 * * TODO: After two WP versions (starting from the WP version the core patch landed), * we should remove this and call `paginate_links` with the proper new arg.