', 'Content-Type: text/html; charset=UTF-8' ); $contents = 'Website: ' . get_home_url() . '

'; $contents .= ABD_Perf_Tools::get_readable_server_config_data( '
' ); $contents .= '



SESSION LOG
======================
'; $contents .= ABD_Log::get_readable_log( 0, ' >> ', '

' ); $res = wp_mail( $email_address, 'ABD Usage Info: ' . get_home_url(), $contents, $headers ); if( !$res ) { ABD_Log::error( 'Unknown error sending usage info email to developer.' ); } else { ABD_Log::info( 'Successfully emailed developer usage info.' ); } ABD_Log::perf_summary( 'ABD_Click_Handler::send_usage_info()', $start_time, $start_mem ); self::redirect( 'send_usage_info_success' ); } public static function delete_all_statistics() { $start_time = microtime( true ); $start_mem = memory_get_usage( true ); check_admin_referer( 'user instructed deletion of all statistics table rows' ); $res = ABD_Database::delete_all_stats(); ABD_Log::perf_summary( 'ABD_Click_Handler::send_usage_info()', $start_time, $start_mem ); self::redirect( 'delete_all_stats_success' ); } protected static function redirect( $query_arg_value = 'generic success', $query_arg = 'msg-code' ) { $url = $_SERVER['HTTP_REFERER']; $url = add_query_arg( $query_arg, $query_arg_value, $url ); header( 'Location: ' . $url ); exit; } } // end class } // end if( !class_exists( ...