REST API: generate a valid fallback URI in wp.api.utils.getRootURL.
When window.location.origin isn't set, correctly insert two slashes between the protocol and host when constructing the fallback URL. props abdullahramzan. Fixes #44764. Built from https://develop.svn.wordpress.org/trunk@43566 git-svn-id: http://core.svn.wordpress.org/trunk@43395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c0cc6617f2
commit
b5ec1e6d96
|
@ -145,7 +145,7 @@
|
|||
wp.api.utils.getRootUrl = function() {
|
||||
return window.location.origin ?
|
||||
window.location.origin + '/' :
|
||||
window.location.protocol + '/' + window.location.host + '/';
|
||||
window.location.protocol + '//' + window.location.host + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43565';
|
||||
$wp_version = '5.0-alpha-43566';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue