show_message

Displays the given administration message.

Description

show_message( (string|WP_Error) $message ); 

Parameters (1)

0. $message (string|WP_Error)
The message.

Usage

  1. if ( !function_exists( 'show_message' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/misc.php'; 
  3.  
  4. // The message. 
  5. $message = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = show_message($message); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/misc.php  
  1. function show_message($message) { 
  2. if ( is_wp_error($message) ) { 
  3. if ( $message->get_error_data() && is_string( $message->get_error_data() ) ) 
  4. $message = $message->get_error_message() . ': ' . $message->get_error_data(); 
  5. else 
  6. $message = $message->get_error_message(); 
  7. echo "<p>$message</p>\n"; 
  8. flush();