Retrieves URL with nonce added to URL query.
Parameters
$actionurl
stringrequired- URL to add nonce action.
$action
int|stringoptional- Nonce action name.
Default:
-1
$name
stringoptional- Nonce name. Default
'_wpnonce'
.Default:
'_wpnonce'
Source
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 ) );
}