/** * @return boolean */ function wpgrade_update_notifier_check_if_new_version() { // get the latest remote XML file on our server $xml = wpgrade_update_notifier_latest_theme_version(wpgrade::update_notifier_cacheinterval()); if (version_compare($xml->latest, wpgrade::themeversion()) == 1) { return true; } else { return false; } }
/** * On every wpgrade themes update we need to reconvert theme options into plugin options */ function theme_version_check() { $options = get_option('pixtypes_settings'); if (class_exists('wpgrade') && isset($options['wpgrade_theme_version'])) { if (wpgrade::themeversion() != $options['wpgrade_theme_version']) { // here the theme is updating it's options $test = function_exists('wpgrade_callback_geting_active'); wpgrade_callback_geting_active(); // the plugin will copy these options into it's own field self::activate(false); // end finally merge user's settings with the theme ones save_pixtypes_settings($options); } } }