You appear to be a bot. Output may be restricted
Description
Add actions to trace selected actionsFor 'wp' we can trace the WordPress instance passed and/or the wp_rewrite structure At shutdown create a trace log of the following:
- included files
- saved queries
- general status report
Usage
bw_trace_add_selected_actions();
Parameters
Returns
voidSource
File name: oik-bwtrace/includes/bwtrace-actions.phpLines:
1 to 64 of 64
function bw_trace_add_selected_actions() { bw_trace_add_action( "wp", "trace_wp_action", "includes/oik-actions.php", "bw_trace_wp" ); bw_trace_add_action( "wp", "trace_wp_rewrite", "includes/oik-actions.php", "bw_trace_wp_rewrite" ); //bw_trace_add_action( 'shutdown', 'trace_plugin_loaded', 'includes/oik-actions.php', 'bw_trace_plugin_loaded_report' ); bw_trace_add_action( 'shutdown','trace_plugin_load', 'includes/oik-actions.php', 'bw_trace_plugin_loaded_report' ); bw_trace_add_action( "shutdown", "trace_included_files", "includes/oik-actions.php", "bw_trace_included_files" ); bw_trace_add_action( "shutdown", "trace_saved_queries", "includes/oik-actions.php", "bw_trace_saved_queries" ); bw_trace_add_action( "shutdown", "trace_output_buffer", "includes/oik-actions.php", "bw_trace_output_buffer" ); bw_trace_add_action( "shutdown", "trace_functions", "includes/oik-actions.php", "bw_trace_functions_traced" ); bw_trace_add_action( "shutdown", "trace_status_report", "includes/oik-actions.php", "bw_trace_status_report" ); bw_trace_add_action( 'shutdown', 'trace_purge_if_no_errors', 'includes/oik-actions.php', 'bw_trace_purge_if_no_errors' ); bw_trace_add_action( 'shutdown', 'trace_url_links', 'includes/oik-actions.php', 'bw_trace_url_link' ); /** * @TODO - Add option to trace all attached hooks at shutdown. * This logic is/was being used to investigate which hooks are attached when Gutenberg is running. * add_action( "shutdown", "bw_trace_all_attached_hooks" ); */ /* * These option names are not defined in the admin interface * so are not expected to be in the $bw_action_options array * If you want the hooks to be invoked then you either have to add the entries programmatically * or cheat by using an existing option name */ bw_trace_add_action( "shutdown", "trace_plugin_paths", "includes/oik-actions.php", "bw_trace_plugin_paths" ); $bw_trace_action = bw_trace_add_action( "deprecated_constructor_run", "trace_deprecated", "includes/bwtrace-actions.php", "bw_trace_deprecated_constructor_run", 2 ); if ( $bw_trace_action ) { add_action( "deprecated_constructor_run", "bw_trace_deprecated_constructor_run", 10, 2 ); // hack to get hook listed in WP-a2z add_action( "deprecated_argument_run", "bw_trace_deprecated_argument_run", 10, 3 ); add_action( "deprecated_file_included", "bw_trace_deprecated_file_included", 10, 4 ); add_action( "deprecated_function_run", "bw_trace_deprecated_function_run", 10, 3 ); add_action( "doing_it_wrong_run", "bw_trace_doing_it_wrong_run", 10, 3 ); add_filter( "deprecated_argument_trigger_error", "bw_trace_deprecated_argument_trigger_error", 10 ); add_filter( "deprecated_constructor_trigger_error", "bw_trace_deprecated_argument_trigger_error", 10 ); add_filter( "deprecated_file_trigger_error", "bw_trace_deprecated_argument_trigger_error", 10 ); add_filter( "deprecated_function_trigger_error", "bw_trace_deprecated_argument_trigger_error", 10 ); add_filter( "doing_it_wrong_trigger_error", "bw_trace_deprecated_argument_trigger_error", 10 ); // Quick tests - these should be commented out //_deprecated_argument( __FUNCTION__, "2.0.2", "just a test" ); //_deprecated_file( __FILE__, "2.0.2", "another file", "just a test" ); //_deprecated_function( __FUNCTION__, "2.0.3", "anotherfunc" ); //_doing_it_wrong( __FUNCTION__, "you're doing it wrong", "2.0.3" ); } bw_trace_add_error_handler(); //$x.= "oops"; bw_trace_add_trace_selected_hooks(); bw_trace_add_trace_selected_filters(); bw_trace_add_trace_selected_hooks_the_post(); bw_trace_add_trace_selected_hooks_attached_hooks(); bw_trace_add_trace_selected_hooks_backtrace(); bw_trace_add_trace_stringwatch(); //bw_trace_add_trace_anychange(); bw_trace_add_trace_rest(); bw_trace_http_raw_post_data(); bw_trace_plugins_loaded(); }View on GitHub View on Trac