Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#57594 closed defect (bug) (fixed)

Correct type in rss_widget_feed_link filter docs

Reported by: sabernhardt Owned by: joedolson
Priority: normal Milestone: 6.2
Component: Widgets Version:
Severity: minor Keywords: needs-dev-note
Cc: Focuses: docs

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)

57594.patch (1.5 KB ) - added by sabernhardt 4 years ago.
editing documentation and Twenty Twenty-One

Download all attachments as: .zip

Change History (9)

@sabernhardt
4 years ago

editing documentation and Twenty Twenty-One

#1 @Mista-Flo
4 years ago

  • Keywords has-patch added

Patch looks good thanks @sabernhardt

#2 @sabernhardt
4 years ago

@audrasjb @joedolson Could this be worth adding to 6.2?

#3 @joedolson
4 years ago

  • Milestone Awaiting Review6.2
  • Owner set to joedolson
  • Status newreviewing

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.

#4 @audrasjb
4 years ago

  • Keywords commit added

Yes, this looks ready to go 👍

#7 @sabernhardt
4 years ago

  • Keywords commit removed
  • Resolutionfixed
  • Status reviewingclosed

Fixed in [55409]

#8 @sabernhardt
3 years 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 boolean false. See #57594.

Note: See TracTickets for help on using tickets.