Make WordPress Core


Ignore:
Timestamp:
11/09/2016 01:34:56 AM (8 years ago)
Author:
rmccue
Message:

REST API: Fire correct hooks when creating users on multiste.

add_user_to_blog() is now called, ensuring the correct hooks are called, along with setting the primary blog and clearing relevant caches.

Props jeremyfelt.
Fixes #38526.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-rest-controller.php

    r38832 r39177  
    4141
    4242    public function filter_rest_url_for_leading_slash( $url, $path ) {
     43        if ( is_multisite() ) {
     44            return $url;
     45        }
     46
    4347        // Make sure path for rest_url has a leading slash for proper resolution.
    44         $this->assertTrue( 0 === strpos( $path, '/' ) );
     48        $this->assertTrue( 0 === strpos( $path, '/' ), 'REST API URL should have a leading slash.' );
    4549
    4650        return $url;
Note: See TracChangeset for help on using the changeset viewer.