wp_nonce_ays

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

WordPress Version: 6.4

/**
 * Displays "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    // Default title and response code.
    $title = __('Something went wrong.');
    $response_code = 403;
    if ('log-out' === $action) {
        $title = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html = $title;
        $html .= '</p><p>';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(sanitize_url($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, $response_code);
}

WordPress Version: 6.2

/**
 * Displays "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    // Default title and response code.
    $title = __('Something went wrong.');
    $response_code = 403;
    if ('log-out' === $action) {
        $title = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html = $title;
        $html .= '</p><p>';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, $response_code);
}

WordPress Version: 6.1

/**
 * Displays "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    // Default title and response code.
    $title = __('Something went wrong.');
    $response_code = 403;
    if ('log-out' === $action) {
        $title = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html = $title;
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, $response_code);
}

WordPress Version: 9.5

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    // Default title and response code.
    $title = __('Something went wrong.');
    $response_code = 403;
    if ('log-out' === $action) {
        $title = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html = $title;
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, $response_code);
}

WordPress Version: 5.9

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    // Default title and response code.
    $title = __('Something went wrong.');
    $response_code = 403;
    if ('log-out' === $action) {
        $title = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html = $title;
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, $title, $response_code);
}

WordPress Version: 8.6

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 5.8

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 7.8

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 7.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .10

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 6.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .10

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 5.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .11

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 5.5

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' === $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 4.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .12

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 3.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .14

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 5.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: Site title. */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: Logout URL. */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 2.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .20

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 2.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .17

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 1.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .15

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 0.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .20

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 0.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .18

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 9.5

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 9.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .22

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: .20

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 9.2

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .10

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('The link you followed has expired.');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('Something went wrong.'), 403);
}

WordPress Version: 4.7

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(
            /* translators: %s: site name */
            __('You are attempting to log out of %s'),
            get_bloginfo('name')
        );
        $html .= '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(
            /* translators: %s: logout URL */
            __('Do you really want to <a href="%s">log out</a>?'),
            wp_logout_url($redirect_to)
        );
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url(remove_query_arg('updated', wp_get_referer())), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 6.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .25

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 5.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .30

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 5.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .28

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 4.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .30

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 4.3

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .29

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 3.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .30

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 2.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .34

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 1.5

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .40

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 1.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: .37

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 4.1

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, __('WordPress Failure Notice'), 403);
}

WordPress Version: 0.4

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: .37

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: 4.0

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed
 * along with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: 3.9

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed along
 * with the "Are you sure?" message.
 *
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url($redirect_to));
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: 7.5

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed along
 * with the "Are you sure?" message.
 *
 * @package WordPress
 * @subpackage Security
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url());
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: .40

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed along
 * with the "Are you sure?" message.
 *
 * @package WordPress
 * @subpackage Security
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url());
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $wp_http_referer = remove_query_arg('updated', wp_get_referer());
            $wp_http_referer = wp_validate_redirect(esc_url_raw($wp_http_referer));
            $html .= '</p><p>';
            $html .= sprintf('<a href="%s">%s</a>', esc_url($wp_http_referer), __('Please try again.'));
        }
    }
    wp_die($html, $title, array('response' => 403));
}

WordPress Version: 3.7

/**
 * Display "Are You Sure" message to confirm the action being taken.
 *
 * If the action has the nonce explain message, then it will be displayed along
 * with the "Are you sure?" message.
 *
 * @package WordPress
 * @subpackage Security
 * @since 2.0.4
 *
 * @param string $action The nonce action.
 */
function wp_nonce_ays($action)
{
    $title = __('WordPress Failure Notice');
    if ('log-out' == $action) {
        $html = sprintf(__('You are attempting to log out of %s'), get_bloginfo('name')) . '</p><p>';
        $html .= sprintf(__("Do you really want to <a href='%s'>log out</a>?"), wp_logout_url());
    } else {
        $html = __('Are you sure you want to do this?');
        if (wp_get_referer()) {
            $html .= "</p><p><a href='" . esc_url(remove_query_arg('updated', wp_get_referer())) . "'>" . __('Please try again.') . "</a>";
        }
    }
    wp_die($html, $title, array('response' => 403));
}