Make WordPress Core

#58254 closed defect (bug) (fixed)

HTML API: Fix ordering issue in docblock that's breaking Developer Resources

Reported by: dmsnell's profile dmsnell Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.2.1 Priority: normal
Severity: normal Version: 6.2
Component: HTML API Keywords: has-patch fixed-major
Focuses: docs Cc:

Description

In this patch we're re-ordering the @see tag in the docblock comment for WP_HTML_Tag_Processor::get_attribute_names_with_prefix. Previously the rendering in Developer Resources was broken, whereby it merged the link in the @see tag with the example code.

https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_attribute_names_with_prefix/

Now, in this patch, the @see tag has been moved below the code example so that the example is properly extracted.

Additionally the example code for WP_HTML_Tag_Processor::get_tag has been updated to show lowercase tag names in the input HTML so that it doesn't convey the wrong impression that the uppercase output from get_tag() depends on the case of the input HTML.

Change History (11)

This ticket was mentioned in PR #4425 on WordPress/wordpress-develop by @dmsnell.


10 months ago
#1

Trac: #58254-ticket

In this patch we're re-ordering the @see tag in the docblock comment for WP_HTML_Tag_Processor::get_attribute_names_with_prefix. Previously the rendering in Developer Resources was broken, whereby it merged the link in the @see tag with the example code.

https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_attribute_names_with_prefix/

Now, in this patch, the @see tag has been moved below the code example so that the example is properly extracted.

Additionally the example code for WP_HTML_Tag_Processor::get_tag has been updated to show lowercase tag names in the input HTML so that it doesn't convey the wrong impression that the uppercase output from get_tag() depends on the case of the input HTML.

## Screenshot

https://i0.wp.com/user-images.githubusercontent.com/5431237/236184790-13ed04d9-39f3-4641-9b25-97f4d23c0707.png

After this patch the example code should appear in its own block as with all the other methods in the class.

#2 @dmsnell
10 months ago

cc: @zieladam @bernhard-reiter @johnbillion

thanks @johnbillion for reviewing these developer docs! I found this because of the other issues you fixed

#3 @johnbillion
10 months ago

  • Focuses docs added
  • Milestone changed from Awaiting Review to 6.3

#4 @SergeyBiryukov
10 months ago

  • Milestone changed from 6.3 to 6.2.1

Thanks for the ticket!

I think this can be addressed in 6.2.1 along with #58028.

@audrasjb commented on PR #4425:


10 months ago
#5

Thanks for putting this PR together!
Indeed, this change is welcome to ship with 58028 in milestone 6.2.1 👍

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


10 months ago

#7 @SergeyBiryukov
10 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55724:

Docs: Correct the placement of @see tags in WP_HTML_Tag_Processor class.

This moves a reference link in ::get_attribute_names_with_prefix() below the code example, so that it is correctly displayed in the Developer Resources.

Includes updating some other @see tags for consistency as per the documentation standards.

Additionally, the example code for WP_HTML_Tag_Processor::get_tag() is updated to show lowercase tag names in the input HTML, so that it does not convey the wrong impression that the uppercase output from ::get_tag() depends on the case of the input HTML.

Follow-up to [55203].

Props dmsnell, johnbillion, audrasjb, SergeyBiryukov.
Fixes #58254.

#8 @SergeyBiryukov
10 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 6.2.1.

@SergeyBiryukov commented on PR #4425:


10 months ago
#9

Thanks for the PR! Merged in r55724.

#10 @dmsnell
10 months ago

Thanks!

#11 @SergeyBiryukov
10 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 55728:

Docs: Correct the placement of @see tags in WP_HTML_Tag_Processor class.

This moves a reference link in ::get_attribute_names_with_prefix() below the code example, so that it is correctly displayed in the Developer Resources.

Includes updating some other @see tags for consistency as per the documentation standards.

Additionally, the example code for WP_HTML_Tag_Processor::get_tag() is updated to show lowercase tag names in the input HTML, so that it does not convey the wrong impression that the uppercase output from ::get_tag() depends on the case of the input HTML.

Follow-up to [55203].

Props dmsnell, johnbillion, audrasjb, SergeyBiryukov.
Merges [55724] to the 6.2 branch.
Fixes #58254.

Note: See TracTickets for help on using tickets.