load-(pagenow)
Fires before a particular screen is loaded.
The load-* hook fires in a number of contexts. This hook is for core screens.
The dynamic portion of the hook name, $pagenow, is a global variable referring to the filename of the current screen, such as 'admin.php', 'post-new.php' etc. A complete hook for the latter would be 'load-post-new.php'.
Использование
add_action( 'load-(pagenow)', 'wp_kama_load_pagenow_action' ); /** * Function for `load-(pagenow)` action-hook. * * @return void */ function wp_kama_load_pagenow_action(){ // action... }
Список изменений
С версии 2.1.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/admin.php
load-(pagenow)
wp-admin/admin.php 385
do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
Где используется хук в WordPress
wp-admin/includes/admin-filters.php 131
add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called.
wp-admin/includes/admin-filters.php 132
add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
wp-admin/includes/class-custom-background.php 81
add_action( "load-{$page}", array( $this, 'admin_load' ) );
wp-admin/includes/class-custom-background.php 82
add_action( "load-{$page}", array( $this, 'take_action' ), 49 );
wp-admin/includes/class-custom-background.php 83
add_action( "load-{$page}", array( $this, 'handle_upload' ), 49 );
wp-includes/update.php 1152
add_action( 'load-plugins.php', 'wp_update_plugins' );
wp-includes/update.php 1153
add_action( 'load-update.php', 'wp_update_plugins' );
wp-includes/update.php 1154
add_action( 'load-update-core.php', 'wp_update_plugins' );
wp-includes/update.php 1158
add_action( 'load-themes.php', 'wp_update_themes' );
wp-includes/update.php 1159
add_action( 'load-update.php', 'wp_update_themes' );
wp-includes/update.php 1160
add_action( 'load-update-core.php', 'wp_update_themes' );