|
@@ 260-276 (lines=17) @@
|
| 257 |
|
* |
| 258 |
|
* @since 1.5.0 |
| 259 |
|
*/ |
| 260 |
|
public function register_field() { |
| 261 |
|
|
| 262 |
|
?> |
| 263 |
|
<input type="checkbox" id="wp-php-console-register" name="wp_php_console[register]" value="1" <?php checked( (bool) $this->options['register'] ); ?> /> |
| 264 |
|
<label for="wp-php-console-register"><?php esc_html_e( 'Yes', 'wp-php-console' ); ?></label><br> |
| 265 |
|
<p class="description"><?php |
| 266 |
|
esc_html_e( 'Tick to register PC class in the global namespace.', 'wp-php-console' ); |
| 267 |
|
echo '<br>'; |
| 268 |
|
/* translators: Placeholders: PHP code snippets examples */ |
| 269 |
|
printf( __( 'Allows to write %1$s or %2$s instructions in PHP to inspect %3$s in the JavaScript console.', 'wp-php-console' ), |
| 270 |
|
'<code>PC::debug($var, $tag)</code>', |
| 271 |
|
'<code>PC::magic_tag($var)</code>', |
| 272 |
|
'<code>$var</code>' |
| 273 |
|
); ?></p> |
| 274 |
|
<?php |
| 275 |
|
|
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
|
| 279 |
|
/** |
|
@@ 300-315 (lines=16) @@
|
| 297 |
|
* |
| 298 |
|
* @since 1.5.0 |
| 299 |
|
*/ |
| 300 |
|
public function short_field() { |
| 301 |
|
|
| 302 |
|
?> |
| 303 |
|
<input type="checkbox" id="wp-php-console-short" name="wp_php_console[short]" value="1" <?php checked( (bool) $this->options['short'] ); ?> /> |
| 304 |
|
<label for="wp-php-console-short"><?php esc_html_e( 'Yes', 'wp-php-console' ); ?></label><br> |
| 305 |
|
<p class="description"><?php |
| 306 |
|
esc_html_e( 'Tick to shorten the length of PHP Console error sources and traces paths in browser JavaScript console for better readability.', 'wp-php-console' ); |
| 307 |
|
echo '<br>'; |
| 308 |
|
/* translators: %1$s - long server path, %2$s shortened server path */ |
| 309 |
|
printf( __( 'Paths like %1$s will be displayed as %2$s', 'wp-php-console' ), |
| 310 |
|
'<code>/server/path/to/document/root/WP/wp-admin/admin.php:31</code>', |
| 311 |
|
'<code>/WP/wp-admin/admin.php:31</code>' |
| 312 |
|
); ?></p> |
| 313 |
|
<?php |
| 314 |
|
|
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
|
| 318 |
|
/** |