You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo'<small class="description">' . __( 'The password for the eval terminal. If empty, the plugin will not work.', 'wp-php-console' ) . '</small>';
286
+
echo'<small class="description">' . esc_html__( 'The password for the eval terminal. If empty, the plugin will not work.', 'wp-php-console' ) . '</small>';
echo'<small class="description">' . __( 'Tick this option if you want the eval terminal to work only on a SSL connection.', 'wp-php-console' ) . '</small>';
306
+
echo'<small class="description">' . esc_html__( 'Tick this option if you want the eval terminal to work only on a SSL connection.', 'wp-php-console' ) . '</small>';
// translators VVV Varying Vagrant Vagrants default IP address
324
+
/* translators: VVV Varying Vagrant Vagrants default IP address */
280
325
printf ( __( '<small class="description">' . __( 'You may specify an IP address (e.g. <code>192.168.50.4</code>, %s default IP address), a range of addresses (<code>192.168.*.*</code>) or multiple addresses, comma separated (<code>192.168.10.25,192.168.10.28</code>) to grant access to the eval terminal.', 'wp-php-console' ) . '</small>' ), '<a href="https://github.com/Varying-Vagrant-Vagrants/VVV">Varying Vagrant Vagrants</a>' );
281
326
282
327
}
@@ -406,10 +451,10 @@ public function settings_page() {
406
451
publicfunctionsettings_info() {
407
452
408
453
?>
409
-
<p><?php// Translators: %s refers to 'PHP Console' Chrome extension, will print download link for the Chrome extension
454
+
<p><?php/* translators: %s refers to 'PHP Console' Chrome extension, will print download link for the Chrome extension */
410
455
printf( _x( 'This plugin allows you to use %s within your WordPress installation for testing, debugging and development purposes.<br/>Usage instructions:', 'PHP Console, the Chrome Extension', 'wp-php-console' ), '<a href="https://github.com/barbushin/php-console" target="_blank">PHP Console</a>' ); ?></p>
411
456
<ol>
412
-
<li><?php// Translators: Install PHP Console extension for Google Chrome download link
457
+
<li><?php/* translators: Install PHP Console extension for Google Chrome download link */
413
458
printf( _x( 'Make sure you have downloaded and installed %s.', 'PHP Console, the Chrome Extension', 'wp-php-console' ), '<a target="_blank" href="https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef">PHP Console extension for Google Chrome</a>' ); ?></li>
414
459
<li><?php_e( 'Set a password for the eval terminal in the options below and hit <code>save changes</code>.', 'wp-php-console' ); ?></li>
415
460
<li><?php_e( 'Reload any page of your installation and click on the key icon in your Chrome browser address bar, enter your password and access the terminal.', 'wp-php-console' ); ?></li>
@@ -441,12 +486,21 @@ public function init() {
441
486
}
442
487
443
488
$connector = PhpConsole\Connector::getInstance();
444
-
$connector->setPassword( $password );
489
+
490
+
try {
491
+
$connector->setPassword( $password );
492
+
} catch ( \Exception$e ) {
493
+
$this->print_notice_exception( $e );
494
+
}
445
495
446
496
// PhpConsole instance
447
497
$handler = PhpConsole\Handler::getInstance();
448
-
if ( PhpConsole\Handler::getInstance()->isStarted() != true ) {
449
-
$handler->start();
498
+
if ( PhpConsole\Handler::getInstance()->isStarted() !== true ) {
/* translators: Placeholders: %1$s - opening HTML <a> link tag; %2$s closing HTML </a> link tag */
564
+
printf( $this->plugin_name . ': ' . __( 'Please remember to %1$s set a password %2$s if you want to enable terminal.', 'wp-php-console' ), '<a href="' . $settings_page .'">', '</a>' );
* Description: An implementation of PHP Console for WordPress. Easily debug and trace PHP errors and warnings from your Chrome dev tools console using a Google Chrome extension.
0 commit comments