本文整理匯總了PHP中wpgrade::themeversion方法的典型用法代碼示例。如果您正苦於以下問題:PHP wpgrade::themeversion方法的具體用法?PHP wpgrade::themeversion怎麽用?PHP wpgrade::themeversion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wpgrade
的用法示例。
在下文中一共展示了wpgrade::themeversion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: wpgrade_update_notifier_check_if_new_version
/**
* @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;
}
}
示例2: theme_version_check
/**
* 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);
}
}
}