Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 19 months ago

#57594 closed defect (bug) (fixed)

Correct type in rss_widget_feed_link filter docs

Reported by: sabernhardt's profile sabernhardt Owned by: joedolson's profile 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)

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

Download all attachments as: .zip

Change History (9)

@sabernhardt
20 months ago

editing documentation and Twenty Twenty-One

#1 @Mista-Flo
20 months ago

  • Keywords has-patch added

Patch looks good thanks @sabernhardt

#2 @sabernhardt
20 months ago

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

#3 @joedolson
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.

#4 @audrasjb
20 months ago

  • Keywords commit added

Yes, this looks ready to go 👍

#7 @sabernhardt
20 months ago

  • Keywords commit removed
  • Resolution set to fixed
  • Status changed from reviewing to closed

Fixed in [55409]

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

Note: See TracTickets for help on using tickets.