WordPress.org

Make WordPress Core

Changeset 23519


Ignore:
Timestamp:
02/28/13 18:08:53 (2 years ago)
Author:
nacin
Message:

Allow nonce name to be passed to wp_nonce_url(), as allowed by wp_nonce_field(). props MatthewRuddy, fixes #22423.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r23504 r23519  
    11691169 * @since 2.0.4 
    11701170 * 
    1171  * @param string $actionurl URL to add nonce action 
    1172  * @param string $action Optional. Nonce action name 
     1171 * @param string $actionurl URL to add nonce action. 
     1172 * @param string $action Optional. Nonce action name. 
     1173 * @param string $name Optional. Nonce name. 
    11731174 * @return string URL with nonce action added. 
    11741175 */ 
    1175 function wp_nonce_url( $actionurl, $action = -1 ) { 
     1176function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) { 
    11761177    $actionurl = str_replace( '&', '&', $actionurl ); 
    1177     return esc_url( add_query_arg( '_wpnonce', wp_create_nonce( $action ), $actionurl ) ); 
     1178    return esc_url( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) ); 
    11781179} 
    11791180 
Note: See TracChangeset for help on using the changeset viewer.