dbg

The MailPoet Newsletters dbg function.

Description

dbg( $mixed, (constant) $exit = true ); 

Parameters (2)

0. $mixed
The mixed.
1. $exit — Optional. (constant) => true
The exit.

Usage

  1. if ( !function_exists( 'dbg' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'mailpoet-newsletters/inc/debug.php'; 
  3.  
  4. // The mixed. 
  5. $mixed = null; 
  6.  
  7. // The exit. 
  8. $exit = true; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = dbg($mixed, $exit); 
  12.  

Defined (1)

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

/inc/debug.php  
  1. function dbg($mixed, $exit=true) { 
  2. if(!function_exists('is_user_logged_in')) include(ABSPATH.'wp-includes'.DS.'pluggable.php'); 
  3. if(is_user_logged_in() || isset($_GET['dbg'])) { 
  4. new dBug ( $mixed ); 
  5. if($exit) { 
  6. global $wysija_msg, $wysija_queries, $wysija_queries_errors; 
  7. echo '<h2>WYSIJA MSG</h2>'; 
  8. echo '<pre>'; 
  9. dbg($wysija_msg, 0); 
  10. echo '</pre>'; 
  11.  
  12. echo '<h2>WYSIJA QUERIES</h2>'; 
  13. echo '<pre>'; 
  14. dbg($wysija_queries, 0); 
  15. echo '</pre>'; 
  16.  
  17. echo '<h2>WYSIJA QUERIES ERRORS</h2>'; 
  18. echo '<pre>'; 
  19. dbg($wysija_queries_errors, 0); 
  20. echo '</pre>'; 
  21. exit;