From 81080da6f2ce46a7271e796173fcbdda76b82103 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 Feb 2013 18:08:53 +0000 Subject: [PATCH] Allow nonce name to be passed to wp_nonce_url(), as allowed by wp_nonce_field(). props MatthewRuddy, fixes #22423. git-svn-id: http://core.svn.wordpress.org/trunk@23519 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 829ca7104b..4561ebecf7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1168,13 +1168,14 @@ function is_blog_installed() { * @subpackage Security * @since 2.0.4 * - * @param string $actionurl URL to add nonce action - * @param string $action Optional. Nonce action name + * @param string $actionurl URL to add nonce action. + * @param string $action Optional. Nonce action name. + * @param string $name Optional. Nonce name. * @return string URL with nonce action added. */ -function wp_nonce_url( $actionurl, $action = -1 ) { +function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) { $actionurl = str_replace( '&', '&', $actionurl ); - return esc_url( add_query_arg( '_wpnonce', wp_create_nonce( $action ), $actionurl ) ); + return esc_url( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) ); } /**