Make WordPress Core


Ignore:
Timestamp:
08/27/2014 02:06:53 AM (12 years ago)
Author:
nacin
Message:

Rename the public methods in the session tokens API.

Introduces a new get( $token ) method. get_token() would not have made sense and spurred the overall renaming. Public methods are now get, get_all, verify, create, update, destroy, destroy_others, and destroy_all.

The protected abstract methods designed for alternative implementations remain the same.

props mdawaffe.
see #20276.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r29620 r29635  
    685685
    686686        $manager = WP_Session_Tokens::get_instance( $user->ID );
    687         if ( ! $manager->verify_token( $token ) ) {
     687        if ( ! $manager->verify( $token ) ) {
    688688                do_action( 'auth_cookie_bad_session_token', $cookie_elements );
    689689                return false;
     
    729729        if ( ! $token ) {
    730730                $manager = WP_Session_Tokens::get_instance( $user_id );
    731                 $token = $manager->create_token( $expiration );
     731                $token = $manager->create( $expiration );
    732732        }
    733733
     
    878878
    879879        $manager = WP_Session_Tokens::get_instance( $user_id );
    880         $token = $manager->create_token( $expiration );
     880        $token = $manager->create( $expiration );
    881881
    882882        $auth_cookie = wp_generate_auth_cookie( $user_id, $expiration, $scheme, $token );
Note: See TracChangeset for help on using the changeset viewer.