update_right_now_message

The timeline below displays how wordpress function update_right_now_message has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Displays WordPress version and active theme in the 'At a Glance' dashboard widget.
 *
 * @since 2.5.0
 */
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = '';
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && 'upgrade' === $cur->response) {
            $msg .= sprintf(
                '<a href="%s" class="button" aria-describedby="wp-version">%s</a> ',
                network_admin_url('update-core.php'),
                /* translators: %s: WordPress version number, or 'Latest' string. */
                sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest'))
            );
        }
    }
    /* translators: 1: Version number, 2: Theme name. */
    $content = __('WordPress %1$s running %2$s theme.');
    /**
     * Filters the text displayed in the 'At a Glance' dashboard widget.
     *
     * Prior to 3.8.0, the widget was named 'Right Now'.
     *
     * @since 4.4.0
     *
     * @param string $content Default text.
     */
    $content = apply_filters('update_right_now_text', $content);
    $msg .= sprintf('<span id="wp-version">' . $content . '</span>', get_bloginfo('version', 'display'), $theme_name);
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 5.3

// Called directly from dashboard
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = '';
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= sprintf(
                '<a href="%s" class="button" aria-describedby="wp-version">%s</a> ',
                network_admin_url('update-core.php'),
                /* translators: %s: WordPress version number, or 'Latest' string. */
                sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest'))
            );
        }
    }
    /* translators: 1: Version number, 2: Theme name. */
    $content = __('WordPress %1$s running %2$s theme.');
    /**
     * Filters the text displayed in the 'At a Glance' dashboard widget.
     *
     * Prior to 3.8.0, the widget was named 'Right Now'.
     *
     * @since 4.4.0
     *
     * @param string $content Default text.
     */
    $content = apply_filters('update_right_now_text', $content);
    $msg .= sprintf('<span id="wp-version">' . $content . '</span>', get_bloginfo('version', 'display'), $theme_name);
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 4.6

// Called directly from dashboard
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = '';
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= '<a href="' . network_admin_url('update-core.php') . '" class="button" aria-describedby="wp-version">' . sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) . '</a> ';
        }
    }
    /* translators: 1: version number, 2: theme name */
    $content = __('WordPress %1$s running %2$s theme.');
    /**
     * Filters the text displayed in the 'At a Glance' dashboard widget.
     *
     * Prior to 3.8.0, the widget was named 'Right Now'.
     *
     * @since 4.4.0
     *
     * @param string $content Default text.
     */
    $content = apply_filters('update_right_now_text', $content);
    $msg .= sprintf('<span id="wp-version">' . $content . '</span>', get_bloginfo('version', 'display'), $theme_name);
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 4.4

// Called directly from dashboard
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = '';
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= '<a href="' . network_admin_url('update-core.php') . '" class="button" aria-describedby="wp-version">' . sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) . '</a> ';
        }
    }
    /* translators: 1: version number, 2: theme name */
    $content = __('WordPress %1$s running %2$s theme.');
    /**
     * Filter the text displayed in the 'At a Glance' dashboard widget.
     *
     * Prior to 3.8.0, the widget was named 'Right Now'.
     *
     * @since 4.4.0
     *
     * @param string $content Default text.
     */
    $content = apply_filters('update_right_now_text', $content);
    $msg .= sprintf('<span id="wp-version">' . $content . '</span>', get_bloginfo('version', 'display'), $theme_name);
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 4.2

// Called directly from dashboard
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = '';
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= '<a href="' . network_admin_url('update-core.php') . '" class="button" aria-describedby="wp-version">' . sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) . '</a> ';
        }
    }
    $msg .= sprintf('<span id="wp-version">' . __('WordPress %1$s running %2$s theme.') . '</span>', get_bloginfo('version', 'display'), $theme_name);
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 3.9

// Called directly from dashboard
function update_right_now_message()
{
    $theme_name = wp_get_theme();
    if (current_user_can('switch_themes')) {
        $theme_name = sprintf('<a href="themes.php">%1$s</a>', $theme_name);
    }
    $msg = sprintf(__('WordPress %1$s running %2$s theme.'), get_bloginfo('version', 'display'), $theme_name);
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= " <a href='" . network_admin_url('update-core.php') . "' class='button'>" . sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) . '</a>';
        }
    }
    echo "<p id='wp-version-message'>{$msg}</p>";
}

WordPress Version: 3.7

// Called directly from dashboard
function update_right_now_message()
{
    $msg = sprintf(__('You are using <span class="b">WordPress %s</span>.'), get_bloginfo('version', 'display'));
    if (current_user_can('update_core')) {
        $cur = get_preferred_from_update_core();
        if (isset($cur->response) && $cur->response == 'upgrade') {
            $msg .= " <a href='" . network_admin_url('update-core.php') . "' class='button'>" . sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) . '</a>';
        }
    }
    echo "<span id='wp-version-message'>{$msg}</span>";
}