[wp-trac] [WordPress Trac] #23265: Canonical callback representation
WordPress Trac
noreply at wordpress.org
Tue Jan 22 15:30:37 UTC 2013
#23265: Canonical callback representation
-----------------------------+-------------------------
Reporter: scribu | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Plugins
Version: | Severity: normal
Keywords: |
-----------------------------+-------------------------
Since PHP 5.3, you have various ways of passing the same callback:
{{{
add_action( 'the_content', array( 'My_Plugin_Main_Class', 'the_content' )
);
add_action( 'the_content', 'My_Plugin_Main_Class::the_content' );
add_action( '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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23265>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list