WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/endtheignorance/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;
		}
	}
}