Update WordPress to 5.2

This commit is contained in:
Oliver Davies 2019-05-08 08:05:39 +01:00
parent 489b5a5914
commit e00f87f2f5
599 changed files with 119573 additions and 55990 deletions

View file

@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["url"] =
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 300);
/******/ return __webpack_require__(__webpack_require__.s = 354);
/******/ })
/************************************************************************/
/******/ ({
/***/ 179:
/***/ 201:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -323,7 +323,7 @@ module.exports = {
/***/ }),
/***/ 180:
/***/ 202:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -349,7 +349,7 @@ module.exports = {
/***/ }),
/***/ 300:
/***/ 354:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -372,7 +372,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependHTTP", function() { return prependHTTP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURI", function() { return safeDecodeURI; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterURLForDisplay", function() { return filterURLForDisplay; });
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURIComponent", function() { return safeDecodeURIComponent; });
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86);
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
/**
* External dependencies
@ -386,6 +387,11 @@ var USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
*
* @param {string} url The string to scrutinise.
*
* @example
* ```js
* const isURL = isURL( 'https://wordpress.org' ); // true
* ```
*
* @return {boolean} Whether or not it looks like a URL.
*/
@ -397,6 +403,12 @@ function isURL(url) {
*
* @param {string} url The full URL.
*
* @example
* ```js
* const protocol1 = getProtocol( 'tel:012345678' ); // 'tel:'
* const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
* ```
*
* @return {?string} The protocol part of the URL.
*/
@ -412,6 +424,12 @@ function getProtocol(url) {
*
* @param {string} protocol The url protocol.
*
* @example
* ```js
* const isValid = isValidProtocol( 'https:' ); // true
* const isNotValid = isValidProtocol( 'https :' ); // false
* ```
*
* @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
*/
@ -427,6 +445,12 @@ function isValidProtocol(protocol) {
*
* @param {string} url The full URL.
*
* @example
* ```js
* const authority1 = getAuthority( 'https://wordpress.org/help/' ); // 'wordpress.org'
* const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
* ```
*
* @return {?string} The authority part of the URL.
*/
@ -442,6 +466,12 @@ function getAuthority(url) {
*
* @param {string} authority A string containing the URL authority.
*
* @example
* ```js
* const isValid = isValidAuthority( 'wordpress.org' ); // true
* const isNotValid = isValidAuthority( 'wordpress#org' ); // false
* ```
*
* @return {boolean} True if the argument contains a valid authority.
*/
@ -457,6 +487,12 @@ function isValidAuthority(authority) {
*
* @param {string} url The full URL.
*
* @example
* ```js
* const path1 = getPath( 'http://localhost:8080/this/is/a/test?query=true' ); // 'this/is/a/test'
* const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
* ```
*
* @return {?string} The path part of the URL.
*/
@ -472,6 +508,12 @@ function getPath(url) {
*
* @param {string} path The URL path.
*
* @example
* ```js
* const isValid = isValidPath( 'test/path/' ); // true
* const isNotValid = isValidPath( '/invalid?test/path/' ); // false
* ```
*
* @return {boolean} True if the argument contains a valid path
*/
@ -487,6 +529,12 @@ function isValidPath(path) {
*
* @param {string} url The full URL.
*
* @example
* ```js
* const queryString1 = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
* const queryString2 = getQueryString( 'https://wordpress.org#fragment?query=false&search=hello' ); // 'query=false&search=hello'
* ```
*
* @return {?string} The query string part of the URL.
*/
@ -502,6 +550,12 @@ function getQueryString(url) {
*
* @param {string} queryString The query string.
*
* @example
* ```js
* const isValid = isValidQueryString( 'query=true&another=false' ); // true
* const isNotValid = isValidQueryString( 'query=true?another=false' ); // false
* ```
*
* @return {boolean} True if the argument contains a valid query string.
*/
@ -517,6 +571,12 @@ function isValidQueryString(queryString) {
*
* @param {string} url The full URL
*
* @example
* ```js
* const fragment1 = getFragment( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // '#fragment'
* const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
* ```
*
* @return {?string} The fragment part of the URL.
*/
@ -532,6 +592,12 @@ function getFragment(url) {
*
* @param {string} fragment The url fragment.
*
* @example
* ```js
* const isValid = isValidFragment( '#valid-fragment' ); // true
* const isNotValid = isValidFragment( '#invalid-#fragment' ); // false
* ```
*
* @return {boolean} True if the argument contains a valid fragment.
*/
@ -551,12 +617,23 @@ function isValidFragment(fragment) {
* only the resulting querystring is returned.
* @param {Object} args Query arguments to apply to URL.
*
* @example
* ```js
* const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
* ```
*
* @return {string} URL with arguments applied.
*/
function addQueryArgs() {
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var args = arguments.length > 1 ? arguments[1] : undefined;
// If no arguments are to be appended, return original URL.
if (!args || !Object.keys(args).length) {
return url;
}
var baseUrl = url; // Determine whether URL already had query arguments.
var queryStringIndex = url.indexOf('?');
@ -576,6 +653,11 @@ function addQueryArgs() {
* @param {string} url URL
* @param {string} arg Query arg name
*
* @example
* ```js
* const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
* ```
*
* @return {Array|string} Query arg value.
*/
@ -590,7 +672,12 @@ function getQueryArg(url, arg) {
* @param {string} url URL
* @param {string} arg Query arg name
*
* @return {boolean} Whether or not the URL contains the query aeg.
* @example
* ```js
* const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
* ```
*
* @return {boolean} Whether or not the URL contains the query arg.
*/
function hasQueryArg(url, arg) {
@ -602,6 +689,11 @@ function hasQueryArg(url, arg) {
* @param {string} url URL
* @param {...string} args Query Args
*
* @example
* ```js
* const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
* ```
*
* @return {string} Updated URL
*/
@ -624,6 +716,11 @@ function removeQueryArgs(url) {
*
* @param {string} url The URL to test
*
* @example
* ```js
* const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
* ```
*
* @return {string} The updated URL
*/
@ -640,6 +737,11 @@ function prependHTTP(url) {
*
* @param {string} uri URI to decode.
*
* @example
* ```js
* const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
* ```
*
* @return {string} Decoded URI if possible.
*/
@ -655,6 +757,11 @@ function safeDecodeURI(uri) {
*
* @param {string} url Original URL.
*
* @example
* ```js
* const displayUrl = filterURLForDisplay( 'https://www.wordpress.org/gutenberg/' ); // wordpress.org/gutenberg
* ```
*
* @return {string} Displayed URL.
*/
@ -668,18 +775,34 @@ function filterURLForDisplay(url) {
return filteredURL;
}
/**
* Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
* `decodeURIComponent` throws an error.
*
* @param {string} uriComponent URI component to decode.
*
* @return {string} Decoded URI component if possible.
*/
function safeDecodeURIComponent(uriComponent) {
try {
return decodeURIComponent(uriComponent);
} catch (uriComponentError) {
return uriComponent;
}
}
/***/ }),
/***/ 301:
/***/ 355:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(179);
var formats = __webpack_require__(180);
var utils = __webpack_require__(201);
var formats = __webpack_require__(202);
var arrayPrefixGenerators = {
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
@ -922,13 +1045,13 @@ module.exports = function (object, opts) {
/***/ }),
/***/ 302:
/***/ 356:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(179);
var utils = __webpack_require__(201);
var has = Object.prototype.hasOwnProperty;
@ -1156,15 +1279,15 @@ module.exports = function (str, opts) {
/***/ }),
/***/ 76:
/***/ 86:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var stringify = __webpack_require__(301);
var parse = __webpack_require__(302);
var formats = __webpack_require__(180);
var stringify = __webpack_require__(355);
var parse = __webpack_require__(356);
var formats = __webpack_require__(202);
module.exports = {
formats: formats,