本文整理汇总了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);
}
}
}