本文整理汇总了PHP中WPSC_Country::get_outdated_isocodes方法的典型用法代码示例。如果您正苦于以下问题:PHP WPSC_Country::get_outdated_isocodes方法的具体用法?PHP WPSC_Country::get_outdated_isocodes怎么用?PHP WPSC_Country::get_outdated_isocodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WPSC_Country
的用法示例。
在下文中一共展示了WPSC_Country::get_outdated_isocodes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _wpsc_action_admin_notices_deprecated_countries_notice
/**
* Displays notice if user has Great Britain selected as their base country
* Since 3.8.9, we have deprecated Great Britain in favor of the UK
*
* @since 3.8.9
* @access private
* @link http://code.google.com/p/wp-e-commerce/issues/detail?id=1079
*
* @uses get_option() Retrieves option from the WordPress database
* @uses get_outdate_isocodes() Returns outdated isocodes
* @uses admin_url() Returns admin_url of the site
*
* @return string The admin notices for deprecated countries
*/
function _wpsc_action_admin_notices_deprecated_countries_notice()
{
$base_country = get_option('base_country');
if (!in_array($base_country, WPSC_Country::get_outdated_isocodes())) {
return;
}
switch ($base_country) {
case 'YU':
$message = __('Yugoslavia is no longer a valid official country name according to <a href="%1$s">ISO 3166</a> while both Serbia and Montenegro have been added to the country list.<br /> As a result, we highly recommend changing your <em>Base Country</em> to reflect this change on the <a href="%2$s">General Settings</a> page.', 'wpsc');
break;
case 'UK':
$message = __('Prior to WP e-Commerce 3.8.9, in your database, United Kingdom\'s country code is UK and you have already selected that country code as the base country. However, now that you\'re using WP e-Commerce version %3$s, it is recommended that you change your base country to the official "GB" country code, according to <a href="%1$s">ISO 3166</a>.<br /> Please go to <a href="%2$s">General Settings</a> page to make this change.<br />The legacy "UK" item will be marked as "U.K. (legacy)" on the country drop down list. Simply switch to the official "United Kingdom (ISO 3166)" to use the "GB" country code.', 'wpsc');
break;
case 'AN':
$message = __('Netherlands Antilles is no longer a valid official country name according to <a href="%1$s">ISO 3166</a>.<br />Please consider changing your <em>Base Country</em> to reflect this change on the <a href="%2$s">General Settings</a> page.', 'wpsc');
case 'TP':
$message = __('Prior to WP e-Commerce 3.8.9, in your database, East Timor\'s country code is TP and you have already selected that country code as the base country. However, now that you\'re using WP e-Commerce version %3$s, it is recommended that you change your base country to the official "TL" country code, according to <a href="%1$s">ISO 3166</a>.<br /> Please go to <a href="%2$s">General Settings</a> page to make this change.<br />The legacy "TP" item will be marked as "East Timor (legacy)" on the country drop down list. Simply switch to the official "Timor-Leste (ISO 3166)" to use the "TL" country code.', 'wpsc');
break;
}
$message = sprintf($message, 'http://en.wikipedia.org/wiki/ISO_3166-1', admin_url('options-general.php?page=wpsc-settings&tab=general'), WPSC_VERSION);
echo '<div id="wpsc-warning" class="error"><p>' . $message . '</p></div>';
}