Make WordPress Core

Opened 10 years ago

Closed 15 months ago

#37185 closed defect (bug) (wontfix)

wp_print_styles() doesn't call "wp_print_styles" action when "$handles" argument passed

Reported by: evgenniy Owned by:
Priority: normal Milestone:
Component: Script Loader Version: 3.3.1
Severity: normal Keywords: needs-unit-tests has-patch needs-refresh
Cc: Focuses:

Description

In wp_print_styles(), there is "wp_print_styles" action calls when function is used with optional "$handles" argument.

if () statement should be deleted ( like wp_print_scripts() ).

Unit tests are passed.

Attachments (1)

functions.wp-styles.diff (385 bytes ) - added by evgenniy 10 years ago.
Patch

Download all attachments as: .zip

Change History (9)

@evgenniy
10 years ago

Patch

#1 @SergeyBiryukov
10 years ago

  • Component GeneralScript Loader
  • Milestone Awaiting Review4.6

#2 follow-up: @stephenharris
10 years ago

  • Keywords needs-unit-tests has-patch added

@evgenniy are you able to add a unit test for this?

#3 @rachelbaker
10 years ago

  • Owner set to rachelbaker
  • Status newaccepted

#4 @SergeyBiryukov
10 years ago

  • Version trunk3.3.1

Introduced in [19649].

#5 in reply to: ↑ 2 @evgenniy
10 years ago

Replying to stephenharris:

@evgenniy are you able to add a unit test for this?

Yes, I can add unit test for wp_print_styles() function.

#6 @rachelbaker
10 years ago

  • Keywords needs-refresh added
  • Owner rachelbaker removed
  • Status acceptedassigned

@evgenniy It would also be helpful if you could generate the patch from the root directory. Looks like functions.wp-styles.diff was generated from within the wp-includes directory.

#7 @rachelbaker
10 years ago

  • Milestone 4.6Future Release

Punting out of 4.6 pending unit tests and a refreshed patch

#8 @westonruter
15 months ago

  • Resolutionwontfix
  • Status assignedclosed

The inclusion of the if was done intentionally in [19649] to fix #19510. Removing the if will cause all kinds of back-compat breakage now.

If an action is needed whenever wp_print_styles() is called regardless of whether the $handles arg is passed, then we'll need a new action to trigger separately.

Note: See TracTickets for help on using tickets.