wpsc_config_file_notices() WPSCache 1.0
No Hooks.
Return
Null. Nothing.
Usage
wpsc_config_file_notices();
Code of wpsc_config_file_notices() wpsc config file notices WPSCache 1.7.1
function wpsc_config_file_notices() {
global $wp_cache_config_file;
if ( ! isset( $_GET['page'] ) || $_GET['page'] != 'wpsupercache' ) {
return false;
}
$notice = get_transient( 'wpsc_config_error' );
if ( ! $notice ) {
return false;
}
switch( $notice ) {
case 'error_move_tmp_config_file':
$msg = sprintf( __( 'Error: Could not rename temporary file to configuration file. Please make sure %s is writeable by the webserver.' ), $wp_cache_config_file );
break;
case 'config_file_ro':
$msg = sprintf( __( 'Error: Configuration file is read only. Please make sure %s is writeable by the webserver.' ), $wp_cache_config_file );
break;
case 'tmp_file_ro':
$msg = sprintf( __( 'Error: The directory containing the configuration file %s is read only. Please make sure it is writeable by the webserver.' ), $wp_cache_config_file );
break;
case 'config_file_not_loaded':
$msg = sprintf( __( 'Error: Configuration file %s could not be loaded. Please reload the page.' ), $wp_cache_config_file );
break;
case 'config_file_missing':
$msg = sprintf( __( 'Error: Configuration file %s is missing. Please reload the page.' ), $wp_cache_config_file );
break;
}
echo '<div class="error"><p><strong>' . $msg . '</strong></p></div>';
}