Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#23265 closed enhancement

Canonical callback representation — at Version 2

Reported by: scribu Owned by:
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description (last modified by scribu)

Since PHP 5.3, you have various ways of passing the same callback:

add_filter( 'the_content', array( 'My_Plugin_Main_Class', 'the_content' ) );

add_filter( 'the_content', 'My_Plugin_Main_Class::the_content' );

add_filter( 'the_content', '\\My_Plugin_Main_Class::the_content' );

Currently, you have to use the exact same syntax in remove_action(), or it won't work.

It would be nice if _wp_filter_build_unique_id() converted all these variations to a canonical representation.

Sprung out of #23259

Change History (2)

#1 @nacin
5 years ago


#2 @scribu
5 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.