39263 Commits

Author SHA1 Message Date
Sergey Biryukov
a879500a89 Build/Test Tools: Remove unused ::assertPostHasTerms() method from tests/term.php.
The associated test was removed in [30241].

Merges [47341] to 3.7+ branches.
See #49485.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47489 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-22 14:29:03 +00:00
Sergey Biryukov
7dabc9e4ad Build/Test Tools: Display PHPUnit information for PHP tests only (for 5.1 branch).
This avoids a build error on `travis:format` job, caused by Travis running PHPUnit 9.x by default, which requires PHP 7.3+.

Merges [47336] to the 5.1 branch.
See #49485.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47337 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 10:46:53 +00:00
Sergey Biryukov
00a2dbe3be Build/Test Tools: Trim the test matrix on Travis in order to speed up the 5.1 branch build.
This removes the PHP 7.2, 7.1, 5.5, 5.4, and 5.3 jobs.

This also removes the PHP 5.6 job which runs without an object cache in place as the likelihood of a change being backported that only breaks 5.6 environments without an object cache is small.

Merges [44992] and [45005] to the 5.1 branch.
See #42387, #40407.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47322 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 13:31:53 +00:00
Sergey Biryukov
80fd7c9970 Tests: Correct assertions in test_site_dates_are_gmt().
`assertSame()` doesn't have the `$delta` parameter, only `assertEquals()` does.

Follow-up to [47313].

Merges [47318] to the 5.1 branch.
See #40364.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47321 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 05:13:08 +00:00
Sergey Biryukov
c3011a9ba5 Tests: Use delta comparison in test_site_dates_are_gmt() to avoid race conditions.
Merges [47313] to the 5.1 branch.
See #40364.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@47316 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-19 02:57:05 +00:00
Sergey Biryukov
b6a2c29473 WordPress 5.1.4
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46922 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 20:24:13 +00:00
Sergey Biryukov
964aebc211 Formatting: Use wp_list_pluck() instead of array_column() in wp_targeted_link_rel_callback().
`array_column()` requires PHP >= 5.5.

Follow-up to [46894].

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46919 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 19:48:57 +00:00
Jake Spurlock
57715e4b4b Ensure that a user can publish_posts before making a post sticky.
Props: danielbachhuber, whyisjake, peterwilson, xknown.
Prevent  stored XSS through wp_targeted_link_rel().
Props: vortfu, whyisjake, peterwilsoncc, xknown,  SergeyBiryukov, flaviozavan.
Update wp_kses_bad_protocol() to recognize : on uri attributes,
wp_kses_bad_protocol() makes sure to validate that uri attributes don't contain invalid/or not allowed protocols. While this works fine in most cases, there's a risk that by using the colon html5 named entity, one is able to bypass this function.
Brings r46895 to the 5.3 branch.
Props: xknown, nickdaugherty, peterwilsoncc.
Prevent stored XSS in the block editor.
Brings r46896 to the 5.3 branch.
Prevent escaped unicode characters become unescaped in unsafe HTML during JSON decoding.
Props: aduth, epiqueras.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46907 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-12 18:36:20 +00:00
Jonathan Desrosiers
4de9aac8cd Coding Standards: Fix indentation issues introduced in [46509].
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46541 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 22:04:47 +00:00
Jonathan Desrosiers
b2b1e5fb25 WordPress 5.1.3
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46509 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 20:04:46 +00:00
Jake Spurlock
2e4cbf513b Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 5.1 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46491 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 18:18:13 +00:00
Jake Spurlock
4ea459d68c Backporting several bug fixes.
- Query: Remove the static query property.
- HTTP API: Protect against hex interpretation.
- Filesystem API: Prevent directory travelersals when creating new folders.
- Administration: Ensure that admin referer nonce is valid.
- REST API: Send a Vary: Origin header on GET requests.

Backports [46474], [46475], [46476], [46477], [46478], [46483], [46485] to the 5.1 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46490 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 18:16:02 +00:00
Jonathan Desrosiers
9c10c15fab Build/Test Tools: Remove PHP nightly build from Travis for 5.1 branch.
See #48225.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46407 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 17:06:02 +00:00
Jonathan Desrosiers
59b8d97c1c WordPress 5.1.2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46045 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 21:25:07 +00:00
Jake Spurlock
42565e613d Update the block library to 2.2.17 to fix an issue with invalid shortcode blocks.
Props aduth, flaviozavan, epiqueras, jorgefilipecosta


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46030 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 21:15:59 +00:00
Sergey Biryukov
6605763c34 Coding Standards: Fix WPCS issue in [45990].
Merges [46019] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46024 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:43:07 +00:00
Andrew Ozz
9c76dcbbe1 jQuery: bring jquery.js back into the WordPress SVN repo and backport the patch from 3.4.0.
Merges [45342] to the 5.1 branch.

Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46014 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:35:42 +00:00
Jonathan Desrosiers
19a8957bd0 Fix for URL sanitization in wp_kses_bad_protocol_once().
Merges [45997] to the 5.1 branch.

Props irsdl, sstoqnov, whyisjake.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@46002 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 18:00:59 +00:00
Sergey Biryukov
678aa83873 Improve handling the existing rel attribute in wp_rel_nofollow_callback().
Merges [45990] to the 5.1 branch.
Props xknown, sstoqnov.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45992 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:40:11 +00:00
Sergey Biryukov
fcd92ff35a Improve URL validation in wp_validate_redirect().
Merges [45971] to the 5.1 branch.
Props vortfu, whyisjake, peterwilsoncc.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45973 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:58:39 +00:00
Jake Spurlock
df38632c82 Remove _convert_urlencoded_to_entities() from the get_the_content() callback.
Merges [45937] to the 5.1 branch.

Props vortfu, whyisjake, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45940 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:20:37 +00:00
Sergey Biryukov
bf34d826e8 Escape the output in wp_ajax_upload_attachment().
Merges [45936] to the 5.1 branch.
Props whyisjake, sstoqnov.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@45939 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 16:17:53 +00:00
John Blackbourn
eaa0d5b92b Build/Test tools: Switch npm dependency caching strategy on Travis CI.
This switches to caching npm's local cache instead of `node_modules` in order to prevent issues caused by modules compiled using a different version of node.

Merges [44993] into the 5.1 branch.

See #46632


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44994 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-25 00:53:58 +00:00
Gary Pendergast
3c2d00d038 Admin: Revert [44984].
That was supposed to go into `trunk`, not the 5.1 branch.

See #46573.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44985 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:36:10 +00:00
Gary Pendergast
bef9b9138d Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44984 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:17:14 +00:00
Felix Arntz
c29015f3b3 Multisite: Do not prime site meta caches unless necessary.
Merges [44926] to the 5.1 branch.

Props spacedmonkey.
Fixes #46357. See #46167.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44928 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-18 16:20:53 +00:00
Felix Arntz
de65eacf12 Multisite: Ensure site meta caches are not primed unless the wp_blogmeta table is available.
Prior to this change, querying sites early in the bootstrap process could potentially cause a fatal error, since at that stage the filter to bail on updating site meta cache if the respective database table has not been installed yet is not hooked in yet. This changeset forces the filter to be added if that is not already the case.

Merges [44925] to the 5.1 branch.

Props spacedmonkey.
Fixes #46167.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44927 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-18 16:19:27 +00:00
Gary Pendergast
688b855fd3 WordPress 5.1.1
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44860 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-13 00:16:04 +00:00
Sergey Biryukov
8df47ff01f PHPCS: Fix errors introduced in [44833].
Merges [44858] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44859 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:56:44 +00:00
Sergey Biryukov
67a2a6feb9 Comments: Improve comment content filtering.
Merges [44842] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44843 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:31:55 +00:00
Sergey Biryukov
7206b554d9 Formatting: Improve rel="nofollow" handling in comments.
Merges [44833] to the 5.1 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44834 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 22:15:37 +00:00
Aaron Jorbin
6d22ce686a General: Add missing @since annotation for wp_get_direct_php_update_url().
Backports [44829] to 5.1 branch. Dev-reviewed by desrosj and SergeyBiryukov.

Missed in [44815].

Props birgire.
See #46074.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44831 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-12 17:12:22 +00:00
Gary Pendergast
68fa2f44cf WordPress 5.1.1 RC1 post release version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44820 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-08 00:29:18 +00:00
Gary Pendergast
3c91f92aba WordPress 5.1.1 RC1.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44819 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-08 00:12:51 +00:00
Jonathan Desrosiers
057d0fbff1 Widgets: Remove change event when editing a Custom HTML widget.
The `change` event was previously required to ensure that the Customizer picked detected changes to the widget's content and synced them to the preview. In the current state, though, the `trigger( 'change' )` is no longer required and is causing issues with the widget's “Done” and “Save” buttons.

Merges [44816] to the 5.1 branch.

Fixes #46335.
Props audrasjb, afercia, westonruter.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44817 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 22:34:03 +00:00
Jonathan Desrosiers
85076ad9f9 General: Add a way to specify a direct link for a user to update PHP.
A direct URL to where a user can update PHP for their website can now be specified in one of two ways:

- Defining the `WP_DIRECT_UPDATE_PHP_URL` environment variable.
- Returning a URL to the `wp_direct_php_update_url` filter.

When a URL is specified, an additional “Update PHP” button will be displayed at the bottom of the Core dashboard widget informing administrators that their site is running an outdated version of PHP (see [42832]).

Merges [44814] to the 5.1 branch.

Fixes #46074.
Props afragen, desrosj, lukecarbis.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44815 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 21:36:22 +00:00
Jeremy Felt
cd010b40fe Multisite: Ensure wpmu_new_blog hook receives expected data in $meta.
Restores `public`, `archived`, `mature`, `spam`, `deleted`, `lang_id`, and `WPLANG` to the `$meta` data passed to `wpmu_new_blog`. This hook was deprecated in 5.1.0, but code using it still relies on this data.

Props davidbinda, pbiron.
Merges [44805] and [44806] to the 5.1 branch.
Fixes #46351.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44807 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-07 04:36:36 +00:00
Sergey Biryukov
9042c9d9b7 Menus: After [42857], apply background to the correct elements on Menus screen.
Props audrasjb, afercia, mukesh27, garrett-eclipse.
Merges [44801] to the 5.1 branch.
Fixes #46368.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44802 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-05 21:02:47 +00:00
Sergey Biryukov
b57deec916 Networks and Sites: Check the result of get_site() in wp_insert_site().
Props davidbinda, vanyukov, lukecarbis.
Merges [44799] to the 5.1 branch.
Fixes #46300.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44800 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-05 20:36:28 +00:00
Sergey Biryukov
0b63929b95 I18N: Remove trailing spaces from translatable strings introduced in [43436].
Props dimadin.
Merges [44797] to the 5.1 branch.
Fixes #46277.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44798 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-05 20:29:19 +00:00
Peter Wilson
8f8b1c9237 Comments: Allow for comment-reply.js to be loaded in the HTML header.
Allows for themes or plugins setting the comment-reply JavaScript as a dependency of an HTML header script. This in turn causes `comment-reply.js` to be loaded early, requiring execution to be delayed.

Props pento, peterwilsoncc, jorbin for feedback.
Merges [44794] to the 5.1 branch.
Fixes #46280.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44795 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-05 02:13:25 +00:00
Felix Arntz
11b3b4bca8 General: Introduce wp_is_php_version_acceptable filter to make the check for triggering PHP version warnings stricter.
The filter is only run if the wordpress.org API considers the PHP version acceptable. This ensures that other plugins or hosting providers can only make this check stricter, but not loosen it.

Merges [44788] to the 5.1 branch.

Props j-falk, mikeschroder.
Fixes #46065.


git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44789 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-04 21:22:30 +00:00
Jonathan Desrosiers
c6cd9f81b8 Build: Minify images
After `grunt-contrib-imagemin` was upgraded in WordPress 5.0, the `grunt precommit:image` task results in further minifications to `loading.gif`.

Merges [44768] to the 5.1 branch.

Fixes #46295.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44783 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-28 21:55:15 +00:00
Jonathan Desrosiers
984f2b6aae Help/About: Fix mismatched opening/closing tags.
The 5.1 About page contains some invalid HTML markup.

Props bulletdigital.

Merges [44769] to the 5.1 branch.

Fixes #46319.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44770 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-26 16:23:45 +00:00
Gary Pendergast
ae3d09e136 Bump version to 5.1.1-alpha.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44766 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-21 22:54:01 +00:00
Gary Pendergast
eb6a46184a WordPress 5.1! 🕺🏻
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44764 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-21 22:06:06 +00:00
Aaron Jorbin
13feabce1d Script Loader: Load fakejshint as jshint due to "good and evil".
Backports [44762] from trunk to 5.1. Devreviewed by Pento.

Originally fixed in [42547]. Broken in [44163]. We've been here before. I recognize that tree.

Fixes #46299



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44763 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-21 21:21:24 +00:00
Gary Pendergast
7a13795e40 Upgrades: Update $_old_files for WordPress 5.1.
`wp-includes/random_compat/random_bytes_openssl.php` was removed in [43130], this commit updates `$_old_files` to match.

Merges [44760] to the 5.1 branch.

Fixes #46284.



git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44761 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-21 04:36:10 +00:00
Gary Pendergast
aeee7aca2b Post WordPress 5.1 RC2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44754 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-19 02:57:05 +00:00
Gary Pendergast
f7fc6a541f WordPress 5.1 RC2.
git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44753 602fd350-edb4-49c9-b593-d223f7449a82
2019-02-19 02:43:54 +00:00