Make WordPress Core

Ticket #21111: 21111.2.diff

File 21111.2.diff, 635 bytes (added by sc0ttkclark, 12 years ago)

Duh, add $action to filter too

  • pluggable.php

     
    12561256function wp_verify_nonce($nonce, $action = -1) {
    12571257        $user = wp_get_current_user();
    12581258        $uid = (int) $user->ID;
     1259        if ( empty( $uid ) )
     1260                $uid = apply_filters( 'nonce_anonymous', $uid, $action );
    12591261
    12601262        $i = wp_nonce_tick();
    12611263
     
    12821284function wp_create_nonce($action = -1) {
    12831285        $user = wp_get_current_user();
    12841286        $uid = (int) $user->ID;
     1287        if ( empty( $uid ) )
     1288                $uid = apply_filters( 'nonce_anonymous', $uid, $action );
    12851289
    12861290        $i = wp_nonce_tick();
    12871291