Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/views/admin
File: network-settings.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Jetpack Network Settings view template.
[2] Fix | Delete
*
[3] Fix | Delete
* @html-template Jetpack::load_view
[4] Fix | Delete
* @package automattic/jetpack
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- HTML template, let Phan handle it.
[8] Fix | Delete
[9] Fix | Delete
use Automattic\Jetpack\IP\Utils as IP_Utils;
[10] Fix | Delete
[11] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[12] Fix | Delete
exit( 0 );
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended
[16] Fix | Delete
?>
[17] Fix | Delete
<div class="updated"><p><?php esc_html_e( 'Jetpack Network Settings Updated!', 'jetpack' ); ?></p></div>
[18] Fix | Delete
<?php endif; ?>
[19] Fix | Delete
[20] Fix | Delete
<?php
[21] Fix | Delete
if ( isset( $_GET['error'] ) && 'jetpack_protect_whitelist' === $_GET['error'] ) : // phpcs:ignore WordPress.Security.NonceVerification.Recommended
[22] Fix | Delete
?>
[23] Fix | Delete
<div class="error"><p><?php esc_html_e( 'One of your IP addresses was not valid.', 'jetpack' ); ?></p></div>
[24] Fix | Delete
<?php endif; ?>
[25] Fix | Delete
[26] Fix | Delete
<div class="wrap">
[27] Fix | Delete
<h2><?php esc_html_e( 'Network Settings', 'jetpack' ); ?></h2>
[28] Fix | Delete
<form action="edit.php?action=jetpack-network-settings" method="POST">
[29] Fix | Delete
<h3><?php echo esc_html_x( 'Global', 'Affects all sites in a Multisite network.', 'jetpack' ); ?></h3>
[30] Fix | Delete
<p><?php esc_html_e( 'These settings affect all sites on the network.', 'jetpack' ); ?></p>
[31] Fix | Delete
<?php wp_nonce_field( 'jetpack-network-settings' ); ?>
[32] Fix | Delete
<table class="form-table">
[33] Fix | Delete
<tr valign="top">
[34] Fix | Delete
<th scope="row"><label for="sub-site-override"><?php esc_html_e( 'Sub-site override', 'jetpack' ); ?></label></th>
[35] Fix | Delete
<td>
[36] Fix | Delete
<input type="checkbox" name="sub-site-connection-override" id="sub-site-override" value="1" <?php checked( $data['options']['sub-site-connection-override'] ); ?> />
[37] Fix | Delete
<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>
[38] Fix | Delete
</td>
[39] Fix | Delete
</tr>
[40] Fix | Delete
[41] Fix | Delete
<tr valign="top">
[42] Fix | Delete
<th scope="row"><label for="sub-site-override"><?php esc_html_e( 'Protect IP allow list', 'jetpack' ); ?></label></th>
[43] Fix | Delete
<td>
[44] Fix | Delete
<p><strong>
[45] Fix | Delete
<?php
[46] Fix | Delete
$current_ip = IP_Utils::get_ip();
[47] Fix | Delete
if ( ! empty( $current_ip ) ) {
[48] Fix | Delete
printf(
[49] Fix | Delete
/* Translators: placeholder is an IP address. */
[50] Fix | Delete
esc_html__( 'Your current IP: %1$s', 'jetpack' ),
[51] Fix | Delete
esc_html( $current_ip )
[52] Fix | Delete
);
[53] Fix | Delete
}
[54] Fix | Delete
?>
[55] Fix | Delete
</strong></p>
[56] Fix | Delete
<?php
[57] Fix | Delete
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.
[58] Fix | Delete
[59] Fix | Delete
foreach ( $data['jetpack_protect_whitelist']['global'] as $ip ) {
[60] Fix | Delete
echo esc_html( $ip ) . "\n";
[61] Fix | Delete
}
[62] Fix | Delete
?>
[63] Fix | Delete
</textarea> <br />
[64] Fix | Delete
<label for="global-allow-list">
[65] Fix | Delete
<?php esc_html_e( 'IPv4 and IPv6 are acceptable. Enter multiple IPs on separate lines.', 'jetpack' ); ?>
[66] Fix | Delete
<br />
[67] Fix | Delete
<?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' ); ?>
[68] Fix | Delete
</label>
[69] Fix | Delete
</td>
[70] Fix | Delete
</tr>
[71] Fix | Delete
</table>
[72] Fix | Delete
<?php submit_button(); ?>
[73] Fix | Delete
[74] Fix | Delete
</form>
[75] Fix | Delete
</div>
[76] Fix | Delete
[77] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function