Action hook 'current_screen'

in WP Core File wp-admin/includes/class-wp-screen.php at line 424

View Source

current_screen

Action Hook
Description
Fires after the current screen has been set.

Hook Information

File Location wp-admin/includes/class-wp-screen.php View on GitHub
Hook Type Action
Line Number 424

Hook Parameters

Type Name Description
WP_Screen $current_screen Current WP_Screen object.

Usage Examples

Basic Usage
<?php
// Hook into current_screen
add_action('current_screen', 'my_custom_function', 10, 1);

function my_custom_function($current_screen) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/class-wp-screen.php:424 - How this hook is used in WordPress core
<?php
 419  		 *
 420  		 * @since 3.0.0
 421  		 *
 422  		 * @param WP_Screen $current_screen Current WP_Screen object.
 423  		 */
 424  		do_action( 'current_screen', $current_screen );
 425  	}
 426  
 427  	/**
 428  	 * Constructor
 429  	 *

PHP Documentation

<?php
/**
		 * Fires after the current screen has been set.
		 *
		 * @since 3.0.0
		 *
		 * @param WP_Screen $current_screen Current WP_Screen object.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-admin/includes/class-wp-screen.php
Related Hooks

Related hooks will be displayed here in future updates.