PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 14.8
Jetpack – WP Security, Backup, Speed, & Growth v14.8
16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 All 502 releases
jetpack / views / admin / network-settings.php

network-settings.php in Jetpack – WP Security, Backup, Speed, & Growth 14.8, at views/admin/network-settings.php

74 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Jetpack Network Settings view template.
4 *
5 * @html-template Jetpack::load_view
6 * @package automattic/jetpack
7 */
8
9 // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- HTML template, let Phan handle it.
10
11 use Automattic\Jetpack\IP\Utils as IP_Utils;
12
13 if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended
14 ?>
15 <div class="updated"><p><?php esc_html_e( 'Jetpack Network Settings Updated!', 'jetpack' ); ?></p></div>
16 <?php endif; ?>
17
18 <?php
19 if ( isset( $_GET['error'] ) && 'jetpack_protect_whitelist' === $_GET['error'] ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended
20 ?>
21 <div class="error"><p><?php esc_html_e( 'One of your IP addresses was not valid.', 'jetpack' ); ?></p></div>
22 <?php endif; ?>
23
24 <div class="wrap">
25 <h2><?php esc_html_e( 'Network Settings', 'jetpack' ); ?></h2>
26 <form action="edit.php?action=jetpack-network-settings" method="POST">
27 <h3><?php echo esc_html_x( 'Global', 'Affects all sites in a Multisite network.', 'jetpack' ); ?></h3>
28 <p><?php esc_html_e( 'These settings affect all sites on the network.', 'jetpack' ); ?></p>
29 <?php wp_nonce_field( 'jetpack-network-settings' ); ?>
30 <table class="form-table">
31 <tr valign="top">
32 <th scope="row"><label for="sub-site-override"><?php esc_html_e( 'Sub-site override', 'jetpack' ); ?></label></th>
33 <td>
34 <input type="checkbox" name="sub-site-connection-override" id="sub-site-override" value="1" <?php checked( $data['options']['sub-site-connection-override'] ); ?> />
35 <label for="sub-site-override"><?php esc_html_e( 'Allow individual site administrators to manage their own connections (connect and disconnect) to WordPress.com', 'jetpack' ); ?></label>
36 </td>
37 </tr>
38
39 <tr valign="top">
40 <th scope="row"><label for="sub-site-override"><?php esc_html_e( 'Protect IP allow list', 'jetpack' ); ?></label></th>
41 <td>
42 <p><strong>
43 <?php
44 $current_ip = IP_Utils::get_ip();
45 if ( ! empty( $current_ip ) ) {
46 printf(
47 /* Translators: placeholder is an IP address. */
48 esc_html__( 'Your current IP: %1$s', 'jetpack' ),
49 esc_html( $current_ip )
50 );
51 }
52 ?>
53 </strong></p>
54 <?php
55 echo '<textarea name="global-allow-list" style="width: 100%;" rows="8">'; // echo to avoid tabs displayed in textarea. See https://github.com/Automattic/jetpack/pull/21151/files#r713922521.
56
57 foreach ( $data['jetpack_protect_whitelist']['global'] as $ip ) {
58 echo esc_html( $ip ) . "\n";
59 }
60 ?>
61 </textarea> <br />
62 <label for="global-allow-list">
63 <?php esc_html_e( 'IPv4 and IPv6 are acceptable. Enter multiple IPs on separate lines.', 'jetpack' ); ?>
64 <br />
65 <?php esc_html_e( 'To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100', 'jetpack' ); ?>
66 </label>
67 </td>
68 </tr>
69 </table>
70 <?php submit_button(); ?>
71
72 </form>
73 </div>
74