#57863 closed defect (bug) (fixed)
HTML API: Document the shorthand usage of the next_tag() function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | HTML API | Keywords: | has-patch commit |
Focuses: | docs | Cc: |
Description
In WP_HTML_Tag_Processor
, the next_tag() method may be used with a query:
$this->next_tag( array( 'tag_name' => 'img' ) )
But it may also be used with just a tag name:
$this->next_tag( 'img' )
Both forms are valid, but only the former one is covered in the docstrings.
Change History (11)
This ticket was mentioned in PR #4168 on WordPress/wordpress-develop by @zieladam.
2 years ago
#1
- Keywords has-patch added
#2
@
2 years ago
- Focuses docs added
- Keywords commit added
Looks good to me, this will help reduce confusion about differences between the documentation and the code that is already in use.
#3
@
2 years ago
- Owner set to hellofromTonya
- Status changed from new to reviewing
Self-assigning for commit review.
#4
@
2 years ago
- Keywords changes-requested added; commit removed
Removing commit
as discussion is still happening in PR 4168.
Note: This is docs only. So it can go up to RC1.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
2 years ago
#6
@
2 years ago
- Keywords commit added; changes-requested removed
Patch: https://github.com/WordPress/wordpress-develop/pull/4168
Ready for commit. Prepping commit now ahead of Beta 5.
@hellofromTonya commented on PR #4168:
2 years ago
#7
Committed via https://core.trac.wordpress.org/changeset/55477.
2 years ago
#9
Thanks for fixing the alignment all! Helps for people using plaintext editors like vim
and emacs
## Description
The docstrings in
WP_HTML_Tag_Processor
don't mention the shorthand usage$this->next_tag( 'img' )
. They only cover the long form of$this->next_tag( array( 'tag_name' => 'img' ) )
. This PR adjusts a few examples to cover both.cc @poena @dmsnell @hellofromtonya
Trac ticket: https://core.trac.wordpress.org/ticket/57863