Advertisement
nshelper

Untitled

Jun 4th, 2022 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.96 KB | None | 0 0
  1. <?php
  2.  
  3.    
  4.     //Debug
  5.     add_action ( 'wph/settings_reset', '_debug_wph_settings_reset' );
  6.     function _debug_wph_settings_reset()
  7.         {
  8.             global $wph;
  9.            
  10.             $wph->functions->log_save( '-------------------------------' );
  11.             $wph->functions->log_save( date("Y-m-d H:i:s") );
  12.             $wph->functions->log_save( 'Action wph/settings_reset' );
  13.            
  14.             if ( function_exists( 'get_current_user_id' ) )
  15.                 $wph->functions->log_save( "Username " . get_current_user_id() );
  16.            
  17.             $wph->functions->log_save( "Callstack" );    
  18.             $wph->functions->log_save( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), TRUE ) );
  19.            
  20.             $wph->functions->log_save( "GET" );    
  21.             $wph->functions->log_save( print_r( $_GET, TRUE ) );
  22.            
  23.             $wph->functions->log_save( "POST" );    
  24.             $wph->functions->log_save( print_r( $_POST, TRUE ) );
  25.         }
  26.    
  27.     add_action ( 'wph/do_recovery', '_debug_wph_do_recovery' );
  28.     function _debug_wph_do_recovery()
  29.         {
  30.             global $wph;
  31.            
  32.             $wph->functions->log_save( '-------------------------------' );
  33.             $wph->functions->log_save( date("Y-m-d H:i:s") );
  34.             $wph->functions->log_save( 'Action wph/do_recovery' );
  35.            
  36.             if ( function_exists( 'get_current_user_id' ) )
  37.                 $wph->functions->log_save( "Username " . get_current_user_id() );
  38.            
  39.             $wph->functions->log_save( "Callstack" );    
  40.             $wph->functions->log_save( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), TRUE ) );
  41.            
  42.             $wph->functions->log_save( "GET" );    
  43.             $wph->functions->log_save( print_r( $_GET, TRUE ) );
  44.            
  45.             $wph->functions->log_save( "POST" );    
  46.             $wph->functions->log_save( print_r( $_POST, TRUE ) );
  47.         }  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement