Last active
September 5, 2024 01:36
-
-
Save Rarst/5505035 to your computer and use it in GitHub Desktop.
Additional items for A Fresher Cache WP plugin: APC, plugin/themes updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function () { | |
if ( ! function_exists( 'afc_add_item' ) || ! function_exists( 'apc_clear_cache' ) ) { | |
return; | |
} | |
afc_add_item( array( | |
'id' => 'apc', | |
'title' => 'APC', | |
'no_href' => true, | |
) ); | |
afc_add_item( array( | |
'id' => 'apc-system', | |
'parent' => 'apc', | |
'title' => 'System', | |
'function' => 'apc_clear_cache', | |
'capability' => 'manage_options', | |
) ); | |
afc_add_item( array( | |
'id' => 'apc-user', | |
'parent' => 'apc', | |
'title' => 'User', | |
'function' => 'apc_clear_cache', | |
'args' => array( 'user' ), | |
'capability' => 'manage_options', | |
) ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment