wpsc_check_advanced_cache()
No Hooks.
Return
null
. Nothing (null).
Usage
wpsc_check_advanced_cache();
wpsc_check_advanced_cache() wpsc check advanced cache code WPSCache 1.12.4
function wpsc_check_advanced_cache() { global $wpsc_advanced_cache_filename; $ret = false; $other_advanced_cache = false; if ( file_exists( $wpsc_advanced_cache_filename ) ) { $cache_type = wpsc_identify_advanced_cache(); switch ( $cache_type ) { case 'WPSC': return true; case 'BOOST': $other_advanced_cache = 'BOOST'; break; default: $other_advanced_cache = true; break; } } else { $ret = wp_cache_create_advanced_cache(); } if ( false == $ret ) { if ( $other_advanced_cache === 'BOOST' ) { wpsc_deactivate_boost_cache_notice(); } elseif ( $other_advanced_cache ) { echo '<div style="width: 50%" class="notice notice-error"><h2>' . __( 'Warning! You may not be allowed to use this plugin on your site.', 'wp-super-cache' ) . "</h2>"; echo '<p>' . sprintf( __( 'The file %s was created by another plugin or by your system administrator. Please examine the file carefully by FTP or SSH and consult your hosting documentation. ', 'wp-super-cache' ), $wpsc_advanced_cache_filename ) . '</p>'; echo '<p>' . __( 'If it was created by another caching plugin please uninstall that plugin first before activating WP Super Cache. If the file is not removed by that action you should delete the file manually.', 'wp-super-cache' ), '</p>'; echo '<p><strong>' . __( 'If you need support for this problem contact your hosting provider.', 'wp-super-cache' ), '</strong></p>'; echo '</div>'; } elseif ( ! is_writeable_ACLSafe( $wpsc_advanced_cache_filename ) ) { echo '<div class="notice notice-error"><h2>' . __( 'Warning', 'wp-super-cache' ) . "! <em>" . sprintf( __( '%s/advanced-cache.php</em> cannot be updated.', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</h2>"; echo '<ol>'; echo "<li>" . sprintf( __( 'Make %1$s writable using the chmod command through your ftp or server software. (<em>chmod 777 %1$s</em>) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li>"; echo "<li>" . sprintf( __( 'Refresh this page to update <em>%s/advanced-cache.php</em>', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li></ol>"; echo sprintf( __( 'If that doesn’t work, make sure the file <em>%s/advanced-cache.php</em> doesn’t exist:', 'wp-super-cache' ), WP_CONTENT_DIR ) . "<ol>"; echo "</ol>"; echo '</div>'; } return false; } return true; }