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(); |
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( 'upgrader_process_complete', 'sentree_upgrader_process_complete', 10, 0 ); | |
function sentree_upgrader_process_complete() | |
{ | |
error_log('Upgrade process complete'); | |
global $nginx_purger; | |
if(isset($nginx_purger)) | |
{ | |
$nginx_purger->purge_all(); |
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
<!-- Fix PDFs loaded in tabs --> | |
<script type="text/javascript"> | |
jQuery(function() { | |
jQuery('.tab-link').click(function() { | |
setTimeout(function(){ | |
if (typeof(Event) === 'function') { | |
// modern browsers | |
window.dispatchEvent(new Event('resize')); | |
} else { | |
// for IE and other old browsers |