当前位置: 首页>>代码示例>>PHP>>正文


PHP list_theme_updates函数代码示例

本文整理汇总了PHP中list_theme_updates函数的典型用法代码示例。如果您正苦于以下问题:PHP list_theme_updates函数的具体用法?PHP list_theme_updates怎么用?PHP list_theme_updates使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了list_theme_updates函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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 ' &nbsp; <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>';
}
开发者ID:jawandsingh,项目名称:wordpress_with_sql_azure,代码行数:71,代码来源:update-core.php

示例2: printf

        }
        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 ' &nbsp; <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>';
    include ABSPATH . 'wp-admin/admin-footer.php';
} elseif ('do-core-upgrade' == $action || 'do-core-reinstall' == $action) {
    if (!current_user_can('update_core')) {
开发者ID:leonardopires,项目名称:projectnami,代码行数:31,代码来源:update-core.php

示例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('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>';
}
开发者ID:laiello,项目名称:cartonbank,代码行数:55,代码来源:update-core.php


注:本文中的list_theme_updates函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。