wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_nonce_url › WordPress Function

Since2.0.4
Deprecatedn/a
wp_nonce_url ( $actionurl, $action = -1, $name = '_wpnonce' )
Parameters: (3)
  • (string) $actionurl URL to add nonce action.
    Required: Yes
  • (int|string) $action Optional. Nonce action name. Default -1.
    Required: No
    Default: -1
  • (string) $name Optional. Nonce name. Default '_wpnonce'.
    Required: No
    Default: '_wpnonce'
Returns:
  • (string) Escaped URL with nonce action added.
Defined at:
Codex:

Retrieves URL with nonce added to URL query.



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 ) );
}