Improve wp-cache config functions#487
Conversation
|
Tests for function var_dump( wpsc_var_export( false ) );
var_dump( wpsc_var_export( true ) );
var_dump( wpsc_var_export( 0 ) );
var_dump( wpsc_var_export( '0' ) );
var_dump( wpsc_var_export( 'test' ) );
var_dump( wpsc_var_export( array( ) ) );
var_dump( wpsc_var_export( array( 'bot1', 'bot2' ) ) );
var_dump( wpsc_var_export( array( 0 => 'bot1', 1 => 'bot2' ) ) );
$obj = new stdclass();
$obj->test = 'test';
var_dump( wpsc_var_export( $obj ) );Output: I've also checked I'll avoid replace spaces when |
|
That looks great, but I'll leave this until the next release after this one as it's a critical part of the plugin. |
|
I agree. We need to carefully test everything. I'm still testing it.. |
| } | ||
|
|
||
| function wp_cache_edit_max_time() { | ||
| global $cache_max_time, $wp_cache_config_file, $valid_nonce, $super_cache_enabled, $cache_schedule_type, $cache_scheduled_time, $cache_schedule_interval, $cache_time_interval, $cache_gc_email_me, $wp_cache_preload_on; |
There was a problem hiding this comment.
$valid_nonce needs to be a global variable in the functions that update settings because the REST API in rest/class.wp-super-cache-rest-update-settings.php sets it to true so it can use these update functions.
If we want to verify the nonce in each update function the REST API update code has to be modified to generate a valid POST nonce too. Probably best to keep that for a different PR?
wp_cache_replace_lineandwp_cache_update_rejected_pageswpsc_var_export