Retrieves URL with nonce added to URL query.
$actionurlstringrequired
$actionint|stringoptional
Default:-1
$namestringoptional
'_wpnonce'.Default:'_wpnonce'
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 ) );
}
| Version | Description |
|---|---|
| 2.0.4 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_nonce_url