$get_global_path, 'version' => $xl_ultimate_latest_core_all['latest']['version'], ) ); } } } //add_action( 'xl_loaded', array( 'XL_Common', 'load_text_domain' ), 10, 1 ); global $xl_ultimate_latest_core_all; if ( ! $xl_ultimate_latest_core_all || count( $xl_ultimate_latest_core_all ) <= 0 ) { $xl_ultimate_latest_core_all = array(); $xl_ultimate_latest_core_all['plugins'] = array(); $xl_ultimate_latest_core_all['plugins'][ plugin_basename( XLWCTY_PLUGIN_FILE ) ] = array( 'version' => $this_current_version, 'plugin_path' => dirname( XLWCTY_PLUGIN_FILE ), ); } else { //if not registered yet if ( ! isset( $xl_ultimate_latest_core_all['plugins'][ plugin_basename( XLWCTY_PLUGIN_FILE ) ] ) ) { $xl_ultimate_latest_core_all['plugins'][ plugin_basename( XLWCTY_PLUGIN_FILE ) ] = array( 'version' => $this_current_version, 'plugin_path' => dirname( XLWCTY_PLUGIN_FILE ), ); } } //if not registered yet if ( ! isset( $xl_ultimate_latest_core_all['latest'] ) ) { $xl_ultimate_latest_core_all['latest'] = array( 'basename' => plugin_basename( XLWCTY_PLUGIN_FILE ), 'version' => $this_current_version, 'plugin_path' => dirname( XLWCTY_PLUGIN_FILE ), ); } else { //if latest framework exists and have for the same plugin //if current version is same as the saved one if ( version_compare( $this_current_version, $xl_ultimate_latest_core_all['latest']['version'], '<' ) ) { //do nothing } else { $xl_ultimate_latest_core_all['latest'] = array( 'basename' => plugin_basename( XLWCTY_PLUGIN_FILE ), 'version' => $this_current_version, 'plugin_path' => dirname( XLWCTY_PLUGIN_FILE ), ); } }