Action hook 'admin_notices'

in WP Core File wp-admin/admin-header.php at line 313

View Source

admin_notices

Action Hook
Description
Prints admin screen notices.

Hook Information

File Location wp-admin/admin-header.php View on GitHub
Hook Type Action
Line Number 313

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into admin_notices
add_action('admin_notices', 'my_custom_function');

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

Source Code Context

wp-admin/admin-header.php:313 - How this hook is used in WordPress core
<?php
 308  	/**
 309  	 * Prints admin screen notices.
 310  	 *
 311  	 * @since 3.1.0
 312  	 */
 313  	do_action( 'admin_notices' );
 314  }
 315  
 316  /**
 317   * Prints generic admin screen notices.
 318   *

PHP Documentation

<?php
/**
	 * Prints admin screen notices.
	 *
	 * @since 3.1.0
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-admin/admin-header.php
Related Hooks

Related hooks will be displayed here in future updates.