mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39177 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -40,8 +40,12 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase {
|
||||
abstract public function test_get_item_schema();
|
||||
|
||||
public function filter_rest_url_for_leading_slash( $url, $path ) {
|
||||
if ( is_multisite() ) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
// Make sure path for rest_url has a leading slash for proper resolution.
|
||||
$this->assertTrue( 0 === strpos( $path, '/' ) );
|
||||
$this->assertTrue( 0 === strpos( $path, '/' ), 'REST API URL should have a leading slash.' );
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user