Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-super.../partials
File: easy.php
<div class="wpsc-settings-inner">
[0] Fix | Delete
<?php
[1] Fix | Delete
global $wpsc_promo_links;
[2] Fix | Delete
echo '<div class="wpsc-card">';
[3] Fix | Delete
echo '<form name="wp_manager" action="' . esc_url_raw( add_query_arg( 'tab', 'easy', $admin_url ) ) . '" method="post">';
[4] Fix | Delete
echo '<input type="hidden" name="action" value="easysetup" />';
[5] Fix | Delete
wp_nonce_field( 'wp-cache' );
[6] Fix | Delete
?>
[7] Fix | Delete
<table class="form-table">
[8] Fix | Delete
<tr valign="top">
[9] Fix | Delete
<th scope="row"><label for="wp_cache_status"><?php esc_html_e( 'Caching', 'wp-super-cache' ); ?></label></th>
[10] Fix | Delete
<td>
[11] Fix | Delete
<fieldset>
[12] Fix | Delete
<label><input type='radio' name='wp_cache_easy_on' value='1' <?php checked( $cache_enabled ); ?> ><?php echo esc_html__( 'Caching On', 'wp-super-cache' ) . ' <em>(' . esc_html__( 'Recommended', 'wp-super-cache' ) . ')</em>'; ?></label><br />
[13] Fix | Delete
<label><input type='radio' name='wp_cache_easy_on' value='0' <?php checked( ! $cache_enabled ); ?> ><?php esc_html_e( 'Caching Off', 'wp-super-cache' ); ?></label><br />
[14] Fix | Delete
</fieldset>
[15] Fix | Delete
</td>
[16] Fix | Delete
</tr>
[17] Fix | Delete
</table>
[18] Fix | Delete
<p><?php _e( 'The following recommended settings will be enabled:', 'wp-super-cache' ); ?></p>
[19] Fix | Delete
<ol>
[20] Fix | Delete
<li><?php _e( 'Caching disabled for logged in visitors.', 'wp-super-cache' ); ?></li>
[21] Fix | Delete
<li><?php _e( 'Simple caching.', 'wp-super-cache' ); ?></li>
[22] Fix | Delete
<li><?php _e( 'Cache Rebuild.', 'wp-super-cache' ); ?></li>
[23] Fix | Delete
<li><?php _e( 'Interval garbage collection every 10 minutes with a cache lifetime of 30 minutes (if not configured already).', 'wp-super-cache' ); ?></li>
[24] Fix | Delete
</ol>
[25] Fix | Delete
<p><?php _e( 'These settings can be modified on the Advanced Settings page.', 'wp-super-cache' ); ?></p>
[26] Fix | Delete
<?php
[27] Fix | Delete
if ( ! $is_nginx && $cache_enabled && ! $wp_cache_mod_rewrite ) {
[28] Fix | Delete
$scrules = trim( implode( "\n", extract_from_markers( trailingslashit( get_home_path() ) . '.htaccess', 'WPSuperCache' ) ) );
[29] Fix | Delete
if ( ! empty( $scrules ) ) {
[30] Fix | Delete
echo '<p><strong>' . esc_html__( 'Notice: Simple caching enabled but Supercache mod_rewrite rules from expert mode detected. Cached files will be served using those rules. If your site is working ok, please ignore this message. Otherwise, you can edit the .htaccess file in the root of your install and remove the SuperCache rules.', 'wp-super-cache' ) . '</strong></p>';
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
[34] Fix | Delete
echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . ' value="' . esc_html__( 'Update Status', 'wp-super-cache' ) . '" />';
[35] Fix | Delete
if ( wpsc_is_boost_current() ) {
[36] Fix | Delete
$config = wpsc_get_boost_migration_config();
[37] Fix | Delete
$button_url = $config['is_installed'] ? $config['activate_url'] : $config['install_url'];
[38] Fix | Delete
$button_class = $config['is_installed'] ? 'wpsc-activate-boost-button' : 'wpsc-install-boost-button';
[39] Fix | Delete
$button_label = esc_html__( 'Try Jetpack Boost', 'wp-super-cache' );
[40] Fix | Delete
if ( wpsc_is_boost_active() && wpsc_is_boost_installed() ) {
[41] Fix | Delete
$button_url = esc_url( admin_url( 'admin.php?page=jetpack-boost' ) );
[42] Fix | Delete
$button_class = '';
[43] Fix | Delete
$button_label = esc_html__( 'Jetpack Boost Dashboard', 'wp-super-cache' );
[44] Fix | Delete
}
[45] Fix | Delete
echo "<a style='margin-left: 12px;' data-source='try_button' class='button button-secondary " . esc_attr( $button_class ) . " wpsc-boost-migration-button' href='" . esc_url( $button_url ) . "'>";
[46] Fix | Delete
echo '<div class="spinner" style="display:none;"></div>';
[47] Fix | Delete
echo '<label>';
[48] Fix | Delete
echo esc_html( $button_label );
[49] Fix | Delete
echo '</label>';
[50] Fix | Delete
echo '</a>';
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
echo '</div></form>';
[54] Fix | Delete
echo '</div>';
[55] Fix | Delete
if ( $cache_enabled ) {
[56] Fix | Delete
echo '<div class="wpsc-card">';
[57] Fix | Delete
echo '<h4>' . esc_html__( 'Cache Tester', 'wp-super-cache' ) . '</h4>';
[58] Fix | Delete
echo '<p>' . esc_html__( 'Test your cached website by clicking the test button below.', 'wp-super-cache' ) . '</p>';
[59] Fix | Delete
echo '<p>' . __( 'Note: if you use Cloudflare or other transparent front-end proxy service this test may fail.<ol><li> If you have Cloudflare minification enabled this plugin may detect differences in the pages and report an error.</li><li> Try using the development mode of Cloudflare to perform the test. You can disable development mode afterwards if the test succeeds.</li></ol>', 'wp-super-cache' ) . '</p>';
[60] Fix | Delete
if ( array_key_exists( 'action', $_POST ) && 'test' === $_POST['action'] && $valid_nonce ) {
[61] Fix | Delete
$url = trailingslashit( get_bloginfo( 'url' ) );
[62] Fix | Delete
if ( isset( $_POST['httponly'] ) ) {
[63] Fix | Delete
$url = str_replace( 'https://', 'http://', $url );
[64] Fix | Delete
}
[65] Fix | Delete
$test_messages = array( esc_html__( 'Fetching %s to prime cache: ', 'wp-super-cache' ), esc_html__( 'Fetching first copy of %s: ', 'wp-super-cache' ), esc_html__( 'Fetching second copy of %s: ', 'wp-super-cache' ) );
[66] Fix | Delete
$c = 0;
[67] Fix | Delete
$cache_test_error = false;
[68] Fix | Delete
$page = array();
[69] Fix | Delete
foreach ( $test_messages as $message ) {
[70] Fix | Delete
echo '<p>' . sprintf( $message, $url );
[71] Fix | Delete
$page[ $c ] = wp_remote_get( $url, array( 'timeout' => 60, 'blocking' => true ) );
[72] Fix | Delete
if ( ! is_wp_error( $page[ $c ] ) ) {
[73] Fix | Delete
$fp = fopen( $cache_path . $c . '.html', 'w' );
[74] Fix | Delete
fwrite( $fp, $page[ $c ]['body'] );
[75] Fix | Delete
fclose( $fp );
[76] Fix | Delete
echo '<span style="color: #0a0; font-weight: bold;">' . esc_html__( 'OK', 'wp-super-cache' ) . "</span> (<a href='" . esc_url_raw( WP_CONTENT_URL . '/cache/' . $c . '.html' ) . "'>" . $c . '.html</a>)</p>';
[77] Fix | Delete
sleep( 1 );
[78] Fix | Delete
} else {
[79] Fix | Delete
$cache_test_error = true;
[80] Fix | Delete
echo '<span style="color: #a00; font-weight: bold;">' . esc_html__( 'FAILED', 'wp-super-cache' ) . '</span></p>';
[81] Fix | Delete
$errors = '';
[82] Fix | Delete
$messages = '';
[83] Fix | Delete
foreach ( $page[ $c ]->get_error_codes() as $code ) {
[84] Fix | Delete
$severity = $page[ $c ]->get_error_data( $code );
[85] Fix | Delete
foreach ( $page[ $c ]->get_error_messages( $code ) as $err ) {
[86] Fix | Delete
$errors .= $severity . ': ' . $err . "<br />\n";
[87] Fix | Delete
}
[88] Fix | Delete
}
[89] Fix | Delete
if ( ! empty( $errors ) ) {
[90] Fix | Delete
echo '<p>' . sprintf( __( '<strong>Errors:</strong> %s', 'wp-super-cache' ), $errors ) . '</p>';
[91] Fix | Delete
}
[92] Fix | Delete
}
[93] Fix | Delete
++$c;
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
if ( false == $cache_test_error ) {
[97] Fix | Delete
echo '<ul><li>' . sprintf( esc_html__( 'Page %d: %d (%s)', 'wp-super-cache' ), 1, intval( $page[1]['response']['code'] ), esc_attr( $page[1]['response']['message'] ) ) . '</li>';
[98] Fix | Delete
echo '<li>' . sprintf( esc_html__( 'Page %d: %d (%s)', 'wp-super-cache' ), 2, intval( $page[2]['response']['code'] ), esc_attr( $page[2]['response']['message'] ) ) . '</li></ul>';
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
if ( false == $cache_test_error && preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[1]['body'], $matches1 ) &&
[102] Fix | Delete
preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[2]['body'], $matches2 ) && $matches1[2] == $matches2[2]
[103] Fix | Delete
) {
[104] Fix | Delete
echo '<p>' . sprintf( esc_html__( 'Page 1: %s', 'wp-super-cache' ), $matches1[2] ) . '</p>';
[105] Fix | Delete
echo '<p>' . sprintf( esc_html__( 'Page 2: %s', 'wp-super-cache' ), $matches2[2] ) . '</p>';
[106] Fix | Delete
echo '<p><span style="color: #0a0; font-weight: bold;">' . esc_html__( 'The timestamps on both pages match!', 'wp-super-cache' ) . '</span></p>';
[107] Fix | Delete
} else {
[108] Fix | Delete
echo '<p><strong>' . esc_html__( 'The pages do not match! Timestamps differ or were not found!', 'wp-super-cache' ) . '</strong></p>';
[109] Fix | Delete
echo '<p>' . esc_html__( 'Things you can do:', 'wp-super-cache' ) . '</p>';
[110] Fix | Delete
echo '<ol><li>' . esc_html__( 'Load your homepage in a logged out browser, check the timestamp at the end of the html source. Load the page again and compare the timestamp. Caching is working if the timestamps match.', 'wp-super-cache' ) . '</li>';
[111] Fix | Delete
echo '<li>' . esc_html__( 'Enable logging on the Debug page here. That should help you track down the problem.', 'wp-super-cache' ) . '</li>';
[112] Fix | Delete
echo '<li>' . esc_html__( 'You should check Page 1 and Page 2 above for errors. Your local server configuration may not allow your website to access itself.', 'wp-super-cache' ) . '</li>';
[113] Fix | Delete
echo '</ol>';
[114] Fix | Delete
}
[115] Fix | Delete
}
[116] Fix | Delete
echo '<form name="cache_tester" action="' . esc_url_raw( add_query_arg( 'tab', 'easy', $admin_url ) ) . '" method="post">';
[117] Fix | Delete
echo '<input type="hidden" name="action" value="test" />';
[118] Fix | Delete
if ( ! empty( $_SERVER['HTTPS'] ) && 'on' === strtolower( $_SERVER['HTTPS'] ) ) {
[119] Fix | Delete
echo '<input type="checkbox" name="httponly" checked="checked" value="1" /> ' . esc_html__( 'Send non-secure (non https) request for homepage', 'wp-super-cache' );
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
if ( isset( $wp_super_cache_comments ) && $wp_super_cache_comments == 0 ) {
[123] Fix | Delete
echo '<p>' . __( '<strong>Warning!</strong> Cache comments are currently disabled. Please go to the Debug page and enable Cache Status Messages there. You should clear the cache before testing.', 'wp-super-cache' ) . '</p>';
[124] Fix | Delete
echo '<div class="submit"><input disabled style="color: #aaa" class="button-secondary" type="submit" name="test" value="' . esc_html__( 'Test Cache', 'wp-super-cache' ) . '" /></div>';
[125] Fix | Delete
} else {
[126] Fix | Delete
echo '<div class="submit"><input class="button-secondary" type="submit" name="test" value="' . __( 'Test Cache', 'wp-super-cache' ) . '" /></div>';
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
wp_nonce_field( 'wp-cache' );
[130] Fix | Delete
echo '</form>';
[131] Fix | Delete
echo '</div>';
[132] Fix | Delete
}
[133] Fix | Delete
echo '<div class="wpsc-card">';
[134] Fix | Delete
echo '<h4>' . esc_html__( 'Delete Cached Pages', 'wp-super-cache' ) . '</h4>';
[135] Fix | Delete
echo '<p>' . esc_html__( 'Cached pages are stored on your server as html and PHP files. If you need to delete them, use the button below.', 'wp-super-cache' ) . '</p>';
[136] Fix | Delete
echo '<form name="wp_cache_content_delete" action="' . esc_url_raw( add_query_arg( 'tab', 'contents', $admin_url ) ) . '" method="post">';
[137] Fix | Delete
echo '<input type="hidden" name="wp_delete_cache" />';
[138] Fix | Delete
echo '<div class="submit"><input id="deletepost" class="button-secondary" type="submit" ' . SUBMITDISABLED . 'value="' . esc_html__( 'Delete Cache', 'wp-super-cache' ) . ' " /></div>';
[139] Fix | Delete
wp_nonce_field( 'wp-cache' );
[140] Fix | Delete
echo "</form>\n";
[141] Fix | Delete
echo '</div>';
[142] Fix | Delete
[143] Fix | Delete
if ( is_multisite() && wpsupercache_site_admin() ) {
[144] Fix | Delete
echo '<div class="wpsc-card">';
[145] Fix | Delete
echo '<form name="wp_cache_content_delete" action="' . esc_url_raw( add_query_arg( 'tab', 'contents', $admin_url ) . '#listfiles' ) . '" method="post">';
[146] Fix | Delete
echo '<input type="hidden" name="wp_delete_all_cache" />';
[147] Fix | Delete
echo '<div class="submit"><input id="deleteallpost" class="button-secondary" type="submit" ' . SUBMITDISABLED . 'value="' . esc_html__( 'Delete Cache On All Blogs', 'wp-super-cache' ) . '" /></div>';
[148] Fix | Delete
wp_nonce_field( 'wp-cache' );
[149] Fix | Delete
echo "</form><br />\n";
[150] Fix | Delete
echo '</div>';
[151] Fix | Delete
}
[152] Fix | Delete
?>
[153] Fix | Delete
<div class="wpsc-card">
[154] Fix | Delete
<h4 class="clear"><?php esc_html_e( 'Recommended Links and Plugins', 'wp-super-cache' ); ?></h4>
[155] Fix | Delete
<p><?php esc_html_e( 'Caching is only one part of making a website faster. Here are some other plugins that will help:', 'wp-super-cache' ); ?></p>
[156] Fix | Delete
[157] Fix | Delete
<ul style="list-style: square; margin-left: 2em;">
[158] Fix | Delete
<li>
[159] Fix | Delete
<?php
[160] Fix | Delete
echo \wp_kses(
[161] Fix | Delete
\sprintf(
[162] Fix | Delete
/* translators: %s: Link URL for Jetpack Boost. */
[163] Fix | Delete
__( '<a href="%s">Jetpack Boost</a> helps speed up your website by generating critical CSS, defering Javascript and much more.', 'wp-super-cache' ),
[164] Fix | Delete
$wpsc_promo_links['boost']
[165] Fix | Delete
),
[166] Fix | Delete
'a'
[167] Fix | Delete
);
[168] Fix | Delete
?>
[169] Fix | Delete
</li>
[170] Fix | Delete
[171] Fix | Delete
<li>
[172] Fix | Delete
<?php
[173] Fix | Delete
printf(
[174] Fix | Delete
/* translators: %s: HTML Link to Jetpack website. */
[175] Fix | Delete
esc_html__( '%s provides everything you need to build a successful WordPress website including an image/photo CDN (free) and a video hosting service (paid).', 'wp-super-cache' ),
[176] Fix | Delete
'<a href="' . esc_url( $wpsc_promo_links['jetpack'] ) . '">Jetpack</a>'
[177] Fix | Delete
);
[178] Fix | Delete
?>
[179] Fix | Delete
</li>
[180] Fix | Delete
[181] Fix | Delete
<?php // translators: this is a html link to the GTMetrix website. ?>
[182] Fix | Delete
<li><?php printf( esc_html__( 'See how your site performs by doing a %s analysis of it.', 'wp-super-cache' ), '<a href="https://gtmetrix.com/">GTMetrix</a>' ); ?></li>
[183] Fix | Delete
<?php // translators: this is a html link to the Memcached plugin. ?>
[184] Fix | Delete
<li><?php printf( esc_html__( 'Advanced users only: Install an object cache like %s.', 'wp-super-cache' ), '<a href="https://wordpress.org/plugins/memcached/">Memcached</a>' ); ?></li>
[185] Fix | Delete
<li><?php printf( __( '<a href="%s">WP Crontrol</a> is a useful plugin to use when trying to debug garbage collection and preload problems.', 'wp-super-cache' ), 'https://wordpress.org/plugins/wp-crontrol/' ); ?></li>
[186] Fix | Delete
</ul>
[187] Fix | Delete
<p><?php esc_html_e( "* The links above (apart from Jetpack and Jetpack Boost) go to websites outside the author's control. Caution is advised when testing any new software.", 'wp-super-cache' ); ?></p>
[188] Fix | Delete
</div>
[189] Fix | Delete
</div>
[190] Fix | Delete
[191] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function