_monsterinsights_deprecated

Marks something as deprecated.

Description

_monsterinsights_deprecated( (string) $message ); 

The current behavior is to trigger a user error if WP_DEBUG is true.

Parameters (1)

0. $message (string)
Deprecation message shown.

Usage

  1. if ( !function_exists( '_monsterinsights_deprecated' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/deprecated.php'; 
  3.  
  4. // Deprecation message shown. 
  5. $message = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _monsterinsights_deprecated($message); 
  9.  

Defined (1)

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

/includes/deprecated.php  
  1. function _monsterinsights_deprecated( $message ) { 
  2.  
  3. /** 
  4. * Deprecated Message Filter. 
  5. * Allow plugin to filter the deprecated message. 
  6. * @since 6.0.0 
  7. *  
  8. * @param string $message Error message. 
  9. */  
  10. do_action( 'monsterinsights_deprecated_run', $message ); 
  11.  
  12. $show_errors = current_user_can( 'manage_options' ); 
  13.  
  14. /** 
  15. * Deprecated Error Trigger. 
  16. * Allow plugin to filter the outputerrortrigger. 
  17. * @since 6.0.0 
  18. *  
  19. * @param bool $show_errors Whether to show errors. 
  20. */ 
  21. $show_errors = apply_filters( 'monsterinsights_deprecated_trigger_error', $show_errors ); 
  22. if ( ( WP_DEBUG && $show_errors ) || monsterinsights_is_debug_mode() ) { 
  23. trigger_error( esc_html( $message ) );