Created
January 15, 2021 02:41
-
-
Save cnasal/f0721d4f2ec226a2fe73915aa455de45 to your computer and use it in GitHub Desktop.
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 | |
// This code snippet will purge the Nginx cache using the Nginx Helper if it's installed and active on the site | |
// You can add this to MainWP Code Snippets | |
// For the MainWP Snippet Type, choose "Return info from Child Sites" | |
// This may also work with ManageWP Code Snippets | |
global $nginx_purger; | |
if(isset($nginx_purger)) | |
{ | |
$nginx_purger->purge_all(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment