/home/altere25/sportzsoftlivemeet.com/wp-content/plugins/hummingbird-performance
NameSizeModeActions
admin/-0755rm
core/-0755rm
languages/-0755rm
vendor/-0755rm
_src/-0755rm
readme.txt439070644editdlrm
uninstall.php28740644editdlrm
wp-hummingbird.php78470644editdlrm
Edit: /home/altere25/sportzsoftlivemeet.com/wp-content/plugins/hummingbird-performance/wp-hummingbird.php (7847B)
maybe_disable_free_version(); $this->init(); $this->init_pro(); $this->load_textdomain(); } /** * Initialize the plugin. */ private function init() { // Initialize the plugin core. $this->core = new Core\Core(); if ( is_admin() ) { // Initialize admin core files. $this->admin = new Admin\Admin(); } // Triggered when WP Hummingbird is totally loaded. do_action( 'wp_hummingbird_loaded' ); } /** * Initialize pro modules. * * @since 1.7.2 */ private function init_pro() { // Overwriting in wp-config.php file to exclude PRO. if ( defined( 'WPHB_LOAD_PRO' ) && false === WPHB_LOAD_PRO ) { return; } // Prevents from erroring out on free version. if ( ! is_readable( WPHB_DIR_PATH . 'core/pro/class-pro.php' ) ) { if ( ! defined( 'WPHB_WPORG' ) ) { define( 'WPHB_WPORG', true ); } return; } $this->pro = Core\Pro\Pro::get_instance(); // Modules are only needed on the backend or during cron. if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { $this->pro->init(); } $this->pro->load_ajax(); } /** * Flush all WP Hummingbird Cache * * @param bool $remove_data Remove data. * @param bool $remove_settings Remove settings. * @param bool $disable_cache Disable page cache module. */ public static function flush_cache( $remove_data = true, $remove_settings = true, $disable_cache = true ) { $hummingbird = self::get_instance(); /** * Hummingbird module. * * @var Core\Module $module */ foreach ( $hummingbird->core->modules as $module ) { if ( ! $module->is_active() ) { continue; } if ( 'page_cache' === $module->get_slug() && $disable_cache ) { /** * Page caching module. Remove page cache files. * * @var Core\Modules\Page_Cache $module */ $module->toggle_service( false ); } if ( 'minify' === $module->get_slug() ) { $module->clear_cache( false ); continue; } $module->clear_cache(); } if ( $remove_settings ) { Core\Module_Server::unsave_htaccess( 'gzip' ); Core\Module_Server::unsave_htaccess( 'caching' ); } if ( $remove_data ) { Core\Filesystem::instance()->clean_up(); Core\Logger::cleanup(); } } /** * Load translations */ private function load_textdomain() { load_plugin_textdomain( 'wphb', false, 'wp-hummingbird/languages/' ); } /** * Moved from above to class. * * Checks if HB has both the free and Pro versions installed and disables the Free version. * * @since 2.0.1 */ private function maybe_disable_free_version() { // Free is not installed - exit check. if ( ! is_admin() || 'wp-hummingbird/wp-hummingbird.php' === WPHB_BASENAME ) { return; } define( 'WPHB_WPORG', true ); // Add notice to rate the free version. $free_installation = get_site_option( 'wphb-free-install-date' ); if ( empty( $free_installation ) ) { update_site_option( 'wphb-notice-free-rated-show', 'yes' ); update_site_option( 'wphb-free-install-date', current_time( 'timestamp' ) ); } // This plugin is the free version so if the Pro version is activated we need to deactivate this one. if ( ! function_exists( 'is_plugin_active' ) ) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } $pro_installed = false; if ( file_exists( WP_PLUGIN_DIR . '/wp-hummingbird/wp-hummingbird.php' ) ) { $pro_installed = true; } if ( ( is_plugin_active( 'wp-hummingbird/wp-hummingbird.php' ) || $pro_installed ) && ! defined( 'WPHB_SWITCHING_VERSION' ) ) { define( 'WPHB_SWITCHING_VERSION', true ); } // Check if the pro version exists and is activated. if ( is_plugin_active( 'wp-hummingbird/wp-hummingbird.php' ) ) { // Pro is activated, deactivate this one. deactivate_plugins( WPHB_BASENAME ); update_site_option( 'wphb-notice-free-deactivated-show', 'yes' ); return; } elseif ( $pro_installed ) { // Pro is installed but not activated, let's activate it. deactivate_plugins( WPHB_BASENAME ); activate_plugin( 'wp-hummingbird/wp-hummingbird.php' ); } } } } /* @noinspection PhpIncludeInspection */ require_once WPHB_DIR_PATH . 'core/class-installer.php'; register_activation_hook( __FILE__, array( 'Hummingbird\\Core\\Installer', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Hummingbird\\Core\\Installer', 'deactivate' ) ); // Init the plugin and load the plugin instance for the first time. add_action( 'plugins_loaded', array( 'Hummingbird\\WP_Hummingbird', 'get_instance' ) );