Commit Graph

38672 Commits

Author SHA1 Message Date
Sergey Biryukov efe9a3eb21 Docs: Improve documentation for `date_i18n()`'s second argument.
Despite previously being labeled as a Unix timestamp, in reality it's a sum of Unix timestamp and timezone offset in seconds.

Props Rarst.
See #38771.

git-svn-id: https://develop.svn.wordpress.org/trunk@43380 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-26 13:18:13 +00:00
Andrew Ozz 6b366c6620 Privacy: use `wp_login_url()` for the link in the user confirmation email.
Props desrosj, usmankhalid.
Fixes #44353.

git-svn-id: https://develop.svn.wordpress.org/trunk@43379 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-25 15:01:29 +00:00
K. Adam White a830dbcab3 REST API: Support meta registration for specific object subtypes.
Introduce an `object_subtype` argument to the args array for `register_meta()` which can be used to limit meta registration to a single subtype (e.g. a custom post type or taxonomy, vs all posts or taxonomies).

Introduce `register_post_meta()` and `register_term_meta()` wrapper methods for `register_meta` to provide a convenient interface for the common case of registering meta for a specific taxonomy or post type. These methods work the way plugin developers have often expected `register_meta` to function, and should be used in place of direct `register_meta` where possible.

Props flixos90, tharsheblows, spacedmonkey.
Fixes #38323.



git-svn-id: https://develop.svn.wordpress.org/trunk@43378 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-21 21:06:50 +00:00
Gary Pendergast cdd9910f01 Emoji: Update Twemoji to version 11.0.
🦹

Props kraftbj,
Fixes #44339.



git-svn-id: https://develop.svn.wordpress.org/trunk@43377 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-20 04:20:32 +00:00
Andrew Ozz 1ebcb33c3c Privacy: append `(Draft)` to draft page titles in the page drop-down on the Privacy Settings screen.
Props allendav, desrosj.
Fixes #44100.

git-svn-id: https://develop.svn.wordpress.org/trunk@43376 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-19 12:11:46 +00:00
Andrew Ozz 2972f7c220 Privacy: add user request type to the admin notification email subject.
Props birgire, desrosj.
Fixes #44099.

git-svn-id: https://develop.svn.wordpress.org/trunk@43375 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-19 08:17:44 +00:00
Andrew Ozz b2830c15e6 Privacy: on the Privacy Settings screen change `view` to `preview` when a draft page is selected for the privacy policy.
Props garrett-eclipse, desrosj.
Fixes #44131.

git-svn-id: https://develop.svn.wordpress.org/trunk@43374 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 16:36:18 +00:00
Andrew Ozz 5168c31084 Privacy: filter the email subject in `_wp_privacy_send_request_confirmation_notification()`.
Props garrett-eclipse, birgire, desrosj.
Fixes #44382.

git-svn-id: https://develop.svn.wordpress.org/trunk@43373 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 16:23:37 +00:00
Andrew Ozz acbbd28d0e Privacy: add `esc_html` to assertion in test_wp_comments_personal_data_exporter.
Props mermel, 1naveengiri.
Fixes #44113.

git-svn-id: https://develop.svn.wordpress.org/trunk@43371 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 16:09:55 +00:00
Andrew Ozz 819626ce83 Privacy: do not show the comment cookies opt-in checkbox (on the front-end comments form) when comment cookies are disabled.
Props felipeelia, johnbillion.
Fixes #44342.

git-svn-id: https://develop.svn.wordpress.org/trunk@43370 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 15:01:27 +00:00
John Blackbourn 1e88432e34 Build/Test Tools: Introduce support for a `WP_TESTS_CONFIG_FILE_PATH` constant to override the test suite config file location.
This can be used in phpunit.xml:

{{{
<php>
	<const name="WP_TESTS_CONFIG_FILE_PATH" value="/path/to/wp-tests-config.php" />
</php>
}}}

Props clarinetlord

Fixes #39734


git-svn-id: https://develop.svn.wordpress.org/trunk@43369 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 14:21:18 +00:00
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