Action hook 'all_admin_notices'

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

View Source

all_admin_notices

Action Hook
Description
Prints generic admin screen notices.

Hook Information

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

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

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

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

Source Code Context

wp-admin/admin-header.php:321 - How this hook is used in WordPress core
<?php
 316  /**
 317   * Prints generic admin screen notices.
 318   *
 319   * @since 3.1.0
 320   */
 321  do_action( 'all_admin_notices' );
 322  
 323  if ( 'options-general.php' === $parent_file ) {
 324  	require ABSPATH . 'wp-admin/options-head.php';
 325  }

PHP Documentation

<?php
/**
 * Prints generic 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.