From 844c52016834e8fbe680ae3a11a372286594357b Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Wed, 28 Jan 2026 00:54:27 +0600 Subject: [PATCH 01/16] Docs: Replace incorrect @see usage with @link in specific core files See https://core.trac.wordpress.org/ticket/64224 --- src/wp-admin/edit-form-blocks.php | 2 +- src/wp-admin/site-editor.php | 2 +- .../class-wp-url-pattern-prefixer.php | 2 +- src/wp-includes/deprecated.php | 10 ++-- ...ass-wp-html-active-formatting-elements.php | 8 +-- .../html-api/class-wp-html-decoder.php | 4 +- .../html-api/class-wp-html-doctype-info.php | 36 ++++++------- .../html-api/class-wp-html-tag-processor.php | 54 +++++++++---------- src/wp-includes/media.php | 6 +-- src/wp-includes/nav-menu-template.php | 2 +- src/wp-includes/pluggable.php | 2 +- .../endpoints/class-wp-rest-controller.php | 2 +- .../class-wp-rest-templates-controller.php | 2 +- src/wp-includes/script-loader.php | 8 +-- src/wp-includes/speculative-loading.php | 2 +- 15 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 98f5c223f4017..d0f2000fdce17 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -105,7 +105,7 @@ static function ( $classes ) { ), $paths[] = add_query_arg( 'slug', - // @see https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254 + // @link https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254 $template_lookup_slug, '/wp/v2/templates/lookup' ), diff --git a/src/wp-admin/site-editor.php b/src/wp-admin/site-editor.php index 628be6625369c..1c8e8b525459b 100644 --- a/src/wp-admin/site-editor.php +++ b/src/wp-admin/site-editor.php @@ -238,7 +238,7 @@ static function ( $classes ) { if ( 'page' === $block_editor_context->post->post_type ) { $preload_paths[] = add_query_arg( 'slug', - // @see https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254 + // @link https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254 empty( $block_editor_context->post->post_name ) ? 'page' : 'page-' . $block_editor_context->post->post_name, '/wp/v2/templates/lookup' ); diff --git a/src/wp-includes/class-wp-url-pattern-prefixer.php b/src/wp-includes/class-wp-url-pattern-prefixer.php index a79e6e10c8cc0..3e94db53ff7b2 100644 --- a/src/wp-includes/class-wp-url-pattern-prefixer.php +++ b/src/wp-includes/class-wp-url-pattern-prefixer.php @@ -124,7 +124,7 @@ public static function get_default_contexts(): array { * Escapes a string for use in a URL pattern component. * * @since 6.8.0 - * @see https://urlpattern.spec.whatwg.org/#escape-a-pattern-string + * @link https://urlpattern.spec.whatwg.org/#escape-a-pattern-string * * @param string $str String to be escaped. * @return string String with backslashes added where required. diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php index 360acf5d4689f..2b6ad4c8feea5 100644 --- a/src/wp-includes/deprecated.php +++ b/src/wp-includes/deprecated.php @@ -6328,12 +6328,12 @@ function wp_get_global_styles_custom_css() { * that can use dynamic data (modify the stylesheet depending on some option, * settings depending on user permissions, etc.). * See some of the existing hooks to modify theme.json behavior: - * @see https://make.wordpress.org/core/2022/10/10/filters-for-theme-json-data/ + * @link https://make.wordpress.org/core/2022/10/10/filters-for-theme-json-data/ * * A different alternative considered was to invalidate the cache upon certain * events such as options add/update/delete, user meta, etc. * It was judged not enough, hence this approach. - * @see https://github.com/WordPress/gutenberg/pull/45372 + * @link https://github.com/WordPress/gutenberg/pull/45372 */ $cache_key = 'wp_get_global_styles_custom_css'; $cache_group = 'theme_json'; @@ -6462,9 +6462,9 @@ function wp_add_editor_classic_theme_styles( $editor_settings ) { * @deprecated 6.9.0 Use wp_enqueue_img_auto_sizes_contain_css_fix() instead. * @see wp_enqueue_img_auto_sizes_contain_css_fix() * - * @see https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size - * @see https://core.trac.wordpress.org/ticket/62413 - * @see https://core.trac.wordpress.org/ticket/62731 + * @link https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size + * @link https://core.trac.wordpress.org/ticket/62413 + * @link https://core.trac.wordpress.org/ticket/62731 */ function wp_print_auto_sizes_contain_css_fix() { _deprecated_function( __FUNCTION__, '6.9.0', 'wp_enqueue_img_auto_sizes_contain_css_fix' ); diff --git a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php index 2f51482eee052..264eb12b19da4 100644 --- a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php +++ b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php @@ -30,7 +30,7 @@ * * @access private * - * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements + * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements * @see WP_HTML_Processor */ class WP_HTML_Active_Formatting_Elements { @@ -94,7 +94,7 @@ public function current_node() { * > formatting from "leaking" into applet, object, marquee, template, * > td, th, and caption elements. * - * @see https://html.spec.whatwg.org/#concept-parser-marker + * @link https://html.spec.whatwg.org/#concept-parser-marker * * @since 6.7.0 */ @@ -107,7 +107,7 @@ public function insert_marker(): void { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements + * @link https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements * * @param WP_HTML_Token $token Push this node onto the stack. */ @@ -214,7 +214,7 @@ public function walk_up() { * > The list has been cleared up to the last marker. * > 4. Go to step 1. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-decoder.php b/src/wp-includes/html-api/class-wp-html-decoder.php index bd62f311aef13..851f81832b859 100644 --- a/src/wp-includes/html-api/class-wp-html-decoder.php +++ b/src/wp-includes/html-api/class-wp-html-decoder.php @@ -295,7 +295,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * This comment is here to note and explain why there's no check to * remove these characters or replace them. * - * @see https://infra.spec.whatwg.org/#noncharacter + * @link https://infra.spec.whatwg.org/#noncharacter */ /* @@ -418,7 +418,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * * @since 6.6.0 * - * @see https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. + * @link https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. * * @param int $code_point Which code point to convert. * @return string Converted code point, or `�` if invalid. diff --git a/src/wp-includes/html-api/class-wp-html-doctype-info.php b/src/wp-includes/html-api/class-wp-html-doctype-info.php index 1e57afb3fd550..b3c95aae42cd4 100644 --- a/src/wp-includes/html-api/class-wp-html-doctype-info.php +++ b/src/wp-includes/html-api/class-wp-html-doctype-info.php @@ -33,20 +33,20 @@ * > document ensures that the browser makes a best-effort attempt at following the * > relevant specifications. * - * @see https://html.spec.whatwg.org/#the-doctype + * @link https://html.spec.whatwg.org/#the-doctype * * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, * and an indication of which document compatibility mode they would imply if an HTML parser * hadn't already determined it from other information. * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how * to interpret the various tags and entities within a document. Its role in HTML diverged * from how it was used in SGML and no meaning should be back-read into HTML based on how it * is used in SGML, XML, or XHTML documents. * - * @see https://www.iso.org/standard/16387.html + * @link https://www.iso.org/standard/16387.html * * @since 6.7.0 * @@ -65,7 +65,7 @@ class WP_HTML_Doctype_Info { * * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -89,7 +89,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -119,7 +119,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ ╰──── system identifier ────╯ * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -144,7 +144,7 @@ class WP_HTML_Doctype_Info { * before the HTML element has been opened and before finding any other * DOCTYPE declaration tokens. * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @since 6.7.0 * @@ -166,7 +166,7 @@ class WP_HTML_Doctype_Info { * > and system identifier must be marked as missing (which is a distinct state from the * > empty string), and the force-quirks flag must be set to off (its other state is on). * - * @see https://html.spec.whatwg.org/multipage/parsing.html#tokenization + * @link https://html.spec.whatwg.org/multipage/parsing.html#tokenization * * @since 6.7.0 * @@ -422,7 +422,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * This parser combines the rules for parsing DOCTYPE tokens found in the HTML * specification for the DOCTYPE related tokenizer states. * - * @see https://html.spec.whatwg.org/#doctype-state + * @link https://html.spec.whatwg.org/#doctype-state */ /* @@ -447,8 +447,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { /* * Perform newline normalization and ensure the $end value is correct after normalization. * - * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @see https://infra.spec.whatwg.org/#normalize-newlines + * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @link https://infra.spec.whatwg.org/#normalize-newlines */ $doctype_html = str_replace( "\r\n", "\n", $doctype_html ); $doctype_html = str_replace( "\r", "\n", $doctype_html ); @@ -477,7 +477,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Parsing effectively begins in "Before DOCTYPE name state". Ignore whitespace and * proceed to the next state. * - * @see https://html.spec.whatwg.org/#before-doctype-name-state + * @link https://html.spec.whatwg.org/#before-doctype-name-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at ); @@ -500,7 +500,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Find a case-insensitive match for "PUBLIC" or "SYSTEM" at this point. * Otherwise, set force-quirks and enter bogus DOCTYPE state (skip the rest of the doctype). * - * @see https://html.spec.whatwg.org/#after-doctype-name-state + * @link https://html.spec.whatwg.org/#after-doctype-name-state */ if ( $at + 6 >= $end ) { return new self( $doctype_name, $doctype_public_id, $doctype_system_id, true ); @@ -547,8 +547,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE public identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @see https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state - * @see https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; @@ -577,7 +577,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * * Advance through whitespace between public and system identifiers. * - * @see https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state + * @link https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at, $end - $at ); if ( $at >= $end ) { @@ -590,8 +590,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE system identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @see https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state - * @see https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 69e3e5d2c7557..cb0c0aab3f081 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1383,7 +1383,7 @@ public function release_bookmark( $name ): bool { * * @since 6.3.2 * - * @see https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm + * @link https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm * * @param string $tag_name The uppercase tag name which will close the RAWTEXT region. * @return bool Whether an end to the RAWTEXT region was found before the end of the document. @@ -1402,7 +1402,7 @@ private function skip_rawtext( string $tag_name ): bool { * * @since 6.2.0 * - * @see https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state + * @link https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state * * @param string $tag_name The uppercase tag name which will close the RCDATA region. * @return bool Whether an end to the RCDATA region was found before the end of the document. @@ -1631,17 +1631,17 @@ private function skip_script_data(): bool { /** * These characters trigger state transitions of interest: * - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} + * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} + * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} + * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} + * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} * * The "\r" character is not present in the above references. However, "\r" must be * treated the same as "\n". This is because the HTML Standard requires newline * normalization during preprocessing which applies this replacement. * - * - @see https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream - * - @see https://infra.spec.whatwg.org/#normalize-newlines + * - @link https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream + * - @link https://infra.spec.whatwg.org/#normalize-newlines */ '>' !== $c && ' ' !== $c && @@ -1729,7 +1729,7 @@ private function parse_next_tag(): bool { * At this point the parser checks if this is one of those cases and if it is * will continue searching for the next "<" in search of a token boundary. * - * @see https://html.spec.whatwg.org/#tag-open-state + * @link https://html.spec.whatwg.org/#tag-open-state */ if ( 1 !== strspn( $html, '!/?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $at + 1, 1 ) ) { ++$at; @@ -2050,7 +2050,7 @@ private function parse_next_tag(): bool { * @todo Processing instruction nodes in SGML may contain any kind of markup. XML defines a * special case with `` syntax, but the `?` is part of the bogus comment. * - * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget + * @link https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget */ if ( $this->token_length >= 5 && '?' === $html[ $closer_at - 1 ] ) { $comment_text = substr( $html, $this->token_starts_at + 2, $this->token_length - 4 ); @@ -2140,7 +2140,7 @@ private function parse_next_attribute(): bool { * Treat the equal sign as a part of the attribute * name if it is the first encountered byte. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state + * @link https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state */ $name_length = '=' === $this->html[ $this->bytes_already_parsed ] ? 1 + strcspn( $this->html, "=/> \t\f\r\n", $this->bytes_already_parsed + 1 ) @@ -2217,7 +2217,7 @@ private function parse_next_attribute(): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $comparable_name = strtolower( $attribute_name ); @@ -2830,7 +2830,7 @@ public function get_attribute( $name ) { * * @since 6.2.0 * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -3347,7 +3347,7 @@ public function is_tag_closer(): bool { * appears then the HTML parser will treat it as an opening tag with no * attributes. The BR tag is unique in this way. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @link https://html.spec.whatwg.org/#parsing-main-inbody */ 'BR' !== $this->get_tag() ); @@ -3646,8 +3646,8 @@ public function get_modifiable_text(): string { * it's important to apply the pre-processing steps, which is * normalizing newlines. * - * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @see https://infra.spec.whatwg.org/#normalize-newlines + * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @link https://infra.spec.whatwg.org/#normalize-newlines */ $text = str_replace( "\r\n", "\n", $text ); $text = str_replace( "\r", "\n", $text ); @@ -3912,7 +3912,7 @@ static function ( $tag_match ) { * * Only 'javascript' and 'json' content types are currently recognized. * - * @see https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element + * @link https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element * * @since 7.0.0 * @@ -3980,8 +3980,8 @@ private function get_script_content_type(): ?string { * > - text/x-ecmascript * > - text/x-javascript * - * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match - * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type + * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match + * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type */ switch ( $type_string ) { case 'application/ecmascript': @@ -4183,8 +4183,8 @@ private function get_script_content_type(): ?string { * as “tag-name-terminating characters.” This sequence forms the start * of what could be a SCRIPT opening or closing tag. * - * @see https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications + * @link https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements + * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications * @see wp_html_api_script_element_escaping_diagram_source() * * @since 7.0.0 @@ -4292,7 +4292,7 @@ public function set_attribute( $name, $value ): bool { * - greater-than “>” * - ampersand “&” * - * @see https://html.spec.whatwg.org/#attributes-2 + * @link https://html.spec.whatwg.org/#attributes-2 */ if ( 0 === $name_length || @@ -4333,7 +4333,7 @@ public function set_attribute( $name, $value ): bool { /** * Escape attribute values appropriately. * - * @see https://html.spec.whatwg.org/#attributes-3 + * @link https://html.spec.whatwg.org/#attributes-3 */ $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes(), true ) ? esc_url( $value ) @@ -4362,7 +4362,7 @@ public function set_attribute( $name, $value ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $comparable_name = strtolower( $name ); @@ -4438,7 +4438,7 @@ public function remove_attribute( $name ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $name = strtolower( $name ); @@ -4975,7 +4975,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > described by the modern HTML and CSS specifications. * * @see self::$compat_mode - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * @@ -4991,7 +4991,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > built before the widespread adoption of web standards. * * @see self::$compat_mode - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 5d350b1a18951..8834c3d17aa45 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -2088,9 +2088,9 @@ function wp_sizes_attribute_includes_valid_auto( string $sizes_attr ): bool { * * @since 6.9.0 * - * @see https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size - * @see https://core.trac.wordpress.org/ticket/62413 - * @see https://core.trac.wordpress.org/ticket/62731 + * @link https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size + * @link https://core.trac.wordpress.org/ticket/62413 + * @link https://core.trac.wordpress.org/ticket/62731 */ function wp_enqueue_img_auto_sizes_contain_css_fix(): void { // Back-compat for plugins that disable functionality by unhooking this action. diff --git a/src/wp-includes/nav-menu-template.php b/src/wp-includes/nav-menu-template.php index d90fdfa8061ab..e48fa8795a111 100644 --- a/src/wp-includes/nav-menu-template.php +++ b/src/wp-includes/nav-menu-template.php @@ -651,7 +651,7 @@ function _nav_menu_item_id_use_once( $id, $item ) { * WordPress 3.0.0 so this needs to allow for cases in which the filter is * called without them. * - * @see https://core.trac.wordpress.org/ticket/56926 + * @link https://core.trac.wordpress.org/ticket/56926 * * @since 6.2.0 * diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 2dbdd584b385d..05229149249c9 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2381,7 +2381,7 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) * end in a period. To avoid the ambiguity, ensure that the login is not the last query * arg in the URL. If moving it to the end, a trailing period will need to be escaped. * - * @see https://core.trac.wordpress.org/tickets/42957 + * @link https://core.trac.wordpress.org/tickets/42957 */ $message .= network_site_url( 'wp-login.php?login=' . rawurlencode( $user->user_login ) . "&key=$key&action=rp", 'login' ) . "\r\n"; diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php index 75e72a442f987..74337bfd2442c 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php @@ -668,7 +668,7 @@ public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CRE * * @since 4.7.0 * - * @see https://github.com/WP-API/WP-API/issues/1585 + * @link https://github.com/WP-API/WP-API/issues/1585 * * @todo Remove this in favour of https://core.trac.wordpress.org/ticket/34659 * diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php index 0ac6c8b93d5dd..e7d6b97934a84 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php @@ -208,7 +208,7 @@ protected function permissions_check( $request ) { * slugs cannot contain slashes. * * @since 5.9.0 - * @see https://core.trac.wordpress.org/ticket/54507 + * @link https://core.trac.wordpress.org/ticket/54507 * * @param string $id Template ID. * @return string Sanitized template ID. diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index ab980b35e42f0..f2e96a1268be3 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -171,7 +171,7 @@ function wp_default_packages_vendor( $scripts ) { * These scripts enable hot module replacement (HMR) for block development * when using `wp-scripts start --hot`. * - * @see https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts#start + * @link https://github.com/WordPress/gutenberg/tree/trunk/packages/scripts#start * * @since 6.0.0 * @@ -3913,7 +3913,7 @@ public function remove() { * * @since 6.9.0 * - * @see https://html.spec.whatwg.org/#concept-domstringmap-pairs + * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * @see \wp_html_custom_data_attribute_name() * * @param string $html_attribute_name Raw attribute name as found in the source HTML. @@ -3940,7 +3940,7 @@ function wp_js_dataset_name( string $html_attribute_name ): ?string { * > U+002D HYPHEN-MINUS character (-) and replace the character that * > followed it by the same character converted to ASCII uppercase. * - * @see https://html.spec.whatwg.org/#concept-domstringmap-pairs + * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs */ $custom_name = ''; $at = 5; @@ -3991,7 +3991,7 @@ function wp_js_dataset_name( string $html_attribute_name ): ?string { * * @since 6.9.0 * - * @see https://html.spec.whatwg.org/#concept-domstringmap-pairs + * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * @see \wp_js_dataset_name() * * @param string $js_dataset_name Name of JS `dataset` property to transform. diff --git a/src/wp-includes/speculative-loading.php b/src/wp-includes/speculative-loading.php index 319e04d36ddde..488a7a2e403a4 100644 --- a/src/wp-includes/speculative-loading.php +++ b/src/wp-includes/speculative-loading.php @@ -43,7 +43,7 @@ function wp_get_speculation_rules_configuration(): ?array { * indicating that speculative loading is entirely disabled. * * @since 6.8.0 - * @see https://developer.chrome.com/docs/web-platform/prerender-pages + * @link https://developer.chrome.com/docs/web-platform/prerender-pages * * @param array|null $config Associative array with 'mode' and 'eagerness' keys, or `null`. The * default value for both of the keys is 'auto'. Other possible values From 5792687c4212706239f66ff317b78994b870d3f4 Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Wed, 4 Feb 2026 16:11:29 +0600 Subject: [PATCH 02/16] Fix malformed @link tags in WP_HTML_Tag_Processor --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index cb0c0aab3f081..2ce16fb7a5c74 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1631,10 +1631,10 @@ private function skip_script_data(): bool { /** * These characters trigger state transitions of interest: * - * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} - * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} - * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} - * - @link {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} + * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state + * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state + * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state + * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state * * The "\r" character is not present in the above references. However, "\r" must be * treated the same as "\n". This is because the HTML Standard requires newline From aee51241aab619ad841b98edd42eefd6747c89bc Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Wed, 4 Feb 2026 16:28:28 +0600 Subject: [PATCH 03/16] docs: Replace `@see` with `@link` for external URLs in PHPDoc comments. --- .../class-wp-http-requests-hooks.php | 2 +- src/wp-includes/compat-utf8.php | 4 +- src/wp-includes/compat.php | 4 +- .../class-wp-customize-custom-css-setting.php | 2 +- .../global-styles-and-settings.php | 2 +- .../html-api/class-wp-html-open-elements.php | 8 +-- .../class-wp-html-processor-state.php | 60 +++++++++---------- .../html-api/class-wp-html-processor.php | 2 +- .../html-api/class-wp-html-token.php | 2 +- src/wp-includes/style-engine.php | 4 +- src/wp-includes/theme-previews.php | 2 +- src/wp-includes/utf8.php | 6 +- 12 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/wp-includes/class-wp-http-requests-hooks.php b/src/wp-includes/class-wp-http-requests-hooks.php index 80e4eb7ef4b9f..541ccc9a661a1 100644 --- a/src/wp-includes/class-wp-http-requests-hooks.php +++ b/src/wp-includes/class-wp-http-requests-hooks.php @@ -64,7 +64,7 @@ public function dispatch( $hook, $parameters = array() ) { * * This action maps Requests internal hook to a native WordPress action. * - * @see https://github.com/WordPress/Requests/blob/master/docs/hooks.md + * @link https://github.com/WordPress/Requests/blob/master/docs/hooks.md * * @since 4.7.0 * diff --git a/src/wp-includes/compat-utf8.php b/src/wp-includes/compat-utf8.php index 20ebdfc3144e7..daeabb932b8e4 100644 --- a/src/wp-includes/compat-utf8.php +++ b/src/wp-includes/compat-utf8.php @@ -120,7 +120,7 @@ function _wp_scan_utf8( string $bytes, int &$at, int &$invalid_length, ?int $max * │ U+100000..U+10FFFF │ F4 │ 80..8F │ 80..BF │ 80..BF │ * ╰─────────────────────┴────────────┴──────────────┴─────────────┴──────────────╯ * - * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/#G27506 + * @link https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/#G27506 */ // Valid two-byte code points. @@ -197,7 +197,7 @@ function _wp_scan_utf8( string $bytes, int &$at, int &$invalid_length, ?int $max * > Furthermore, this practice can be defined consistently for better * > interoperability between different implementations of conversion. * - * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-5/#G40630 + * @link https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-5/#G40630 */ invalid_utf8: $at = $i; diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php index 3ac1372fdca1e..fa5340b61e3c9 100644 --- a/src/wp-includes/compat.php +++ b/src/wp-includes/compat.php @@ -18,7 +18,7 @@ * * @since 0.71 * - * @see https://php.net/manual/en/function.gettext.php + * @link https://php.net/manual/en/function.gettext.php * * @param string $message The message being translated. * @return string @@ -309,7 +309,7 @@ function utf8_decode( $utf8_text ): string { * * An array is considered a list if its keys consist of consecutive numbers from 0 to count($array)-1. * - * @see https://github.com/symfony/polyfill-php81/tree/main + * @link https://github.com/symfony/polyfill-php81/tree/main * * @since 6.5.0 * diff --git a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php index 58897a7e72742..ed825618b2dc1 100644 --- a/src/wp-includes/customize/class-wp-customize-custom-css-setting.php +++ b/src/wp-includes/customize/class-wp-customize-custom-css-setting.php @@ -201,7 +201,7 @@ public function validate( $value ) { * that would have broken out of the containing STYLE element, thus * corrupting the page and potentially introducing security issues. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#rawtext-end-tag-name-state + * @link https://html.spec.whatwg.org/multipage/parsing.html#rawtext-end-tag-name-state */ $possible_style_close_tag = 0 === substr_compare( $css, diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index d50ee14e22015..c19140012c2e0 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -57,7 +57,7 @@ function wp_get_global_settings( $path = array(), $context = array() ) { * A different alternative considered was to invalidate the cache upon certain * events such as options add/update/delete, user meta, etc. * It was judged not enough, hence this approach. - * See https://github.com/WordPress/gutenberg/pull/45372 + * @link https://github.com/WordPress/gutenberg/pull/45372 */ $cache_group = 'theme_json'; $cache_key = 'wp_get_global_settings_' . $origin; diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 210492ab9af08..bb0655c8714b0 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -439,7 +439,7 @@ public function has_element_in_button_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Full implementation. * - * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-table-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -470,7 +470,7 @@ public function has_element_in_table_scope( string $tag_name ): bool { * @since 6.4.0 Stub implementation (throws). * @since 6.7.0 Full implementation. * - * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-select-scope * * @param string $tag_name Name of tag to check. * @return bool Whether the given element is in SELECT scope. @@ -497,7 +497,7 @@ public function has_element_in_select_scope( string $tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @return bool Whether a P is in BUTTON scope. */ @@ -510,7 +510,7 @@ public function has_p_in_button_scope(): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @return bool Whether a node was popped off of the stack. */ diff --git a/src/wp-includes/html-api/class-wp-html-processor-state.php b/src/wp-includes/html-api/class-wp-html-processor-state.php index b257aa809da75..779ac35fcab0b 100644 --- a/src/wp-includes/html-api/class-wp-html-processor-state.php +++ b/src/wp-includes/html-api/class-wp-html-processor-state.php @@ -32,7 +32,7 @@ class WP_HTML_Processor_State { * is added to the parser for more modes, add them here * following the same naming and value pattern. * - * @see https://html.spec.whatwg.org/#the-insertion-mode + * @link https://html.spec.whatwg.org/#the-insertion-mode */ /** @@ -40,7 +40,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -52,7 +52,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -64,7 +64,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-beforehead + * @link https://html.spec.whatwg.org/#parsing-main-beforehead * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -76,7 +76,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inhead + * @link https://html.spec.whatwg.org/#parsing-main-inhead * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -88,7 +88,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -100,7 +100,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterhead + * @link https://html.spec.whatwg.org/#parsing-main-afterhead * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -112,7 +112,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -124,7 +124,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intable + * @link https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -136,7 +136,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -148,7 +148,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incaption + * @link https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -160,7 +160,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incolumngroup + * @link https://html.spec.whatwg.org/#parsing-main-incolumngroup * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -172,7 +172,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intablebody + * @link https://html.spec.whatwg.org/#parsing-main-intablebody * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -184,7 +184,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inrow + * @link https://html.spec.whatwg.org/#parsing-main-inrow * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -196,7 +196,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incell + * @link https://html.spec.whatwg.org/#parsing-main-incell * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -208,7 +208,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inselect + * @link https://html.spec.whatwg.org/#parsing-main-inselect * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -220,7 +220,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inselectintable + * @link https://html.spec.whatwg.org/#parsing-main-inselectintable * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -232,7 +232,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intemplate + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -244,7 +244,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterbody + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -256,7 +256,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inframeset + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -268,7 +268,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterframeset + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -280,7 +280,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -292,7 +292,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode * * @var string @@ -304,7 +304,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes + * @link https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes * * @var array */ @@ -317,7 +317,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @var WP_HTML_Open_Elements */ @@ -330,7 +330,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements + * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements * * @var WP_HTML_Active_Formatting_Elements */ @@ -350,7 +350,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#insertion-mode + * @link https://html.spec.whatwg.org/#insertion-mode * * @var string */ @@ -403,7 +403,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer + * @link https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer * * @var WP_HTML_Token|null */ @@ -419,7 +419,7 @@ class WP_HTML_Processor_State { * * @todo This may be invalidated by a seek operation. * - * @see https://html.spec.whatwg.org/#form-element-pointer + * @link https://html.spec.whatwg.org/#form-element-pointer * * @since 6.7.0 * @@ -434,7 +434,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#frameset-ok-flag + * @link https://html.spec.whatwg.org/#frameset-ok-flag * * @var bool */ diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 55f955f2c1a9a..c5f32560b6aee 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -467,7 +467,7 @@ function ( WP_HTML_Token $token ): void { * fragment. Special care must be taken when processing fragments that are expected to appear * in specific contexts. SVG and TABLE are good examples, but there are others. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm + * @link https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm * * @since 6.8.0 * diff --git a/src/wp-includes/html-api/class-wp-html-token.php b/src/wp-includes/html-api/class-wp-html-token.php index d5e51ac29007f..44ce93c107567 100644 --- a/src/wp-includes/html-api/class-wp-html-token.php +++ b/src/wp-includes/html-api/class-wp-html-token.php @@ -54,7 +54,7 @@ class WP_HTML_Token { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#self-closing-flag + * @link https://html.spec.whatwg.org/#self-closing-flag * * @var bool */ diff --git a/src/wp-includes/style-engine.php b/src/wp-includes/style-engine.php index 53627612f9504..5d1e5bfa95d30 100644 --- a/src/wp-includes/style-engine.php +++ b/src/wp-includes/style-engine.php @@ -32,8 +32,8 @@ * * @since 6.1.0 * - * @see https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/theme-json-living/#styles - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ + * @link https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/theme-json-living/#styles + * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ * * @param array $block_styles The style object. * @param array $options { diff --git a/src/wp-includes/theme-previews.php b/src/wp-includes/theme-previews.php index 287559c984360..8b0695cd054f3 100644 --- a/src/wp-includes/theme-previews.php +++ b/src/wp-includes/theme-previews.php @@ -61,7 +61,7 @@ function wp_attach_theme_preview_middleware() { * Sets the JavaScript global WP_BLOCK_THEME_ACTIVATE_NONCE containing the nonce * required to activate a theme. For use within the site editor. * - * @see https://github.com/WordPress/gutenberg/pull/41836 + * @link https://github.com/WordPress/gutenberg/pull/41836 * * @since 6.3.0 * @access private diff --git a/src/wp-includes/utf8.php b/src/wp-includes/utf8.php index da10838f233d1..8fb92fd6c6945 100644 --- a/src/wp-includes/utf8.php +++ b/src/wp-includes/utf8.php @@ -147,9 +147,9 @@ function wp_scrub_utf8( $text ) { * - U+FFFE–U+FFFF * - U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, …, U+10FFFE, U+10FFFF * - * @see https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-23/#G12612 - * @see https://www.w3.org/TR/xml/#charsets - * @see https://html.spec.whatwg.org/#attributes-2 + * @link https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-23/#G12612 + * @link https://www.w3.org/TR/xml/#charsets + * @link https://html.spec.whatwg.org/#attributes-2 * * @since 6.9.0 * From f4bc59d071ac753c47ba7535232367cbed4c00b3 Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Thu, 16 Jul 2026 08:53:05 +0600 Subject: [PATCH 04/16] Docs: Replace remaining incorrect @see usage with @link Comprehensive pass converting all `@see ` occurrences to `@link ` across WordPress core PHP, where @see was incorrectly used for URLs. Symbol references such as `@see Class::method()` are unchanged. Bundled external libraries (PHPMailer, SimplePie, PSR/Nyholm) are intentionally excluded. --- .../twentyfifteen/inc/custom-header.php | 4 +- .../class-twentytwenty-walker-comment.php | 10 +-- src/wp-includes/blocks.php | 2 +- 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/class-wp-script-modules.php | 6 +- src/wp-includes/class-wp-theme-json.php | 12 +-- src/wp-includes/class-wpdb.php | 2 +- src/wp-includes/formatting.php | 10 +-- src/wp-includes/functions.php | 24 +++--- .../global-styles-and-settings.php | 4 +- .../html-api/class-wp-html-decoder.php | 4 +- .../html-api/class-wp-html-open-elements.php | 18 ++-- .../html-api/class-wp-html-processor.php | 82 +++++++++---------- src/wp-includes/kses.php | 4 +- src/wp-includes/pomo/plural-forms.php | 2 +- src/wp-includes/user.php | 2 +- src/wp-includes/utf8.php | 4 +- src/wp-load.php | 2 +- 22 files changed, 104 insertions(+), 104 deletions(-) diff --git a/src/wp-content/themes/twentyfifteen/inc/custom-header.php b/src/wp-content/themes/twentyfifteen/inc/custom-header.php index 699d72cec7b31..68ebb0a398f62 100644 --- a/src/wp-content/themes/twentyfifteen/inc/custom-header.php +++ b/src/wp-content/themes/twentyfifteen/inc/custom-header.php @@ -146,7 +146,7 @@ function twentyfifteen_header_style() { /* * No shorthand so the Customizer can override individual properties. - * @see https://core.trac.wordpress.org/ticket/31460 + * @link https://core.trac.wordpress.org/ticket/31460 */ background-image: url(); background-repeat: no-repeat; @@ -162,7 +162,7 @@ function twentyfifteen_header_style() { /* * No shorthand so the Customizer can override individual properties. - * @see https://core.trac.wordpress.org/ticket/31460 + * @link https://core.trac.wordpress.org/ticket/31460 */ background-image: url(); background-repeat: no-repeat; diff --git a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php index 8012677ce8e76..e9172810a7992 100644 --- a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php +++ b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php @@ -22,11 +22,11 @@ class TwentyTwenty_Walker_Comment extends Walker_Comment { * @since Twenty Twenty 1.0 * * @see wp_list_comments() - * @see https://developer.wordpress.org/reference/functions/get_comment_author_url/ - * @see https://developer.wordpress.org/reference/functions/get_comment_author/ - * @see https://developer.wordpress.org/reference/functions/get_avatar/ - * @see https://developer.wordpress.org/reference/functions/get_comment_reply_link/ - * @see https://developer.wordpress.org/reference/functions/get_edit_comment_link/ + * @link https://developer.wordpress.org/reference/functions/get_comment_author_url/ + * @link https://developer.wordpress.org/reference/functions/get_comment_author/ + * @link https://developer.wordpress.org/reference/functions/get_avatar/ + * @link https://developer.wordpress.org/reference/functions/get_comment_reply_link/ + * @link https://developer.wordpress.org/reference/functions/get_edit_comment_link/ * * @param WP_Comment $comment Comment to display. * @param int $depth Depth of the current comment. diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 41e11f4a2a75f..e695123acc4db 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -2781,7 +2781,7 @@ function build_query_vars_from_query_block( $block, $page ) { * Logic should be used before hand to determine if WP_Query should be used in the event that the array * being passed to post__in is empty. * - * @see https://core.trac.wordpress.org/ticket/28099 + * @link https://core.trac.wordpress.org/ticket/28099 */ $query['post__in'] = ! empty( $sticky ) ? $sticky : array( 0 ); $query['ignore_sticky_posts'] = 1; 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 1bffd81324857..015aff37b5037 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 cde3910e74353..36ec12e75f48d 100644 --- a/src/wp-includes/blocks/post-navigation-link.php +++ b/src/wp-includes/blocks/post-navigation-link.php @@ -105,8 +105,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/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 154c951513047..b16624ea8ea81 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -1101,9 +1101,9 @@ public function print_script_module_data(): void { * is not encoded in UTF-8 then it's not safe to include those literals. They must * be escaped to avoid encoding issues. * - * @see https://www.rfc-editor.org/rfc/rfc8259.html for details on encoding requirements. - * @see https://www.php.net/manual/en/json.constants.php for details on these constants. - * @see https://html.spec.whatwg.org/#script-data-state for details on script tag parsing. + * @link https://www.rfc-editor.org/rfc/rfc8259.html for details on encoding requirements. + * @link https://www.php.net/manual/en/json.constants.php for details on these constants. + * @link https://html.spec.whatwg.org/#script-data-state for details on script tag parsing. */ $json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS; if ( ! is_utf8_charset() ) { diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 212c52023a621..3286d2344eb90 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -1507,7 +1507,7 @@ protected static function append_to_selector( $selector, $to_append ) { * there should be no way for a comma to mean anything other than a * comma token. The exception are syntax errors, which are not handled here. * - * @see https://www.w3.org/TR/css-syntax-3/#parse-comma-separated-list-of-component-values + * @link https://www.w3.org/TR/css-syntax-3/#parse-comma-separated-list-of-component-values */ if ( strlen( $selector ) === strcspn( $selector, '/\'"(<\\' ) ) { return preg_replace( '~[ \t\n]*,[ \t\n]*~', "{$to_append}, ", trim( $selector, " \t\n" ) ) . $to_append; @@ -1556,7 +1556,7 @@ protected static function prepend_to_selector( $selector, $to_prepend ) { * there should be no way for a comma to mean anything other than a * comma token. The exception are syntax errors, which are not handled here. * - * @see https://www.w3.org/TR/css-syntax-3/#parse-comma-separated-list-of-component-values + * @link https://www.w3.org/TR/css-syntax-3/#parse-comma-separated-list-of-component-values */ if ( strlen( $selector ) === strcspn( $selector, '/\'"(<\\' ) ) { return $to_prepend . preg_replace( '~[ \t\n]*,[ \t\n]*~', ", {$to_prepend}", trim( $selector, " \t\n" ) ); @@ -1601,8 +1601,8 @@ protected static function prepend_to_selector( $selector, $to_prepend ) { * // Comments stay with the selector they follow. * array( '.a /* a, the first *\/', '.b' ) === self::split_selector_list( '.a /* a, the first *\/,.b' ); * - * @see https://www.w3.org/TR/selectors/#parse-selector - * @see https://www.w3.org/TR/css-syntax-3/ + * @link https://www.w3.org/TR/selectors/#parse-selector + * @link https://www.w3.org/TR/css-syntax-3/ * * @since 7.1.0 * @@ -1709,8 +1709,8 @@ protected static function split_selector_list( $selector ): array { * > not included in this definition, as they are converted * > to U+000A LINE FEED during preprocessing. * - * @see https://www.w3.org/TR/css-syntax/#whitespace - * @see https://www.w3.org/TR/css-syntax/#newline + * @link https://www.w3.org/TR/css-syntax/#whitespace + * @link https://www.w3.org/TR/css-syntax/#newline */ $selectors[] = trim( substr( $selector, $was_at, $next_at - $was_at ), " \t\n" ); $at = $next_at + 1; diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php index e9d7f986d5801..79ebc966a6b37 100644 --- a/src/wp-includes/class-wpdb.php +++ b/src/wp-includes/class-wpdb.php @@ -1980,7 +1980,7 @@ public function db_connect( $allow_bail = true ) { /* * If using the `mysqlnd` library, the IPv6 address needs to be enclosed * in square brackets, whereas it doesn't while using the `libmysqlclient` library. - * @see https://bugs.php.net/bug.php?id=67563 + * @link https://bugs.php.net/bug.php?id=67563 */ if ( $is_ipv6 && extension_loaded( 'mysqlnd' ) ) { $host = "[$host]"; diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index acacb131a627b..b187d9f8096b5 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2051,9 +2051,9 @@ function sanitize_file_name( $filename ) { * The “Zs” in the pattern selects characters in the `Space_Separator` * category, which is what Unicode considers space characters. * - * @see https://www.unicode.org/reports/tr44/#General_Category_Values - * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-6/#G17548 - * @see https://www.php.net/manual/en/regexp.reference.unicode.php + * @link https://www.unicode.org/reports/tr44/#General_Category_Values + * @link https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-6/#G17548 + * @link https://www.php.net/manual/en/regexp.reference.unicode.php */ $filename = preg_replace( '#\p{Zs}#siu', ' ', $filename ); } @@ -2610,8 +2610,8 @@ function force_balance_tags( $text ) { * To get the pattern as a string without the comments paste into a PHP * REPL like `php -a`. * - * @see https://html.spec.whatwg.org/#elements-2 - * @see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name + * @link https://html.spec.whatwg.org/#elements-2 + * @link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name * * @example * ~# php -a diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 6a7333d317b71..10ce50136f517 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1055,7 +1055,7 @@ function build_query( $data ) { * @since 3.2.0 * @access private * - * @see https://www.php.net/manual/en/function.http-build-query.php + * @link https://www.php.net/manual/en/function.http-build-query.php * * @param array|object $data An array or object of data. Converted to array. * @param string $prefix Optional. Numeric index. If set, start parameter numbering with it. @@ -2304,8 +2304,8 @@ function wp_is_writable( $path ) { * * @since 2.8.0 * - * @see https://bugs.php.net/bug.php?id=27609 - * @see https://bugs.php.net/bug.php?id=30931 + * @link https://bugs.php.net/bug.php?id=27609 + * @link https://bugs.php.net/bug.php?id=30931 * * @param string $path Windows path to check for write-ability. * @return bool Whether the path is writable. @@ -3226,8 +3226,8 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { * finfo_file() can return duplicate mime type for Google docs, * this conditional reduces it to a single instance. * - * @see https://bugs.php.net/bug.php?id=77784 - * @see https://core.trac.wordpress.org/ticket/57898 + * @link https://bugs.php.net/bug.php?id=77784 + * @link https://core.trac.wordpress.org/ticket/57898 */ if ( 2 === substr_count( $real_mime, $google_docs_type ) ) { $real_mime = $google_docs_type; @@ -6920,7 +6920,7 @@ function wp_timezone_choice( $selected_zone, $locale = null ) { * @since 2.8.0 * @access private * - * @see https://core.trac.wordpress.org/ticket/8497 + * @link https://core.trac.wordpress.org/ticket/8497 * * @param string $str Header comment to clean up. * @return string Cleaned header comment. @@ -7130,8 +7130,8 @@ function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.V * * @since 3.0.0 * - * @see https://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx - * @see https://src.chromium.org/viewvc/chrome?view=rev&revision=6985 + * @link https://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx + * @link https://src.chromium.org/viewvc/chrome?view=rev&revision=6985 */ function send_nosniff_header() { header( 'X-Content-Type-Options: nosniff' ); @@ -7244,8 +7244,8 @@ function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = ar * * @since 3.1.3 * - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-ancestors + * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options + * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/frame-ancestors */ function send_frame_options_header() { if ( ! headers_sent() ) { @@ -7323,7 +7323,7 @@ function wp_allowed_protocols() { * * @since 3.4.0 * - * @see https://core.trac.wordpress.org/ticket/19589 + * @link https://core.trac.wordpress.org/ticket/19589 * * @param string $ignore_class Optional. A class to ignore all function calls within - useful * when you want to just give info about the callee. Default null. @@ -7691,7 +7691,7 @@ function is_utf8_charset( $blog_charset = null ) { * @since 3.6.0 * @access private * - * @see https://core.trac.wordpress.org/ticket/23688 + * @link https://core.trac.wordpress.org/ticket/23688 * * @param string $charset A charset name, e.g. "UTF-8", "Windows-1252", "SJIS". * @return string The canonical form of the charset. diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index c91959996ff44..f54cf2ad16988 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -161,12 +161,12 @@ function wp_get_global_stylesheet( $types = array() ) { * that can use dynamic data (modify the stylesheet depending on some option, * settings depending on user permissions, etc.). * See some of the existing hooks to modify theme.json behavior: - * @see https://make.wordpress.org/core/2022/10/10/filters-for-theme-json-data/ + * @link https://make.wordpress.org/core/2022/10/10/filters-for-theme-json-data/ * * A different alternative considered was to invalidate the cache upon certain * events such as options add/update/delete, user meta, etc. * It was judged not enough, hence this approach. - * @see https://github.com/WordPress/gutenberg/pull/45372 + * @link https://github.com/WordPress/gutenberg/pull/45372 */ $cache_group = 'theme_json'; $cache_key = 'wp_get_global_stylesheet'; diff --git a/src/wp-includes/html-api/class-wp-html-decoder.php b/src/wp-includes/html-api/class-wp-html-decoder.php index 0551e8133287f..3938394a7cb15 100644 --- a/src/wp-includes/html-api/class-wp-html-decoder.php +++ b/src/wp-includes/html-api/class-wp-html-decoder.php @@ -456,8 +456,8 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * `/?random&degree&gt=0&lt=360&not=90` produces the intended * value regardless of the following character.) * - * @see https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - * @see https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references + * @link https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + * @link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references */ if ( 'attribute' !== $context || ';' === $text[ $after_name - 1 ] || $after_name >= $length ) { $match_byte_length = $after_name - $at; diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 01219f4d79542..7984ab7ec54cb 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -25,7 +25,7 @@ * @access private * @ignore * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * @see WP_HTML_Processor */ class WP_HTML_Open_Elements { @@ -235,7 +235,7 @@ public function current_node_is( string $identity ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope * * @param string $tag_name Name of tag check. * @param string[] $termination_list List of elements that terminate the search. @@ -296,7 +296,7 @@ public function has_element_in_specific_scope( string $tag_name, $termination_li * @since 6.4.0 * @since 6.7.0 Full support. * - * @see https://html.spec.whatwg.org/#has-an-element-in-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -345,7 +345,7 @@ public function has_element_in_scope( string $tag_name ): bool { * @since 6.5.0 Implemented: no longer throws on every invocation. * @since 6.7.0 Supports all required HTML elements. * - * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -395,7 +395,7 @@ public function has_element_in_list_item_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Supports all required HTML elements. * - * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -556,7 +556,7 @@ public function pop_until( string $html_tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @param WP_HTML_Token $stack_item Item to add onto stack. */ @@ -774,7 +774,7 @@ public function after_element_pop( WP_HTML_Token $item ): void { * > that the UA must, while the current node is not a table, template, or html element, pop * > elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context * * @since 6.7.0 */ @@ -798,7 +798,7 @@ public function clear_to_table_context(): void { * > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or * > html element, pop elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context * * @since 6.7.0 */ @@ -824,7 +824,7 @@ public function clear_to_table_body_context(): void { * > means that the UA must, while the current node is not a tr, template, or html element, pop * > elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index f788eba873bf3..f300006a68469 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -1494,7 +1494,7 @@ public function serialize_token(): string { * > that token and move on to the next one. (Newlines at the start of pre blocks * > are ignored as an authoring convenience.) * - * @see https://html.spec.whatwg.org/multipage/parsing.html + * @link https://html.spec.whatwg.org/multipage/parsing.html */ if ( $in_html && ( 'TEXTAREA' === $tag_name || 'PRE' === $tag_name || 'LISTING' === $tag_name ) ) { $html .= "\n"; @@ -1561,7 +1561,7 @@ private static function escape_text_for_serialization( string $text ): string { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -1635,7 +1635,7 @@ private function step_initial(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -1735,7 +1735,7 @@ private function step_before_html(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-before-head-insertion-mode + * @link https://html.spec.whatwg.org/#the-before-head-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -1835,7 +1835,7 @@ private function step_before_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead + * @link https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -2060,7 +2060,7 @@ private function step_in_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -2165,7 +2165,7 @@ private function step_in_head_noscript(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-head-insertion-mode + * @link https://html.spec.whatwg.org/#the-after-head-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -2312,7 +2312,7 @@ private function step_after_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -3380,7 +3380,7 @@ private function step_in_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step_in_body * * @return bool Whether an element was found. @@ -3433,7 +3433,7 @@ private function in_body_any_other_end_tag(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intable + * @link https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -3487,7 +3487,7 @@ private function step_in_table(): bool { * > Otherwise, insert the characters given by the pending table * > character tokens list. * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @link https://html.spec.whatwg.org/#parsing-main-intabletext */ if ( parent::TEXT_IS_WHITESPACE === $this->text_node_classification ) { $this->insert_html_element( $this->state->current_token ); @@ -3692,7 +3692,7 @@ private function step_in_table(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -3712,7 +3712,7 @@ private function step_in_table_text(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-incaption + * @link https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -3797,7 +3797,7 @@ private function step_in_caption(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-incolgroup + * @link https://html.spec.whatwg.org/#parsing-main-incolgroup * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -3907,7 +3907,7 @@ private function step_in_column_group(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intbody + * @link https://html.spec.whatwg.org/#parsing-main-intbody * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4011,7 +4011,7 @@ private function step_in_table_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intr + * @link https://html.spec.whatwg.org/#parsing-main-intr * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4122,7 +4122,7 @@ private function step_in_row(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intd + * @link https://html.spec.whatwg.org/#parsing-main-intd * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4227,7 +4227,7 @@ private function step_in_cell(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intemplate + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4359,7 +4359,7 @@ private function step_in_template(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-afterbody + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4451,7 +4451,7 @@ private function step_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inframeset + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4573,7 +4573,7 @@ private function step_in_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-afterframeset + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4661,7 +4661,7 @@ private function step_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4727,7 +4727,7 @@ private function step_after_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -4798,7 +4798,7 @@ private function step_after_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inforeign + * @link https://html.spec.whatwg.org/#parsing-main-inforeign * @see WP_HTML_Processor::step * * @return bool Whether an element was found. @@ -5377,7 +5377,7 @@ public function remove_attribute( $name ): bool { * * @since 6.6.0 Subclassed for the HTML Processor. * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -5777,7 +5777,7 @@ public function has_bookmark( $bookmark_name ): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#close-a-p-element + * @link https://html.spec.whatwg.org/#close-a-p-element */ private function close_a_p_element(): void { $this->generate_implied_end_tags( 'P' ); @@ -5791,7 +5791,7 @@ private function close_a_p_element(): void { * @since 6.7.0 Full spec support. * @ignore * - * @see https://html.spec.whatwg.org/#generate-implied-end-tags + * @link https://html.spec.whatwg.org/#generate-implied-end-tags * * @param string|null $except_for_this_element Perform as if this element doesn't exist in the stack of open elements. */ @@ -5830,7 +5830,7 @@ private function generate_implied_end_tags( ?string $except_for_this_element = n * @ignore * * @see WP_HTML_Processor::generate_implied_end_tags - * @see https://html.spec.whatwg.org/#generate-implied-end-tags + * @link https://html.spec.whatwg.org/#generate-implied-end-tags */ private function generate_implied_end_tags_thoroughly(): void { $elements_with_implied_end_tags = array( @@ -5867,7 +5867,7 @@ private function generate_implied_end_tags_thoroughly(): void { * > has only one element in it (fragment case); otherwise, the adjusted current * > node is the current node. * - * @see https://html.spec.whatwg.org/#adjusted-current-node + * @link https://html.spec.whatwg.org/#adjusted-current-node * * @since 6.7.0 * @ignore @@ -5894,7 +5894,7 @@ private function get_adjusted_current_node(): ?WP_HTML_Token { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements + * @link https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements * * @return bool Whether any formatting elements needed to be reconstructed. */ @@ -5935,7 +5935,7 @@ private function reconstruct_active_formatting_elements(): bool { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately + * @link https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately */ private function reset_insertion_mode_appropriately(): void { // Set the first node. @@ -6091,7 +6091,7 @@ private function reset_insertion_mode_appropriately(): void { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#adoption-agency-algorithm + * @link https://html.spec.whatwg.org/#adoption-agency-algorithm */ private function run_adoption_agency_algorithm(): void { $budget = 1000; @@ -6202,7 +6202,7 @@ private function run_adoption_agency_algorithm(): void { * > 4. Clear the list of active formatting elements up to the last marker. * > 5. Switch the insertion mode to "in row". * - * @see https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell + * @link https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell * * @since 6.7.0 * @ignore @@ -6226,7 +6226,7 @@ private function close_cell(): void { * @since 6.4.0 * @ignore * - * @see https://html.spec.whatwg.org/#insert-a-foreign-element + * @link https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Name of bookmark pointing to element in original input HTML. */ @@ -6240,7 +6240,7 @@ private function insert_html_element( WP_HTML_Token $token ): void { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#insert-a-foreign-element + * @link https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Insert this token. The token's namespace and * insertion point will be updated correctly. @@ -6267,7 +6267,7 @@ private function insert_foreign_element( WP_HTML_Token $token, bool $only_add_to * Here, there's no DOM node onto which the element will be appended, so the * parser will skip this step. * - * @see https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location + * @link https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location */ } @@ -6308,7 +6308,7 @@ private function insert_virtual_node( $token_name, $bookmark_name = null ): WP_H * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#mathml-text-integration-point + * @link https://html.spec.whatwg.org/#mathml-text-integration-point * * @return bool Whether the current token is a MathML integration point. */ @@ -6345,7 +6345,7 @@ private function is_mathml_integration_point(): bool { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#html-integration-point + * @link https://html.spec.whatwg.org/#html-integration-point * * @return bool Whether the current token is an HTML integration point. */ @@ -6395,7 +6395,7 @@ private function is_html_integration_point(): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#special + * @link https://html.spec.whatwg.org/#special * * @param WP_HTML_Token|string $tag_name Node to check, or only its name if in the HTML namespace. * @return bool Whether the element of the given name is in the special category. @@ -6516,7 +6516,7 @@ public static function is_special( $tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#void-elements + * @link https://html.spec.whatwg.org/#void-elements * * @param string $tag_name Name of HTML tag to check. * @return bool Whether the given tag is an HTML Void Element. @@ -6558,7 +6558,7 @@ public static function is_void( $tag_name ): bool { * null === self::get_encoding( 'UTF-7' ); * null === self::get_encoding( 'utf8; charset=' ); * - * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @link https://encoding.spec.whatwg.org/#concept-encoding-get * * @todo As this parser only supports UTF-8, only the UTF-8 * encodings are detected. Add more as desired, but the diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 37d457a3e18a2..cadb65422adcc 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -1339,7 +1339,7 @@ function wp_kses_split2( $content, $allowed_html, $allowed_protocols ) { * * Preserve these comments and do not treat them like tags. * - * @see https://html.spec.whatwg.org/#bogus-comment-state + * @link https://html.spec.whatwg.org/#bogus-comment-state */ if ( 1 === preg_match( '~^(?:]*>|]*>)$~', $content ) ) { /** @@ -2254,7 +2254,7 @@ function wp_kses_normalize_entities3( $matches ) { * * @since 2.7.0 * - * @see https://www.w3.org/TR/xml/#charsets + * @link https://www.w3.org/TR/xml/#charsets * * @param int $i Unicode codepoint. * @return bool Whether or not the codepoint is a valid Unicode codepoint. diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index a604334e88c20..39efbba907209 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -30,7 +30,7 @@ class Plural_Forms { * Operator precedence from highest to lowest. Higher numbers indicate * higher precedence, and are executed first. * - * @see https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence + * @link https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence * * @since 4.9.0 * @var array $op_precedence Operator precedence from highest to lowest. diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index d682762acb7e7..822de9e55d051 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3390,7 +3390,7 @@ function retrieve_password( $user_login = '' ) { * end in a period. To avoid the ambiguity, ensure that the login is not the last query * arg in the URL. If moving it to the end, a trailing period will need to be escaped. * - * @see https://core.trac.wordpress.org/tickets/42957 + * @link https://core.trac.wordpress.org/tickets/42957 */ $message .= network_site_url( 'wp-login.php?login=' . rawurlencode( $user_login ) . "&key=$key&action=rp", 'login' ) . '&wp_lang=' . $locale . "\r\n\r\n"; diff --git a/src/wp-includes/utf8.php b/src/wp-includes/utf8.php index 2b705224d87ad..666d1d4260557 100644 --- a/src/wp-includes/utf8.php +++ b/src/wp-includes/utf8.php @@ -29,7 +29,7 @@ * byte sequence required by UTF-8, and that no sequence encodes a UTF-16 surrogate * code point or any character above the representable range. * - * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/#G32860 + * @link https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/#G32860 * * @since 6.9.0 * @@ -101,7 +101,7 @@ function wp_is_valid_utf8( string $string ): bool { * * @since 6.9.0 * - * @see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-5/#G40630 + * @link https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-5/#G40630 * * @param string $text String which is assumed to be UTF-8 but may contain invalid sequences of bytes. * @return string Input text with invalid sequences of bytes replaced with the Unicode replacement character. diff --git a/src/wp-load.php b/src/wp-load.php index 40c141f74034b..684797f8c4de3 100644 --- a/src/wp-load.php +++ b/src/wp-load.php @@ -31,7 +31,7 @@ * Initialize error reporting to a known set of levels. * * This will be adapted in wp_debug_mode() located in wp-includes/load.php based on WP_DEBUG. - * @see https://www.php.net/manual/en/errorfunc.constants.php List of known error levels. + * @link https://www.php.net/manual/en/errorfunc.constants.php List of known error levels. */ error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); } From 9ceebca717a3a800c5ce40ffaf9cd10d546270af Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Thu, 16 Jul 2026 09:05:17 +0600 Subject: [PATCH 05/16] Docs: Exclude bundled pomo library from @see -> @link conversion The pomo/ directory is a bundled library, out of scope for this docs convention change. Restores the original @see in plural-forms.php. --- src/wp-includes/pomo/plural-forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index 39efbba907209..a604334e88c20 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -30,7 +30,7 @@ class Plural_Forms { * Operator precedence from highest to lowest. Higher numbers indicate * higher precedence, and are executed first. * - * @link https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence + * @see https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence * * @since 4.9.0 * @var array $op_precedence Operator precedence from highest to lowest. From 74397820a3a524bfd10ebedfde8a80f2fd749ef4 Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Mon, 5 Oct 2026 12:11:09 +0600 Subject: [PATCH 06/16] Docs: Exclude bundled blocks from @see -> @link conversion The src/wp-includes/blocks/ directory is synced from Gutenberg packages and out of scope for core repo docs convention changes. Restores original @see tags to prevent build process failures. --- 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 36ec12e75f48d..cde3910e74353 100644 --- a/src/wp-includes/blocks/post-navigation-link.php +++ b/src/wp-includes/blocks/post-navigation-link.php @@ -105,8 +105,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. From e6c8bc72c9f14f0d93ec694b93e3b749748e700a Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 20:59:42 -0700 Subject: [PATCH 07/16] Docs: Place `@see` tags before `@link` tags. Converting `@see URL` to `@link URL` in place left the new `@link` tags ahead of the `@see` tags that followed them. The PHP documentation standards order `@see` before `@link`, so swap them. Co-Authored-By: Claude Opus 5.5 --- ...ass-wp-html-active-formatting-elements.php | 2 +- .../html-api/class-wp-html-open-elements.php | 2 +- .../class-wp-html-processor-state.php | 40 ++++++++--------- .../html-api/class-wp-html-processor.php | 44 +++++++++---------- .../html-api/class-wp-html-tag-processor.php | 2 +- src/wp-includes/script-loader.php | 4 +- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php index 94ba506b900ae..d9cf45fff8129 100644 --- a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php +++ b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php @@ -31,8 +31,8 @@ * @access private * @ignore * - * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements * @see WP_HTML_Processor + * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements */ class WP_HTML_Active_Formatting_Elements { /** diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 7984ab7ec54cb..4472ff14a3e4a 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -25,8 +25,8 @@ * @access private * @ignore * - * @link https://html.spec.whatwg.org/#stack-of-open-elements * @see WP_HTML_Processor + * @link https://html.spec.whatwg.org/#stack-of-open-elements */ class WP_HTML_Open_Elements { /** diff --git a/src/wp-includes/html-api/class-wp-html-processor-state.php b/src/wp-includes/html-api/class-wp-html-processor-state.php index 6952b97ae7719..05819d03c3a4d 100644 --- a/src/wp-includes/html-api/class-wp-html-processor-state.php +++ b/src/wp-includes/html-api/class-wp-html-processor-state.php @@ -41,8 +41,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @var string */ @@ -53,8 +53,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @var string */ @@ -65,8 +65,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-beforehead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-beforehead * * @var string */ @@ -77,8 +77,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-inhead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inhead * * @var string */ @@ -89,8 +89,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @var string */ @@ -101,8 +101,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-afterhead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterhead * * @var string */ @@ -113,8 +113,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @var string */ @@ -125,8 +125,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intable * * @var string */ @@ -137,8 +137,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @var string */ @@ -149,8 +149,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @var string */ @@ -161,8 +161,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-incolumngroup * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incolumngroup * * @var string */ @@ -173,8 +173,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-intablebody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intablebody * * @var string */ @@ -185,8 +185,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-inrow * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inrow * * @var string */ @@ -197,8 +197,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-incell * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incell * * @var string */ @@ -237,8 +237,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @var string */ @@ -249,8 +249,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @var string */ @@ -261,8 +261,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @var string */ @@ -273,8 +273,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @var string */ @@ -285,8 +285,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @var string */ @@ -297,8 +297,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @var string */ diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index c4b8505553638..4cadb962dd9d7 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -1563,8 +1563,8 @@ private static function escape_text_for_serialization( string $text ): string { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @return bool Whether an element was found. */ @@ -1636,8 +1636,8 @@ private function step_initial(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @return bool Whether an element was found. */ @@ -1734,8 +1734,8 @@ private function step_before_html(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-before-head-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-before-head-insertion-mode * * @return bool Whether an element was found. */ @@ -1832,8 +1832,8 @@ private function step_before_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * * @return bool Whether an element was found. */ @@ -2055,8 +2055,8 @@ private function step_in_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @return bool Whether an element was found. */ @@ -2159,8 +2159,8 @@ private function step_in_head_noscript(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-after-head-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-head-insertion-mode * * @return bool Whether an element was found. */ @@ -2304,8 +2304,8 @@ private function step_after_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3370,8 +3370,8 @@ private function step_in_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step_in_body + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3422,8 +3422,8 @@ private function in_body_any_other_end_tag(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intable * * @return bool Whether an element was found. */ @@ -3680,8 +3680,8 @@ private function step_in_table(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @return bool Whether an element was found. */ @@ -3700,8 +3700,8 @@ private function step_in_table_text(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @return bool Whether an element was found. */ @@ -3785,8 +3785,8 @@ private function step_in_caption(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-incolgroup * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-incolgroup * * @return bool Whether an element was found. */ @@ -3894,8 +3894,8 @@ private function step_in_column_group(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intbody * * @return bool Whether an element was found. */ @@ -3998,8 +3998,8 @@ private function step_in_table_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intr * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intr * * @return bool Whether an element was found. */ @@ -4109,8 +4109,8 @@ private function step_in_row(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intd * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intd * * @return bool Whether an element was found. */ @@ -4214,8 +4214,8 @@ private function step_in_cell(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @return bool Whether an element was found. */ @@ -4346,8 +4346,8 @@ private function step_in_template(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @return bool Whether an element was found. */ @@ -4437,8 +4437,8 @@ private function step_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @return bool Whether an element was found. */ @@ -4559,8 +4559,8 @@ private function step_in_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @return bool Whether an element was found. */ @@ -4647,8 +4647,8 @@ private function step_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @return bool Whether an element was found. */ @@ -4712,8 +4712,8 @@ private function step_after_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @return bool Whether an element was found. */ @@ -4783,8 +4783,8 @@ private function step_after_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#parsing-main-inforeign * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inforeign * * @return bool Whether an element was found. */ diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 91444a2b009f0..81de1e3cbada1 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -4514,9 +4514,9 @@ private function get_script_content_type(): ?string { * as “tag-name-terminating characters.” This sequence forms the start * of what could be a SCRIPT opening or closing tag. * + * @see wp_html_api_script_element_escaping_diagram_source() * @link https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications - * @see wp_html_api_script_element_escaping_diagram_source() * * @since 7.0.0 * @ignore diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 253984ebd4905..6cb146d373c16 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -4657,8 +4657,8 @@ public function replace( string $text ): void { * * @since 6.9.0 * - * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * @see \wp_html_custom_data_attribute_name() + * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * * @param string $html_attribute_name Raw attribute name as found in the source HTML. * @return string|null Transformed `dataset` name, if interpretable as a custom data attribute, else `null`. @@ -4735,8 +4735,8 @@ function wp_js_dataset_name( string $html_attribute_name ): ?string { * * @since 6.9.0 * - * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * @see \wp_js_dataset_name() + * @link https://html.spec.whatwg.org/#concept-domstringmap-pairs * * @param string $js_dataset_name Name of JS `dataset` property to transform. * @return string|null Corresponding name of an HTML custom data attribute for the given dataset name, From 2e1f356e1ac2a6d0492a2a883bd21ede58c8b0e4 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 20:59:59 -0700 Subject: [PATCH 08/16] Twenty Twenty: Reference core functions with `@see` in the comment walker. The `html5_comment()` docblock linked to the developer.wordpress.org pages for core functions. Internal symbols are referenced with `@see function()`, which lets the documentation parser cross-link them, matching the existing `@see wp_list_comments()` in the same block. Co-Authored-By: Claude Opus 5.5 --- .../classes/class-twentytwenty-walker-comment.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php index e9172810a7992..329f7164ee518 100644 --- a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php +++ b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php @@ -22,11 +22,11 @@ class TwentyTwenty_Walker_Comment extends Walker_Comment { * @since Twenty Twenty 1.0 * * @see wp_list_comments() - * @link https://developer.wordpress.org/reference/functions/get_comment_author_url/ - * @link https://developer.wordpress.org/reference/functions/get_comment_author/ - * @link https://developer.wordpress.org/reference/functions/get_avatar/ - * @link https://developer.wordpress.org/reference/functions/get_comment_reply_link/ - * @link https://developer.wordpress.org/reference/functions/get_edit_comment_link/ + * @see get_comment_author_url() + * @see get_comment_author() + * @see get_avatar() + * @see get_comment_reply_link() + * @see get_edit_comment_link() * * @param WP_Comment $comment Comment to display. * @param int $depth Depth of the current comment. From 3fed97da0b1edd21bd69899a96887012f805d368 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:00:16 -0700 Subject: [PATCH 09/16] HTML API: Use inline `{@link}` tags in bulleted spec references. A tag is only recognized at the start of a docblock line, so a list item reading `- @link URL` is plain text. Inside prose and lists, the inline `{@link URL}` form is the correct one, and it also restores the braces the original `- @see {URL}` items had. Co-Authored-By: Claude Opus 5.5 --- .../html-api/class-wp-html-tag-processor.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 81de1e3cbada1..3386cfac890dd 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1652,17 +1652,17 @@ private function skip_script_data(): bool { /** * These characters trigger state transitions of interest: * - * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state - * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state - * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state - * - @link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} * * The "\r" character is not present in the above references. However, "\r" must be * treated the same as "\n". This is because the HTML Standard requires newline * normalization during preprocessing which applies this replacement. * - * - @link https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream - * - @link https://infra.spec.whatwg.org/#normalize-newlines + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream} + * - {@link https://infra.spec.whatwg.org/#normalize-newlines} */ '>' !== $c && ' ' !== $c && From 69a13e3dbca38d676dd828195b8a34f7fdc1c9d7 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:00:43 -0700 Subject: [PATCH 10/16] Docs: Replace remaining `@see` tags for URLs with `@link`. Convert the `@see URL` references the earlier sweep missed: the inline prefetch script in `script-loader.php`, `pomo/plural-forms.php`, core JavaScript sources in `src/js`, and the PHPUnit tests and test helpers. The block render files in `src/wp-includes/blocks/` are left alone since they are synced from Gutenberg, and the normalize.css comment in Twenty Thirteen is left alone since it is vendored. Co-Authored-By: Claude Opus 5.5 --- src/js/_enqueues/deprecated/fakejshint.js | 4 ++-- src/js/_enqueues/lib/codemirror/javascript-lint.js | 6 +++--- src/wp-includes/pomo/plural-forms.php | 2 +- src/wp-includes/script-loader.php | 2 +- .../generate-html5-named-character-references.php | 2 +- tests/phpunit/includes/build-visual-html-tree.php | 2 +- tests/phpunit/tests/actions.php | 2 +- tests/phpunit/tests/auth.php | 2 +- tests/phpunit/tests/blocks/serialize.php | 4 ++-- tests/phpunit/tests/formatting/balanceTags.php | 4 ++-- tests/phpunit/tests/html-api/wpHtmlDecoder.php | 4 ++-- tests/phpunit/tests/pomo/pluralForms.php | 2 +- tests/phpunit/tests/rest-api/wpRestMenuItemsController.php | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/js/_enqueues/deprecated/fakejshint.js b/src/js/_enqueues/deprecated/fakejshint.js index b3290c4406064..c064d4d505c5a 100644 --- a/src/js/_enqueues/deprecated/fakejshint.js +++ b/src/js/_enqueues/deprecated/fakejshint.js @@ -6,8 +6,8 @@ * @since 4.9.3 * @deprecated 7.0.0 * @output wp-includes/js/codemirror/fakejshint.js - * @see https://core.trac.wordpress.org/ticket/42850 - * @see https://core.trac.wordpress.org/ticket/64558 + * @link https://core.trac.wordpress.org/ticket/42850 + * @link https://core.trac.wordpress.org/ticket/64558 */ /* jshint -W057, -W058 */ diff --git a/src/js/_enqueues/lib/codemirror/javascript-lint.js b/src/js/_enqueues/lib/codemirror/javascript-lint.js index 15fefe832805c..20c50d548d6f1 100644 --- a/src/js/_enqueues/lib/codemirror/javascript-lint.js +++ b/src/js/_enqueues/lib/codemirror/javascript-lint.js @@ -9,7 +9,7 @@ import CodeMirror from 'codemirror'; /** * CodeMirror Lint Error. * - * @see https://codemirror.net/5/doc/manual.html#addon_lint + * @link https://codemirror.net/5/doc/manual.html#addon_lint * * @typedef {Object} CodeMirrorLintError * @property {string} message Error message. @@ -21,8 +21,8 @@ import CodeMirror from 'codemirror'; /** * JSHint options supported by Espree. * - * @see https://jshint.com/docs/options/ - * @see https://www.npmjs.com/package/espree#options + * @link https://jshint.com/docs/options/ + * @link https://www.npmjs.com/package/espree#options * * @typedef {Object} SupportedJSHintOptions * @property {import('espree').Options['ecmaVersion']} [esversion] "This option is used to specify the ECMAScript version to which the code must adhere." diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index cc31471a0b88d..9db163cee7a40 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -30,7 +30,7 @@ class Plural_Forms { * Operator precedence from highest to lowest. Higher numbers indicate * higher precedence, and are executed first. * - * @see https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence + * @link https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence * * @since 4.9.0 * @var array $op_precedence Operator precedence from highest to lowest. diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 6cb146d373c16..dfaaf73ede55a 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -3051,7 +3051,7 @@ function wp_prefetch_admin_assets(): void { /** * Prefetches the page's rel=prefetch links with fetch() in browsers that do not support rel=prefetch. * - * @see https://caniuse.com/link-rel-prefetch + * @link https://caniuse.com/link-rel-prefetch */ () => { if ( document.createElement( 'link' ).relList?.supports?.( 'prefetch' ) ) { diff --git a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php index 609d521dec440..fa483d83e5671 100644 --- a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php +++ b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php @@ -12,7 +12,7 @@ * 'characters' => '©', * ); * - * @see https://html.spec.whatwg.org/entities.json + * @link https://html.spec.whatwg.org/entities.json * * @var array. */ diff --git a/tests/phpunit/includes/build-visual-html-tree.php b/tests/phpunit/includes/build-visual-html-tree.php index d874e944ead0c..b4592df6ef89a 100644 --- a/tests/phpunit/includes/build-visual-html-tree.php +++ b/tests/phpunit/includes/build-visual-html-tree.php @@ -34,7 +34,7 @@ * style="margin-top:50px;margin-bottom:50px;" * * - * @see https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md + * @link https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md * * @since 6.9.0 * diff --git a/tests/phpunit/tests/actions.php b/tests/phpunit/tests/actions.php index 4e25cca0e2e99..f3144e4f954e9 100644 --- a/tests/phpunit/tests/actions.php +++ b/tests/phpunit/tests/actions.php @@ -187,7 +187,7 @@ public function test_action_args_2() { * Test that multiple callbacks receive the correct number of args even when the number * is less than, or greater than previous hooks. * - * @see https://core.trac.wordpress.org/ticket/17817#comment:72 + * @link https://core.trac.wordpress.org/ticket/17817#comment:72 * @ticket 17817 * * @covers ::do_action diff --git a/tests/phpunit/tests/auth.php b/tests/phpunit/tests/auth.php index a290d11e118e6..e832303869e66 100644 --- a/tests/phpunit/tests/auth.php +++ b/tests/phpunit/tests/auth.php @@ -679,7 +679,7 @@ public function test_setting_password_beyond_bcrypt_length_limit_is_rejected() { } /** - * @see https://core.trac.wordpress.org/changeset/30466 + * @link https://core.trac.wordpress.org/changeset/30466 */ public function test_invalid_password_at_phpass_length_limit_is_rejected() { $limit = str_repeat( 'a', self::$phpass_length_limit ); diff --git a/tests/phpunit/tests/blocks/serialize.php b/tests/phpunit/tests/blocks/serialize.php index 5d119e655babc..4ace7bf8cba47 100644 --- a/tests/phpunit/tests/blocks/serialize.php +++ b/tests/phpunit/tests/blocks/serialize.php @@ -88,8 +88,8 @@ public static function data_serialize_identity_from_parsed(): array { * Ensure that the previous escape form can be parsed compatibly and serialized back to * the new form. * - * @see https://github.com/WordPress/wordpress-develop/pull/9558 - * @see https://github.com/WordPress/gutenberg/pull/71291 + * @link https://github.com/WordPress/wordpress-develop/pull/9558 + * @link https://github.com/WordPress/gutenberg/pull/71291 * * @ticket 63917 * diff --git a/tests/phpunit/tests/formatting/balanceTags.php b/tests/phpunit/tests/formatting/balanceTags.php index 47e505c362924..a25b7e5511e4d 100644 --- a/tests/phpunit/tests/formatting/balanceTags.php +++ b/tests/phpunit/tests/formatting/balanceTags.php @@ -75,7 +75,7 @@ public function test_ignores_unsupported_custom_tag_names( $tag ) { /** * These are valid custom elements but we don't support them yet. * - * @see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name + * @link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name */ public function data_unsupported_valid_tag_names() { return array( @@ -143,7 +143,7 @@ public function test_detects_supported_invalid_tag_names( $tag ) { /** * These are invalid custom elements but we support them right now in order to keep the parser simpler. * - * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name + * @link https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name */ public function data_supported_invalid_tag_names() { return array( diff --git a/tests/phpunit/tests/html-api/wpHtmlDecoder.php b/tests/phpunit/tests/html-api/wpHtmlDecoder.php index a8e1fa65c681a..894cfee43f9f5 100644 --- a/tests/phpunit/tests/html-api/wpHtmlDecoder.php +++ b/tests/phpunit/tests/html-api/wpHtmlDecoder.php @@ -227,7 +227,7 @@ public function test_semicolonless_legacy_reference_before_multibyte_attribute_f * treated as alphanumerics by `ctype_alnum()` on some systems, but should never * be recognized as ASCII Alphanumerics according to the HTML standards. * - * @see https://html.spec.whatwg.org/#named-character-reference-state + * @link https://html.spec.whatwg.org/#named-character-reference-state * * @return array An ASCII alphanumeric is an ASCII digit or ASCII alpha. * > An ASCII alpha is an ASCII upper alpha or ASCII lower alpha. * - * @see https://html.spec.whatwg.org/#named-character-reference-state + * @link https://html.spec.whatwg.org/#named-character-reference-state * * @return Generator Test cases. */ diff --git a/tests/phpunit/tests/pomo/pluralForms.php b/tests/phpunit/tests/pomo/pluralForms.php index f3b5d82a01b4b..aace128123e2a 100644 --- a/tests/phpunit/tests/pomo/pluralForms.php +++ b/tests/phpunit/tests/pomo/pluralForms.php @@ -65,7 +65,7 @@ public function test_regression( int $nplurals, string $expression ): void { /** * Distinct plural expressions from the GlotPress locales file, keyed by one locale that uses each. * - * @see https://github.com/GlotPress/GlotPress/blob/1bf58a783e1888849faf45b53dbc84bc169b3246/locales/locales.php + * @link https://github.com/GlotPress/GlotPress/blob/1bf58a783e1888849faf45b53dbc84bc169b3246/locales/locales.php * * @return array */ diff --git a/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php b/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php index 85d5618ab964c..7ddc12d0492a9 100644 --- a/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php +++ b/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php @@ -310,7 +310,7 @@ public function test_get_item_term_posts() { * Test that title.raw contains the verbatim title and that title.rendered * has been passed through the_title which escapes & characters. * - * @see https://github.com/WordPress/gutenberg/pull/24673 + * @link https://github.com/WordPress/gutenberg/pull/24673 * * @ticket 40878 * @covers ::get_item From 5cc8bc71883ec1b942ffff3cd716d3ef640d14e6 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:00:59 -0700 Subject: [PATCH 11/16] Docs: Correct the Trac ticket URL path in password reset comments. Trac ticket URLs use `/ticket/`, not `/tickets/`. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/pluggable.php | 2 +- src/wp-includes/user.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index fd4542233d220..0aaeabbb3b9c0 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2392,7 +2392,7 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) * end in a period. To avoid the ambiguity, ensure that the login is not the last query * arg in the URL. If moving it to the end, a trailing period will need to be escaped. * - * @link https://core.trac.wordpress.org/tickets/42957 + * @link https://core.trac.wordpress.org/ticket/42957 */ $message .= network_site_url( 'wp-login.php?login=' . rawurlencode( $user->user_login ) . "&key=$key&action=rp", 'login' ) . "\r\n"; diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 7046c3eff7b9f..e1030ee025278 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3421,7 +3421,7 @@ function retrieve_password( $user_login = '' ) { * end in a period. To avoid the ambiguity, ensure that the login is not the last query * arg in the URL. If moving it to the end, a trailing period will need to be escaped. * - * @link https://core.trac.wordpress.org/tickets/42957 + * @link https://core.trac.wordpress.org/ticket/42957 */ $message .= network_site_url( 'wp-login.php?login=' . rawurlencode( $user_login ) . "&key=$key&action=rp", 'login' ) . '&wp_lang=' . $locale . "\r\n\r\n"; From f7aa4367ccab8b163cd7b149e0422df899f5a414 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:01:30 -0700 Subject: [PATCH 12/16] HTTP API: Update the Requests hooks documentation link. The Requests library no longer has a `master` branch; the old URL only works through a redirect to `stable`, so link to `stable` directly. Also move the `@link` tag after `@since`, per the PHP documentation standards. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/class-wp-http-requests-hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-http-requests-hooks.php b/src/wp-includes/class-wp-http-requests-hooks.php index 5e22cdb715d15..aac172892f293 100644 --- a/src/wp-includes/class-wp-http-requests-hooks.php +++ b/src/wp-includes/class-wp-http-requests-hooks.php @@ -64,10 +64,10 @@ public function dispatch( $hook, $parameters = array() ) { * * This action maps Requests internal hook to a native WordPress action. * - * @link https://github.com/WordPress/Requests/blob/master/docs/hooks.md - * * @since 4.7.0 * + * @link https://github.com/WordPress/Requests/blob/stable/docs/hooks.md + * * @param array $parameters Parameters from Requests internal hook. * @param array $request Request data in WP_Http format. * @param string $url URL to request. From 591e0e7d6e053ca2726446df1a66e79f0a665dda Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:02:00 -0700 Subject: [PATCH 13/16] Docs: Replace dead links in the `send_nosniff_header()` docblock. The IE blog post moved from blogs.msdn.com to the Microsoft Learn archive, and the Chromium ViewVC revision link no longer resolves. Point to the archived post and to the Fetch Standard, which now defines the `X-Content-Type-Options` header. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index a4ed033d67402..3b8f5bd555a4c 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -7257,8 +7257,8 @@ function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.V * * @since 3.0.0 * - * @link https://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx - * @link https://src.chromium.org/viewvc/chrome?view=rev&revision=6985 + * @link https://learn.microsoft.com/en-us/archive/blogs/ie/ie8-security-part-v-comprehensive-protection + * @link https://fetch.spec.whatwg.org/#x-content-type-options-header */ function send_nosniff_header() { header( 'X-Content-Type-Options: nosniff' ); From 34d1ddf2cbc62d323fa55e9a028a5520c0497185 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:02:27 -0700 Subject: [PATCH 14/16] Docs: Keep the bundled pomo library out of the `@link` conversion. Restore the `@see` tag in `pomo/plural-forms.php`, which was converted despite the earlier decision to treat the pomo library as out of scope. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/pomo/plural-forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/pomo/plural-forms.php b/src/wp-includes/pomo/plural-forms.php index 9db163cee7a40..cc31471a0b88d 100644 --- a/src/wp-includes/pomo/plural-forms.php +++ b/src/wp-includes/pomo/plural-forms.php @@ -30,7 +30,7 @@ class Plural_Forms { * Operator precedence from highest to lowest. Higher numbers indicate * higher precedence, and are executed first. * - * @link https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence + * @see https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence * * @since 4.9.0 * @var array $op_precedence Operator precedence from highest to lowest. From 3371646a3a65d26c2f4208bd87bc6488811c469c Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:13:29 -0700 Subject: [PATCH 15/16] HTML API: Use inline `{@link}` tags in the `WP_HTML_Doctype_Info` description. The class description interleaves spec references with its paragraphs. As block-level tags, the first `@link` ended the description, and the paragraphs after it were parsed as the link's text. The inline form keeps the references in place without cutting the description short. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/html-api/class-wp-html-doctype-info.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-doctype-info.php b/src/wp-includes/html-api/class-wp-html-doctype-info.php index 985083d2f0f02..7d10fc43b982c 100644 --- a/src/wp-includes/html-api/class-wp-html-doctype-info.php +++ b/src/wp-includes/html-api/class-wp-html-doctype-info.php @@ -33,20 +33,20 @@ * > document ensures that the browser makes a best-effort attempt at following the * > relevant specifications. * - * @link https://html.spec.whatwg.org/#the-doctype + * {@link https://html.spec.whatwg.org/#the-doctype} * * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, * and an indication of which document compatibility mode they would imply if an HTML parser * hadn't already determined it from other information. * - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode + * {@link https://html.spec.whatwg.org/#the-initial-insertion-mode} * * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how * to interpret the various tags and entities within a document. Its role in HTML diverged * from how it was used in SGML and no meaning should be back-read into HTML based on how it * is used in SGML, XML, or XHTML documents. * - * @link https://www.iso.org/standard/16387.html + * {@link https://www.iso.org/standard/16387.html} * * @since 6.7.0 * @since 7.1.0 Spec update: missing and empty SYSTEM identifiers are handled From e82dca9ed277749de7fe25245ffdfa4fcfb1b09d Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 16 Oct 2026 21:50:18 -0700 Subject: [PATCH 16/16] HTML API: Move the `@link` conversion to a separate pull request. Restore the HTML API classes and their tests to match trunk. Their `@see` to `@link` changes now live in their own pull request, so the HTML API maintainers can review them separately. Co-Authored-By: Claude Opus 5.5 --- ...ass-wp-html-active-formatting-elements.php | 8 +- .../html-api/class-wp-html-decoder.php | 8 +- .../html-api/class-wp-html-doctype-info.php | 36 ++++---- .../html-api/class-wp-html-open-elements.php | 24 +++--- .../class-wp-html-processor-state.php | 56 ++++++------- .../html-api/class-wp-html-processor.php | 84 +++++++++---------- .../html-api/class-wp-html-tag-processor.php | 56 ++++++------- .../html-api/class-wp-html-token.php | 2 +- ...erate-html5-named-character-references.php | 2 +- .../includes/build-visual-html-tree.php | 2 +- .../phpunit/tests/html-api/wpHtmlDecoder.php | 4 +- 11 files changed, 141 insertions(+), 141 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php index d9cf45fff8129..d73561843bcb2 100644 --- a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php +++ b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php @@ -31,8 +31,8 @@ * @access private * @ignore * + * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements * @see WP_HTML_Processor - * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements */ class WP_HTML_Active_Formatting_Elements { /** @@ -95,7 +95,7 @@ public function current_node() { * > formatting from "leaking" into applet, object, marquee, template, * > td, th, and caption elements. * - * @link https://html.spec.whatwg.org/#concept-parser-marker + * @see https://html.spec.whatwg.org/#concept-parser-marker * * @since 6.7.0 */ @@ -108,7 +108,7 @@ public function insert_marker(): void { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements + * @see https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements * * @param WP_HTML_Token $token Push this node onto the stack. */ @@ -215,7 +215,7 @@ public function walk_up() { * > The list has been cleared up to the last marker. * > 4. Go to step 1. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-decoder.php b/src/wp-includes/html-api/class-wp-html-decoder.php index 4709aa615d465..31ed56808e324 100644 --- a/src/wp-includes/html-api/class-wp-html-decoder.php +++ b/src/wp-includes/html-api/class-wp-html-decoder.php @@ -345,7 +345,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * This comment is here to note and explain why there's no check to * remove these characters or replace them. * - * @link https://infra.spec.whatwg.org/#noncharacter + * @see https://infra.spec.whatwg.org/#noncharacter */ /* @@ -456,8 +456,8 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * `/?random&degree&gt=0&lt=360&not=90` produces the intended * value regardless of the following character.) * - * @link https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - * @link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references + * @see https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + * @see https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references */ if ( 'attribute' !== $context || ';' === $text[ $after_name - 1 ] || $after_name >= $length ) { $match_byte_length = $after_name - $at; @@ -494,7 +494,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * * @since 6.6.0 * - * @link https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. + * @see https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. * * @param int $code_point Which code point to convert. * @return string Converted code point, or `�` if invalid. diff --git a/src/wp-includes/html-api/class-wp-html-doctype-info.php b/src/wp-includes/html-api/class-wp-html-doctype-info.php index 7d10fc43b982c..ce6004a940cf3 100644 --- a/src/wp-includes/html-api/class-wp-html-doctype-info.php +++ b/src/wp-includes/html-api/class-wp-html-doctype-info.php @@ -33,20 +33,20 @@ * > document ensures that the browser makes a best-effort attempt at following the * > relevant specifications. * - * {@link https://html.spec.whatwg.org/#the-doctype} + * @see https://html.spec.whatwg.org/#the-doctype * * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, * and an indication of which document compatibility mode they would imply if an HTML parser * hadn't already determined it from other information. * - * {@link https://html.spec.whatwg.org/#the-initial-insertion-mode} + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how * to interpret the various tags and entities within a document. Its role in HTML diverged * from how it was used in SGML and no meaning should be back-read into HTML based on how it * is used in SGML, XML, or XHTML documents. * - * {@link https://www.iso.org/standard/16387.html} + * @see https://www.iso.org/standard/16387.html * * @since 6.7.0 * @since 7.1.0 Spec update: missing and empty SYSTEM identifiers are handled @@ -67,7 +67,7 @@ class WP_HTML_Doctype_Info { * * ╰──┴── name is "html". * - * @link https://html.spec.whatwg.org/#tokenization + * @see https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -91,7 +91,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ * ╰──┴── name is "html". * - * @link https://html.spec.whatwg.org/#tokenization + * @see https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -121,7 +121,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ ╰──── system identifier ────╯ * ╰──┴── name is "html". * - * @link https://html.spec.whatwg.org/#tokenization + * @see https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -149,7 +149,7 @@ class WP_HTML_Doctype_Info { * before the HTML element has been opened and before finding any other * DOCTYPE declaration tokens. * - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * * @since 6.7.0 * @@ -171,7 +171,7 @@ class WP_HTML_Doctype_Info { * > and system identifier must be marked as missing (which is a distinct state from the * > empty string), and the force-quirks flag must be set to off (its other state is on). * - * @link https://html.spec.whatwg.org/multipage/parsing.html#tokenization + * @see https://html.spec.whatwg.org/multipage/parsing.html#tokenization * * @since 6.7.0 * @@ -424,7 +424,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * This parser combines the rules for parsing DOCTYPE tokens found in the HTML * specification for the DOCTYPE related tokenizer states. * - * @link https://html.spec.whatwg.org/#doctype-state + * @see https://html.spec.whatwg.org/#doctype-state */ /* @@ -449,8 +449,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { /* * Perform newline normalization and ensure the $end value is correct after normalization. * - * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @link https://infra.spec.whatwg.org/#normalize-newlines + * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @see https://infra.spec.whatwg.org/#normalize-newlines */ $doctype_html = str_replace( "\r\n", "\n", $doctype_html ); $doctype_html = str_replace( "\r", "\n", $doctype_html ); @@ -479,7 +479,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Parsing effectively begins in "Before DOCTYPE name state". Ignore whitespace and * proceed to the next state. * - * @link https://html.spec.whatwg.org/#before-doctype-name-state + * @see https://html.spec.whatwg.org/#before-doctype-name-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at ); @@ -502,7 +502,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Find a case-insensitive match for "PUBLIC" or "SYSTEM" at this point. * Otherwise, set force-quirks and enter bogus DOCTYPE state (skip the rest of the doctype). * - * @link https://html.spec.whatwg.org/#after-doctype-name-state + * @see https://html.spec.whatwg.org/#after-doctype-name-state */ if ( $at + 6 >= $end ) { return new self( $doctype_name, $doctype_public_id, $doctype_system_id, true ); @@ -549,8 +549,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE public identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @link https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state - * @link https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state + * @see https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state + * @see https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; @@ -579,7 +579,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * * Advance through whitespace between public and system identifiers. * - * @link https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state + * @see https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at, $end - $at ); if ( $at >= $end ) { @@ -592,8 +592,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE system identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @link https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state - * @link https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state + * @see https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state + * @see https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 4472ff14a3e4a..af0d6ef508795 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -25,8 +25,8 @@ * @access private * @ignore * + * @see https://html.spec.whatwg.org/#stack-of-open-elements * @see WP_HTML_Processor - * @link https://html.spec.whatwg.org/#stack-of-open-elements */ class WP_HTML_Open_Elements { /** @@ -235,7 +235,7 @@ public function current_node_is( string $identity ): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope * * @param string $tag_name Name of tag check. * @param string[] $termination_list List of elements that terminate the search. @@ -296,7 +296,7 @@ public function has_element_in_specific_scope( string $tag_name, $termination_li * @since 6.4.0 * @since 6.7.0 Full support. * - * @link https://html.spec.whatwg.org/#has-an-element-in-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -345,7 +345,7 @@ public function has_element_in_scope( string $tag_name ): bool { * @since 6.5.0 Implemented: no longer throws on every invocation. * @since 6.7.0 Supports all required HTML elements. * - * @link https://html.spec.whatwg.org/#has-an-element-in-list-item-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -395,7 +395,7 @@ public function has_element_in_list_item_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Supports all required HTML elements. * - * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -444,7 +444,7 @@ public function has_element_in_button_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Full implementation. * - * @link https://html.spec.whatwg.org/#has-an-element-in-table-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -491,7 +491,7 @@ public function has_element_in_select_scope( string $tag_name ): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @return bool Whether a P is in BUTTON scope. */ @@ -504,7 +504,7 @@ public function has_p_in_button_scope(): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#stack-of-open-elements + * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @return bool Whether a node was popped off of the stack. */ @@ -556,7 +556,7 @@ public function pop_until( string $html_tag_name ): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#stack-of-open-elements + * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @param WP_HTML_Token $stack_item Item to add onto stack. */ @@ -774,7 +774,7 @@ public function after_element_pop( WP_HTML_Token $item ): void { * > that the UA must, while the current node is not a table, template, or html element, pop * > elements from the stack of open elements. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context * * @since 6.7.0 */ @@ -798,7 +798,7 @@ public function clear_to_table_context(): void { * > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or * > html element, pop elements from the stack of open elements. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context * * @since 6.7.0 */ @@ -824,7 +824,7 @@ public function clear_to_table_body_context(): void { * > means that the UA must, while the current node is not a tr, template, or html element, pop * > elements from the stack of open elements. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-processor-state.php b/src/wp-includes/html-api/class-wp-html-processor-state.php index 05819d03c3a4d..d1b3526a9cc79 100644 --- a/src/wp-includes/html-api/class-wp-html-processor-state.php +++ b/src/wp-includes/html-api/class-wp-html-processor-state.php @@ -33,7 +33,7 @@ class WP_HTML_Processor_State { * is added to the parser for more modes, add them here * following the same naming and value pattern. * - * @link https://html.spec.whatwg.org/#the-insertion-mode + * @see https://html.spec.whatwg.org/#the-insertion-mode */ /** @@ -41,8 +41,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @var string */ @@ -53,8 +53,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @var string */ @@ -65,8 +65,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-beforehead * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-beforehead * * @var string */ @@ -77,8 +77,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-inhead * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-inhead * * @var string */ @@ -89,8 +89,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @var string */ @@ -101,8 +101,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-afterhead * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-afterhead * * @var string */ @@ -113,8 +113,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * + * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @var string */ @@ -125,8 +125,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-intable * * @var string */ @@ -137,8 +137,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @var string */ @@ -149,8 +149,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @var string */ @@ -161,8 +161,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-incolumngroup * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-incolumngroup * * @var string */ @@ -173,8 +173,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-intablebody * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-intablebody * * @var string */ @@ -185,8 +185,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-inrow * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-inrow * * @var string */ @@ -197,8 +197,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-incell * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-incell * * @var string */ @@ -237,8 +237,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @var string */ @@ -249,8 +249,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @var string */ @@ -261,8 +261,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @var string */ @@ -273,8 +273,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @var string */ @@ -285,8 +285,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @var string */ @@ -297,8 +297,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * + * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode - * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @var string */ @@ -309,7 +309,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes + * @see https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes * * @var array */ @@ -322,7 +322,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#stack-of-open-elements + * @see https://html.spec.whatwg.org/#stack-of-open-elements * * @var WP_HTML_Open_Elements */ @@ -335,7 +335,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements + * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements * * @var WP_HTML_Active_Formatting_Elements */ @@ -355,7 +355,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#insertion-mode + * @see https://html.spec.whatwg.org/#insertion-mode * * @var string */ @@ -408,7 +408,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @link https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer + * @see https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer * * @var WP_HTML_Token|null */ @@ -424,7 +424,7 @@ class WP_HTML_Processor_State { * * @todo This may be invalidated by a seek operation. * - * @link https://html.spec.whatwg.org/#form-element-pointer + * @see https://html.spec.whatwg.org/#form-element-pointer * * @since 6.7.0 * @@ -439,7 +439,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#frameset-ok-flag + * @see https://html.spec.whatwg.org/#frameset-ok-flag * * @var bool */ diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 4cadb962dd9d7..7f871ec9e6628 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -475,7 +475,7 @@ function ( WP_HTML_Token $token ): void { * fragment. Special care must be taken when processing fragments that are expected to appear * in specific contexts. SVG and TABLE are good examples, but there are others. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm + * @see https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm * * @since 6.8.0 * @@ -1496,7 +1496,7 @@ public function serialize_token(): string { * > that token and move on to the next one. (Newlines at the start of pre blocks * > are ignored as an authoring convenience.) * - * @link https://html.spec.whatwg.org/multipage/parsing.html + * @see https://html.spec.whatwg.org/multipage/parsing.html */ if ( $in_html && ( 'TEXTAREA' === $tag_name || 'PRE' === $tag_name || 'LISTING' === $tag_name ) ) { $html .= "\n"; @@ -1563,8 +1563,8 @@ private static function escape_text_for_serialization( string $text ): string { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @return bool Whether an element was found. */ @@ -1636,8 +1636,8 @@ private function step_initial(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @return bool Whether an element was found. */ @@ -1734,8 +1734,8 @@ private function step_before_html(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-before-head-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-before-head-insertion-mode * * @return bool Whether an element was found. */ @@ -1832,8 +1832,8 @@ private function step_before_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * * @return bool Whether an element was found. */ @@ -2055,8 +2055,8 @@ private function step_in_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @return bool Whether an element was found. */ @@ -2159,8 +2159,8 @@ private function step_in_head_noscript(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-after-head-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-after-head-insertion-mode * * @return bool Whether an element was found. */ @@ -2304,8 +2304,8 @@ private function step_after_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3370,8 +3370,8 @@ private function step_in_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step_in_body - * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3422,8 +3422,8 @@ private function in_body_any_other_end_tag(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intable * * @return bool Whether an element was found. */ @@ -3476,7 +3476,7 @@ private function step_in_table(): bool { * > Otherwise, insert the characters given by the pending table * > character tokens list. * - * @link https://html.spec.whatwg.org/#parsing-main-intabletext + * @see https://html.spec.whatwg.org/#parsing-main-intabletext */ if ( parent::TEXT_IS_WHITESPACE === $this->text_node_classification ) { $this->insert_html_element( $this->state->current_token ); @@ -3680,8 +3680,8 @@ private function step_in_table(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @return bool Whether an element was found. */ @@ -3700,8 +3700,8 @@ private function step_in_table_text(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @return bool Whether an element was found. */ @@ -3785,8 +3785,8 @@ private function step_in_caption(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-incolgroup * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-incolgroup * * @return bool Whether an element was found. */ @@ -3894,8 +3894,8 @@ private function step_in_column_group(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intbody * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intbody * * @return bool Whether an element was found. */ @@ -3998,8 +3998,8 @@ private function step_in_table_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intr * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intr * * @return bool Whether an element was found. */ @@ -4109,8 +4109,8 @@ private function step_in_row(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intd * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intd * * @return bool Whether an element was found. */ @@ -4214,8 +4214,8 @@ private function step_in_cell(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @return bool Whether an element was found. */ @@ -4346,8 +4346,8 @@ private function step_in_template(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @return bool Whether an element was found. */ @@ -4437,8 +4437,8 @@ private function step_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @return bool Whether an element was found. */ @@ -4559,8 +4559,8 @@ private function step_in_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @return bool Whether an element was found. */ @@ -4647,8 +4647,8 @@ private function step_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @return bool Whether an element was found. */ @@ -4712,8 +4712,8 @@ private function step_after_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @return bool Whether an element was found. */ @@ -4783,8 +4783,8 @@ private function step_after_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * + * @see https://html.spec.whatwg.org/#parsing-main-inforeign * @see WP_HTML_Processor::step - * @link https://html.spec.whatwg.org/#parsing-main-inforeign * * @return bool Whether an element was found. */ @@ -5362,7 +5362,7 @@ public function remove_attribute( $name ): bool { * * @since 6.6.0 Subclassed for the HTML Processor. * - * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -5762,7 +5762,7 @@ public function has_bookmark( $bookmark_name ): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#close-a-p-element + * @see https://html.spec.whatwg.org/#close-a-p-element */ private function close_a_p_element(): void { $this->generate_implied_end_tags( 'P' ); @@ -5776,7 +5776,7 @@ private function close_a_p_element(): void { * @since 6.7.0 Full spec support. * @ignore * - * @link https://html.spec.whatwg.org/#generate-implied-end-tags + * @see https://html.spec.whatwg.org/#generate-implied-end-tags * * @param string|null $except_for_this_element Perform as if this element doesn't exist in the stack of open elements. */ @@ -5815,7 +5815,7 @@ private function generate_implied_end_tags( ?string $except_for_this_element = n * @ignore * * @see WP_HTML_Processor::generate_implied_end_tags - * @link https://html.spec.whatwg.org/#generate-implied-end-tags + * @see https://html.spec.whatwg.org/#generate-implied-end-tags */ private function generate_implied_end_tags_thoroughly(): void { $elements_with_implied_end_tags = array( @@ -5852,7 +5852,7 @@ private function generate_implied_end_tags_thoroughly(): void { * > has only one element in it (fragment case); otherwise, the adjusted current * > node is the current node. * - * @link https://html.spec.whatwg.org/#adjusted-current-node + * @see https://html.spec.whatwg.org/#adjusted-current-node * * @since 6.7.0 * @ignore @@ -5879,7 +5879,7 @@ private function get_adjusted_current_node(): ?WP_HTML_Token { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements + * @see https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements * * @return bool Whether any formatting elements needed to be reconstructed. */ @@ -5920,7 +5920,7 @@ private function reconstruct_active_formatting_elements(): bool { * @since 6.7.0 * @ignore * - * @link https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately + * @see https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately */ private function reset_insertion_mode_appropriately(): void { // Set the first node. @@ -6076,7 +6076,7 @@ private function reset_insertion_mode_appropriately(): void { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @link https://html.spec.whatwg.org/#adoption-agency-algorithm + * @see https://html.spec.whatwg.org/#adoption-agency-algorithm */ private function run_adoption_agency_algorithm(): void { $budget = 1000; @@ -6187,7 +6187,7 @@ private function run_adoption_agency_algorithm(): void { * > 4. Clear the list of active formatting elements up to the last marker. * > 5. Switch the insertion mode to "in row". * - * @link https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell + * @see https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell * * @since 6.7.0 * @ignore @@ -6211,7 +6211,7 @@ private function close_cell(): void { * @since 6.4.0 * @ignore * - * @link https://html.spec.whatwg.org/#insert-a-foreign-element + * @see https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Name of bookmark pointing to element in original input HTML. */ @@ -6225,7 +6225,7 @@ private function insert_html_element( WP_HTML_Token $token ): void { * @since 6.7.0 * @ignore * - * @link https://html.spec.whatwg.org/#insert-a-foreign-element + * @see https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Insert this token. The token's namespace and * insertion point will be updated correctly. @@ -6252,7 +6252,7 @@ private function insert_foreign_element( WP_HTML_Token $token, bool $only_add_to * Here, there's no DOM node onto which the element will be appended, so the * parser will skip this step. * - * @link https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location + * @see https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location */ } @@ -6293,7 +6293,7 @@ private function insert_virtual_node( $token_name, $bookmark_name = null ): WP_H * @since 6.7.0 * @ignore * - * @link https://html.spec.whatwg.org/#mathml-text-integration-point + * @see https://html.spec.whatwg.org/#mathml-text-integration-point * * @return bool Whether the current token is a MathML integration point. */ @@ -6330,7 +6330,7 @@ private function is_mathml_integration_point(): bool { * @since 6.7.0 * @ignore * - * @link https://html.spec.whatwg.org/#html-integration-point + * @see https://html.spec.whatwg.org/#html-integration-point * * @return bool Whether the current token is an HTML integration point. */ @@ -6378,7 +6378,7 @@ private function is_html_integration_point(): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#special + * @see https://html.spec.whatwg.org/#special * * @param WP_HTML_Token|string $tag_name Node to check, or only its name if in the HTML namespace. * @return bool Whether the element of the given name is in the special category. @@ -6499,7 +6499,7 @@ public static function is_special( $tag_name ): bool { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#void-elements + * @see https://html.spec.whatwg.org/#void-elements * * @param string $tag_name Name of HTML tag to check. * @return bool Whether the given tag is an HTML Void Element. @@ -6541,7 +6541,7 @@ public static function is_void( $tag_name ): bool { * null === self::get_encoding( 'UTF-7' ); * null === self::get_encoding( 'utf8; charset=' ); * - * @link https://encoding.spec.whatwg.org/#concept-encoding-get + * @see https://encoding.spec.whatwg.org/#concept-encoding-get * * @todo As this parser only supports UTF-8, only the UTF-8 * encodings are detected. Add more as desired, but the diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 3386cfac890dd..afd4dca2c0e6a 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1403,7 +1403,7 @@ public function release_bookmark( $name ): bool { * @since 6.3.2 * @ignore * - * @link https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm + * @see https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm * * @param string $tag_name The uppercase tag name which will close the RAWTEXT region. * @return bool Whether an end to the RAWTEXT region was found before the end of the document. @@ -1423,7 +1423,7 @@ private function skip_rawtext( string $tag_name ): bool { * @since 6.2.0 * @ignore * - * @link https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state + * @see https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state * * @param string $tag_name The uppercase tag name which will close the RCDATA region. * @return bool Whether an end to the RCDATA region was found before the end of the document. @@ -1652,17 +1652,17 @@ private function skip_script_data(): bool { /** * These characters trigger state transitions of interest: * - * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} - * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} - * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} - * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} + * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} + * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} + * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} + * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} * * The "\r" character is not present in the above references. However, "\r" must be * treated the same as "\n". This is because the HTML Standard requires newline * normalization during preprocessing which applies this replacement. * - * - {@link https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream} - * - {@link https://infra.spec.whatwg.org/#normalize-newlines} + * - @see https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream + * - @see https://infra.spec.whatwg.org/#normalize-newlines */ '>' !== $c && ' ' !== $c && @@ -1753,7 +1753,7 @@ private function parse_next_tag(): bool { * At this point the parser checks if this is one of those cases and if it is * will continue searching for the next "<" in search of a token boundary. * - * @link https://html.spec.whatwg.org/#tag-open-state + * @see https://html.spec.whatwg.org/#tag-open-state */ if ( 1 !== strspn( $html, '!/?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $at + 1, 1 ) ) { ++$at; @@ -2131,7 +2131,7 @@ private function parse_next_tag(): bool { * [#x10000-#xEFFFF] * > NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] * - * @link https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget + * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget */ if ( $this->token_length >= 5 && '?' === $html[ $closer_at - 1 ] ) { $comment_text = substr( $html, $this->token_starts_at + 2, $this->token_length - 4 ); @@ -2244,7 +2244,7 @@ private function parse_next_attribute(): bool { * Treat the equal sign as a part of the attribute * name if it is the first encountered byte. * - * @link https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state + * @see https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state */ $name_length = '=' === $this->html[ $this->bytes_already_parsed ] ? 1 + strcspn( $this->html, "=/> \t\f\r\n", $this->bytes_already_parsed + 1 ) @@ -2321,12 +2321,12 @@ private function parse_next_attribute(): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * The tokenizer replaces U+0000 NULL bytes in * attribute names with U+FFFD. * - * @link https://html.spec.whatwg.org/#attribute-name-state + * @see https://html.spec.whatwg.org/#attribute-name-state */ $comparable_name = strtolower( str_replace( "\x00", "\u{FFFD}", $attribute_name ) ); @@ -2960,7 +2960,7 @@ private function get_decoded_attribute_value( WP_HTML_Attribute_Token $attribute * * @since 6.2.0 * - * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -3515,7 +3515,7 @@ public function is_tag_closer(): bool { * appears then the HTML parser will treat it as an opening tag with no * attributes. The BR tag is unique in this way. * - * @link https://html.spec.whatwg.org/#parsing-main-inbody + * @see https://html.spec.whatwg.org/#parsing-main-inbody */ 'BR' !== $this->get_tag() ); @@ -3833,8 +3833,8 @@ public function get_modifiable_text(): string { * it's important to apply the pre-processing steps, which is * normalizing newlines. * - * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @link https://infra.spec.whatwg.org/#normalize-newlines + * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @see https://infra.spec.whatwg.org/#normalize-newlines */ $text = str_replace( "\r\n", "\n", $text ); $text = str_replace( "\r", "\n", $text ); @@ -4242,7 +4242,7 @@ static function ( $tag_match ) { * * Only 'javascript' and 'json' content types are currently recognized. * - * @link https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element + * @see https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element * * @since 7.0.0 * @ignore @@ -4311,8 +4311,8 @@ private function get_script_content_type(): ?string { * > - text/x-ecmascript * > - text/x-javascript * - * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match - * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type + * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match + * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type */ switch ( $type_string ) { case 'application/ecmascript': @@ -4514,9 +4514,9 @@ private function get_script_content_type(): ?string { * as “tag-name-terminating characters.” This sequence forms the start * of what could be a SCRIPT opening or closing tag. * + * @see https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications * @see wp_html_api_script_element_escaping_diagram_source() - * @link https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements - * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications * * @since 7.0.0 * @ignore @@ -4624,7 +4624,7 @@ public function set_attribute( $name, $value ): bool { * - greater-than “>” * - ampersand “&” * - * @link https://html.spec.whatwg.org/#attributes-2 + * @see https://html.spec.whatwg.org/#attributes-2 */ if ( 0 === $name_length || @@ -4665,7 +4665,7 @@ public function set_attribute( $name, $value ): bool { /** * Escape attribute values appropriately. * - * @link https://html.spec.whatwg.org/#attributes-3 + * @see https://html.spec.whatwg.org/#attributes-3 */ $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes(), true ) ? esc_url( $value ) @@ -4694,7 +4694,7 @@ public function set_attribute( $name, $value ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $comparable_name = strtolower( $name ); @@ -4770,7 +4770,7 @@ public function remove_attribute( $name ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $name = strtolower( $name ); @@ -5340,7 +5340,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > described by the modern HTML and CSS specifications. * * @see self::$compat_mode - * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * @@ -5356,7 +5356,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > built before the widespread adoption of web standards. * * @see self::$compat_mode - * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * diff --git a/src/wp-includes/html-api/class-wp-html-token.php b/src/wp-includes/html-api/class-wp-html-token.php index 01701d02ec9d1..de1b843dc33ff 100644 --- a/src/wp-includes/html-api/class-wp-html-token.php +++ b/src/wp-includes/html-api/class-wp-html-token.php @@ -54,7 +54,7 @@ class WP_HTML_Token { * * @since 6.4.0 * - * @link https://html.spec.whatwg.org/#self-closing-flag + * @see https://html.spec.whatwg.org/#self-closing-flag * * @var bool */ diff --git a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php index fa483d83e5671..609d521dec440 100644 --- a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php +++ b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php @@ -12,7 +12,7 @@ * 'characters' => '©', * ); * - * @link https://html.spec.whatwg.org/entities.json + * @see https://html.spec.whatwg.org/entities.json * * @var array. */ diff --git a/tests/phpunit/includes/build-visual-html-tree.php b/tests/phpunit/includes/build-visual-html-tree.php index b4592df6ef89a..d874e944ead0c 100644 --- a/tests/phpunit/includes/build-visual-html-tree.php +++ b/tests/phpunit/includes/build-visual-html-tree.php @@ -34,7 +34,7 @@ * style="margin-top:50px;margin-bottom:50px;" * * - * @link https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md + * @see https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md * * @since 6.9.0 * diff --git a/tests/phpunit/tests/html-api/wpHtmlDecoder.php b/tests/phpunit/tests/html-api/wpHtmlDecoder.php index 894cfee43f9f5..a8e1fa65c681a 100644 --- a/tests/phpunit/tests/html-api/wpHtmlDecoder.php +++ b/tests/phpunit/tests/html-api/wpHtmlDecoder.php @@ -227,7 +227,7 @@ public function test_semicolonless_legacy_reference_before_multibyte_attribute_f * treated as alphanumerics by `ctype_alnum()` on some systems, but should never * be recognized as ASCII Alphanumerics according to the HTML standards. * - * @link https://html.spec.whatwg.org/#named-character-reference-state + * @see https://html.spec.whatwg.org/#named-character-reference-state * * @return array An ASCII alphanumeric is an ASCII digit or ASCII alpha. * > An ASCII alpha is an ASCII upper alpha or ASCII lower alpha. * - * @link https://html.spec.whatwg.org/#named-character-reference-state + * @see https://html.spec.whatwg.org/#named-character-reference-state * * @return Generator Test cases. */