HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/hanode/public_html/wp-content/plugins/wpml-cms-nav/inc/upgrade.php
<?php
if ( ! defined( 'WPML_CMS_NAV_DEV_VERSION' ) && ( version_compare( get_option( 'WPML_CMS_NAV_VERSION' ), WPML_CMS_NAV_VERSION, '=' ) || ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'error_scrape' ) || ! isset( $wpdb ) ) ) {
	return;
}
add_action( 'plugins_loaded', 'wpml_cms_nav_upgrade', 1 );

function wpml_cms_nav_upgrade() {
	$previous_version = get_option( 'WPML_CMS_NAV_VERSION' );

	//Forcing upgrade logic when WPML_CMS_NAV_DEV_VERSION is defined
	//This allow to run the logic between different alpha/beta/RC versions
	//since we are now storing only the formal version in the options
	if ( defined( 'WPML_CMS_NAV_DEV_VERSION' ) ) {
		wpml_cms_nav_upgrade_version( WPML_CMS_NAV_VERSION, true );
	}

	if ( version_compare( $previous_version, WPML_CMS_NAV_VERSION, '<' ) ) {
		update_option( 'WPML_CMS_NAV_VERSION', WPML_CMS_NAV_VERSION );
	}
}

function wpml_cms_nav_upgrade_version( $version, $force = false ) {
	$previous_version = get_option( 'WPML_CMS_NAV_VERSION' );

	if ( $force || ( $previous_version && version_compare( $previous_version, $version, '<' ) ) ) {
		$upg_file = WPML_CMS_NAV_PLUGIN_PATH . '/inc/upgrade-functions/upgrade-' . $version . '.php';
		if ( file_exists( $upg_file ) && is_readable( $upg_file ) ) {
			if ( ! defined( 'WPML_DOING_UPGRADE' ) ) {
				define( 'WPML_DOING_UPGRADE', true );
			}
			/** @noinspection PhpIncludeInspection */
			include_once $upg_file;
		}
	}
}