HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/shootinschool/wp-content/plugins/sg-cachepress/core/Cli/Cli_Config.php
<?php
namespace SiteGround_Optimizer\Cli;

use SiteGround_Optimizer\Config\Config;

/**
 * WP-CLI: wp sg optimizer-config.
 *
 * Run the `wp sg optimizer-config` command to generate config file.
 *
 * @since 7.6.3
 * @package Cli
 * @subpackage Cli/Config
 */

/**
 * Define the {@link Cli_Config} class.
 *
 * @since 7.6.3
 */
class Cli_Config {

	/**
	 * Create Config file.
	 */
	public function __invoke() {
		$config = new Config();

		if ( ! version_compare( get_option( 'siteground_optimizer_current_version', false ), \SiteGround_Optimizer\VERSION, '==' ) ) {
			// Update the option in the db.
			update_option( 'siteground_optimizer_current_version', \SiteGround_Optimizer\VERSION );
		}

		$config->update_config();
	}

}