'seed_csp4' ), admin_url( 'admin.php' ) ) ); } /*************************************************************************** * Load Required Files ***************************************************************************/ // Global global $seed_csp4_settings; require_once( SEED_CSP4_PLUGIN_PATH.'framework/get-settings.php' ); $seed_csp4_settings = seed_csp4_get_settings(); require_once( SEED_CSP4_PLUGIN_PATH.'inc/class-seed-csp4.php' ); add_action( 'plugins_loaded', array( 'SEED_CSP4', 'get_instance' ) ); if( is_admin() ) { // Admin Only require_once( SEED_CSP4_PLUGIN_PATH.'inc/config-settings.php' ); require_once( SEED_CSP4_PLUGIN_PATH.'framework/framework.php' ); add_action( 'plugins_loaded', array( 'SEED_CSP4_ADMIN', 'get_instance' ) ); require_once( SEED_CSP4_PLUGIN_PATH.'framework/review.php' ); if(version_compare(phpversion(), '5.3.3', '>=')){ require_once( SEED_CSP4_PLUGIN_PATH.'lib/setup_tgmpa.php' ); require_once( SEED_CSP4_PLUGIN_PATH.'lib/TGMPA.php' ); } } else { // Public only } // Clear Popular Caches add_action( 'update_option_seed_csp4_settings_content', 'seed_csp4_clear_known_caches', 10, 2 ); function seed_csp4_clear_known_caches($o,$n){ try { if(isset($o['status']) && isset($n['status'])){ if($o['status'] != $n['status']){ // Clear Litespeed cache method_exists( 'LiteSpeed_Cache_API', 'purge_all' ) && LiteSpeed_Cache_API::purge_all() ; // WP Super Cache if ( function_exists( 'wp_cache_clear_cache' ) ) { wp_cache_clear_cache(); } // W3 Total Cahce if ( function_exists( 'w3tc_pgcache_flush' ) ) { w3tc_pgcache_flush(); } // Site ground if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher ', 'purge_cache' )) { SG_CachePress_Supercacher::purge_cache(true); } // Endurance Cache if ( class_exists( 'Endurance_Page_Cache' ) ) { $e = new Endurance_Page_Cache; $e->purge_all(); } // WP Fastest Cache if ( isset($GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache') ) { $GLOBALS['wp_fastest_cache']->deleteCache(true); } } } } catch (Exception $e) {} } function seed_csp4_admin_upgrade_link( $medium = 'link' ) { return apply_filters( 'seed_csp4_upgrade_link', 'https://www.seedprod.com/ultimate-coming-soon-page-vs-coming-soon-pro/?utm_source=WordPress&utm_medium=' . sanitize_key( apply_filters( 'seed_csp4_upgrade_link_medium', $medium ) ) . '&utm_campaign=liteplugin' ); }