rwmb_debug

Adds [whatever] to the global debug array.

Description

(array) rwmb_debug( (mixed) $input, (string) $print_or_export = 'print' ); 

Returns (array)

Parameters (2)

0. $input (mixed)
The input.
1. $print_or_export — Optional. (string) => 'print'
The print or export.

Usage

  1. if ( !function_exists( 'rwmb_debug' ) ) { 
  2. require_once '/meta-box/meta-box.php'; 
  3.  
  4. // The input. 
  5. $input = null; 
  6.  
  7. // The print or export. 
  8. $print_or_export = 'print'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = rwmb_debug($input, $print_or_export); 
  12.  

Defined (1)

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

/meta-box/meta-box.php  
  1. function rwmb_debug( $input, $print_or_export = 'print' ) 
  2. global $rwmb_debug; 
  3.  
  4. $html = 'print' === $print_or_export ? print_r( $input, true ) : var_export( $input, true ); 
  5.  
  6. return $rwmb_debug[] = $html;