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
Dion Hulse
708e355c79
Bump akismet external to 4.0.8.
...
git-svn-id: http://core.svn.wordpress.org/trunk@43330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-18 06:47:37 +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