monsterinsights_get_message

Need to escape in advance of passing in $text.

Description

monsterinsights_get_message( (string) $type = 'error', (string) $text = '' ); 

Parameters (2)

0. $type — Optional. (string) => 'error'
The type.
1. $text — Optional. (string) => ''
The text.

Usage

  1. if ( !function_exists( 'monsterinsights_get_message' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/helpers.php'; 
  3.  
  4. // The type. 
  5. $type = 'error'; 
  6.  
  7. // The text. 
  8. $text = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = monsterinsights_get_message($type, $text); 
  12.  

Defined (1)

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

/includes/helpers.php  
  1. function monsterinsights_get_message( $type = error, $text = '' ) { 
  2. $div = ''; 
  3. if ( $type === error || $type === 'alert' || $type === 'success' || $type === 'info' ) { 
  4. $base = MonsterInsights(); 
  5. return $base->notices->display_inline_notice( 'monsterinsights_standard_notice', '', $text, $type, false, array( 'skip_message_escape' => true ) ); 
  6. } else { 
  7. return '';