Commit Graph

38501 Commits

Author SHA1 Message Date
Sergey Biryukov
244f435e22 Script/Style Dependencies: Make sure that inline scripts for handles without a source are printed.
See [36550] for `WP_Styles`.

Props bpayton.
Fixes #44551.

git-svn-id: https://develop.svn.wordpress.org/trunk@43565 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-11 17:41:29 +00:00
Sergey Biryukov
cbf8f438d7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@43564 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-11 17:41:02 +00:00
Sergey Biryukov
b87cc1ceb9 Docs: Correct description for WP_Scripts::$default_version.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@43563 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-11 15:08:23 +00:00
Sergey Biryukov
3b4b754f2a Tests: Avoid a race condition in test_date_i18n_handles_shorthand_formats() by using a delta for comparing timestamps.
See #20973, #38381.

git-svn-id: https://develop.svn.wordpress.org/trunk@43562 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-11 13:28:26 +00:00
Sergey Biryukov
28a6760634 Customize: Pass missing parameter to dynamic option_{$option} filter in WP_Customize_Widgets::capture_filter_pre_get_option().
Props dlh.
Fixes #44770.

git-svn-id: https://develop.svn.wordpress.org/trunk@43561 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-11 12:44:22 +00:00
Rachel Baker
7e879f48f1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43560 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-08 21:44:31 +00:00
Boone Gorges
ed2fff61d7 Correct param documentation for WP_Term_Query.
The description of `$meta_type` introduced in [40053] was incorrect.

Props dlh.
Fixes #44608.

git-svn-id: https://develop.svn.wordpress.org/trunk@43559 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-08 19:22:39 +00:00
Boone Gorges
90a3ab5f80 Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.
Props soulseekah.
Fixes #44733.

git-svn-id: https://develop.svn.wordpress.org/trunk@43558 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-08 19:14:08 +00:00
obenland
c52e7c79b2 Toolbar: Check if obj is set before using it.
Props pento.
See #44526.


git-svn-id: https://develop.svn.wordpress.org/trunk@43556 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-06 19:32:12 +00:00
Sergey Biryukov
4ce3db3e8d Build/Test Tools: Add documentation for tests_add_filter(), _test_filter_build_unique_id(), _delete_all_data(), _delete_all_posts().
Props andizer.
Fixes #44703.

git-svn-id: https://develop.svn.wordpress.org/trunk@43555 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 22:35:10 +00:00
laurelfulford
49a6596d7e Twenty Seventeen: Correct date in changelog for 4.9.8 release.
Props pbiron, laurelfulford.
Fixes #44646.



git-svn-id: https://develop.svn.wordpress.org/trunk@43550 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 15:32:26 +00:00
Sergey Biryukov
e26a5d64d1 Docs: Correct parameter name in strip_shortcodes_tagnames filter DocBlock.
Props uttam007.
Fixes #44691.

git-svn-id: https://develop.svn.wordpress.org/trunk@43549 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 15:12:56 +00:00
Felix Arntz
c29d019762 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43548 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-01 13:05:44 +00:00
Aaron Jorbin
df9dd119a5 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


git-svn-id: https://develop.svn.wordpress.org/trunk@43545 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 15:15:31 +00:00
Aaron Jorbin
8ed24bbbda 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43543 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 14:41:46 +00:00
John Blackbourn
ae69878202 Login and Registration: Pass the $errors parameter to the lost_password action.
Props sebakurzyn

Fixes #44512


git-svn-id: https://develop.svn.wordpress.org/trunk@43542 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-28 13:01:30 +00:00
laurelfulford
a3dcfa9f91 Twenty Seventeen: Bump version number and update changelog for 4.9.8 release.
Props pbiron.
Fixes #44646.


git-svn-id: https://develop.svn.wordpress.org/trunk@43541 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-27 18:36:35 +00:00
Peter Wilson
a32ea2d35d 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@43540 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-27 02:22:50 +00:00
Sergey Biryukov
927cd42632 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@43535 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-25 20:56:39 +00:00
Sergey Biryukov
ddc8f803c6 Privacy: Revert [43525].
The commenter cookies checkbox is not legally required, so should be disabled by default.

Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43531 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 17:05:56 +00:00
Sergey Biryukov
0f7e947546 REST API: Ensure attachments created with WP_REST_Attachments_Controller::create_item() on Windows have a relative path.
Props ocean90, SergeyBiryukov, redcastor.
Fixes #40861.

git-svn-id: https://develop.svn.wordpress.org/trunk@43529 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 16:51:09 +00:00
Sergey Biryukov
6c32fcd011 I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Fixes #44139.

git-svn-id: https://develop.svn.wordpress.org/trunk@43527 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 15:03:19 +00:00
Sergey Biryukov
335b69cedc Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour.

See #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43525 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 12:50:55 +00:00
K. Adam White
3aba622692 Docs: Add $object_subtype param documentation for sanitize_meta().
Props timothyblynjacobs.

See #38323.


git-svn-id: https://develop.svn.wordpress.org/trunk@43521 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-23 17:13:40 +00:00
K. Adam White
9fd092fb71 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43520 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-23 17:01:02 +00:00
John Blackbourn
796bac8645 Docs: Correct the parameter type for WP_REST_Post_Types_Controller::prepare_item_for_response().
Props subrataemfluence

Fixes #44437


git-svn-id: https://develop.svn.wordpress.org/trunk@43519 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-22 12:25:48 +00:00
Sergey Biryukov
8a0aac2ccb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@43518 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-20 00:37:40 +00:00
obenland
9d4b0ec88f Toolbar: Fail gracefully when adding events to non-existent elements
Avoids a type error when `obj` is not set.

Fixes #44526.


git-svn-id: https://develop.svn.wordpress.org/trunk@43517 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 21:59:23 +00:00
Sergey Biryukov
e7d9ee5051 Privacy: Improve grammar on Privacy Settings screen.
Props ianbelanger, garrett-eclipse.
Fixes #44612.

git-svn-id: https://develop.svn.wordpress.org/trunk@43513 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:13:29 +00:00
Sergey Biryukov
2075b3d921 Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
See #44613.

git-svn-id: https://develop.svn.wordpress.org/trunk@43512 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 19:52:41 +00:00
Sergey Biryukov
0ba13ec260 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@43511 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 19:09:56 +00:00
Sergey Biryukov
ffdc5e6827 Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.
Props XpertOne, idea15, garrett-eclipse.
Fixes #44130.

git-svn-id: https://develop.svn.wordpress.org/trunk@43508 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 12:09:31 +00:00
Sergey Biryukov
a1f6ba5477 Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link().
Props desrosj, birgire, ianbelanger, Ov3rfly.
Fixes #44192.

git-svn-id: https://develop.svn.wordpress.org/trunk@43506 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:49:46 +00:00
Sergey Biryukov
7e4f59b28e I18N: Update list of continents and cities for the timezone selection.
Props soulseekah, dyrer.
Fixes #44574.

git-svn-id: https://develop.svn.wordpress.org/trunk@43504 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:20:28 +00:00
Sergey Biryukov
9daa08da8e Filesystem API: Skip https:// test for wp_is_stream() if openssl extension is not loaded.
See #44533.

git-svn-id: https://develop.svn.wordpress.org/trunk@43503 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 09:51:53 +00:00
Sergey Biryukov
6f0218d8bc Filesystem API: Add basic tests for wp_is_stream().
Props JPry.
See #44533.

git-svn-id: https://develop.svn.wordpress.org/trunk@43501 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 01:01:28 +00:00
Sergey Biryukov
b2d63fd056 Privacy: Add unit tests for _wp_privacy_send_request_confirmation_notification(), introduced in [43211].
Props birgire, desrosj, garrett-eclipse.
Fixes #43967.

git-svn-id: https://develop.svn.wordpress.org/trunk@43499 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 22:55:51 +00:00
Sergey Biryukov
df7b163a31 Privacy: Mark Privacy Policy page as such in the Pages list table.
Props desrosj, subrataemfluence, ianbelanger, danieltj.
Fixes #44006.

git-svn-id: https://develop.svn.wordpress.org/trunk@43495 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:45:04 +00:00
Sergey Biryukov
a8b83cf91a Twenty Seventeen: Correct list item style for nested unordered lists.
Props macbookandrew, audrasjb.
Fixes #44109.

git-svn-id: https://develop.svn.wordpress.org/trunk@43493 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:34:57 +00:00
Sergey Biryukov
121215092c Docs: Change @since entry for WP_Term_Query::populate_terms() added in [43049] to 4.9.8.
See #42691.

git-svn-id: https://develop.svn.wordpress.org/trunk@43491 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:24:35 +00:00
Sergey Biryukov
f75b58113d Privacy: Enable pagination screen options for privacy requests list tables.
Props birgire, pbiron.
Fixes #44025.

git-svn-id: https://develop.svn.wordpress.org/trunk@43486 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:03:59 +00:00
Andrew Ozz
590d18844b Customize: Do not attempt to count uncountable value.
Props dlh.
Fixes #44104.

git-svn-id: https://develop.svn.wordpress.org/trunk@43480 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:37:21 +00:00
Sergey Biryukov
d25cf1c907 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@43478 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:14:47 +00:00
Andrew Ozz
7a86b55763 Privacy: Add $request to $email_data to make it available to all filters.
Props desrosj.
Fixes #44379.

git-svn-id: https://develop.svn.wordpress.org/trunk@43477 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 13:52:43 +00:00
Andrew Ozz
6612d0e452 Privacy: Add filter for the subject of the erasure complete notification emails.
Props desrosj.
Fixes #44265.

git-svn-id: https://develop.svn.wordpress.org/trunk@43475 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 13:41:33 +00:00
Andrew Ozz
c1ce7d134b Privacy: Fix tests after [43467].
See #44141.


git-svn-id: https://develop.svn.wordpress.org/trunk@43471 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:57:57 +00:00
Andrew Ozz
d8869384be Privacy: Add a setting to disable comment cookie consent.
Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43469 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:07:29 +00:00
Andrew Ozz
b33deaf1b5 Privacy: Don't replace comment author URL and email with anything.
Props TZ-Media, desrosj, birgire.
Fixes #44141.

git-svn-id: https://develop.svn.wordpress.org/trunk@43467 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 08:59:30 +00:00
Gary Pendergast
6c8c2aeaf9 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@43466 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:53:18 +00:00
Gary Pendergast
8c55028c90 Privacy: Remove some unnecessary code comments.
[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Fixes #44590.



git-svn-id: https://develop.svn.wordpress.org/trunk@43465 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:42:23 +00:00