gtp4wp_debug_file

The Google Tag Manager for WordPress gtp4wp debug file function.

Description

gtp4wp_debug_file( $debug_data ); 

Parameters (1)

0. $debug_data
The debug data.

Usage

  1. if ( !function_exists( 'gtp4wp_debug_file' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-tag-manager-for-wordpress/common/readoptions.php'; 
  3.  
  4. // The debug data. 
  5. $debug_data = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gtp4wp_debug_file($debug_data); 
  9.  

Defined (1)

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

/common/readoptions.php  
  1. function gtp4wp_debug_file( $debug_data ) { 
  2. $fp = fopen( dirname( __FILE__ ) . "/" . date("Y-m-d-H-i-s-u") . ".txt", "w" ); 
  3. if ( $fp ) { 
  4. fwrite( $fp, $debug_data ); 
  5. fclose( $fp );