#57594 closed defect (bug) (fixed)
Correct type in rss_widget_feed_link filter docs
Reported by: | sabernhardt | Owned by: | joedolson |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Widgets | Keywords: | needs-dev-note |
Focuses: | docs | Cc: |
Description
In changeset:52031, the rss_widget_feed_link
filter's DocBlock says the first parameter is a string. However, I had recommended returning false
to remove the link.
Mentioning both possibilities is probably enough, though I think switching to __return_empty_string
would improve it (in the documentation and in Twenty Twenty-One).
Attachments (1)
Change History (9)
#3
@
20 months ago
- Milestone changed from Awaiting Review to 6.2
- Owner set to joedolson
- Status changed from new to reviewing
It certainly cleans things up. It's a minor tweak, so I don't see any reason not to get it into 6.2. I can take that.
This ticket was mentioned in PR #4117 on WordPress/wordpress-develop by @joedolson.
20 months ago
#5
Trac ticket: https://core.trac.wordpress.org/ticket/57594
@joedolson commented on PR #4117:
20 months ago
#6
#7
@
20 months ago
- Keywords commit removed
- Resolution set to fixed
- Status changed from reviewing to closed
Fixed in [55409]
#8
@
19 months ago
- Keywords needs-dev-note added; has-patch removed
The dev note from WP5.9 probably could be updated. Here's a draft for the modified example and revision note:
add_filter( 'rss_widget_feed_link', '__return_empty_string' );
For Twenty Twenty-One, the
after_setup_theme
action contains the filter. Update: Since March 2023, Twenty Twenty-One's filter returns an empty string instead of the booleanfalse
. See #57594.
editing documentation and Twenty Twenty-One