Commit Graph

38411 Commits

Author SHA1 Message Date
John Blackbourn
102422679d Security: Harden the random aspect of the hash used for user profile and admin email address changes.
Props BjornW

Fixes #43771


git-svn-id: https://develop.svn.wordpress.org/trunk@43367 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 14:09:58 +00:00
John Blackbourn
e42ce4a603 Options, Meta APIs: Use the correct escaping function when outputting the meta box context.
Props khaihong, abdullahramzan, leanderiversen, aryamaaru, lbenicio, palmiak

Fixes #44274


git-svn-id: https://develop.svn.wordpress.org/trunk@43365 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:49:23 +00:00
Sergey Biryukov
c8cbd26cb3 Docs: Correct inline comment added in [43361] for consistency with other comments.
See #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43363 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:09:46 +00:00
Sergey Biryukov
3de54cc930 Docs: Add missing @return value for save_mod_rewrite_rules() and iis7_save_url_rewrite_rules().
See #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43362 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:03:39 +00:00
Sergey Biryukov
d99d403030 Privacy: Make sure wp_add_privacy_policy_content() does not cause a fatal error by unintentionally flushing rewrite rules outside of the admin context.
Add a `_doing_it_wrong()` message describing the correct usage of the function.

Props kraftbj, azaozz, SergeyBiryukov, YuriV.
Fixes #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43361 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:01:42 +00:00
Anton Timmermans
885cd0fb44 Docs: Improve JSDoc for emoji.js.
Props lisannekluitmans, hansjovisyoast, igorsch, nicollle.
Fixes #44367.


git-svn-id: https://develop.svn.wordpress.org/trunk@43360 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 12:53:07 +00:00
John Blackbourn
5aa5e5c131 I18N: Introduce unit tests for the Japanese language in order to facilitate future improvements.
Props ryotsun

Fixes #43829


git-svn-id: https://develop.svn.wordpress.org/trunk@43359 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 12:44:46 +00:00
Sergey Biryukov
4d5b00da46 Docs: Update @since versions in Community Events class added in [42726].
See #41112.

git-svn-id: https://develop.svn.wordpress.org/trunk@43356 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:38:27 +00:00
Anton Timmermans
1476007240 Docs: Improve JSDoc for auth-check.js.
Props pskli.
Fixes #44364.


git-svn-id: https://develop.svn.wordpress.org/trunk@43355 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:28:56 +00:00
Sergey Biryukov
51b94c3262 Privacy: Remove unnecessary This email has been sent to ###EMAIL### from privacy emails.
The line was copied from the emails that get sent when an email address changes, without considering if it made sense in the new context.

Props iandunn, ianbelanger, desrosj.
Fixes #44030.

git-svn-id: https://develop.svn.wordpress.org/trunk@43353 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:24:30 +00:00
Anton Timmermans
83cfbd8ac0 Docs: Improve JSDoc for admin/link.js.
Props andg.
Fixes #44362.


git-svn-id: https://develop.svn.wordpress.org/trunk@43352 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:11:57 +00:00
Sergey Biryukov
a7435b7a04 Privacy: Fix typo in default privacy policy text.
Props garetharnold, abdullahramzan.
Fixes #44166.

git-svn-id: https://develop.svn.wordpress.org/trunk@43350 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:06:41 +00:00
jrf
3581d34bb0 Build/Tools: Update PHPCS ruleset for WP Core and related Composer setup.
`.gitignore` + `svn:ignore`:
* Add the typical filenames of overloaded PHPCS configs to `.gitignore`.

Composer:
* Use the `develop` (Packagist `dev-master`) version of WPCS as it contains lots of bugfixes.
* Remove the PHPCS dependency. This is a dependency of WPCS, not of WP Core itself. This will also make sure that the PHPCS version used is always one which is supported by WPCS.
* Refreshed the `composer.lock` file.

PHPCS ruleset:
* Removed a reference to a sniff which doesn't exist in WPCS yet.
* Use the PHPCS 3.x `basepath` option to clean up the file paths PHPCS shows in the reports.
* Use the PHPCS 3.x `parallel` option to enable parallel scanning whenever possible to speed up the scans.
* Whitelist the `wp-includes/l10n.php` file from issues being reported by the `WordPress.WP.I18n` sniff.

Fixes #44366.

git-svn-id: https://develop.svn.wordpress.org/trunk@43348 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 15:56:58 +00:00
Anton Timmermans
78f2b0e731 Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.


git-svn-id: https://develop.svn.wordpress.org/trunk@43347 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-15 10:18:44 +00:00
Anton Timmermans
e32886cbdf Docs: Improve JSDoc for pointer.js.
Props maartenleenders, dfangstrom.
Fixes #44325.


git-svn-id: https://develop.svn.wordpress.org/trunk@43346 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-14 15:13:19 +00:00
Sergey Biryukov
80f0a73cf5 I18N: Remove unused MediaElement.js strings.
Props metodiew.
See #42139. Fixes #37453.

git-svn-id: https://develop.svn.wordpress.org/trunk@43345 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-14 14:46:49 +00:00
Anton Timmermans
b2fe6abbe2 Build Tools: Fix JSDoc configuration include paths.
After [43309] the JSDoc configuration was broken, this fixes that.

Props herregroen.


git-svn-id: https://develop.svn.wordpress.org/trunk@43344 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-14 12:45:06 +00:00
Weston Ruter
802139d185 Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.
Props dlh.
Fixes #44117.


git-svn-id: https://develop.svn.wordpress.org/trunk@43343 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-14 11:39:35 +00:00
Anton Timmermans
517cdca538 Docs: Improve JSDoc for admin-bar.js.
Change an incorrect type and description after [43332].

Props afercia.
See #43871.


git-svn-id: https://develop.svn.wordpress.org/trunk@43341 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-12 09:33:08 +00:00
Felix Arntz
07f3c7097e REST API: Improve test coverage by providing tests for term meta.
See #38323.


git-svn-id: https://develop.svn.wordpress.org/trunk@43340 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-11 17:54:19 +00:00
Felix Arntz
9e38c2847e Tests: Improve performance of post meta tests.
See #38323.


git-svn-id: https://develop.svn.wordpress.org/trunk@43339 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-11 16:32:32 +00:00
Andrew Ozz
d3014a47b4 Move scheduling of old auto-draft posts deletion to get_default_post_to_edit() (where auto-drafts are created).
Fixes #44337.

git-svn-id: https://develop.svn.wordpress.org/trunk@43338 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-08 15:52:22 +00:00
Andrew Ozz
2325faeb96 TinyMCE: do not force-load external plugins, not needed any more and may cause issues.
Fixes #44330.

git-svn-id: https://develop.svn.wordpress.org/trunk@43337 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-08 09:32:35 +00:00
Andrew Ozz
a56df22d91 TinyMCE: prevent creation of paragraphs from multiple HTML comments when wpautop is disabled.
Fixes #44308.

git-svn-id: https://develop.svn.wordpress.org/trunk@43336 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-08 08:58:51 +00:00
Jeremy Felt
8d9cd406fb Build/Test Tools: Avoid running full PHPUnit test suite for every PHP file change.
Use `grunt watch --phpunit --group={testgroup}` to start `grunt watch` with a specific test group so that PHP file changes trigger a limited number of tests.

Props jeremyfelt, birgire for testing.
Fixes #44240.


git-svn-id: https://develop.svn.wordpress.org/trunk@43335 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-08 04:40:18 +00:00
Anton Timmermans
a14e4f1c86 Docs: Improve JSDoc for language-chooser.js.
Props ireneyoast, manuelaugustin.
Fixes #43950.


git-svn-id: https://develop.svn.wordpress.org/trunk@43334 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-07 15:07:31 +00:00
Anton Timmermans
8a9bf2a08b Docs: Improve JSDoc for zxcvbn-async.js.
Props manuelaugustin, igorsch, LisanneKluitmans.
Fixes 43948.


git-svn-id: https://develop.svn.wordpress.org/trunk@43333 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-07 14:51:02 +00:00
Anton Timmermans
a65ad8a247 Docs: Improve JSDoc for admin-bar.js.
Props manuelaugustin, terwdan, sjardo, LisanneKluitmans.
Fixes #43871.


git-svn-id: https://develop.svn.wordpress.org/trunk@43332 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-07 14:39:43 +00:00
Sergey Biryukov
f4580c122b Users: In wp_validate_user_request_key(), properly return the WP_Error object in case the confirmation email has expired.
Props itowhid06.
Fixes #44298.

git-svn-id: https://develop.svn.wordpress.org/trunk@43331 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-04 13:45:13 +00:00
Sergey Biryukov
88df6476cd Docs: Remove obsolete $wpdb global references in WP_User::__construct() and WP_User::for_blog().
Props mt8.biz.
Fixes #44295.

git-svn-id: https://develop.svn.wordpress.org/trunk@43330 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-04 13:38:33 +00:00
Gary Pendergast
a26c24226c Build Tools: grunt build should only copy Core files.
Historically, `grunt build` has copied all files from the `src` directory to the `build` directory. This is usually fine, but can be super slow when there are lots of custom plugins or themes in the `src` directory.

To rectify this, we now only copy Core plugins and themes to `build`.

Props adamsilverstein, pento, johnbillion.
Fixes #44256.



git-svn-id: https://develop.svn.wordpress.org/trunk@43329 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-01 01:28:53 +00:00
Sergey Biryukov
ecb3302b45 Build/Test Tools: Replace Codex home page link in "Read more about setting up your local development environment" with a more specific handbook link.
Props abdullahramzan, johnbillion.
Fixes #44228.

git-svn-id: https://develop.svn.wordpress.org/trunk@43328 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-30 14:55:10 +00:00
Andrew Ozz
ccecd58f97 Build tools: Grunt:
- Normalize `filepath` in the the `watch` event.
- Throw a warning when `watch` fails to process a file because the destination path cannot be determined.

Fixes #44262.

git-svn-id: https://develop.svn.wordpress.org/trunk@43327 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-29 14:20:44 +00:00
Jeremy Felt
50cd98012e Docs: Document globals in validate_another_blog_signup().
Props mukesh27.
Fixes #43594.


git-svn-id: https://develop.svn.wordpress.org/trunk@43326 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 20:06:19 +00:00
Sergey Biryukov
b9a3b166e5 Docs: Fix typo in Services_JSON DocBlocks.
Props sagarnasit.
Fixes #44244.

git-svn-id: https://develop.svn.wordpress.org/trunk@43325 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 19:41:16 +00:00
Jeremy Felt
532d177b65 Built/Test Tools: Increase grunt watch interval on all files.
Significantly reduces Grunt's CPU usage when `grunt watch` is in an idle/watching state.

Props netweb.
Fixes #44241.


git-svn-id: https://develop.svn.wordpress.org/trunk@43324 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 18:46:15 +00:00
Andrew Ozz
247eba769e Build tools: Update Grunt to version 1.0.2.
Props iandunn, netweb.
Fixes #42308.

git-svn-id: https://develop.svn.wordpress.org/trunk@43323 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 17:02:22 +00:00
Andrew Ozz
4fc1579427 Build tools:
- Remove `check-node-version` from package.json for now. Throws errors.
- Minor fixes to package-lock.json, `http` => `https`.

See #44246.

git-svn-id: https://develop.svn.wordpress.org/trunk@43322 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 16:42:34 +00:00
Andrew Ozz
338e951cec Build tools: add check-node-version to check required Node.js and npm versions are installed.
Props netweb.
Fixes #44246.

git-svn-id: https://develop.svn.wordpress.org/trunk@43321 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 16:07:48 +00:00
Andrew Ozz
f26fe4ea9c Build tools: Use npm v6.1.0.
Props netweb.
Fixes #44245.

git-svn-id: https://develop.svn.wordpress.org/trunk@43320 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 16:00:45 +00:00
Sergey Biryukov
d67826119d Docs: Fix typo in _walk_bookmarks() DocBlock.
Props abhijitrakas.
Fixes #44242.

git-svn-id: https://develop.svn.wordpress.org/trunk@43319 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 08:35:12 +00:00
Sergey Biryukov
302a2297dd Posts, Post Types: Use COOKIEPATH when clearing post password cookie, as that's the path it's created with.
See #44089.

git-svn-id: https://develop.svn.wordpress.org/trunk@43318 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-27 01:32:20 +00:00
Sergey Biryukov
daf0333601 Posts, Post Types: Clear post password cookie when logging out.
Props skoldin, subrataemfluence, ianbelanger, johnbillion.
Fixes #44089.

git-svn-id: https://develop.svn.wordpress.org/trunk@43317 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-26 12:42:57 +00:00
John Blackbourn
58a71dc610 Build/Test Tools: Allow the unit test framework to be used without the data directory in place.
Fixes #43982

git-svn-id: https://develop.svn.wordpress.org/trunk@43315 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-25 22:42:11 +00:00
Boone Gorges
39fb88f961 Taxonomy: Improve cache handling when querying for terms using all_with_object_id.
When a term query using `fields=all_with_object_id` hits the cache, the
cached `stdClass` objects must be converted to `WP_Term` objects. This
was overlooked when `WP_Term_Query` was refactored to support object
queries in [38667].

Props dlh.
Fixes #44221.

git-svn-id: https://develop.svn.wordpress.org/trunk@43313 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-25 01:22:44 +00:00
Gary Pendergast
53e3a17e6f Tools: Update wp-cli.yml to point to the build directory.
After [43309], WP-CLI should be running against the `build` directory, not the `src` directory.

Props jpry.
Fixes #44214.



git-svn-id: https://develop.svn.wordpress.org/trunk@43312 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-25 00:14:14 +00:00
John Blackbourn
f4fbba188d Build/Test Tools: Roses are red, this fixes stuff.
Update the test infrastructure so that third party plugins, themes, and projects that use the core testing framework continue to operate from the `src` directory and do not require a build step.

Props mboynes, danielbachhuber, schlessera

See #43055


git-svn-id: https://develop.svn.wordpress.org/trunk@43311 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 17:54:44 +00:00
Gary Pendergast
386adbb8f8 Following [43309], I need to change one little line,
And delete some left over cruft, only then shall we prevail.
There are some things easily missed, when using Git, which does not persist—
Empty directories, though that didn't derail—
Our Travis-based tests, which now must prevail.
            Quoth Travis CI, “Build did fail.”

See #43055.



git-svn-id: https://develop.svn.wordpress.org/trunk@43310 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 11:02:28 +00:00
Gary Pendergast
ef37f002ee Once upon a midnight dreary, while I coded, weak and weary,
In many a strange and curious file of forgotten lore—
While I pondered, blaming Nacin, my notifications suddenly awakened,
As of someone quietly DMing;—DMing me, I can’t ignore.
“’Tis some contributor,” I muttered, “DMing me an idea or four—
            Only this and nothing more.”

Ah, distinctly I remember, at WordCamp US, last December;
A mad proposal nearly laid me—down out cold—upon the floor.
Curious, I listened closely;—to a plan I agreed with, mostly—
A way to make our JavaScript—JavaScript which was a chore—
Maintainable, extendable, for the future, is what I saw.
            Guten-ready for evermore.

Open here I switch to Slack, when, with many a patch and hack,
In there stepped Omar, a JavaScript developer hardcore;
Pronouncing all the changes fit; ready now to be commit;
“There’s nothing else for us to do,” DMing me, “It’s done!” he swore—
“No longer random guessing at which file need next be explored—
            Let’s move on, we’re all aboard.”

Moved all together, grouped and managed, in folders all is packaged,
The code had all been cleaned and tidied, important parts moved to the fore,
“Though this change be useful here,” I said, “it is too large, I fear,
We couldn’t manage such a patch, we’ve done nothing like this before—
Tell me where doth go this change, change to make our codebase soar!”
            Quoth Omar, “In WordPress Core.”

Props omarreis for shepherding this significant change.
Props adamsilverstein, aduth, atimmer, dingo_bastard, frank-klein, gziolo, herregroen, jaswrks, jeremyfelt, jipmoors, jorbin, netweb, ocean90, pento, tjnowell, and youknowriad for testing, feedback, discussion, encouragement, commiserations, etc.
I make no apologies for this commit message.
Fixes #43055.



git-svn-id: https://develop.svn.wordpress.org/trunk@43309 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 10:04:22 +00:00
Boone Gorges
acebda9aa5 Taxonomy: Fix $object_ids reference in WP_Term_Query parameter documentation.
Props dlh.
Fixes #44200.

git-svn-id: https://develop.svn.wordpress.org/trunk@43308 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 02:23:53 +00:00