@@ 335-347 (lines=13) @@ | ||
332 | * |
|
333 | * @since 1.2.4 |
|
334 | */ |
|
335 | public function register_field() { |
|
336 | ||
337 | $register = ! empty( $this->options['register'] ); |
|
338 | ||
339 | printf ( |
|
340 | '<input type="checkbox" id="wp-php-console-register" name="wp_php_console[register]" value="1" %s /> ', |
|
341 | $register ? 'checked="checked"' : '' |
|
342 | ); |
|
343 | echo '<label for="wp-php-console-register">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>'; |
|
344 | echo '<br />'; |
|
345 | echo '<small class="description">' . __( 'Choose to register PC in the global namespace. Allows to write <code>PC::debug($var, $tag)</code> or <code>PC::magic_tag($var)</code> instructions in PHP to inspect <code>$var</code> in the JavaScript console.', 'wp-php-console' ) . '</small>'; |
|
346 | ||
347 | } |
|
348 | ||
349 | ||
350 | /** |
|
@@ 355-367 (lines=13) @@ | ||
352 | * |
|
353 | * @since 1.2.4 |
|
354 | */ |
|
355 | public function stack_field() { |
|
356 | ||
357 | $stack = ! empty( $this->options['stack'] ); |
|
358 | ||
359 | printf ( |
|
360 | '<input type="checkbox" id="wp-php-console-stack" name="wp_php_console[stack]" value="1" %s /> ', |
|
361 | $stack ? 'checked="checked"' : '' |
|
362 | ); |
|
363 | echo '<label for="wp-php-console-stack">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>'; |
|
364 | echo '<br />'; |
|
365 | echo '<small class="description">' . __( "Choose to also see the call stack when PHP Console writes to the browser's JavaScript-console.", 'wp-php-console' ) . '</small>'; |
|
366 | ||
367 | } |
|
368 | ||
369 | ||
370 | /** |
|
@@ 375-387 (lines=13) @@ | ||
372 | * |
|
373 | * @since 1.2.4 |
|
374 | */ |
|
375 | public function short_field() { |
|
376 | ||
377 | $short = ! empty( $this->options['short'] ); |
|
378 | ||
379 | printf ( |
|
380 | '<input type="checkbox" id="wp-php-console-short" name="wp_php_console[short]" value="1" %s /> ', |
|
381 | $short ? 'checked="checked"' : '' |
|
382 | ); |
|
383 | echo '<label for="wp-php-console-short">' . esc_html__( 'Yes', 'wp-php-console' ) . '</label>'; |
|
384 | echo '<br />'; |
|
385 | echo '<small class="description">' . __( "Choose to shorten PHP Console error sources and traces paths in browser's JavaScript-console. Paths like <code>/server/path/to/document/root/WP/wp-admin/admin.php:31</code> will be displayed as <code>/W/wp-admin/admin.php:31</code>", 'wp-php-console' ) . '</small>'; |
|
386 | ||
387 | } |
|
388 | ||
389 | ||
390 | /** |