WordPress.org

Make WordPress Core

Ticket #22423: 22423.diff

File 22423.diff, 950 bytes (added by SergeyBiryukov, 2 years ago)
  • wp-includes/functions.php

     
    11681168 * @subpackage Security 
    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_html( add_query_arg( '_wpnonce', wp_create_nonce( $action ), $actionurl ) ); 
     1178        return esc_html( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) ); 
    11781179} 
    11791180 
    11801181/**