本文整理匯總了PHP中Shopp::_emi方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shopp::_emi方法的具體用法?PHP Shopp::_emi怎麽用?PHP Shopp::_emi使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shopp
的用法示例。
在下文中一共展示了Shopp::_emi方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<div id="welcome" class="wrap about-wrap">
<div class="icon32"></div>
<h1><?php
Shopp::_emi('Shopp Database **Update Required**');
?>
</h1>
<?php
Shopp::_em('Shopp has been updated! Now the database needs updated to keep things humming along nice and smooth.
To protect your database, the storefront has been switched to maintenance mode until the database update is completed.');
?>
<?php
if (current_user_can('activate_plugins')) {
?>
<div class="warning"><p><?php
Shopp::_em('**IMPORTANT**
Be sure to backup your database to prevent a loss of data! Backup now and come back later when you are ready to update. [How do I backup?](%s)', ShoppSupport::DOCS . 'getting-started/upgrading/');
?>
</p></div>
<?php
Shopp::_em('The update process should only take a moment. Keep calm and don\'t panic. You did a backup right?');
?>
<?php
$upgrade = wp_nonce_url(add_query_arg(array('action' => 'shopp-upgrade'), admin_url('admin.php')), 'shopp-upgrade');
?>
<p><a href="<?php
示例2: earlyupdates
public static function earlyupdates()
{
$updates = shopp_setting('updates');
$core = isset($updates->response[SHOPP_PLUGINFILE]) ? $updates->response[SHOPP_PLUGINFILE] : false;
$addons = isset($updates->response[SHOPP_PLUGINFILE . '/addons']) ? $updates->response[SHOPP_PLUGINFILE . '/addons'] : false;
if (!$core && !$addons) {
return false;
}
$plugin_name = 'Shopp';
$plugin_slug = strtolower($plugin_name);
$store_url = ShoppSupport::STORE;
$account_url = "{$store_url}/account/";
$updates = array();
if (!empty($core) && isset($core->new_version) && version_compare($core->new_version, ShoppVersion::release(), '>')) {
$details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&core=' . $core->new_version . '&TB_iframe=true&width=600&height=800');
$updates[] = Shopp::_mi('%2$s Shopp %1$s is available %3$s from shopplugin.com now.', $core->new_version, '<a href="' . $details_url . '" class="thickbox" title="' . esc_attr($plugin_name) . '">', '</a>');
}
if (!empty($addons)) {
// Addon update messages
$addonupdates = array();
foreach ((array) $addons as $addon) {
$addonupdates[] = $addon->name . ' ' . $addon->new_version;
}
if (count($addons) > 1) {
$last = array_pop($addonupdates);
$updates[] = Shopp::_mi('Add-on updates are available for %s & %s.', join(', ', $addonupdates), $last);
} elseif (count($addons) == 1) {
$updates[] = Shopp::_mi('An add-on update is available for %s.', $addonupdates[0]);
}
}
if (is_network_admin() || !is_multisite()) {
$wp_list_table = _get_list_table('WP_Plugins_List_Table');
echo '<tr class="plugin-update-tr"><th colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
Shopp::_emi('You're missing out on important updates! %1$s %2$s Buy a Shopp Support Key! %3$s', empty($updates) ? '' : join(' ', $updates), '<a href="' . ShoppSupport::STORE . '" class="button button-primary">', '</a>');
echo '<style type="text/css">#shopp th,#shopp td{border-bottom:0;}</style>';
echo '</div></td></tr>';
}
return true;
}
示例3:
<div id="welcome" class="wrap shopp">
<div class="icon32"></div>
<h2><?php
Shopp::_emi('Shopp Database **Upgrade Required**');
?>
</h2>
<?php
Shopp::_em('Shopp has been updated!
Before you can use the new version of Shopp, your database needs to be upgraded.
Your storefront has been switched to maintenance mode until the database upgrade is completed.');
?>
<?php
if (current_user_can('activate_plugins')) {
?>
<div class="error"><p><?php
Shopp::_em('**IMPORTANT:** Be sure to backup your database to prevent a loss of data! [How do I backup?](%s)', ShoppSupport::DOCS . 'getting-started/upgrading/');
?>
</p></div>
<?php
Shopp::_em('To upgrade, you simply need to reactivate Shopp:
- Click the **Continue…** button below to deactivate Shopp
- In the WordPress **Plugins** manager, click the **Activate** link for Shopp to reactivate and upgrade the Shopp database');
?>
<?php