Make WordPress Core

Ticket #20372: 20372.xmlrpc-caps.diff

File 20372.xmlrpc-caps.diff, 866 bytes (added by duck_, 13 years ago)
  • wp-includes/pluggable.php

     
    7474function get_currentuserinfo() {
    7575        global $current_user;
    7676
    77         if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
    78                 wp_set_current_user( 0 );
    79                 return false;
    80         }
    81 
    8277        if ( ! empty( $current_user ) ) {
    8378                if ( $current_user instanceof WP_User )
    8479                        return;
     
    9792                return false;
    9893        }
    9994
     95        if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
     96                wp_set_current_user( 0 );
     97                return false;
     98        }
     99
    100100        if ( ! $user = wp_validate_auth_cookie() ) {
    101101                 if ( is_blog_admin() || is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) || !$user = wp_validate_auth_cookie( $_COOKIE[LOGGED_IN_COOKIE], 'logged_in' ) ) {
    102102                        wp_set_current_user( 0 );