0 ) { // add every plugin that loads before PHP Console Log to $plugin_list array for ( $i = 0; $i < $key; $i++ ) { $plugin_list[] = $plugins[$i]; } } // set default response // $return_html = '
None. PHP Console Log loads first.
'; $return_html = '' . esc_html__( 'None.', 'php-console-log' ) . ' PHP Console Log ' . esc_html__( 'loads first.', 'php-console-log' ) . '
'; // build HTML ordered list of all plugins that load before PHP Console Log if ( count( $plugin_list ) ) { $return_html = 'do_action( 'php_console_log', '' );
do_action( 'php_console_log', '' ); do_action( 'php_console_log', '' );
$my_string = 'My String';
do_action( 'php_console_log', $my_string );
$my_array = array(
'elm 1',
'elm 2',
);
do_action( 'php_console_log', $my_array );
$my_array = array(
'key 1'=>'elm 1',
'key 2'=>'elm 2',
);
do_action( 'php_console_log', $my_array);
$my_array = array(
'My String 1',
'My String 2',
array(
'elm 1',
'elm 2',
),
'My String 3',
array(
'key 1'=>'elm 1',
'key 2'=>'elm 2',
'key 3' => array(
'key 3a' => 'elm 3a',
'key 3b' => 'elm 3b',
),
),
'My String 4'
);
do_action( 'php_console_log', $my_array);
Chrome:
: https://developers.google.com/web/tools/chrome-devtools/open#console
Firefox:
: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console
Safari:
Preferences, click Advanced, then select "Show Develop menu in menu bar".', 'php-console-log' );?>
: https://support.apple.com/guide/safari-developer/develop-menu-dev39df999c1/mac
do_action( 'php_console_log', '' );
do_action( 'php_console_log', '' ); add_action( 'init', 'my_function' ); do_action( 'php_console_log', '' );
define( 'WP_DEBUG', true );