load-page-new.php
Action HookDescription
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'. / do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /* The following hooks are fired to ensure backward compatibility. In all other cases, 'load-' . $pagenow should be used instead.Hook Information
| File Location | wp-admin/admin.phpView on GitHub | 
| Hook Type | Action | 
| Line Number | 394 | 
Hook Parameters
                    This hook doesn't accept any parameters.
                
                
                
                Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into load-page-new.php
add_action('load-page-new.php', 'my_custom_function');
function my_custom_function() {
    // Your custom code here
}
Source Code Context
                        wp-admin/admin.php:394
                        - How this hook is used in WordPress core
                    
                    <?php
 389  	 * The following hooks are fired to ensure backward compatibility.
 390  	 * In all other cases, 'load-' . $pagenow should be used instead.
 391  	 */
 392  	if ( 'page' === $typenow ) {
 393  		if ( 'post-new.php' === $pagenow ) {
 394  			do_action( 'load-page-new.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 395  		} elseif ( 'post.php' === $pagenow ) {
 396  			do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
 397  		}
 398  	} elseif ( 'edit-tags.php' === $pagenow ) {
 399  		if ( 'category' === $taxnow ) {
PHP Documentation
<?php
/**
	 * 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'.
	 *
	 * @since 2.1.0
	 */
	do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
	/*
	 * The following hooks are fired to ensure backward compatibility.
	 * In all other cases, 'load-' . $pagenow should be used instead.
	 */
                        Quick Info
                    
                    - Hook Type: Action
- Parameters: 0
- File: wp-admin/admin.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
