Felix Arntz
17f435b5aa
General: Provide context parameters to doing_it_wrong_trigger_error
filter.
...
`$function`, `$message`, and `$version` have historically been passed to the `doing_it_wrong_run` action. It makes sense to pass those to the filter as well, so that one can conditionally determine the filter value to return.
Fixes #34183 .
Built from https://develop.svn.wordpress.org/trunk@43587
git-svn-id: http://core.svn.wordpress.org/trunk@43416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-28 13:38:24 +00:00
Felix Arntz
27e48708f8
REST API: Fix failing tests after [43584] and [43585].
...
See #40510 .
Built from https://develop.svn.wordpress.org/trunk@43586
git-svn-id: http://core.svn.wordpress.org/trunk@43415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-28 13:05:24 +00:00
Felix Arntz
77fd4135f1
REST API: Fix failing tests after [43584].
...
See #40510 .
Built from https://develop.svn.wordpress.org/trunk@43585
git-svn-id: http://core.svn.wordpress.org/trunk@43414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-28 12:44:24 +00:00
Felix Arntz
9fe4db814a
REST API: Support pagination, order, search and other common query parameters for revisions.
...
The original REST API revisions controller relied on `wp_get_post_revisions()`, getting all revisions of a post without any possibility to restrict the result. This changeset replaces that function call with a proper `WP_Query` setup, replicating how `wp_get_post_revisions()` works while offering parameters to alter the default behavior.
Props adamsilverstein, birgire, flixos90.
Fixes #40510 .
Built from https://develop.svn.wordpress.org/trunk@43584
git-svn-id: http://core.svn.wordpress.org/trunk@43413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-28 12:23:26 +00:00
John Blackbourn
d27579cf15
Docs: Improve inline documentation for WP_Scripts
.
...
Props desrosj
See #42505
Built from https://develop.svn.wordpress.org/trunk@43583
git-svn-id: http://core.svn.wordpress.org/trunk@43412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-27 14:34:24 +00:00
John Blackbourn
47d32decd6
Docs: Correct and improve various inline documentation.
...
See #42505
Built from https://develop.svn.wordpress.org/trunk@43582
git-svn-id: http://core.svn.wordpress.org/trunk@43411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-27 14:28:26 +00:00
Andrew Ozz
5bbb3b38d9
TinyMCE: remove stray CSS map reference from skin.min.css
.
...
Props: pross.
Fixes #44785 .
Built from https://develop.svn.wordpress.org/trunk@43581
git-svn-id: http://core.svn.wordpress.org/trunk@43410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 15:09:24 +00:00
Andrew Ozz
1521b64337
Script loader: remove (PHP based) compression from load-styles.php
and load-scripts.php
. WIth the amount of scripts and stylesheets grown a lot over the years, it has become pretty slow and consumes a lot of server resources. Also, most servers are set to compress PHP output anyway.
...
Props LucasRolff, azaozz.
Fixes #44815 .
See #43308 .
Built from https://develop.svn.wordpress.org/trunk@43580
git-svn-id: http://core.svn.wordpress.org/trunk@43409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 13:51:24 +00:00
Andrew Ozz
1824884b75
Reorder quicktags.js
a bit to account for the order of defining vars and functions after [43577].
...
See #44371 .
Built from https://develop.svn.wordpress.org/trunk@43579
git-svn-id: http://core.svn.wordpress.org/trunk@43408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 13:34:25 +00:00
Felix Arntz
1422d8ffd9
Customize: Safeguard a check on the customize_validate_{$setting_id}
filter value to ensure it is a WP_Error
.
...
While the filter is documented to only support a `WP_Error`, it has been a common practice to return true in a validation function if no errors have occurred. This was already caught when the same filter was executed in `WP_Customize_Setting`, it was however missing in `WP_Customize_Manager::validate_setting_values()`.
Fixes #44809 .
Built from https://develop.svn.wordpress.org/trunk@43578
git-svn-id: http://core.svn.wordpress.org/trunk@43407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 16:38:24 +00:00
omarreiss
bdbaccce37
General: Explicitly assigns all JS globals to the window.
...
Many variables in the JavaScript were defined in the global scope without being explicitly assigned to the window. When built with Webpack, the code gets encapsulated in anonymous functions and those implicit globals get assigned to the wrong scope. This patch prevents that from happening.
Fixes #44371 . See #43731 .
Built from https://develop.svn.wordpress.org/trunk@43577
git-svn-id: http://core.svn.wordpress.org/trunk@43406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 13:33:24 +00:00
John Blackbourn
879f43f278
Docs: Remove an erroneous closing brace from the description of wp_list_pages()
.
...
Props birgire
See #42505
Built from https://develop.svn.wordpress.org/trunk@43576
git-svn-id: http://core.svn.wordpress.org/trunk@43405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 11:17:26 +00:00
John Blackbourn
8730f3cb79
Customize: Increase the colour contrast of the line numbers in CodeMirror.
...
Props earnjam, abdullahramzan, audrasjb, Luminus
Fixes #44763
Built from https://develop.svn.wordpress.org/trunk@43574
git-svn-id: http://core.svn.wordpress.org/trunk@43403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 11:01:23 +00:00
Sergey Biryukov
8efab48ede
Administration: Remove $title_class
variable, unused since [18683].
...
Props hitendra-chopda, torontodigits.
Fixes #44812 .
Built from https://develop.svn.wordpress.org/trunk@43573
git-svn-id: http://core.svn.wordpress.org/trunk@43402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 10:18:26 +00:00
Gary Pendergast
41166ed741
Tests: Revert wp-api-generated.js
change added in [43571].
...
The fixtures file was accidentally included in [43571], but that caused other tests to fail.
See #39122 .
Built from https://develop.svn.wordpress.org/trunk@43572
git-svn-id: http://core.svn.wordpress.org/trunk@43401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 04:12:25 +00:00
Gary Pendergast
56c162fbc9
Coding Standards: Upgrade WPCS to 1.0.0
...
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.
This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script.
- Auto-fixable coding standards issues will now cause Travis failures.
Fixes #44600 .
Built from https://develop.svn.wordpress.org/trunk@43571
git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Boone Gorges
8142df82bc
Introduce wp_insert_term_duplicate_term_check
filter.
...
This filter allows plugins to intervene in the duplicate-term check
that takes place at the time of term creation. See [30238], #22023 .
Props strategio.
Fixes #43271 .
Built from https://develop.svn.wordpress.org/trunk@43570
git-svn-id: http://core.svn.wordpress.org/trunk@43399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-15 19:50:25 +00:00
Gary Pendergast
8244397ffb
Coding Standards: Prepare for upgrading WPCS to 1.0.0.
...
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.
These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.
See #44600 .
Built from https://develop.svn.wordpress.org/trunk@43569
git-svn-id: http://core.svn.wordpress.org/trunk@43398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-15 06:22:26 +00:00
Sergey Biryukov
08af3900c3
Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.
...
Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
Fixes #43985 .
Built from https://develop.svn.wordpress.org/trunk@43568
git-svn-id: http://core.svn.wordpress.org/trunk@43397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-13 16:32:27 +00:00
K. Adam White
a2648da538
Tests: Improve coverage for REST API term meta registration.
...
Introduce tests to validate that register_meta and register_term_meta work as expected in WP_REST_Terms_Controller.
props timmydcrawford.
Fixes #39122 .
Built from https://develop.svn.wordpress.org/trunk@43567
git-svn-id: http://core.svn.wordpress.org/trunk@43396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-12 00:06:24 +00:00
K. Adam White
b5ec1e6d96
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
2018-08-11 18:51:24 +00:00
Sergey Biryukov
c0cc6617f2
Script/Style Dependencies: Make sure that inline scripts for handles without a source are printed.
...
See [36550] for `WP_Styles`.
Props bpayton.
Fixes #44551 .
Built from https://develop.svn.wordpress.org/trunk@43565
git-svn-id: http://core.svn.wordpress.org/trunk@43394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 17:42:49 +00:00
Sergey Biryukov
c89962511b
Script/Style Dependencies: Simplify some logic in WP_Styles::do_item()
.
...
Combine repetitive assignments, make the code more consistent with `WP_Scripts::do_item()`.
See #44551 .
Built from https://develop.svn.wordpress.org/trunk@43564
git-svn-id: http://core.svn.wordpress.org/trunk@43393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 17:42:24 +00:00
Sergey Biryukov
4ad3539113
Docs: Correct description for WP_Scripts::$default_version
.
...
See #42505 .
Built from https://develop.svn.wordpress.org/trunk@43563
git-svn-id: http://core.svn.wordpress.org/trunk@43392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 15:09:24 +00:00
Sergey Biryukov
d7f3dbf939
Tests: Avoid a race condition in test_date_i18n_handles_shorthand_formats()
by using a delta for comparing timestamps.
...
See #20973 , #38381 .
Built from https://develop.svn.wordpress.org/trunk@43562
git-svn-id: http://core.svn.wordpress.org/trunk@43391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 13:29:25 +00:00
Sergey Biryukov
b456c7eb12
Customize: Pass missing parameter to dynamic option_{$option}
filter in WP_Customize_Widgets::capture_filter_pre_get_option()
.
...
Props dlh.
Fixes #44770 .
Built from https://develop.svn.wordpress.org/trunk@43561
git-svn-id: http://core.svn.wordpress.org/trunk@43390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 12:45:26 +00:00
Rachel Baker
64bcc842af
Docs: Update $meta_type descriptions to include ’term’ as a valid type in meta.php and class-wp-term-query.php.
...
Props macbookandrew.
Merges [43557] to trunk.
Fixes #44751 .
Built from https://develop.svn.wordpress.org/trunk@43560
git-svn-id: http://core.svn.wordpress.org/trunk@43389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-08 21:45:24 +00:00
Boone Gorges
38c33611e0
Correct param documentation for WP_Term_Query
.
...
The description of `$meta_type` introduced in [40053] was incorrect.
Props dlh.
Fixes #44608 .
Built from https://develop.svn.wordpress.org/trunk@43559
git-svn-id: http://core.svn.wordpress.org/trunk@43388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-08 19:23:25 +00:00
Boone Gorges
297c7e4c8f
Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.
...
Props soulseekah.
Fixes #44733 .
Built from https://develop.svn.wordpress.org/trunk@43558
git-svn-id: http://core.svn.wordpress.org/trunk@43387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-08 19:15:27 +00:00
Konstantin Obenland
071984839c
Toolbar: Check if obj
is set before using it.
...
Props pento.
See #44526 .
Built from https://develop.svn.wordpress.org/trunk@43556
git-svn-id: http://core.svn.wordpress.org/trunk@43385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-06 19:33:28 +00:00
Sergey Biryukov
aab929b8d6
Build/Test Tools: Add documentation for tests_add_filter()
, _test_filter_build_unique_id()
, _delete_all_data()
, _delete_all_posts()
.
...
Props andizer.
Fixes #44703 .
Built from https://develop.svn.wordpress.org/trunk@43555
git-svn-id: http://core.svn.wordpress.org/trunk@43384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 22:36:25 +00:00
laurelfulford
78a71b94bf
Twenty Seventeen: Correct date in changelog for 4.9.8 release.
...
Props pbiron, laurelfulford.
Fixes #44646 .
Built from https://develop.svn.wordpress.org/trunk@43550
git-svn-id: http://core.svn.wordpress.org/trunk@43379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 15:33:24 +00:00
Sergey Biryukov
70bc51e46f
Docs: Correct parameter name in strip_shortcodes_tagnames
filter DocBlock.
...
Props uttam007.
Fixes #44691 .
Built from https://develop.svn.wordpress.org/trunk@43549
git-svn-id: http://core.svn.wordpress.org/trunk@43378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 15:13:27 +00:00
Felix Arntz
9e2e491f1f
Multisite: Complete the new CRUD API for managing sites.
...
New functions `wp_insert_site( $data )`, `wp_update_site( $id, $data )` and `wp_delete_site( $id )` are introduced to manage site rows in the `wp_blogs` table, forming the new CRUD API together with the existing `get_site()` / `get_sites()`. The new API provides various benefits over the previously existing API, fixing several cache invalidation issues and being hook-driven so that normalization and validation of the passed data can be fully customized.
New hooks introduced as part of this are the actions `wp_insert_site`, `wp_update_site`, `wp_delete_site`, `wp_validate_site_data` and the filter `wp_normalize_site_data`.
At this point, `wp_insert_site()` does not handle setting up the site's database tables, and `wp_delete_site()` does not handle dropping the site's database tables, so the two can not yet be used directly as full replacements of `wpmu_create_blog()` and `wpmu_delete_blog()`. Managing the site's database tables will be added via hooks as part of the follow-up ticket #41333 .
The existing functions `wpmu_create_blog()`, `update_blog_details()`, and `wpmu_delete_blog()` make use of the respective new counterpart and will be obsolete once #41333 has been completed.
Props flixos90, jeremyfelt, spacedmonkey.
Fixes #40364 .
Built from https://develop.svn.wordpress.org/trunk@43548
git-svn-id: http://core.svn.wordpress.org/trunk@43377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-01 13:06:26 +00:00
Aaron Jorbin
d38f04eada
Gutenbeg: you can't remove call outs that don't exist
...
This commit should have just gone into the 4.9 branch. It did in [43544].
See: #44680
Unprops jorbin
props ocean90
Built from https://develop.svn.wordpress.org/trunk@43545
git-svn-id: http://core.svn.wordpress.org/trunk@43374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-31 15:16:25 +00:00
Aaron Jorbin
b27951eb85
Gutenberg: Restrict "Try Gutenberg" based on capability and gutenstatus
...
When Gutenberg is either not installed, or not activated, only show the callout to users with the install_plugins capability.
When Gutenberg is activated, expand that to include all users with the edit_posts capability.
Props pento.
Fixes #44680 .
Built from https://develop.svn.wordpress.org/trunk@43543
git-svn-id: http://core.svn.wordpress.org/trunk@43372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-31 14:42:29 +00:00
John Blackbourn
58509ba12f
Login and Registration: Pass the $errors
parameter to the lost_password
action.
...
Props sebakurzyn
Fixes #44512
Built from https://develop.svn.wordpress.org/trunk@43542
git-svn-id: http://core.svn.wordpress.org/trunk@43371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-28 13:02:25 +00:00
laurelfulford
7063c45879
Twenty Seventeen: Bump version number and update changelog for 4.9.8 release.
...
Props pbiron.
Fixes #44646 .
Built from https://develop.svn.wordpress.org/trunk@43541
git-svn-id: http://core.svn.wordpress.org/trunk@43370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-27 18:37:25 +00:00
Peter Wilson
90f1ac17ec
Cron: Add hooks and a function to allow hijacking cron implementation.
...
This allows sites with a large cron option or a custom cron implementation to hijack the cron option to store cron data using custom functionality.
`wp_get_scheduled_event()` is new function to retrieve the event object for a given event based on the hook name, arguments and timestamp. If no timestamp is specified the next occurence is returned.
Preflight filters are added to all functions that read from or modify the cron option: `pre_schedule_event`, `pre_reschedule_event`, `pre_unschedule_event`, `pre_clear_scheduled_hook`, `pre_unschedule_hook`, `pre_get_scheduled_event` and `pre_next_scheduled`.
Additionally, the post scheduling hooks `next_scheduled` and `get_schedule` to allow plugins to modify an event after retrieving it from WordPress.
Props rmccue, DavidAnderson, ethitter, peterwilsoncc.
Fixes #32656 .
Built from https://develop.svn.wordpress.org/trunk@43540
git-svn-id: http://core.svn.wordpress.org/trunk@43369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-27 02:23:25 +00:00
Sergey Biryukov
9c084c6968
Posts, Post Types: Introduce edit_post_{$post->post_type}
hook.
...
The hook fires before the general `edit_post` hook and has the same parameters.
It also complements the `save_post_{$post->post_type}` hook added in [25050].
Props Mte90, garrett-eclipse.
Fixes #34706 .
Built from https://develop.svn.wordpress.org/trunk@43535
git-svn-id: http://core.svn.wordpress.org/trunk@43364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-25 20:57:25 +00:00
Sergey Biryukov
a90f215d2c
Privacy: Revert [43525].
...
The commenter cookies checkbox is not legally required, so should be disabled by default.
Fixes #44373 .
Built from https://develop.svn.wordpress.org/trunk@43531
git-svn-id: http://core.svn.wordpress.org/trunk@43360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 17:06:24 +00:00
Sergey Biryukov
2072479adc
REST API: Ensure attachments created with WP_REST_Attachments_Controller::create_item()
on Windows have a relative path.
...
Props ocean90, SergeyBiryukov, redcastor.
Fixes #40861 .
Built from https://develop.svn.wordpress.org/trunk@43529
git-svn-id: http://core.svn.wordpress.org/trunk@43358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 16:52:25 +00:00
Sergey Biryukov
76e821e647
I18N: Separate two "About" strings with different context.
...
Props desrosj, XpertOne, Nao.
Fixes #44139 .
Built from https://develop.svn.wordpress.org/trunk@43527
git-svn-id: http://core.svn.wordpress.org/trunk@43356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 15:04:25 +00:00
Sergey Biryukov
d68b2b5a2b
Privacy: Remove the setting to enable comment cookies consent added in [43469].
...
This needs some more work to ensure expected behaviour.
See #44373 .
Built from https://develop.svn.wordpress.org/trunk@43525
git-svn-id: http://core.svn.wordpress.org/trunk@43354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 12:51:29 +00:00
K. Adam White
5f7e85d589
Docs: Add $object_subtype
param documentation for sanitize_meta()
.
...
Props timothyblynjacobs.
See #38323 .
Built from https://develop.svn.wordpress.org/trunk@43521
git-svn-id: http://core.svn.wordpress.org/trunk@43350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-23 17:14:26 +00:00
K. Adam White
a7735117b6
Docs: Update @since version to 4.9.8 for meta registration subtype handling.
...
This feature has been backported to 4.9.8 so 5.0.0 is inaccurate.
See #38323 .
Built from https://develop.svn.wordpress.org/trunk@43520
git-svn-id: http://core.svn.wordpress.org/trunk@43349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-23 17:02:25 +00:00
John Blackbourn
49fdd95ac0
Docs: Correct the parameter type for WP_REST_Post_Types_Controller::prepare_item_for_response()
.
...
Props subrataemfluence
Fixes #44437
Built from https://develop.svn.wordpress.org/trunk@43519
git-svn-id: http://core.svn.wordpress.org/trunk@43348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-22 12:26:28 +00:00
Sergey Biryukov
ad68a69250
Comments: Ensure that themes overriding default comment_form()
fields still display the cookies consent checkbox.
...
The `comment_form_default_fields` filter can be used to remove the checkbox.
Props pross, SergeyBiryukov.
Fixes #44126 .
Built from https://develop.svn.wordpress.org/trunk@43518
git-svn-id: http://core.svn.wordpress.org/trunk@43347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-20 00:38:24 +00:00
Konstantin Obenland
51f09ffc2a
Toolbar: Fail gracefully when adding events to non-existent elements
...
Avoids a type error when `obj` is not set.
Fixes #44526 .
Built from https://develop.svn.wordpress.org/trunk@43517
git-svn-id: http://core.svn.wordpress.org/trunk@43346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 22:00:25 +00:00
Sergey Biryukov
d0132b292e
Privacy: Improve grammar on Privacy Settings screen.
...
Props ianbelanger, garrett-eclipse.
Fixes #44612 .
Built from https://develop.svn.wordpress.org/trunk@43513
git-svn-id: http://core.svn.wordpress.org/trunk@43342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 20:14:25 +00:00
Sergey Biryukov
f309e3b660
Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout()
, mirroring the same WP_HTTP_UnitTestCase
method.
...
See #44613 .
Built from https://develop.svn.wordpress.org/trunk@43512
git-svn-id: http://core.svn.wordpress.org/trunk@43341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 19:53:26 +00:00
Sergey Biryukov
3f21ed0f42
Tests: Use WP_HTTP_UnitTestCase::skipTestOnTimeout()
in more HTTP tests.
...
Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".
See #44613 .
Built from https://develop.svn.wordpress.org/trunk@43511
git-svn-id: http://core.svn.wordpress.org/trunk@43340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 19:10:25 +00:00
Sergey Biryukov
78de1dffb5
Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.
...
Props XpertOne, idea15, garrett-eclipse.
Fixes #44130 .
Built from https://develop.svn.wordpress.org/trunk@43508
git-svn-id: http://core.svn.wordpress.org/trunk@43337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 12:10:25 +00:00
Sergey Biryukov
ac338b1666
Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link()
.
...
Props desrosj, birgire, ianbelanger, Ov3rfly.
Fixes #44192 .
Built from https://develop.svn.wordpress.org/trunk@43506
git-svn-id: http://core.svn.wordpress.org/trunk@43335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-18 11:50:25 +00:00
Sergey Biryukov
12b1b3e891
I18N: Update list of continents and cities for the timezone selection.
...
Props soulseekah, dyrer.
Fixes #44574 .
Built from https://develop.svn.wordpress.org/trunk@43504
git-svn-id: http://core.svn.wordpress.org/trunk@43333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-18 11:21:25 +00:00
Sergey Biryukov
058187d34f
Filesystem API: Skip https://
test for wp_is_stream()
if openssl
extension is not loaded.
...
See #44533 .
Built from https://develop.svn.wordpress.org/trunk@43503
git-svn-id: http://core.svn.wordpress.org/trunk@43332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-18 09:52:24 +00:00
Sergey Biryukov
e3439bbe09
Filesystem API: Add basic tests for wp_is_stream()
.
...
Props JPry.
See #44533 .
Built from https://develop.svn.wordpress.org/trunk@43501
git-svn-id: http://core.svn.wordpress.org/trunk@43328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-18 01:02:26 +00:00
Sergey Biryukov
153783a7f1
Privacy: Add unit tests for _wp_privacy_send_request_confirmation_notification()
, introduced in [43211].
...
Props birgire, desrosj, garrett-eclipse.
Fixes #43967 .
Built from https://develop.svn.wordpress.org/trunk@43499
git-svn-id: http://core.svn.wordpress.org/trunk@43326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 22:56:25 +00:00
Sergey Biryukov
90d63591c6
Privacy: Mark Privacy Policy page as such in the Pages list table.
...
Props desrosj, subrataemfluence, ianbelanger, danieltj.
Fixes #44006 .
Built from https://develop.svn.wordpress.org/trunk@43495
git-svn-id: http://core.svn.wordpress.org/trunk@43322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 16:46:25 +00:00
Sergey Biryukov
5d4df64715
Twenty Seventeen: Correct list item style for nested unordered lists.
...
Props macbookandrew, audrasjb.
Fixes #44109 .
Built from https://develop.svn.wordpress.org/trunk@43493
git-svn-id: http://core.svn.wordpress.org/trunk@43320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 16:35:24 +00:00
Sergey Biryukov
df49ab8363
Docs: Change @since
entry for WP_Term_Query::populate_terms()
added in [43049] to 4.9.8.
...
See #42691 .
Built from https://develop.svn.wordpress.org/trunk@43491
git-svn-id: http://core.svn.wordpress.org/trunk@43318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 16:25:26 +00:00
Sergey Biryukov
172aa4aa3e
Privacy: Enable pagination screen options for privacy requests list tables.
...
Props birgire, pbiron.
Fixes #44025 .
Built from https://develop.svn.wordpress.org/trunk@43486
git-svn-id: http://core.svn.wordpress.org/trunk@43313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 16:04:24 +00:00
Andrew Ozz
01d8979bee
Customize: Do not attempt to count uncountable value.
...
Props dlh.
Fixes #44104 .
Built from https://develop.svn.wordpress.org/trunk@43480
git-svn-id: http://core.svn.wordpress.org/trunk@43307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 14:38:24 +00:00
Sergey Biryukov
8f49d94630
Privacy: Rename username_or_email_to_export
POST variable on Erase Personal Data screen to a more generic username_or_email_for_privacy_request
.
...
Props ianbelanger, allendav.
Fixes #44181 .
Built from https://develop.svn.wordpress.org/trunk@43478
git-svn-id: http://core.svn.wordpress.org/trunk@43305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 14:15:25 +00:00
Andrew Ozz
b1330814e2
Privacy: Add $request
to $email_data
to make it available to all filters.
...
Props desrosj.
Fixes #44379 .
Built from https://develop.svn.wordpress.org/trunk@43477
git-svn-id: http://core.svn.wordpress.org/trunk@43304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 13:53:25 +00:00
Andrew Ozz
04b8839454
Privacy: Add filter for the subject of the erasure complete notification emails.
...
Props desrosj.
Fixes #44265 .
Built from https://develop.svn.wordpress.org/trunk@43475
git-svn-id: http://core.svn.wordpress.org/trunk@43302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 13:42:25 +00:00
Andrew Ozz
323a5a2dc8
Privacy: Fix tests after [43467].
...
See #44141 .
Built from https://develop.svn.wordpress.org/trunk@43471
git-svn-id: http://core.svn.wordpress.org/trunk@43298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 09:58:24 +00:00
Andrew Ozz
3b3542fe15
Privacy: Add a setting to disable comment cookie consent.
...
Fixes #44373 .
Built from https://develop.svn.wordpress.org/trunk@43469
git-svn-id: http://core.svn.wordpress.org/trunk@43296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 09:08:26 +00:00
Andrew Ozz
cc1bfb1e55
Privacy: Don't replace comment author URL and email with anything.
...
Props TZ-Media, desrosj, birgire.
Fixes #44141 .
Built from https://develop.svn.wordpress.org/trunk@43467
git-svn-id: http://core.svn.wordpress.org/trunk@43294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 09:00:25 +00:00
Gary Pendergast
46fa15291f
Streams: Return early from wp_is_stream()
for paths that aren't streams.
...
Some versions of PHP appear to have a memory leak that is occasionally triggered by calling `stream_get_wrappers()`. In order to avoid calling this, we can return early from `wp_is_stream()` when `$path` doesn't contain `://`.
Props pbiron, JPry, dontstealmyfish.
Fixes #44532 .
Built from https://develop.svn.wordpress.org/trunk@43466
git-svn-id: http://core.svn.wordpress.org/trunk@43293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:54:25 +00:00
Gary Pendergast
0e5e77a895
Privacy: Remove some unnecessary code comments.
...
[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.
Props burhandodhy.
Fixes #44590 .
Built from https://develop.svn.wordpress.org/trunk@43465
git-svn-id: http://core.svn.wordpress.org/trunk@43292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:43:24 +00:00
Gary Pendergast
7c696fbed2
Editor: Use apply_filters_deprecated()
for some deprecated filters.
...
The `htmledit_pre` and `richedit_pre` filters have been deprecated since 4.3.0, since before `apply_filters_deprecated()` existed. They're now correctly run using `apply_filters_deprecated()`.
Props sebastienthivinfocom, lbenicio, ianbelanger.
Fixes #44341 .
Built from https://develop.svn.wordpress.org/trunk@43464
git-svn-id: http://core.svn.wordpress.org/trunk@43291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:38:24 +00:00
Gary Pendergast
c173331dc4
REST API: Fix some incorrect @since
tags.
...
[43437] included some new methods, which were incorrectly tagged as being `@since 4.9.7`. This updates them to `4.9.8`.
Props danielbachhuber.
Fixes 44287.
Built from https://develop.svn.wordpress.org/trunk@43463
git-svn-id: http://core.svn.wordpress.org/trunk@43290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:27:25 +00:00
Gary Pendergast
17899c1932
REST API: Attachments controller should respect upload limits.
...
When the REST API is in use on WordPress multisite, the `WP_REST_Attachments_Controller` should respect the "Max upload file size" and "Site upload space" site options.
Props flixos90, danielbachhuber.
Fixes #43751 .
Built from https://develop.svn.wordpress.org/trunk@43462
git-svn-id: http://core.svn.wordpress.org/trunk@43289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:22:29 +00:00
Sergey Biryukov
be92bbbbbb
Docs: Change @since
entry for add_inline_data
action added in [42676] to 4.9.8.
...
See #36085 .
Built from https://develop.svn.wordpress.org/trunk@43460
git-svn-id: http://core.svn.wordpress.org/trunk@43287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 15:27:25 +00:00
Sergey Biryukov
cf4f8d8737
Login and Registration: Set a better default value for $wp_error
parameter in login_header()
.
...
To prevent someone from passing a string (which would not be added to a new `WP_Error` instance), check for `is_wp_error()` explicitly.
Props desrosj, chetan200891, spyderbytes, lbenicio, sebastien@thivinfo.com , abdullahramzan.
Fixes #44052 .
Built from https://develop.svn.wordpress.org/trunk@43457
git-svn-id: http://core.svn.wordpress.org/trunk@43284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 14:10:26 +00:00
Sergey Biryukov
4faf05ca6a
Privacy: Change @since
entry for _wp_privacy_settings_filter_draft_page_titles()
added in [43376] to 4.9.8.
...
See #44100 .
Built from https://develop.svn.wordpress.org/trunk@43454
git-svn-id: http://core.svn.wordpress.org/trunk@43281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 13:48:25 +00:00
Sergey Biryukov
357a663899
Privacy: Change @since
entry for user_request_confirmed_email_subject
filter added in [43373] to 4.9.8.
...
See #44382 .
Built from https://develop.svn.wordpress.org/trunk@43451
git-svn-id: http://core.svn.wordpress.org/trunk@43278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 12:12:25 +00:00
Andrew Ozz
26ca877782
TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
...
Fixes #44134 .
Built from https://develop.svn.wordpress.org/trunk@43447
git-svn-id: http://core.svn.wordpress.org/trunk@43274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 08:07:26 +00:00
Aaron Jorbin
691dc59ad3
Privacy: Silence is golden and invisible.
...
"Be more discrete." declared matt in [3155], and since then, "Silence is Golden" has been the calling card of placeholder index files. Historically, these have been php files, but [43012] changed that and added index.html files for privacy export generated folders.
The php silence files produce no visible content. This adds consistency with these new html files in that there will be no visible content. Silence will fall when the question is asked.
Fixes #44195 .
Props audrasjb, rafsuntaskin, Ov3rfly, johnbillion, pento
Built from https://develop.svn.wordpress.org/trunk@43446
git-svn-id: http://core.svn.wordpress.org/trunk@43273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-15 23:39:27 +00:00
Gary Pendergast
7216f9e623
REST API: Update the test fixture generator following [43439]
...
As [43439] added data that contains object IDs, it can cause `wp-api-generated.js` to be unnecessarily regenerated.
Regenerating our list of fixtures that need normalising rectifies this.
See #44321 .
Built from https://develop.svn.wordpress.org/trunk@43441
git-svn-id: http://core.svn.wordpress.org/trunk@43268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-13 04:46:25 +00:00
Gary Pendergast
fd6f50e86f
REST API: Tweak permission checks for taxonomy and term endpoints
...
To match behaviour in the Classic Editor, we need to slightly loosen permissions on taxonomy and term endpoints. This allows users to create terms to assign to a post that they're editing.
Props danielbachhuber.
Fixes #44096 .
Built from https://develop.svn.wordpress.org/trunk@43440
git-svn-id: http://core.svn.wordpress.org/trunk@43267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-13 04:24:25 +00:00
Gary Pendergast
2f803422fa
REST API: Expose revision count and last revision ID on Post response
...
So that REST API clients can show appropriate UI for a post's revisions, it needs to know how many revisions the post has, and what the latest revision ID is.
Props kadamwhite, danielbachhuber, birgire, TimothyBlynJacobs.
Fixes #44321 .
Built from https://develop.svn.wordpress.org/trunk@43439
git-svn-id: http://core.svn.wordpress.org/trunk@43266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-13 04:07:24 +00:00
Gary Pendergast
0ba364411d
REST API: Declare user capabilities using JSON Hyper Schema's "targetSchema".
...
There are a variety of operations a WordPress user can only perform if they have the correct capabilities. A REST API client should only display UI for one of these operations if the WordPress user can perform the operation.
Rather than requiring REST API clients to calculate whether to display UI based on potentially complicated combinations of user capabilities, `targetSchema` allows us to expose a single flag to show whether the corresponding UI should be displayed.
This change also includes flags on post objects for the following actions:
- `action-publish`: The current user can publish this post.
- `action-sticky`: The current user can make this post sticky, and the post type supports sticking.
- `action-assign-author': The current user can change the author on this post.
- `action-assign-{$taxonomy}`: The current user can assign terms from the "$taxonomy" taxonomy to this post.
- `action-create-{$taxonomy}`: The current user can create terms int the "$taxonomy" taxonomy.
Props TimothyBlynJacobs, danielbachhuber.
Fixes #44287 .
Built from https://develop.svn.wordpress.org/trunk@43437
git-svn-id: http://core.svn.wordpress.org/trunk@43264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-11 06:23:27 +00:00
Sergey Biryukov
632d61cead
Plugins: Disable "Install Now" button for plugins that require a higher version of PHP or WordPress.
...
Display a notice with an explanation and the steps required to resolve the issue.
Props afragen, schlessera, flixos90, nerrad, melchoyce, boemedia, hedgefield, joyously, johnalarcon, lakenh, afercia, acirujano, ibantxillo, SergeyBiryukov.
Fixes #43986 .
Built from https://develop.svn.wordpress.org/trunk@43436
git-svn-id: http://core.svn.wordpress.org/trunk@43263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-09 13:45:25 +00:00
Felix Arntz
9768bde3c4
Privacy: Fix a further inconsistency of site name and URL usage in notification emails.
...
This is a follow-up to [43388].
Props desrosj.
Fixes #44396 .
Built from https://develop.svn.wordpress.org/trunk@43435
git-svn-id: http://core.svn.wordpress.org/trunk@43262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-08 13:55:28 +00:00
John Blackbourn
60252611be
Date/Time: Add support for the c
and r
shorthand formats in date_i18n()
.
...
Props Rarst, pbearne
Fixes #20973
Built from https://develop.svn.wordpress.org/trunk@43434
git-svn-id: http://core.svn.wordpress.org/trunk@43261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 23:10:25 +00:00
John Blackbourn
4c2fcf36a3
Media: Update the @since
tag for wp_normalize_path()
as this has been backported to th 3.9 (and all other) branches.
...
See #42837
Built from https://develop.svn.wordpress.org/trunk@43406
git-svn-id: http://core.svn.wordpress.org/trunk@43234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 15:21:25 +00:00
John Blackbourn
c9dce0606b
Media: Limit thumbnail file deletions to the same directory as the original file.
...
Built from https://develop.svn.wordpress.org/trunk@43392
git-svn-id: http://core.svn.wordpress.org/trunk@43220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 14:32:25 +00:00
atimmer
44b8c2e36b
Docs: Fix default values for customize/controls.js
.
...
The old values cannot be parsed by JSDoc.
Props herregroen.
Fixes #44520 .
Built from https://develop.svn.wordpress.org/trunk@43391
git-svn-id: http://core.svn.wordpress.org/trunk@43219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 14:07:24 +00:00
Felix Arntz
5f461574e8
Tests: Fix failing test after [43388].
...
Fixes #44396 .
Built from https://develop.svn.wordpress.org/trunk@43390
git-svn-id: http://core.svn.wordpress.org/trunk@43218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-05 08:53:25 +00:00
Felix Arntz
46589d1578
Date/Time: Fix usage of $gmt
parameter in date_i18n()
and clarify its behavior.
...
The docs for `date_i18n()` and its filter now correctly state that the `$gmt` parameter is only taken into account if no timestamp is provided. Furthermore, a bug with that parameter is fixed, as it is now ensured that the timezone used with it is `UTC`.
Props Rarst.
Fixes #38771 .
Built from https://develop.svn.wordpress.org/trunk@43389
git-svn-id: http://core.svn.wordpress.org/trunk@43217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-04 23:43:25 +00:00
Felix Arntz
057b221af7
Privacy: Use consistent values for the site name and URL used in notification emails.
...
The functions `send_confirmation_on_profile_email()`, `_wp_privacy_send_request_confirmation_notification()`, `_wp_privacy_send_erasure_fulfillment_notification()`, and `wp_send_user_request()` all include a title and URL indicating the current site. However, so far they have dealt with those values inconsistently, sometimes using the site values, other times using the network values if in a multisite. This changeset ensures that only the current site is taken into account in all cases and that special characters in the site name are consistently decoded.
Props subrataemfluence, desrosj.
Fixes #44396 .
Built from https://develop.svn.wordpress.org/trunk@43388
git-svn-id: http://core.svn.wordpress.org/trunk@43216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-03 17:00:25 +00:00
Felix Arntz
dc036d5333
Date/Time: Add support for gmt_offset
to date_i18n()
.
...
Prior to this change, `date_i18n()` only supported the `timezone_string` option, causing incorrect timezones to appear in formatted dates on sites that still rely on the `gmt_offset` option.
Props Rarst.
Fixes #34835 .
Built from https://develop.svn.wordpress.org/trunk@43387
git-svn-id: http://core.svn.wordpress.org/trunk@43215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-03 15:59:25 +00:00
Felix Arntz
b76a714bba
Taxonomy: Introduce is_taxonomy_viewable()
.
...
This utility function allows for easy detection whether terms for a taxonomy are considered publicly viewable.
Props andizer.
Fixes #44466 .
Built from https://develop.svn.wordpress.org/trunk@43386
git-svn-id: http://core.svn.wordpress.org/trunk@43214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-03 10:29:28 +00:00
Sergey Biryukov
efafeed66c
Docs: Add missing backtick in delete_metadata()
DocBlock.
...
Props dilipbheda, cliffpaulick.
Fixes #44433 .
Built from https://develop.svn.wordpress.org/trunk@43385
git-svn-id: http://core.svn.wordpress.org/trunk@43213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-02 17:58:27 +00:00
Sergey Biryukov
99e3bb9077
Date/Time: Simplify mysql_to_rfc3339()
.
...
Erasing timezone with a regular expression is redundant, the date could be just formatted in the respective format instead.
Props Rarst.
Fixes #42542 .
Built from https://develop.svn.wordpress.org/trunk@43384
git-svn-id: http://core.svn.wordpress.org/trunk@43212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:45:53 +00:00
Sergey Biryukov
67716d1367
Docs: Correct description for mysql_to_rfc3339()
.
...
Despite historical function name, the output does not conform to RFC3339 format, which must contain timezone.
Props Rarst.
See #42542 .
Built from https://develop.svn.wordpress.org/trunk@43383
git-svn-id: http://core.svn.wordpress.org/trunk@43211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:45:29 +00:00
Felix Arntz
76c25aa14b
Multisite: Count users in a more performant way when listing sites in the network admin.
...
Props spacedmonkey.
Fixes #44368 .
Built from https://develop.svn.wordpress.org/trunk@43382
git-svn-id: http://core.svn.wordpress.org/trunk@43210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:45:03 +00:00
Felix Arntz
e350e822f8
Role/Capability: Rename upgrade_php
capability to more suitable update_php
.
...
This brings the name in line with user-facing language and similar names of existing related capabilities. Since the capability has not been part of any WordPress release, it can be renamed without any backward-compatibility implications.
Also missing props benhuberman for [43006].
Fixes #44457 .
Built from https://develop.svn.wordpress.org/trunk@43381
git-svn-id: http://core.svn.wordpress.org/trunk@43209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:44:38 +00:00
Sergey Biryukov
b98ef36c97
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 .
Built from https://develop.svn.wordpress.org/trunk@43380
git-svn-id: http://core.svn.wordpress.org/trunk@43208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:44:12 +00:00
Andrew Ozz
be6aa715fe
Privacy: use wp_login_url()
for the link in the user confirmation email.
...
Props desrosj, usmankhalid.
Fixes #44353 .
Built from https://develop.svn.wordpress.org/trunk@43379
git-svn-id: http://core.svn.wordpress.org/trunk@43207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:43:47 +00:00
K. Adam White
a89c86c711
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 .
Built from https://develop.svn.wordpress.org/trunk@43378
git-svn-id: http://core.svn.wordpress.org/trunk@43206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:43:21 +00:00
Gary Pendergast
0db068da94
Emoji: Update Twemoji to version 11.0.
...
{U+01F9B9}
Props kraftbj,
Fixes #44339 .
Built from https://develop.svn.wordpress.org/trunk@43377
git-svn-id: http://core.svn.wordpress.org/trunk@43205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:42:55 +00:00
Andrew Ozz
7e9be993e6
Privacy: append (Draft)
to draft page titles in the page drop-down on the Privacy Settings screen.
...
Props allendav, desrosj.
Fixes #44100 .
Built from https://develop.svn.wordpress.org/trunk@43376
git-svn-id: http://core.svn.wordpress.org/trunk@43204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:42:29 +00:00
Andrew Ozz
3ce87b62f9
Privacy: add user request type to the admin notification email subject.
...
Props birgire, desrosj.
Fixes #44099 .
Built from https://develop.svn.wordpress.org/trunk@43375
git-svn-id: http://core.svn.wordpress.org/trunk@43203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:42:03 +00:00
Andrew Ozz
2afe7146c8
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 .
Built from https://develop.svn.wordpress.org/trunk@43374
git-svn-id: http://core.svn.wordpress.org/trunk@43202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:41:37 +00:00
Andrew Ozz
ac269e570e
Privacy: filter the email subject in _wp_privacy_send_request_confirmation_notification()
.
...
Props garrett-eclipse, birgire, desrosj.
Fixes #44382 .
Built from https://develop.svn.wordpress.org/trunk@43373
git-svn-id: http://core.svn.wordpress.org/trunk@43201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:41:13 +00:00
Andrew Ozz
cefaaa0b51
Privacy: add esc_html
to assertion in test_wp_comments_personal_data_exporter.
...
Props mermel, 1naveengiri.
Fixes #44113 .
Built from https://develop.svn.wordpress.org/trunk@43371
git-svn-id: http://core.svn.wordpress.org/trunk@43199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:40:21 +00:00
Andrew Ozz
b363ace996
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 .
Built from https://develop.svn.wordpress.org/trunk@43370
git-svn-id: http://core.svn.wordpress.org/trunk@43198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:39:57 +00:00
John Blackbourn
ef97b99f66
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
Built from https://develop.svn.wordpress.org/trunk@43369
git-svn-id: http://core.svn.wordpress.org/trunk@43197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:39:31 +00:00
John Blackbourn
0aa2902436
Security: Harden the random aspect of the hash used for user profile and admin email address changes.
...
Props BjornW
Fixes #43771
Built from https://develop.svn.wordpress.org/trunk@43367
git-svn-id: http://core.svn.wordpress.org/trunk@43195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:38:43 +00:00
John Blackbourn
35ca5f61f8
Options, Meta APIs: Use the correct escaping function when outputting the meta box context.
...
Props khaihong, abdullahramzan, leanderiversen, aryamaaru, lbenicio, palmiak
Fixes #44274
Built from https://develop.svn.wordpress.org/trunk@43365
git-svn-id: http://core.svn.wordpress.org/trunk@43193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:37:51 +00:00
Sergey Biryukov
593848e9dc
Docs: Correct inline comment added in [43361] for consistency with other comments.
...
See #44142 .
Built from https://develop.svn.wordpress.org/trunk@43363
git-svn-id: http://core.svn.wordpress.org/trunk@43191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:37:00 +00:00
Sergey Biryukov
d35f9813f1
Docs: Add missing @return
value for save_mod_rewrite_rules()
and iis7_save_url_rewrite_rules()
.
...
See #44142 .
Built from https://develop.svn.wordpress.org/trunk@43362
git-svn-id: http://core.svn.wordpress.org/trunk@43190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:36:35 +00:00
Sergey Biryukov
40cfcfc222
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 .
Built from https://develop.svn.wordpress.org/trunk@43361
git-svn-id: http://core.svn.wordpress.org/trunk@43189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:36:09 +00:00
atimmer
96bfb67e79
Docs: Improve JSDoc for emoji.js
.
...
Props lisannekluitmans, hansjovisyoast, igorsch, nicollle.
Fixes #44367 .
Built from https://develop.svn.wordpress.org/trunk@43360
git-svn-id: http://core.svn.wordpress.org/trunk@43188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:35:44 +00:00
John Blackbourn
649a95f840
I18N: Introduce unit tests for the Japanese language in order to facilitate future improvements.
...
Props ryotsun
Fixes #43829
Built from https://develop.svn.wordpress.org/trunk@43359
git-svn-id: http://core.svn.wordpress.org/trunk@43187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:35:20 +00:00
Sergey Biryukov
66fa722850
Docs: Update @since
versions in Community Events class added in [42726].
...
See #41112 .
Built from https://develop.svn.wordpress.org/trunk@43356
git-svn-id: http://core.svn.wordpress.org/trunk@43184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:34:04 +00:00
atimmer
d9df5dec11
Docs: Improve JSDoc for auth-check.js
.
...
Props pskli.
Fixes #44364 .
Built from https://develop.svn.wordpress.org/trunk@43355
git-svn-id: http://core.svn.wordpress.org/trunk@43183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:33:38 +00:00
Sergey Biryukov
33c708feca
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 .
Built from https://develop.svn.wordpress.org/trunk@43353
git-svn-id: http://core.svn.wordpress.org/trunk@43181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:32:48 +00:00
atimmer
f74a52b0f2
Docs: Improve JSDoc for admin/link.js
.
...
Props andg.
Fixes #44362 .
Built from https://develop.svn.wordpress.org/trunk@43352
git-svn-id: http://core.svn.wordpress.org/trunk@43180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:32:22 +00:00
Sergey Biryukov
947a12f2b2
Privacy: Fix typo in default privacy policy text.
...
Props garetharnold, abdullahramzan.
Fixes #44166 .
Built from https://develop.svn.wordpress.org/trunk@43350
git-svn-id: http://core.svn.wordpress.org/trunk@43178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:31:31 +00:00
jrf
a4f7f70c9d
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 .
Built from https://develop.svn.wordpress.org/trunk@43348
git-svn-id: http://core.svn.wordpress.org/trunk@43176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:40 +00:00
atimmer
bde558be2f
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 .
Built from https://develop.svn.wordpress.org/trunk@43347
git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:15 +00:00
atimmer
6a9a5e123c
Docs: Improve JSDoc for pointer.js
.
...
Props maartenleenders, dfangstrom.
Fixes #44325 .
Built from https://develop.svn.wordpress.org/trunk@43346
git-svn-id: http://core.svn.wordpress.org/trunk@43174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:29:48 +00:00
Sergey Biryukov
6172dab7c1
I18N: Remove unused MediaElement.js strings.
...
Props metodiew.
See #42139 . Fixes #37453 .
Built from https://develop.svn.wordpress.org/trunk@43345
git-svn-id: http://core.svn.wordpress.org/trunk@43173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:29:24 +00:00
atimmer
dbf155d93b
Build Tools: Fix JSDoc configuration include paths.
...
After [43309] the JSDoc configuration was broken, this fixes that.
Props herregroen.
Built from https://develop.svn.wordpress.org/trunk@43344
git-svn-id: http://core.svn.wordpress.org/trunk@43172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:28:58 +00:00
Weston Ruter
8f21b4c607
Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.
...
Props dlh.
Fixes #44117 .
Built from https://develop.svn.wordpress.org/trunk@43343
git-svn-id: http://core.svn.wordpress.org/trunk@43171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:28:33 +00:00
atimmer
ba9e0ac030
Docs: Improve JSDoc for admin-bar.js
.
...
Change an incorrect type and description after [43332].
Props afercia.
See #43871 .
Built from https://develop.svn.wordpress.org/trunk@43341
git-svn-id: http://core.svn.wordpress.org/trunk@43169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:27:38 +00:00
Felix Arntz
a449ac386e
REST API: Improve test coverage by providing tests for term meta.
...
See #38323 .
Built from https://develop.svn.wordpress.org/trunk@43340
git-svn-id: http://core.svn.wordpress.org/trunk@43168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:27:12 +00:00
Felix Arntz
07e121126d
Tests: Improve performance of post meta tests.
...
See #38323 .
Built from https://develop.svn.wordpress.org/trunk@43339
git-svn-id: http://core.svn.wordpress.org/trunk@43167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:26:48 +00:00
Andrew Ozz
06725cf28d
Move scheduling of old auto-draft
posts deletion to get_default_post_to_edit()
(where auto-drafts are created).
...
Fixes #44337 .
Built from https://develop.svn.wordpress.org/trunk@43338
git-svn-id: http://core.svn.wordpress.org/trunk@43166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:26:22 +00:00
Andrew Ozz
679f442285
TinyMCE: do not force-load external plugins, not needed any more and may cause issues.
...
Fixes #44330 .
Built from https://develop.svn.wordpress.org/trunk@43337
git-svn-id: http://core.svn.wordpress.org/trunk@43165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:25:57 +00:00
Andrew Ozz
62bb0dcafd
TinyMCE: prevent creation of paragraphs from multiple HTML comments when wpautop
is disabled.
...
Fixes #44308 .
Built from https://develop.svn.wordpress.org/trunk@43336
git-svn-id: http://core.svn.wordpress.org/trunk@43164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:25:32 +00:00
Jeremy Felt
1b263de2d6
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 .
Built from https://develop.svn.wordpress.org/trunk@43335
git-svn-id: http://core.svn.wordpress.org/trunk@43163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:25:08 +00:00
atimmer
8a9dc11590
Docs: Improve JSDoc for language-chooser.js
.
...
Props ireneyoast, manuelaugustin.
Fixes #43950 .
Built from https://develop.svn.wordpress.org/trunk@43334
git-svn-id: http://core.svn.wordpress.org/trunk@43162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:24:43 +00:00
atimmer
7c410b8d37
Docs: Improve JSDoc for zxcvbn-async.js
.
...
Props manuelaugustin, igorsch, LisanneKluitmans.
Fixes 43948.
Built from https://develop.svn.wordpress.org/trunk@43333
git-svn-id: http://core.svn.wordpress.org/trunk@43161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:24:18 +00:00
atimmer
e6c02f874c
Docs: Improve JSDoc for admin-bar.js
.
...
Props manuelaugustin, terwdan, sjardo, LisanneKluitmans.
Fixes #43871 .
Built from https://develop.svn.wordpress.org/trunk@43332
git-svn-id: http://core.svn.wordpress.org/trunk@43160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:23:53 +00:00
Sergey Biryukov
e0e564d84b
Users: In wp_validate_user_request_key()
, properly return the WP_Error
object in case the confirmation email has expired.
...
Props itowhid06.
Fixes #44298 .
Built from https://develop.svn.wordpress.org/trunk@43331
git-svn-id: http://core.svn.wordpress.org/trunk@43159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:23:27 +00:00
Sergey Biryukov
9ba957770e
Docs: Remove obsolete $wpdb
global references in WP_User::__construct()
and WP_User::for_blog()
.
...
Props mt8.biz.
Fixes #44295 .
Built from https://develop.svn.wordpress.org/trunk@43330
git-svn-id: http://core.svn.wordpress.org/trunk@43158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:23:02 +00:00
Gary Pendergast
fa5cf0a7d6
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 .
Built from https://develop.svn.wordpress.org/trunk@43329
git-svn-id: http://core.svn.wordpress.org/trunk@43157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:22:36 +00:00
Sergey Biryukov
9115444ee7
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 .
Built from https://develop.svn.wordpress.org/trunk@43328
git-svn-id: http://core.svn.wordpress.org/trunk@43156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:22:11 +00:00
Andrew Ozz
ab65b61da9
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 .
Built from https://develop.svn.wordpress.org/trunk@43327
git-svn-id: http://core.svn.wordpress.org/trunk@43155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:21:45 +00:00
Jeremy Felt
3ab90ab858
Docs: Document globals in validate_another_blog_signup().
...
Props mukesh27.
Fixes #43594 .
Built from https://develop.svn.wordpress.org/trunk@43326
git-svn-id: http://core.svn.wordpress.org/trunk@43154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:21:21 +00:00
Sergey Biryukov
dde7843f7e
Docs: Fix typo in Services_JSON
DocBlocks.
...
Props sagarnasit.
Fixes #44244 .
Built from https://develop.svn.wordpress.org/trunk@43325
git-svn-id: http://core.svn.wordpress.org/trunk@43153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:20:54 +00:00
Jeremy Felt
c3b788a205
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 .
Built from https://develop.svn.wordpress.org/trunk@43324
git-svn-id: http://core.svn.wordpress.org/trunk@43152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:20:23 +00:00
Andrew Ozz
facf027fe7
Build tools: Update Grunt to version 1.0.2.
...
Props iandunn, netweb.
Fixes #42308 .
Built from https://develop.svn.wordpress.org/trunk@43323
git-svn-id: http://core.svn.wordpress.org/trunk@43151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:19:59 +00:00
Andrew Ozz
87d1a3222b
Build tools:
...
- Remove `check-node-version` from package.json for now. Throws errors.
- Minor fixes to package-lock.json, `http` => `https`.
See #44246 .
Built from https://develop.svn.wordpress.org/trunk@43322
git-svn-id: http://core.svn.wordpress.org/trunk@43150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:19:33 +00:00
Andrew Ozz
6fd8080e7e
Build tools: Use npm v6.1.0.
...
Props netweb.
Fixes #44245 .
Built from https://develop.svn.wordpress.org/trunk@43320
git-svn-id: http://core.svn.wordpress.org/trunk@43149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-27 16:01:23 +00:00