/** * Runs after FooGallery has been updated via the backend */ function perform_housekeeping() { //allow extensions or other plugins to do stuff when foogallery is updated // this will catch both manual and auto updates! do_action('foogallery_admin_new_version_detected'); //clear the cached extensions if foogallery was updated $api = new FooGallery_Extensions_API(); $api->clear_cached_extensions(); //we need to clear the foogallery css load optimizations when we update the plugin, to ensure the latest CSS files are loaded foogallery_clear_all_css_load_optimizations(); }
/** * AJAX endpoint for clearing all CSS optimizations */ function ajax_clear_css_optimizations() { if (check_admin_referer('foogallery_clear_css_optimizations')) { foogallery_clear_all_css_load_optimizations(); _e('The CSS optimization cache was successfully cleared!', 'foogallery'); die; } }