Created
December 6, 2018 13:09
-
-
Save bogdan-mainwp/4f7552fabe26c03a10cbcf69fb220356 to your computer and use it in GitHub Desktop.
Custom code snippet for clearing SG Optimizer cache on child sites
This file contains 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 | |
// Use this snippet in the MainWP Code Snippets Extension (https://mainwp.com/extension/code-snippets/) | |
// Snippet Type: This Code Snippet only returns information from Child Site | |
if ( function_exists( 'sg_cachepress_purge_cache' ) ) { | |
sg_cachepress_purge_cache(); | |
echo "Cache cleared successfully!"; | |
} else { | |
echo "Clearing cache failed!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment