Skip to content

Commit dfe963f

Browse files
committed
Add settings note about chrome extension unavailability
1 parent cd677b9 commit dfe963f

File tree

2 files changed

+36
-16
lines changed

2 files changed

+36
-16
lines changed

src/Admin/SettingsPage.php

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function output_settings_instructions() {
164164
<p><?php printf(
165165
/* translators: Placeholder: %s refers to the PHP Console library, pointing to its GitHub repository */
166166
_x( 'This plugin allows you to use %s within your WordPress installation for testing, debugging and development purposes.', 'PHP Console, the PHP Library', 'wp-php-console' ),
167-
'<a href="' . esc_url( Plugin::get_php_console_project_page_url() ) . '" target="_blank">PHP Console</a>'
167+
'<a href="' . esc_url( Plugin::get_php_console_repository_url() ) . '" target="_blank">PHP Console</a>'
168168
);
169169
?></p>
170170
<h4><?php esc_html_e( 'Usage instructions:', 'wp-php-console' ); ?></h4>
@@ -173,9 +173,16 @@ public function output_settings_instructions() {
173173

174174
$instructions = [
175175
sprintf(
176-
/* translators: Placeholder: %s represents the Google Chrome PHP Console extension download link */
177-
_x( 'Make sure you have downloaded and installed %s.', 'PHP Console, the Chrome Extension', 'wp-php-console' ),
178-
'<a target="_blank" href="' . esc_url( Plugin::get_php_console_chrome_extension_url() ) .'">PHP Console extension for Google Chrome</a>'
176+
/* translators: Placeholder: %s - the Google Chrome PHP Console extension download link */
177+
_x( 'Make sure you have downloaded and installed the %s.', 'PHP Console, the Chrome Extension', 'wp-php-console' ),
178+
/* translators: Placeholder: %s - PHP Console extension name */
179+
'<a href="' . esc_url( Plugin::get_php_console_chrome_extension_web_store_url() ) . '" target="_blank">' . sprintf( __( '%s extension for Google Chrome', 'wp-php-console' ), 'PHP Console' ) . '</a>'
180+
),
181+
sprintf(
182+
/* translators: Placeholders: %1$s - opening PHP <a> link tag, %2$s - closing PHP </a> link tag */
183+
__( 'If the Chrome extension is unavailable from the web store, you may %1$sdownload and install it from the source%2$s.', 'wp-php-console' ),
184+
'<a href="' . esc_url( Plugin::get_php_console_chrome_extension_repository_url() ) . '" target="_blank">',
185+
'</a>'
179186
),
180187
esc_html__( 'Set a password for the eval terminal in the options below and hit "Save Changes".', 'wp-php-console' ),
181188
esc_html__( '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' ),
@@ -329,17 +336,17 @@ private function output_ip_field_instructions() {
329336
<p class="description"><?php esc_html_e( 'You may specify any of the following, to give access to specific IPs to the eval terminal:', 'wp-php-console' ); ?></p>
330337
<ol>
331338
<li><span class="description"><?php printf(
332-
/* translators: Placeholders: %1$s - a single IP address, %2$s link to Varying Vagrant Vagrants project repository */
333-
__( 'An IP address (for example %1$s, %2$s default IP address).', 'wp-php-console' ),
334-
'<code>192.168.50.4</code>',
335-
'<a href="https://github.com/Varying-Vagrant-Vagrants/VVV">Varying Vagrant Vagrants</a>'
336-
); ?></span></li>
339+
/* translators: Placeholders: %1$s - a single IP address, %2$s link to Varying Vagrant Vagrants project repository */
340+
__( 'An IP address (for example %1$s, %2$s default IP address).', 'wp-php-console' ),
341+
'<code>192.168.50.4</code>',
342+
'<a href="https://github.com/Varying-Vagrant-Vagrants/VVV">Varying Vagrant Vagrants</a>'
343+
); ?></span></li>
337344
<li><span class="description"><?php printf(
338-
/* translators: Placeholders: %1$s a range of IP addresses, %2$s - comma separated IP addresses */
339-
__( 'A range of addresses (%1$s) or multiple addresses, comma separated (%2$s).', 'wp-php-console' ),
340-
'<code>192.168.*.*</code>',
341-
'<code>192.168.10.25,192.168.10.28</code>'
342-
); ?></span></li>
345+
/* translators: Placeholders: %1$s a range of IP addresses, %2$s - comma separated IP addresses */
346+
__( 'A range of addresses (%1$s) or multiple addresses, comma separated (%2$s).', 'wp-php-console' ),
347+
'<code>192.168.*.*</code>',
348+
'<code>192.168.10.25,192.168.10.28</code>'
349+
); ?></span></li>
343350
</ol>
344351
<?php
345352
}

src/Plugin.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public static function get_project_page_url() {
334334
*
335335
* @return string
336336
*/
337-
public static function get_php_console_project_page_url() {
337+
public static function get_php_console_repository_url() {
338338

339339
return 'https://github.com/barbushin/php-console';
340340
}
@@ -347,12 +347,25 @@ public static function get_php_console_project_page_url() {
347347
*
348348
* @return string
349349
*/
350-
public static function get_php_console_chrome_extension_url() {
350+
public static function get_php_console_chrome_extension_web_store_url() {
351351

352352
return 'https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef';
353353
}
354354

355355

356+
/**
357+
* Gets the PHP Console Google Chrome extension repository URL.
358+
*
359+
* @since 1.6.0
360+
*
361+
* @return string
362+
*/
363+
public static function get_php_console_chrome_extension_repository_url() {
364+
365+
return 'https://github.com/barbushin/php-console-extension';
366+
}
367+
368+
356369
/**
357370
* Gets the plugin reviews page URL.
358371
*

0 commit comments

Comments
 (0)