plugin-icon

PHP Console Log

제작자: Marcus Viar·
Log PHP variables and arrays to the web console in your browser via JavaScript's console.log(). No browser extensions required.
등급
5/5
버전
1.0.1
활성화된 설치 항목
20
최근 업데이트일
Feb 7, 2020
PHP Console Log

Examples

Place the do_action( ‘php_console_log’, ‘My String or Array’ ); function anywhere in your WordPress plugin PHP code. The value(s) you pass into do_action( ‘php_console_log’, ‘My String or Array’ ); will be logged to the web console in your browser.

Pass in a string

$my_string = 'My String'; do_action( 'php_console_log', $my_string );

Pass in an array

$my_array = array( 'elm 1' 'elm 2', ); do_action( 'php_console_log', $my_array );

Pass in an associative array

$my_array = array( 'key 1'=>'elm 1', 'key 2'=>'elm 2', ); do_action( 'php_console_log', $my_array);

Pass in an unlimited number of arguments nested to an unlimited depth (multi-dimensional 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);
무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 5.3.20
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.