wp_nonce_url() – Retrieve URL with nonce added to URL query.

You appear to be a bot. Output may be restricted

Description

Retrieves URL with nonce added to URL query.

Usage

$string = wp_nonce_url( $actionurl, $action, $name );

Parameters

$actionurl
( string ) required – URL to add nonce action.
$action
( int|string ) optional default: -1 – Optional. Nonce action name. Default -1.
$name
( string ) optional default: _wpnonce – Optional. Nonce name. Default '_wpnonce'.

Returns

string Escaped URL with nonce action added.

Source

File name: wordpress/wp-includes/functions.php
Lines:

1 to 4 of 4
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 ) );
}
 

 View on GitHub View on Trac