[wp-trac] [WordPress Trac] #41235: New load_screen_** action
WordPress Trac
noreply at wordpress.org
Tue Jul 4 23:30:11 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: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by aussieguy123):
Yes. I saw the existing {{{current_screen}}} hook. However that would also
need extra logic in code hooked into it to have code run on a specific
screen. So this is a new {{{ current_screen_{$screen_id} }}} action
Perhaps the code to set up this new action could be hooked into the
existing {{{ current_screen }}} action?
Something like:
{{{#!php
<?php
add_action( 'current_screen', function() {
$current_screen = function_exists( 'get_current_screen' ) ?
get_current_screen()->id : null;
do_action('load_screen_' . $current_screen);
});
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41235#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list