Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/wp-analytify/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/plugins/wp-analytify/classes/analytify-update-routine.php
<?php
class Analytify_Update_Routine {

	private $current_version = '';

	/**
	 * Private constructor for singleton class.
	 * 
	 */
	public function __construct( $current_version ) {
		$this->current_version = $current_version;
		$this->run_routines();
	}

	/**
	 * Run update routines.
	 * This will run all preceding update routine than current version if required.
	 *
	 * @return void
	 */
	private function run_routines() {

		if ( version_compare( $this->current_version, '4.1.1', '<' ) ) {
			$this->update_routine_411();
		}

		// Update version to latest release.
		update_option( 'analytify_current_version', ANALYTIFY_VERSION );
	}

	/**
	 * Update routine for version 4.1.1
	 *
	 * @return void
	 */
	private function update_routine_411() {
		update_option( 'analytify_gtag_move_to_notice', 'visible' );
	}
}

// Get current plugin version.
$analytify_current_version = get_option( 'analytify_current_version', '4.1.0' );

// Upcoming version on which routine will run.
$run_routine_ver = '4.1.1';

// Call update routine.
if ( version_compare( $analytify_current_version, $run_routine_ver, '<' ) ) {

	// Note: Analytify_Update_Routine will run all updates preceding the version in $run_routine_ver.
	new Analytify_Update_Routine( $analytify_current_version );
}

Spamworldpro Mini