[wp-trac] [WordPress Trac] #41235: New load_screen_** action
WordPress Trac
noreply at wordpress.org
Thu Jul 6 06:23:48 UTC 2017
#41235: New load_screen_** action
--------------------------+------------------------------
Reporter: aussieguy123 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by DrewAPicture):
Looking at your examples, I'm not really sure what the advantage to a new
dynamic hook would be other than making what is already pretty
straightforward with `current_screen` slightly more specific.
As pointed out, the existing `current_screen` hook could be used for what
you want, and the screen object is passed to it:
{{{
#!php
<?php
add_action( 'current_screen', function( $screen ) {
if ( isset( $screen->id ) && 'killed_attachment' === $screen->id ) {
// Do stuff.
}
} );
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41235#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list