function wp_nonce_url( $actionurl, $action = -1 ) {}

Retrieve URL with nonce added to URL query.


  • string $actionurl: URL to add nonce action
  • string $action: Optional. Nonce action name

Return values

returns:URL with nonce action added.

Source code

function wp_nonce_url( $actionurl, $action = -1 ) {

	$actionurl = str_replace( '&', '&', $actionurl );

	return esc_html( add_query_arg( '_wpnonce', wp_create_nonce( $action ), $actionurl ) );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: