Ejemplo n.º 1
0
function _maybe_update_core()
{
    include ABSPATH . nxtINC . '/version.php';
    // include an unmodified $nxt_version
    $current = get_site_transient('update_core');
    if (isset($current->last_checked) && 43200 > time() - $current->last_checked && isset($current->version_checked) && $current->version_checked == $nxt_version) {
        return;
    }
    nxt_version_check();
}
Ejemplo n.º 2
0
{
    return '';
}
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
$upgrade_error = false;
if (('do-theme-upgrade' == $action || 'do-plugin-upgrade' == $action && !isset($_GET['plugins'])) && !isset($_POST['checked'])) {
    $upgrade_error = $action == 'do-theme-upgrade' ? 'themes' : 'plugins';
    $action = 'upgrade-core';
}
$title = __('NXTClass Updates');
$parent_file = 'tools.php';
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('This screen lets you update to the latest version of NXTClass as well as update your themes and plugins from the NXTClass.org repository. When updates are available, the number of available updates will appear in a bubble on the left hand menu as a notification.') . '</p>' . '<p>' . __('It is very important to keep your NXTClass installation up to date for security reasons, so when you see a number appear, make sure you take the time to update, which is an easy process.') . '</p>'));
get_current_screen()->add_help_tab(array('id' => 'how-to-update', 'title' => __('How to Update'), 'content' => '<p>' . __('Updating your NXTClass installation is a simple one-click procedure; just click on the Update button when it says a new version is available.') . '</p>' . '<p>' . __('To update themes or plugins from this screen, use the checkboxes to make your selection and click on the appropriate Update button. Check the box at the top of the Themes or Plugins section to select all and update them all at once.') . '</p>'));
get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Dashboard_Updates_Screen" target="_blank">Documentation on Updating NXTClass</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
if ('upgrade-core' == $action) {
    nxt_version_check();
    require_once ABSPATH . 'nxt-admin/admin-header.php';
    core_upgrade_preamble();
    include ABSPATH . 'nxt-admin/admin-footer.php';
} elseif ('do-core-upgrade' == $action || 'do-core-reinstall' == $action) {
    check_admin_referer('upgrade-core');
    // do the (un)dismiss actions before headers,
    // so that they can redirect
    if (isset($_POST['dismiss'])) {
        do_dismiss_core_update();
    } elseif (isset($_POST['undismiss'])) {
        do_undismiss_core_update();
    }
    require_once ABSPATH . 'nxt-admin/admin-header.php';
    if ('do-core-reinstall' == $action) {
        $reinstall = true;