Filter hook 'wp_admin_notice_markup'

in WP Core File wp-includes/functions.php at line 9063

View Source

wp_admin_notice_markup

Filter Hook
Description
Filters the markup for an admin notice.

Hook Information

File Location wp-includes/functions.php View on GitHub
Hook Type Filter
Line Number 9063

Hook Parameters

Type Name Description
string $markup The HTML markup for the admin notice.
string $message The message for the admin notice.
array $args The arguments for the admin notice.

Usage Examples

Basic Usage
<?php
// Hook into wp_admin_notice_markup
add_filter('wp_admin_notice_markup', 'my_custom_filter', 10, 3);

function my_custom_filter($markup, $message, $args) {
    // Your custom filtering logic here
    return $markup;
}

Source Code Context

wp-includes/functions.php:9063 - How this hook is used in WordPress core
<?php
9058  	 *
9059  	 * @param string $markup  The HTML markup for the admin notice.
9060  	 * @param string $message The message for the admin notice.
9061  	 * @param array  $args    The arguments for the admin notice.
9062  	 */
9063  	return apply_filters( 'wp_admin_notice_markup', $markup, $message, $args );
9064  }
9065  
9066  /**
9067   * Outputs an admin notice.
9068   *

PHP Documentation

<?php
/**
	 * Filters the markup for an admin notice.
	 *
	 * @since 6.4.0
	 *
	 * @param string $markup  The HTML markup for the admin notice.
	 * @param string $message The message for the admin notice.
	 * @param array  $args    The arguments for the admin notice.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/functions.php
Related Hooks

Related hooks will be displayed here in future updates.