WordPress at a glance

wp_nonce_url() WP 1.0

Retrieve URL with nonce added to URL query.

Works based on: wp_create_nonce()
✈ 1 time = 0.000102s = fast | 50000 times = 2.28s = fast

No Hooks.

Return

String. Escaped URL with nonce action added.

Usage

wp_nonce_url( $actionurl, $action, $name );
$actionurl(string) (required)
URL to add nonce action.
$action(int/string)
Nonce action name.
Default: -1
$name(string)
Nonce name.
Default: '_wpnonce'

Code of wp_nonce_url: wp-includes/functions.php VER 5.0.1

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

Related Functions

From tag: nonce (security protection defence)

More from tag: Site security (safety)

No comments
    Hello, !     Log In . Register