Thank you for quick fix.
Another small suggestion to make the plugin even better, add a callback action so 3rd party code can hook into the process and know when the cache was cleared and if it was via button or menu update or widget update.
Something like this at the end of function ccfm_clear_cache_for_me()
:
do_action( 'ccfm_clear_cache_for_me', 'arg' );
Where ‘arg’ would be ‘button’ or ‘menu’ or ‘widgets’ or similar.
Then 3rd party code could deal with that in functions.php
or similar.
function ov3rfly_cache_cleared( $arg ) {
switch ( $arg ) {
...
}
}
add_action( 'ccfm_clear_cache_for_me', 'ov3rfly_cache_cleared' );
The feature would require a few small changes, e.g. adding an arg to ccfm_clear_cache_for_me()
and an extra function for wp_update_nav_menu
action hook…
This would be great.
Thanks for the great plugin.