Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#55219 closed defect (bug) (fixed)

"current_theme_supports-{$feature}" filter doesn't run if no $args are passed

Reported by: helgatheviking's profile helgatheviking Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: Cc:


If there are no args passed to current_theme_supports() then the function terminates early and you never reach the current_theme_supports-{$feature}


Attachments (1)

55219.diff (2.6 KB) - added by pavanpatil1 2 years ago.
Created patch

Download all attachments as: .zip

Change History (7)

#1 @azouamauriac
2 years ago

  • Component changed from General to Themes

Hello there, thanks for the repport!

The return was introduced here [12350] while there wasn't filter yet, then the filter come here [19682].

This can be milestone for consideration I think.

#2 @SergeyBiryukov
2 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.0

Thanks for the ticket! Good catch, this seems like an oversight.

2 years ago

Created patch

#3 @pavanpatil1
2 years ago

  • Keywords has-patch added; needs-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

#4 @pavanpatil1
2 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#5 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Status changed from reopened to reviewing

#6 @SergeyBiryukov
2 years ago

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

In 52812:

Themes: Make sure the current_theme_supports-{$feature} filter is consistently applied.

Previously, the filter was not applied if there are no arguments passed to current_theme_supports().

Follow-up to [12350], [19682].

Props helgatheviking, azouamauriac, pavanpatil1, SergeyBiryukov.
Fixes #55219.

Note: See TracTickets for help on using tickets.