wp_direct_php_update_button

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

WordPress Version: 6.3

/**
 * Displays a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: Hidden accessibility text. */
        __('(opens in a new tab)')
    );
    echo '</p>';
}

WordPress Version: 6.2

/**
 * Displays a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: Hidden accessibility text. */
        __('(opens in a new tab)')
    );
    echo '</p>';
}

WordPress Version: 6.1

/**
 * Displays a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    echo '</p>';
}

WordPress Version: 5.6

/**
 * Display a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    echo '</p>';
}

WordPress Version: 5.3

/**
 * Display a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    echo '</p>';
}

WordPress Version: 1.1

/**
 * Display a button directly linking to a PHP update process.
 *
 * This provides hosts with a way for users to be sent directly to their PHP update process.
 *
 * The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
 *
 * @since 5.1.1
 */
function wp_direct_php_update_button()
{
    $direct_update_url = wp_get_direct_php_update_url();
    if (empty($direct_update_url)) {
        return;
    }
    echo '<p class="button-container">';
    printf(
        '<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
        esc_url($direct_update_url),
        __('Update PHP'),
        /* translators: accessibility text */
        __('(opens in a new tab)')
    );
    echo '</p>';
}