wordpress / latest / functions / wp_nonce_url.html

wp_nonce_url( string $actionurl, int|string $action = -1, string $name = '_wpnonce' ): string

Retrieves URL with nonce added to URL query.

Parameters

$actionurl string Required
URL to add nonce action.
$action int|string Optional
Nonce action name.

Default: -1

$name string Optional
Nonce name. Default '_wpnonce'.

Default: '_wpnonce'

Return

string Escaped URL with nonce action added.

Source

File: wp-includes/functions.php. View all references

function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) {
	$actionurl = str_replace( '&', '&', $actionurl );
	return esc_html( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) );
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
2.0.4 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_nonce_url