Commit Graph

10227 Commits

Author SHA1 Message Date
Adam Silverstein bc7a03a33b WP-API: JavaScript client - fix setup of models used by wp.api.collections objects.
Correct setup for the `model` attribute of `wp.api.collections` objects. Set the collection model as a function that returns a new model of the underlying type, instead of setting it as the model prototype. Fixes an issue where models for fetched collections weren't set up properly and didn't have the expected mixin methods such as `getCategories` available.

Props jesseenterprises.
Fixes #39070.

Built from https://develop.svn.wordpress.org/trunk@39603


git-svn-id: http://core.svn.wordpress.org/trunk@39543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-15 12:54:42 +00:00
Ella Iseulde Van Dorpe 4ec102c189 Editor: Remove target=_blank when unchecked in the link modal.
Fixes #39276 for trunk.


Built from https://develop.svn.wordpress.org/trunk@39601


git-svn-id: http://core.svn.wordpress.org/trunk@39541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 20:30:44 +00:00
John Blackbourn 4548b08236 General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148

Built from https://develop.svn.wordpress.org/trunk@39600


git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 04:18:42 +00:00
John Blackbourn efa99585e3 Posts, Post Types: Ensure `is_page_template()` can only return true when viewing a singular post query.
Props natereist, dlh
Fixes #39211

Built from https://develop.svn.wordpress.org/trunk@39599


git-svn-id: http://core.svn.wordpress.org/trunk@39539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 03:43:43 +00:00
James Nylen 505e135f4c REST API: Add support for filename search in media endpoint.
In [38625], the functionality to search for attachments by filename was added
via the `posts_clauses` filter and the `_filter_query_attachment_filenames()`
function.  This moves `_filter_query_attachment_filenames()` from
`wp-admin/includes/post.php` to `wp-includes/post.php` so that it can be
applied in the same manner in the REST API media endpoint.

Props jblz, tyxla.
Fixes #39092.

Built from https://develop.svn.wordpress.org/trunk@39598


git-svn-id: http://core.svn.wordpress.org/trunk@39538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 14:09:42 +00:00
James Nylen 7cc41e47ac REST API: Allow sending an empty or no-op comment update.
In general, updates that don't actually change anything should succeed.
[39371] added tests for other object types, and this commit fixes empty updates
for comments and adds the missing test.

Fixes #38700.

Built from https://develop.svn.wordpress.org/trunk@39597


git-svn-id: http://core.svn.wordpress.org/trunk@39537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 13:53:45 +00:00
Gary Pendergast 7d9b5b14b5 Libraries: Update zxcvbn from version 1.0 to 4.4.1
This includes masses of bug fixes, as well as tweaks to how passwords are scored.

QUnit tests have been updated to reflect tha scoring changes.

Full changelog: https://github.com/dropbox/zxcvbn/compare/v1.0...v4.4.1

Fixes #31647.


Built from https://develop.svn.wordpress.org/trunk@39596


git-svn-id: http://core.svn.wordpress.org/trunk@39536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 11:23:42 +00:00
James Nylen d7ab7fdf5a REST API: Do not include the `password` argument when getting media items
Currently, `attachment` is the only post type exposed via the REST API that
does not support password protection, but it's possible for other post types to
remove password support.

Fixes #38977.

Built from https://develop.svn.wordpress.org/trunk@39595


git-svn-id: http://core.svn.wordpress.org/trunk@39535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 03:51:44 +00:00
James Nylen 0b599cce41 REST API: Do not error on empty JSON body
It's fairly common for clients to send `Content-Type: application/json` with an
empty body.  While technically not valid JSON, we've historically supported
this behaviour, so it shouldn't cause an error.

Props JPry.
Fixes #39150.

Built from https://develop.svn.wordpress.org/trunk@39594


git-svn-id: http://core.svn.wordpress.org/trunk@39534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 03:34:41 +00:00
Boone Gorges aa644128d6 Taxonomy: Use `get_term_link()` instead of `get_category_link()` in `get_term_parents_list()`.
`get_category_link()` is a wrapper for `get_term_link()`. Using the
unwrapped function makes more sense semantically (it's taxonomy-
agnostic) and it's also more parsimonious (the `WP_Error` check in
`get_category_link()` is redundant with similar checks just before
in `get_term_link()`).

Props keesiemeijer.
Fixes #17069.
Built from https://develop.svn.wordpress.org/trunk@39593


git-svn-id: http://core.svn.wordpress.org/trunk@39533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 02:57:41 +00:00
Ryan McCue 20aa5d7150 General: Correctly detect trailing newline when prepending.
We need to check that the final line is actually an artifact of explode(), not just an empty input string.

See #37082.

Built from https://develop.svn.wordpress.org/trunk@39592


git-svn-id: http://core.svn.wordpress.org/trunk@39532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 02:48:41 +00:00
Ryan McCue fbc00b31ef General: Remove most uses of create_function()
create_function() is equivalent to eval(), and most of our uses can be refactored. This is simpler, more secure, and slightly more performant.

Props sgolemon.
Fixes #37082.

Built from https://develop.svn.wordpress.org/trunk@39591


git-svn-id: http://core.svn.wordpress.org/trunk@39531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 01:49:39 +00:00
Felix Arntz 6e2d9af8b6 Tests: Use `wp_delete_user()` during teardown to delete a single site's user.
Fixes failing tests for `get_dashboard_url()`.

Fixes #39065.

Built from https://develop.svn.wordpress.org/trunk@39590


git-svn-id: http://core.svn.wordpress.org/trunk@39530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 23:18:40 +00:00
Felix Arntz d784b5552c Multisite: Replace `is_super_admin()` with `manage_network` in `get_dashboard_url()`.
Unit tests for `get_dashboard_url()` have been added.

Props iaaxpage.
Fixes #39065. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39589


git-svn-id: http://core.svn.wordpress.org/trunk@39529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 22:41:39 +00:00
Felix Arntz f704fc808a Multisite: Handle capability check for removing oneself via `map_meta_cap()`.
Site administrators should not be able to remove themselves from a site. This moves the enforcement of this rule from `wp-admin/users.php` to `remove_user_from_blog()` via the `remove_user` capability, which furthermore allows us to get rid of two additional clauses and their `is_super_admin()` checks in `wp-admin/users.php`. A unit test for the new behavior has been added.

Fixes #39063. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39588


git-svn-id: http://core.svn.wordpress.org/trunk@39528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 21:42:42 +00:00
Konstantin Obenland ee36cf9214 Themes: Add missing square bracket in jQuery selector.
Fixes a bug in Safari where the UI wasn't updated after deleting a theme due to
the incomplete selector.

Props Hristo Sg.
Fixes #39246.

Built from https://develop.svn.wordpress.org/trunk@39586


git-svn-id: http://core.svn.wordpress.org/trunk@39526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 09:32:41 +00:00
Weston Ruter c9b863fc40 Customize: Prevent navigation in preview when clicking on child elements of preview links that have non-previewable URLs.
Fixes #39098.

Built from https://develop.svn.wordpress.org/trunk@39584


git-svn-id: http://core.svn.wordpress.org/trunk@39524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 08:09:41 +00:00
Dion Hulse 5edd9b03e7 Remove the WordPress version number from `readme.html`.
See #35554 

Built from https://develop.svn.wordpress.org/trunk@39583


git-svn-id: http://core.svn.wordpress.org/trunk@39523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 08:01:39 +00:00
Weston Ruter 8a89a50c69 Customize: Prevent edit shortcut from losing event handler after selective refresh.
Props sirbrillig.
See #27403.
Fixes #39100.

Built from https://develop.svn.wordpress.org/trunk@39581


git-svn-id: http://core.svn.wordpress.org/trunk@39521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 07:52:43 +00:00
Dion Hulse 0a349c9641 PDF Images: Avoid a PHP Warning when attempting to process a file without an extension.
Props chandrapatel for initial patch.
Fixes #39195.

Built from https://develop.svn.wordpress.org/trunk@39580


git-svn-id: http://core.svn.wordpress.org/trunk@39520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 06:19:41 +00:00
Dion Hulse 883689c816 Taxonomy: Restore the ability to use string-based `$args` in `wp_get_object_terms()`.
Props tyxla.
Fixes #39215

Built from https://develop.svn.wordpress.org/trunk@39578


git-svn-id: http://core.svn.wordpress.org/trunk@39518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 05:47:42 +00:00
Weston Ruter 826a0323a2 Build/Test Tools: Facilitate SVN and Git being co-located in the same directory.
Ignore .svn in .gitignore, and ignore .git in svn:ignore.

Fixes #39245.

Built from https://develop.svn.wordpress.org/trunk@39577


git-svn-id: http://core.svn.wordpress.org/trunk@39517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 05:12:44 +00:00
Dion Hulse bdf6087450 Bootstrap: Re-initialize any hooks added manually by `object-cache.php`.
Prior to 3.1 if a object cache dropin wanted to add actions, they needed to use `$wp_filter` directly.

Props jorbin.
Fixes #39132.

Built from https://develop.svn.wordpress.org/trunk@39565


git-svn-id: http://core.svn.wordpress.org/trunk@39505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:29:42 +00:00
Peter Wilson c21907ca1e Options: Prevent unnecessary SQL updates by `update_option`.
Previously an option containing an object would trigger an SQL `UPDATE` on all calls to `update_option`, even if the old and new values were identical. This was due to the old and new values having differing resource IDs.

This change compares the old and new values as serialized data to remove the resource ID from the comparison.

Props salcode, bradyvercher, peterwilsoncc.
Fixes #38903.

Built from https://develop.svn.wordpress.org/trunk@39564


git-svn-id: http://core.svn.wordpress.org/trunk@39504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-11 21:43:43 +00:00
Rachel Baker d054b9afba REST API: Allow schema sanitization_callback to be set to null to bypass fallback sanitization functions.
The logic in WP_REST_Request->sanitize_params() added in [39091] did not account for `null` or `false` being the sanitization_callback preventing overriding `rest_parse_request_arg()`. This fixes that oversight, allowing the built in sanitization function to be bypassed. See #38593.

Props kkoppenhaver, rachelbaker, jnylen0.
Fixes #39042.

Built from https://develop.svn.wordpress.org/trunk@39563


git-svn-id: http://core.svn.wordpress.org/trunk@39503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-11 21:26:43 +00:00
Weston Ruter 9669c60397 Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control.
Fixes #39102.

Built from https://develop.svn.wordpress.org/trunk@39562


git-svn-id: http://core.svn.wordpress.org/trunk@39502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 23:47:41 +00:00
Weston Ruter 57830bf2be Customize: Deprecate `page_home` nav menu item starter content in favor of `home_link`; replace usage in Twenty Seventeen.
Props celloexpressions, westonruter.
Amends [38991].
See #38615, #38114.
Fixes #39104.

Built from https://develop.svn.wordpress.org/trunk@39561


git-svn-id: http://core.svn.wordpress.org/trunk@39501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 23:39:43 +00:00
Weston Ruter a366e58135 Customize: Trim whitespace for URLs supplied for `external_header_video` to prevent `esc_url_raw()` from making them invalid.
Props tyxla.
See #38172.
Fixes #39125.

Built from https://develop.svn.wordpress.org/trunk@39560


git-svn-id: http://core.svn.wordpress.org/trunk@39500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 07:00:45 +00:00
Weston Ruter 6527c24ab1 Customize: Prevent single quotes (apostrophes) in `custom_css` values from unexpectedly causing false positives for unbalanced character validation errors.
See #39218, #35395.
Fixes #39198.

Built from https://develop.svn.wordpress.org/trunk@39559


git-svn-id: http://core.svn.wordpress.org/trunk@39499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 06:45:42 +00:00
Weston Ruter 1b96e389c0 Customize: Fix inability to delete nav menus by preventing `preview` filters from being added during `customize_save` admin ajax request.
Also prevent setting `nav_menu_locations[...]` values to `NaN` which gets sent as `null`.

Amends [38810].
See #30937.
Fixes #39103.

Built from https://develop.svn.wordpress.org/trunk@39558


git-svn-id: http://core.svn.wordpress.org/trunk@39498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 06:30:46 +00:00
Weston Ruter f1c383454b Customize: Prevent scrolling `custom_css` textarea to top when pressing tab.
Props tyxla, sstoqnov for testing, celloexpressions for testing.
See #38667.
Fixes #39134.

Built from https://develop.svn.wordpress.org/trunk@39557


git-svn-id: http://core.svn.wordpress.org/trunk@39497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:44:40 +00:00
John Blackbourn 5b15e8c11b Build/Test Tools: Remove some more randomness.
See #37371

Built from https://develop.svn.wordpress.org/trunk@39556


git-svn-id: http://core.svn.wordpress.org/trunk@39496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:02:41 +00:00
John Blackbourn da5255777a Build/Test Tools: Reuse another fixture in the user capability tests.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39555


git-svn-id: http://core.svn.wordpress.org/trunk@39495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:36:41 +00:00
John Blackbourn b5f7ab46dd Build/Test Tools: Remove commented out tests that have existed in an unimplemented state since the dawn of the test infrastructure.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39554


git-svn-id: http://core.svn.wordpress.org/trunk@39494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:12:41 +00:00
Andrea Fercia 10819d629f Accessibility: Remove inappropriate content from the Edit Categories and Edit Tags screens headings.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39553


git-svn-id: http://core.svn.wordpress.org/trunk@39493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 20:50:41 +00:00
Andrea Fercia 9d474c8206 Accessibility: Remove inappropriate content from the Edit Comments screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39552


git-svn-id: http://core.svn.wordpress.org/trunk@39492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 18:59:40 +00:00
Andrea Fercia c05f1dc805 Accessibility: Remove inappropriate content from the Network screens headings.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39551


git-svn-id: http://core.svn.wordpress.org/trunk@39491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 18:57:42 +00:00
Boone Gorges 97fd5ae77c Docs: Correct param definition for `WP_Query::query()`.
Props Shelob9.
Fixes #38963.
Built from https://develop.svn.wordpress.org/trunk@39550


git-svn-id: http://core.svn.wordpress.org/trunk@39490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 16:23:42 +00:00
Boone Gorges 74b6e1ba86 Taxonomy: Introduce `get_term_parents_list()`.
This new function is a taxonomy-agnostic version of `get_category_parents()`.

Props keesiemeijer, SergeyBiryukov, rafaehlers.
Fixes #17069.
Built from https://develop.svn.wordpress.org/trunk@39549


git-svn-id: http://core.svn.wordpress.org/trunk@39489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 16:10:42 +00:00
Weston Ruter d94530e721 Customize: Collapse available nav menu items panel when clicking outside over preview or over existing items.
Props rockwell15.
Fixes #38953.

Built from https://develop.svn.wordpress.org/trunk@39548


git-svn-id: http://core.svn.wordpress.org/trunk@39488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 06:16:40 +00:00
Weston Ruter d10cde75c6 Customize: Allow (optional) `url` parameter to be omitted in intercepted calls to `history.pushState()` and `history.replaceState()` in customize preview.
Fixes issue where calls without the `url` parameter erroneously end up rewriting the location path to `/undefined`.

Props Christian1012, westonruter.
Fixes #39175.

Built from https://develop.svn.wordpress.org/trunk@39547


git-svn-id: http://core.svn.wordpress.org/trunk@39487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 01:59:41 +00:00
Weston Ruter 592c3fc7d7 Customize: Use `esc_url_raw()` instead of `wp_json_encode()` to eliminate extraneous slashes when outputting background image URL in CSS `url()`.
Props tyxla, westonruter.
See #22058.
Fixes #39145.

Built from https://develop.svn.wordpress.org/trunk@39546


git-svn-id: http://core.svn.wordpress.org/trunk@39486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 01:43:42 +00:00
Weston Ruter c68f1de5f8 Customize: Use selected user language for edit shortcuts in preview instead of site language.
Props ocean90.
Fixes #39009.

Built from https://develop.svn.wordpress.org/trunk@39545


git-svn-id: http://core.svn.wordpress.org/trunk@39485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-08 19:32:59 +00:00
Boone Gorges 3a0e61e680 Allow apostrophes in email address during wp-login.php registration.
See #18039 for a related fix when creating users via the Dashboard.

Props tomdxw.
Fixes #34483.
Built from https://develop.svn.wordpress.org/trunk@39544


git-svn-id: http://core.svn.wordpress.org/trunk@39484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-08 03:58:45 +00:00
Andrea Fercia 76a5b4f3c2 Accessibility: Remove inappropriate content from the Menus screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39543


git-svn-id: http://core.svn.wordpress.org/trunk@39483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 23:47:43 +00:00
Andrea Fercia 40e303237b Accessibility: Remove inappropriate content from the old Edit Media screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39542


git-svn-id: http://core.svn.wordpress.org/trunk@39482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 23:30:40 +00:00
Andrea Fercia 2d76e0dfb2 Accessibility: Remove inappropriate content from the Widgets screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39541


git-svn-id: http://core.svn.wordpress.org/trunk@39481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:18:40 +00:00
Felix Arntz da4cc4d9e2 Multisite: Replace `is_super_admin()` with `update_core` for update permissions.
Fixes #39060. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39540


git-svn-id: http://core.svn.wordpress.org/trunk@39480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:14:42 +00:00
Felix Arntz 72380176dc Multisite: Remove redundant `is_super_admin()` when checking for `edit_others_posts`.
The super admin on multisite as well as the administrator on non-multisite both have this capability already. For custom post types using different capabilities this change ensures that only users with that capability have permissions.

Fixes #39059. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39539


git-svn-id: http://core.svn.wordpress.org/trunk@39479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:09:42 +00:00
Andrea Fercia 57c2604200 Accessibility: Remove inappropriate content from the Edit User screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39538


git-svn-id: http://core.svn.wordpress.org/trunk@39478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:08:43 +00:00
Andrea Fercia 2c227839d4 Accessibility: Remove inappropriate content from the Link Manager screens headings.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39537


git-svn-id: http://core.svn.wordpress.org/trunk@39477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 20:18:46 +00:00
Andrea Fercia 64f63499f8 Accessibility: Remove inappropriate content from the Add Plugins screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39536


git-svn-id: http://core.svn.wordpress.org/trunk@39476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 19:06:41 +00:00
Andrea Fercia 993f895c29 Accessibility: Remove inappropriate content from the Plugins screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39535


git-svn-id: http://core.svn.wordpress.org/trunk@39475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 18:48:40 +00:00
Andrea Fercia 87882d0463 Accessibility: Remove inappropriate content from the Users screen heading.
See #26601.

Built from https://develop.svn.wordpress.org/trunk@39534


git-svn-id: http://core.svn.wordpress.org/trunk@39474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 18:29:38 +00:00
Andrea Fercia 710b4431dd Toolbar: remove some unnecessary CSS lines.
They were commented out in `admin-bar.css` since 3 years, see [26770].

Props kafleg, ketuchetan.

Fixes #39137.

Built from https://develop.svn.wordpress.org/trunk@39533


git-svn-id: http://core.svn.wordpress.org/trunk@39473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 17:45:45 +00:00
Boone Gorges f882fc1295 Comments: Clean up unused code after [38446].
When the direct SQL query was removed in [38446], part of the SQL
concatenation was not removed. This changeset fixes that.

Props david.binda.
Fixes #39142.
Built from https://develop.svn.wordpress.org/trunk@39532


git-svn-id: http://core.svn.wordpress.org/trunk@39472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 15:52:44 +00:00
John Blackbourn 16371b99d8 Users: Style the super admin message on the user editing screen as a notice, not a success message.
Fixes #39131

Built from https://develop.svn.wordpress.org/trunk@39531


git-svn-id: http://core.svn.wordpress.org/trunk@39471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 01:28:40 +00:00
John Blackbourn 042d09001a Taxonomy: Correct the type for the first parameter of the `the_category` filter.
See #39130

Built from https://develop.svn.wordpress.org/trunk@39530


git-svn-id: http://core.svn.wordpress.org/trunk@39470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 01:23:42 +00:00
Andrea Fercia 23ac0d0616 Accessibility: Improve keyboard accessibility avoiding confusing tab stops in the Media views.
When sections of the media modal are hidden out of view, their controls may be
still focusable and actionable. This completely hides these sections to avoid
unnecessary tab stops and potential confusion for assistive technology users.

Props SergeyBiryukov, afercia.

Fixes #30599.

Built from https://develop.svn.wordpress.org/trunk@39529


git-svn-id: http://core.svn.wordpress.org/trunk@39469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 23:28:41 +00:00
Andrea Fercia a9600d1a53 Accessibility: Remove inappropriate content from the Themes screen heading.
Props joedolson.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@39528


git-svn-id: http://core.svn.wordpress.org/trunk@39468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 23:12:41 +00:00
Andrea Fercia c1f59f9fe3 Accessibility: Remove inappropriate content from the Add Themes screen heading.
Props joedolson.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@39527


git-svn-id: http://core.svn.wordpress.org/trunk@39467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 22:24:41 +00:00
Andrea Fercia 26ef4bd86d Accessibility: Remove inappropriate content from the Media Library screens headings.
Props joedolson.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@39526


git-svn-id: http://core.svn.wordpress.org/trunk@39466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 22:18:42 +00:00
Helen Hou-Sandí ab3bca05c8 About page: Update video and REST API reference URLs.
props ocean90, kadamwhite, coffee2code.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39522


git-svn-id: http://core.svn.wordpress.org/trunk@39462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 18:24:41 +00:00
Helen Hou-Sandí 9c023fc883 Remove 4.7 cruft from `$_old_files`.
see #39113.

Built from https://develop.svn.wordpress.org/trunk@39520


git-svn-id: http://core.svn.wordpress.org/trunk@39460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 17:17:41 +00:00
Helen Hou-Sandí 3dea25bcd9 About page: Bump image versions because CDN caching.
props pento.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39517


git-svn-id: http://core.svn.wordpress.org/trunk@39457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 07:13:41 +00:00
Joe McGill da48e4ba1e About page: Resposive images and CDN media URLs.
This adds `srcset` and `sizes` to the about page images, including
art direction, via `<picture>` for the lead Twenty Seventeen image.

This also replaces URLs for all images and feature videos to their
CDN locations on s.w.org.

Props helen, pento, joemcgill.
Fixes #38616.
Built from https://develop.svn.wordpress.org/trunk@39514


git-svn-id: http://core.svn.wordpress.org/trunk@39454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 06:55:41 +00:00
Helen Hou-Sandí f336d4c8ea About page: Imagery and beautification.
Still to come: responsive images, optimized videos, and CDN URLs.

props melchoyce, helen, ramiabraham.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39512


git-svn-id: http://core.svn.wordpress.org/trunk@39452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 04:01:45 +00:00
Weston Ruter 672b8a61cd Customize: Prevent infinite full refresh from occurring when selective refresh falls back for a nav menu that has items excluded from rendering via filtering.
See #37032.
Fixes #38612.

Built from https://develop.svn.wordpress.org/trunk@39510


git-svn-id: http://core.svn.wordpress.org/trunk@39450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 02:51:42 +00:00
Dominik Schilling a5dbd53a46 Comments: Merge a similar string between comments.php, XML-RPC and the REST API comments controller.
Props ramiy.
Fixes #39013.
Built from https://develop.svn.wordpress.org/trunk@39508


git-svn-id: http://core.svn.wordpress.org/trunk@39448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 20:16:41 +00:00
Weston Ruter 3b37903106 Customize: Defer populating `post_name` for `auto-draft` posts in customized state until posts are published.
The ultimate `post_name` is stored in postmeta until the post is published. The `get_page_by_path()` function does not exclude `auto-draft` posts. Revert changes to `wp_unique_post_slug()` from [39411] which excluded `auto-draft` posts.

Props westonruter, dlh for testing, helen for testing.
See #38114, #38928.
Fixes #39078.

Built from https://develop.svn.wordpress.org/trunk@39506


git-svn-id: http://core.svn.wordpress.org/trunk@39446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 19:33:42 +00:00
Weston Ruter 6a3de4d857 Customize: Ensure `changeset_uuid` query param is removed from the `customize.php` window's location once a changeset has been published (committed) with starter content.
Props westonruter, dlh for testing.
See #30937.
Fixes #39081.

Built from https://develop.svn.wordpress.org/trunk@39504


git-svn-id: http://core.svn.wordpress.org/trunk@39444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:56:42 +00:00
Weston Ruter 97f4180916 Customize: Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control.
Props westonruter, dlh for testing.
See #38114, #34923.
Fixes #39071.

Built from https://develop.svn.wordpress.org/trunk@39502


git-svn-id: http://core.svn.wordpress.org/trunk@39442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:47:41 +00:00
Weston Ruter c9b8a5dbbb Customize: Ensure `textarea` for Custom CSS displays as code (in LTR) when an RTL language is active.
See #35395.
Fixes #39085.

Built from https://develop.svn.wordpress.org/trunk@39499


git-svn-id: http://core.svn.wordpress.org/trunk@39439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 13:55:42 +00:00
David A. Kennedy f0b2b3f98f Default Themes: Update version numbers and readme files for 4.7 release
Bump version numbers and update readme files for themes with changes. Also updates description for Twenty Seventeen and removes version number for HTML5 shiv for easier updates in the future.

Props davidakennedy.

Fixes #38858.

Built from https://develop.svn.wordpress.org/trunk@39496


git-svn-id: http://core.svn.wordpress.org/trunk@39436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 23:27:41 +00:00
David A. Kennedy 6f5111d4e7 Twenty Seventeen: Fix CSS specificity problem with CSS feature query for `object-fit`
Previously, the theme's CSS feature query for `object-fit` overrode styles it shouldn't have on interior pages.

This moves the feature query farther down in the stylesheet so it takes precedence in the cascade in supported browsers, and applies the appropriate selector for the interior pages. In browsers that don't support feature queries or `object-fit`, the fallback styles are still applied. The problem was that the rules had the same specificity, so this way, the cascade takes over properly. The transforms and position changes for fallbacks are still needed in browsers that don't support `object-fit` and feature queries.

Props peterwilsoncc, davidakennedy.

Fixes #39073.

Built from https://develop.svn.wordpress.org/trunk@39495


git-svn-id: http://core.svn.wordpress.org/trunk@39435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 23:12:42 +00:00
John Blackbourn 597627fb92 Role/Capability: Don't assign the `delete_site` capability to anyone on single site installs.
This capability is not relevant on single site installs; it only applies to deleting a site on a multisite installation.

Fixes #38326

Built from https://develop.svn.wordpress.org/trunk@39494


git-svn-id: http://core.svn.wordpress.org/trunk@39434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 22:07:39 +00:00
Adam Silverstein 113833953d Docs: Add inline documentation for `image-edit.js`.
Adds JSDoc DocBlocks to the imageEdit methods.

Props: andizer, rensw90.
Fixes #38748.

Built from https://develop.svn.wordpress.org/trunk@39493


git-svn-id: http://core.svn.wordpress.org/trunk@39433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 21:35:40 +00:00
Felix Arntz e72d3d6b5d Multisite: Replace `is_super_admin()` with `manage_network` for admin bar permissions.
Props iaaxpage.
Fixes #39064. See #37616.

Built from https://develop.svn.wordpress.org/trunk@39492


git-svn-id: http://core.svn.wordpress.org/trunk@39432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 21:21:42 +00:00
Rachel Baker 697f079a19 Comments: Merge similar strings between comments.php and the REST API comments controller.
Props ramiy.
Fixes #39014.

Built from https://develop.svn.wordpress.org/trunk@39490


git-svn-id: http://core.svn.wordpress.org/trunk@39430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 20:32:40 +00:00
Rachel Baker f3b71b49d0 REST API: Merge similar date strings in the revisions and comments controllers.
Props ramiy.
Fixes #39016.

Built from https://develop.svn.wordpress.org/trunk@39488


git-svn-id: http://core.svn.wordpress.org/trunk@39428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 20:25:43 +00:00
James Nylen 87eedbd2f7 REST API: Treat any falsy value as `false` in 'rest_allow_anonymous_comments'.
Extend the check in 'rest_allow_anonymous_comments' to accept any falsy value
(previously this was an explicit check for `false`).

One possible failure case is that a plugin developer forgets to include a
return value for some code path in their callback for this filter, leading to a
value of `null` which is currently treated like `true`.

Props joehoyle, jnylen0.

Fixes #39010.

Built from https://develop.svn.wordpress.org/trunk@39487


git-svn-id: http://core.svn.wordpress.org/trunk@39427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:30:41 +00:00
John Blackbourn 5ffc6a7fe0 Users: Clarify the return value of `get_current_user_id()` for non-logged-in users.
Props ovenall
Fixes #39051

Built from https://develop.svn.wordpress.org/trunk@39486


git-svn-id: http://core.svn.wordpress.org/trunk@39426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:25:16 +00:00
David A. Kennedy 94506367ac Twenty Seventeen: Improve display of video header and header image in modern browsers
The theme uses a hack to help the video header and header image fill the available space. This centers around `max-width: 1000%;`. It causes visual issues (zooming of the header video or image) for all users though.

This fixes that with CSS Features Queries. The hack remains for browsers that don't support Feature Queries  and `object-fit`. Browsers that do support both get a better experience with a more reliable styling of the video and image header container.

Props laurelfulford, peterwilsoncc.

Fixes #39035.

Built from https://develop.svn.wordpress.org/trunk@39483


git-svn-id: http://core.svn.wordpress.org/trunk@39423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:16:42 +00:00
David A. Kennedy 04da99389d Twenty Seventeen: Add specific font stack for Thai language
Improves legability and design for users viewing the theme with Thai language.

Props imnok, netweb, melchoyce.

Fixes #38937.

Built from https://develop.svn.wordpress.org/trunk@39482


git-svn-id: http://core.svn.wordpress.org/trunk@39422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:06:41 +00:00
John Blackbourn 89ef3af655 Build/Test Tools: Correctly set up the current screen during list table tests so that they don't fail when run individually.
Props desrosj
Fixes #38761

Built from https://develop.svn.wordpress.org/trunk@39481


git-svn-id: http://core.svn.wordpress.org/trunk@39421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:04:43 +00:00
Andrew Nacin 0d983eb0ef Build/Test Tools: Specify exact node version in package.json.
Enforce it in the tests.

see #35105.

Built from https://develop.svn.wordpress.org/trunk@39478


git-svn-id: http://core.svn.wordpress.org/trunk@39418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:32:16 +00:00
Weston Ruter 0a31089bf6 Customize: Ensure a `custom_css` post insertion gets an initial post revision.
Props georgestephanis, westonruter.
See #30854, #38672, #35395.
Fixes #39032.

Built from https://develop.svn.wordpress.org/trunk@39477


git-svn-id: http://core.svn.wordpress.org/trunk@39417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:31:33 +00:00
Helen Hou-Sandí 27475953bc Docs: Update an `@since` as there will not be a 4.6.2 before 4.7.
props boonebgorges.
fixes #37291. see [38776].

Built from https://develop.svn.wordpress.org/trunk@39475


git-svn-id: http://core.svn.wordpress.org/trunk@39415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:10:43 +00:00
Andrew Nacin 440838095b REST API: Register the admin_email setting in single site only.
See [39470]. This time including unit test changes.

fixes #38990.

Built from https://develop.svn.wordpress.org/trunk@39471


git-svn-id: http://core.svn.wordpress.org/trunk@39411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:41:41 +00:00
Andrew Nacin cafb341db6 REST API: Register the admin_email setting in single site only.
fixes #38990.

Built from https://develop.svn.wordpress.org/trunk@39470


git-svn-id: http://core.svn.wordpress.org/trunk@39410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:39:42 +00:00
Gary Pendergast d7e0ae883c REST API: Site URL setting should not be present on multisite installations.
The `siteurl` setting is registered and made available to the REST API. On a multisite installation, this setting is not configurable from the General Settings screen, but due to the above it is configurable from the REST API.

Props peterwilsoncc.
Fixes #39005.


Built from https://develop.svn.wordpress.org/trunk@39468


git-svn-id: http://core.svn.wordpress.org/trunk@39408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:16:44 +00:00
Helen Hou-Sandí a5e9954f1d Custom CSS: Change the help link to something better for users.
fixes #39015.

Built from https://develop.svn.wordpress.org/trunk@39466


git-svn-id: http://core.svn.wordpress.org/trunk@39406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:11:42 +00:00
Gary Pendergast cc214a219b REST API: Capability check for editing a single term should use the singular form.
As an extra level of sanity checking, the term ID should be cast as an int in `map_meta_cap()`.

Props johnbillion, nacin, dd32, pento.
See #35614.
Fixes #39012.


Built from https://develop.svn.wordpress.org/trunk@39464


git-svn-id: http://core.svn.wordpress.org/trunk@39404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:08:41 +00:00
Gary Pendergast 947888d243 Docs: Add missing REST API-related args to `register_post_type()` and `register_taxonomy()`.
These functions now accept the `show_in_rest`, `rest_base`, and `rest_controller_class` args.

Props ketuchetan, rahulsprajapati.
Fixes #39023.


Built from https://develop.svn.wordpress.org/trunk@39462


git-svn-id: http://core.svn.wordpress.org/trunk@39402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:48:42 +00:00
Gary Pendergast f2a4d010cd REST API: Use the correct error message when editing a single term.
Props ramiy, johnbillion.
Fixes #39017.


Built from https://develop.svn.wordpress.org/trunk@39460


git-svn-id: http://core.svn.wordpress.org/trunk@39400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:42:41 +00:00
Gary Pendergast e8042cfef7 REST API: Merge similar strings in a comments endpoint parameter description.
Props ramiy.
Fixes #39036.


Built from https://develop.svn.wordpress.org/trunk@39457


git-svn-id: http://core.svn.wordpress.org/trunk@39397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:21:39 +00:00
Gary Pendergast 605e2f404a Load: No-op `locale.php`
After re-adding `locale.php` in [39455], remove the content of the file so that it can't cause errors in the event of something loading it early in the WordPress load process.

See #39027.


Built from https://develop.svn.wordpress.org/trunk@39456


git-svn-id: http://core.svn.wordpress.org/trunk@39396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:16:38 +00:00
Gary Pendergast 623ba7e8c9 Load: Re-add `locale.php`.
`locale.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38364].
See #37827, #39027.


Built from https://develop.svn.wordpress.org/trunk@39455


git-svn-id: http://core.svn.wordpress.org/trunk@39395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:07:40 +00:00
Gary Pendergast 3487c1bda8 Load: Re-add `session.php`.
`session.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38373].
See #36335, #39027.


Built from https://develop.svn.wordpress.org/trunk@39453


git-svn-id: http://core.svn.wordpress.org/trunk@39393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:51:41 +00:00
Helen Hou-Sandí f048b66f95 Twenty Seventeen: Improve ARIA for the nav menu.
The `onResizeARIA()` function was not very useful and buggy.

props afercia.
fixes #39029, #39026.

Built from https://develop.svn.wordpress.org/trunk@39451


git-svn-id: http://core.svn.wordpress.org/trunk@39391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:41:41 +00:00
Gary Pendergast a7ca4b8dde Load: Re-add `class-wp-upgrader-skins.php`.
`class-wp-upgrader-skins.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of including `class-wp-upgrader.php`, instead.

Revert of [38379].
See #36335, #39027.


Built from https://develop.svn.wordpress.org/trunk@39450


git-svn-id: http://core.svn.wordpress.org/trunk@39390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:40:41 +00:00
Gary Pendergast 6f1d48cdf3 Load: Re-add `class-feed.php`.
`class-feed.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of calling `fetch_feed()`, however..

Partial revert of [38374].
See #36335, #39027.


Built from https://develop.svn.wordpress.org/trunk@39449


git-svn-id: http://core.svn.wordpress.org/trunk@39389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:30:42 +00:00
David A. Kennedy 5edaa49d99 Twenty Seventeen: Ensure header text color updates in Customizer preview when cleared
Checks if the text color has been cleared and removes the `style` block if it has been. Uses color styles in theme stylesheet.

Props sstoqnov, davidakennedy.

Fixes #38993.

Built from https://develop.svn.wordpress.org/trunk@39447


git-svn-id: http://core.svn.wordpress.org/trunk@39387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 23:01:43 +00:00
Rachel Baker 179e9f20b6 REST API: Fix bug where comment author and author email could be an empty string when creating a comment.
If the `require_name_email` option is true, creating a comment with an empty string for the author name or email should not be accepted.  Both values can be an empty string on update.

Props flixos90, hnle, dd32, rachelbaker, jnylen0, ChopinBach, joehoyle, pento.

Fixes #38971.

Built from https://develop.svn.wordpress.org/trunk@39444


git-svn-id: http://core.svn.wordpress.org/trunk@39384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:44:42 +00:00
Helen Hou-Sandí a4042140f0 About page: Remove link tags from inside translatable strings.
props ramiy.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39443


git-svn-id: http://core.svn.wordpress.org/trunk@39383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:37:44 +00:00
Helen Hou-Sandí 156b8ca421 About page: Remove emoji from translatable string.
props ocean90.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39442


git-svn-id: http://core.svn.wordpress.org/trunk@39382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:30:42 +00:00
Rachel Baker 62129ebe85 REST API: Fix handling of some orderby parameters for the Posts controller.
- `'orderby' => 'include'` requires an array of post_ids via the `include` collection param.
`'orderby' => 'id'` and `'orderby' => 'slug'` need map the correct WP_Query equivalents. 

Props flixos90, hnle, dd32, rachelbaker, joehoyle, pento.

Fixes #38971.

Built from https://develop.svn.wordpress.org/trunk@39440


git-svn-id: http://core.svn.wordpress.org/trunk@39380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:18:42 +00:00
Jeremy Felt 1797ea7098 REST API: Disable `DELETE` requests for users in multisite.
In wp-admin, users are removed from individual sites rather than deleted. A user can only be deleted from the network admin.

Until support for a `PUT` request that removes a user's site and content associations is available, `DELETE` requests are disabled to avoid possible issues with lost content.

Props jnylen0, rachelbaker.
Fixes #38962.

Built from https://develop.svn.wordpress.org/trunk@39438


git-svn-id: http://core.svn.wordpress.org/trunk@39378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:10:42 +00:00
Rachel Baker 08b7e8adaf REST API: Return a `WP_Error` if `meta` property is not an array.
Fixes bug where a PHP Warning is currently thrown if a client sends a request where `meta` is not an array value.

Props timmydcrawford, jnylen0, rachelbaker, pento.
Fixes #38989.
Built from https://develop.svn.wordpress.org/trunk@39436


git-svn-id: http://core.svn.wordpress.org/trunk@39376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 21:56:42 +00:00
Weston Ruter 01fe6a2fac Customize: Fix posts limit query arg for `WP_Query` from incorrect `number` to `posts_per_page`.
Props dlh.
Fixes #39022.

Built from https://develop.svn.wordpress.org/trunk@39434


git-svn-id: http://core.svn.wordpress.org/trunk@39374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 16:18:43 +00:00
Dominik Schilling c354cfd79b About page: Don't wrap URLs with `<code>` tags.
See #38616.
Built from https://develop.svn.wordpress.org/trunk@39433


git-svn-id: http://core.svn.wordpress.org/trunk@39373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 12:31:41 +00:00
Dominik Schilling afc9ef5123 About page: Restore the double `%` in a `printf()` call which has been removed in [39420].
We need this to escape the percent symbol for "100%".

See #38616.
Built from https://develop.svn.wordpress.org/trunk@39432


git-svn-id: http://core.svn.wordpress.org/trunk@39372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 12:03:45 +00:00
Gary Pendergast d1b2a55b44 Plugins: Add a `current_priority()` method to `WP_Hook`.
This allows plugins to determine the currently running priority of a filter.

Fixes #39007.


Built from https://develop.svn.wordpress.org/trunk@39430


git-svn-id: http://core.svn.wordpress.org/trunk@39370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 07:10:43 +00:00
Gary Pendergast 36a55e7ae7 Readme: Update recommendations to PHP 7, and to include HTTPS.
See https://wordpress.org/news/2016/12/moving-toward-ssl/

Fixes #39024.


Built from https://develop.svn.wordpress.org/trunk@39428


git-svn-id: http://core.svn.wordpress.org/trunk@39368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 07:02:41 +00:00
Gary Pendergast 161a41e44c REST API: Require the reassign parameter when deleting users.
When deleting a user through the WordPress admin, a specific decision is presented - whether to assign all of the user's posts to another user, or to delete all of the posts.

This change requires `reassign` as a parameter in the corresponding REST API endpoint, so that content isn't accidentally lost.

Props jeremyfelt.
Fixes #39000.


Built from https://develop.svn.wordpress.org/trunk@39426


git-svn-id: http://core.svn.wordpress.org/trunk@39366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:54:42 +00:00
Aaron Jorbin b3ec5693a5 Build/Test Tools: Remove PHP 7.1 from allowed failures
PHP 7.1 has been officially released. http://php.net/archive/2016.php#id2016-12-01-3

See #37625
Props helen, pento, The PHP team

Built from https://develop.svn.wordpress.org/trunk@39424


git-svn-id: http://core.svn.wordpress.org/trunk@39364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:38:40 +00:00
Helen Hou-Sandí cfd1161a97 About page: Add strings for 4.7 and make available for translation.
It doesn't look very pretty; design changes still to come.

props helen, michaelarestad, samuelsidler, jbpaul17, jorbin, nacin, melchoyce.
see #38616.

Built from https://develop.svn.wordpress.org/trunk@39420


git-svn-id: http://core.svn.wordpress.org/trunk@39360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:31:43 +00:00
David A. Kennedy c0a9b1e57f Twenty Seventeen: Fix broken menu toggle in Customizer after menu items are added
This simplifies the line `$( siteNavigation.closest( '.main-navigation' ), this ).toggleClass( 'toggled-on' );` to `$( siteNavContain ).toggleClass( 'toggled-on' );`, since `this` is the clicked button, so the extra context isn't needed.

Props afercia, laurelfulford.

Fixes #38992.

Built from https://develop.svn.wordpress.org/trunk@39419


git-svn-id: http://core.svn.wordpress.org/trunk@39359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:25:42 +00:00
David A. Kennedy 68fd3f7989 Twenty Seventeen: Fix style issues with gallery image links
* Ensures dark color scheme has proper box shadow and hover/focus styles.
* Make sure links are correct width.

Props afercia, laurelfulford.

Fixes #38969.

Built from https://develop.svn.wordpress.org/trunk@39418


git-svn-id: http://core.svn.wordpress.org/trunk@39358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:10:42 +00:00
David A. Kennedy 853acee460 Twenty Seventeen: Hide front section panels on page load of Customizer.
Props sstoqnov.

Fixes #38951.

Built from https://develop.svn.wordpress.org/trunk@39417


git-svn-id: http://core.svn.wordpress.org/trunk@39357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 05:57:43 +00:00
Joe McGill 6995048c9f Twenty Seventeen: Add `.has-header-video` styles for custom color schemes.
Following [39413], this adds `.has-header-video` style definitions in
`/inc/custom-header.php` to support custom color schemes.

Props laurelfulford.
Fixes 38995.
Built from https://develop.svn.wordpress.org/trunk@39415


git-svn-id: http://core.svn.wordpress.org/trunk@39355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 05:44:42 +00:00
Joe McGill e2b7762e9a Twenty Seventeen: Better handling of custom headers when no image is set.
This ensures that a standard header is shown on the front page whenever
a header video is set without a header image if the video doesn't load,
e.g., on mobile sizes or if the JS doesn't fire.

This adds a new class, `.has-header-video` that is added whenever the
`wp-custom-header-video-loaded` event is fired, which is then used to style
the custom headers along with `.has-header-image` whenever a header image
is available. This also changes the class name on the custom header media
wrapping `div` from `.custom-header-image` to `.custom-header-media`.

Props laurelfulford, joemcgill.
Fixes #38995.
Built from https://develop.svn.wordpress.org/trunk@39413


git-svn-id: http://core.svn.wordpress.org/trunk@39353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 05:12:41 +00:00
Weston Ruter 71d5ba249b Customize: Reuse existing non-auto-draft posts and existing auto-draft posts in the customized state with matching slugs when applying starter content.
* Updates `wp_unique_post_slug()` to ignore `auto-draft` posts. Prevents publishing multiple posts that have the same slugs from starter content.
* Fixes fatal error when attempting to save an header_image setting from a non-admin context.
* Fixes substituting attachment symbols in options and theme mods.
* Fixes applying starter content for header images and background images.

See #38114.
Fixes #38928.

Built from https://develop.svn.wordpress.org/trunk@39411


git-svn-id: http://core.svn.wordpress.org/trunk@39351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:25:41 +00:00
Weston Ruter 5e7d9a49fd Customize: Reject a changeset update when a non-future date is provided and also ensure that a published changeset always gets set to the current date/time.
* Also moves checks from `customize_save` Ajax handler to the underlying `WP_Customize_Manager::save_changeset_post()` call which plugins may invoke directly.
* Ensures that `customize_save_response` filter is always passed an array, with error code available as `code`.

Props utkarshpatel, westonruter, sayedwp.
See #30937.
Fixes #38943.

Built from https://develop.svn.wordpress.org/trunk@39409


git-svn-id: http://core.svn.wordpress.org/trunk@39349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:02:44 +00:00
Rachel Baker 1448bfc96f REST API: Correct the `admin_email` setting description for single site installs.
Display different descriptions for multisite or single site installations.

Props johnbillion, ocean90.
Fixes #38990.

Built from https://develop.svn.wordpress.org/trunk@39406


git-svn-id: http://core.svn.wordpress.org/trunk@39346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 03:03:43 +00:00
David A. Kennedy bfdb5f5cd4 Twenty Seventeen: Make spacing on pages without comments consistent
Previously, the top of the page had more space than the bottom, not matching the original design.

Props laurelfulford, melchoyce.

Fixes #38972.

Built from https://develop.svn.wordpress.org/trunk@39404


git-svn-id: http://core.svn.wordpress.org/trunk@39344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:48:48 +00:00
Rachel Baker a1ec867b61 REST API: Fix incorrect capability check on term create.
Change the capability check used in `WP_REST_Terms_Controller` when creating a new term is attempted, from `manage_terms` to `edit_terms`. This matches the behavior within the WordPress admin. See #35614.

Props johnbillion, rmccue, rachelbaker, helen, jorbin, SergeyBiryukov.

Fixes #38958.
Built from https://develop.svn.wordpress.org/trunk@39402


git-svn-id: http://core.svn.wordpress.org/trunk@39342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:31:44 +00:00
Rachel Baker 606c9905ef REST API: Fix incorrect uses of `rest_sanitize_value_from_schema()`.
In the `check_username()` and `check_password()` callbacks in the Users controller cast the provided request value to a string. The `rest_sanitize_value_from_schema()` function was being used incorrectly which was causing unintended request parsing. 
In `rest_sanitize_request_arg()` do not pass nonexistent third parameter for the `rest_sanitize_value_from_schema()` function.

Props jnylen0, joehoyle, rachelbaker, ocean90.
Fixes #38984.
Built from https://develop.svn.wordpress.org/trunk@39400


git-svn-id: http://core.svn.wordpress.org/trunk@39340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:12:41 +00:00
David A. Kennedy 396c93121c Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Fixes #38980.

Built from https://develop.svn.wordpress.org/trunk@39397


git-svn-id: http://core.svn.wordpress.org/trunk@39337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:04:40 +00:00
Mike Schroder f63c6fd344 Media: Fix regression with display of small images in media library.
Fixes a regression in the media library after [38949], which caused
small images (< thumbnail size) to not display within the media library.

Accounts for images that have no intermediate sizes
in `wp_prepare_attachment_for_js()`.

Adds test.

Fixes #38965.
Props joemcgill, clorith, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@39396


git-svn-id: http://core.svn.wordpress.org/trunk@39336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:02:41 +00:00
Weston Ruter d480f87831 Customize: Fix handling of the nav menu item labels (titles) that match defaults (original titles) and fix the display of item type labels.
* Show default labels for nav menu item as placeholders in a control's label field instead of showing blank.
* Store empty string as label instead of copying default labels.
* Prevent labels for post type archive items from being dropped in preview.
* Also ensure that the item type label is displayed on nav menu item controls for settings that are loaded from an existing changeset.

Amends [38618].
See #38015.
Fixes #38955.

Built from https://develop.svn.wordpress.org/trunk@39393


git-svn-id: http://core.svn.wordpress.org/trunk@39333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:36:42 +00:00
David A. Kennedy b17e25ff34 Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Fixes #38927.

Built from https://develop.svn.wordpress.org/trunk@39392


git-svn-id: http://core.svn.wordpress.org/trunk@39332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:30:40 +00:00
Dominik Schilling 3dc47839db Docs: Document the usage of the global `$wpdb` in `_filter_query_attachment_filenames()`.
Props mt8.biz.
Fixes #38973.
Built from https://develop.svn.wordpress.org/trunk@39390


git-svn-id: http://core.svn.wordpress.org/trunk@39330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:20:42 +00:00
David A. Kennedy f5dbc862df Twenty Seventeen: Provide a background color fallback for non-webkit browsers on input styles
This allows the styles to work correctly when modified by high contrast computer setups.

Props presskopp.

Fixes #38939.

Built from https://develop.svn.wordpress.org/trunk@39388


git-svn-id: http://core.svn.wordpress.org/trunk@39328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:03:43 +00:00
David A. Kennedy d21272ae29 Twenty Seventeen: Allow child themes to easily extend custom color patterns
By adding a filter, child themes can add additional selectors onto the custom color scheme CSS. Like so:

{{{
// Add child theme selectors for color schemes.
function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) {
	$css .= '
	.colors-custom .content-menu > article:not(.has-post-thumbnail),
	.colors-custom .content-menu > section:not(.has-post-thumbnail) {
		border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
	}';
	return $css;
}
add_filter( 'twentyseventeen_custom_colors_css', 'dynamic_seventeen_custom_colors_css', 10, 3 );
}}}

Props celloexpressions.

Fixes #38949.

Built from https://develop.svn.wordpress.org/trunk@39386


git-svn-id: http://core.svn.wordpress.org/trunk@39326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:51:42 +00:00
David A. Kennedy ba18343ae6 Twenty Seventeen: Make screen reader text on scroll arrow more meaningful
This way screen reader users will know what to expect when they use this link.

Props rianrietveld.

Fixes #38970.

Built from https://develop.svn.wordpress.org/trunk@39384


git-svn-id: http://core.svn.wordpress.org/trunk@39324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:16:42 +00:00
Dominik Schilling 1c0e51452f Options: Pass the `$passed_default` parameter to the `'default_option_{$option}` filter in `add_option()`.
This was missed in [38910].

Props joehoyle, lucasstark.
See #38176.
Fixes #38930.
Built from https://develop.svn.wordpress.org/trunk@39382


git-svn-id: http://core.svn.wordpress.org/trunk@39322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 21:22:41 +00:00
Joe McGill dd46ba58ea Twenty Seventeen: Keep header videos from extending past footer.
This adds 1px of bottom padding to header videos to keep them from
extending past the footer at the bottom of the page.

Fixes #38950.
Built from https://develop.svn.wordpress.org/trunk@39380


git-svn-id: http://core.svn.wordpress.org/trunk@39320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 20:53:42 +00:00
Weston Ruter b2c65c9a95 Customize: Fix regression in ability to hide fields for advanced menu properties in nav menu item controls.
Props westonruter, celloexpressions.
See #34391.
Fixes #38952.

Built from https://develop.svn.wordpress.org/trunk@39378


git-svn-id: http://core.svn.wordpress.org/trunk@39318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 18:01:43 +00:00
Weston Ruter b2c12e463a Customize: Fix regression in ability to create submenus for nav menus via drag and drop.
See #34391.
Fixes #38948.
Props delawski, adamsilverstein.

Built from https://develop.svn.wordpress.org/trunk@39376


git-svn-id: http://core.svn.wordpress.org/trunk@39316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 17:43:43 +00:00
James Nylen f630dd7b64 REST API: Add test for creating a comment with an invalid post ID.
#38816 fixed creating a comment with an invalid post ID (this should not be
allowed), but we need a test for this.

Fixes #38991.

Built from https://develop.svn.wordpress.org/trunk@39375


git-svn-id: http://core.svn.wordpress.org/trunk@39315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 16:22:44 +00:00
Helen Hou-Sandí b6c2f11c54 Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981.

Built from https://develop.svn.wordpress.org/trunk@39373


git-svn-id: http://core.svn.wordpress.org/trunk@39313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 05:48:44 +00:00
James Nylen 7288ae5851 REST API: Add tests for empty or "no-op" updates.
The API should allow updates that don't actually change anything.  This allows
clients to, for example, accidentally send the same request twice without
encountering unexpected errors.  This currently works for posts, terms, and
users, so this commit adds test cases accordingly.

See #38700 for issues preventing this from working for comments.

Fixes #38975.

Built from https://develop.svn.wordpress.org/trunk@39371


git-svn-id: http://core.svn.wordpress.org/trunk@39311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 03:03:46 +00:00
Dion Hulse 88a72182ca WP_Hook: Re-initialize any actions added directly to `$wp_filter` by `advanced-cache.php`.
Props dd32, ocean90.
Fixes #38929.

Built from https://develop.svn.wordpress.org/trunk@39369


git-svn-id: http://core.svn.wordpress.org/trunk@39309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 05:37:41 +00:00
Andrew Ozz f346a9d70c TinyMCE: fix the styling of notices generated by the editor UI.
Props: mor10, karmatosed, azaozz.
Fixes #38917.
Built from https://develop.svn.wordpress.org/trunk@39367


git-svn-id: http://core.svn.wordpress.org/trunk@39307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:59:29 +00:00
Weston Ruter b9b0371470 Customize: Fix logic for previewing the URL for `nav_menu_item` settings for terms and post type archives.
Fixes typo in args passed to `get_term_link()` which caused a fatal error due to this call returning a `WP_Error` which was set to `url`. Also fixes never-satisfiable condition for obtaining post type archive URL. Also ensures that `WP_Error` never leaks through as `url` by setting it to an empty string. Adds missing unit tests.

Amends [38991].
See #38114.
Fixes #38945.

Built from https://develop.svn.wordpress.org/trunk@39365


git-svn-id: http://core.svn.wordpress.org/trunk@39305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:58:36 +00:00
John Blackbourn 9011477638 Build/Test Tools: Add an extra `WP_Error` assertion when testing a valid user activation key. This provides a better failure message if the assertion does fail.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39364


git-svn-id: http://core.svn.wordpress.org/trunk@39304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:58:10 +00:00
John Blackbourn b8ca8e16e5 Build/Test Tools: When testing the output of `wp_list_pages()`, use a known and fixed date for each post so the tests don't fail when the date changes between the beginning and end of a test.
Props xrmx
Fixes #38688

Built from https://develop.svn.wordpress.org/trunk@39363


git-svn-id: http://core.svn.wordpress.org/trunk@39303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:57:42 +00:00
Weston Ruter a1ac922c4c Git: Prevent untracked files from being ignored by git in bundled themes.
See #27207.
Fixes #38779.

Built from https://develop.svn.wordpress.org/trunk@39362


git-svn-id: http://core.svn.wordpress.org/trunk@39302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:57:14 +00:00
Gary Pendergast 471f9b3bd5 Git: Ignore patch related files, so they can't be accidentally committed.
This duplicates the changes in [39360] for git.

See #38727.


Built from https://develop.svn.wordpress.org/trunk@39361


git-svn-id: http://core.svn.wordpress.org/trunk@39301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:56:46 +00:00
Gary Pendergast ab13386f71 SVN: Ignore patch related files, so they can't be accidentally committed.
Ignore `*.rej`, `*.orig`, `*.patch`, and `*.diff` files in all directories.

Fixes #38727.


Built from https://develop.svn.wordpress.org/trunk@39360


git-svn-id: http://core.svn.wordpress.org/trunk@39300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:56:18 +00:00
Helen Hou-Sandí 844b0a5307 Trunk is really 4.8-alpha now.
Built from https://develop.svn.wordpress.org/trunk@39359


git-svn-id: http://core.svn.wordpress.org/trunk@39299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:55:50 +00:00
Helen Hou-Sandí 6b1532f96b Trunk is now 4.8-alpha.
Built from https://develop.svn.wordpress.org/trunk@39357


git-svn-id: http://core.svn.wordpress.org/trunk@39297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 21:38:31 +00:00
Helen Hou-Sandí 88d2633119 Post-4.7 RC1 bump.
Built from https://develop.svn.wordpress.org/trunk@39355


git-svn-id: http://core.svn.wordpress.org/trunk@39295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 04:29:31 +00:00
Helen Hou-Sandí 590ae4393c WordPress 4.7 RC1.
Built from https://develop.svn.wordpress.org/trunk@39354


git-svn-id: http://core.svn.wordpress.org/trunk@39294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 04:03:30 +00:00
Joe Hoyle c662bb84dc REST API: Special case the “standard” post format to always be allowed.
Fixes #38916.
Built from https://develop.svn.wordpress.org/trunk@39353


git-svn-id: http://core.svn.wordpress.org/trunk@39293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 00:08:31 +00:00
Joe Hoyle 0a787caec6 REST API: Allow unsetting a post’s password.
Props danielbachhuber, iseulde.
Fixes #38919.
Built from https://develop.svn.wordpress.org/trunk@39352


git-svn-id: http://core.svn.wordpress.org/trunk@39292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 23:13:32 +00:00
Drew Jaynes a7ddf24f3d Docs: Add a missing changelog entry for the point where the `$tagnames` parameter was added to `get_shortcode_regex()`.
Props keesiemeijer.
Fixes #38914.

Built from https://develop.svn.wordpress.org/trunk@39351


git-svn-id: http://core.svn.wordpress.org/trunk@39291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 17:35:32 +00:00
Weston Ruter 456941a018 Customize: Refactor logic for updating `custom_css` posts by introducing `wp_update_custom_css_post()` function and renaming update filter.
* Moves logic from `WP_Customize_Custom_CSS_Setting::update()` into a re-usable `wp_update_custom_css_post()` function, useful for future REST API endpoint, WP-CLI command, or plugin migrations.
* Renames `customize_update_custom_css_post_content_args` filter to `update_custom_css_data` and improves the naming of the parameters. Instead of passing `post_content` and `post_content_filtered` the filtered array now contains `css` and `preprocessed` respectively. 
* The second context param for the `update_custom_css_data` filter is now an array of the original args passed to `wp_update_custom_css_post()` and there is now no more `$setting` arg since it isn't necessarily being called in the customizer context.

Props westonruter, georgestephanis.
See #35395.
Fixes #38672.

Built from https://develop.svn.wordpress.org/trunk@39350


git-svn-id: http://core.svn.wordpress.org/trunk@39290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 17:34:31 +00:00
Joe Hoyle 6f189ddbc8 REST API: Add support for comments of password-protected posts.
Core requires the post password to view and create comments on password protected posts, so we must support a “password” param on the comments endpoint when fetch comments for a specific post and creating a comment on a password protected post.

Props flixos90, jnylen0.
Fixes #38692.
Built from https://develop.svn.wordpress.org/trunk@39349


git-svn-id: http://core.svn.wordpress.org/trunk@39289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 16:15:31 +00:00
Rachel Baker a985a4d126 REST API: Always fire the `rest_insert_*` actions after the related object is updated or inserted.
Brings consistency to the `rest_insert_*` actions. Also includes some shuffling and clean-up as well including:
- Ensure we are passing the most current `$post` and `$user` objects to the `update_additional_fields_for_object()` callbacks.
- Changes the function signature of `handle_status_param()` in the Comments controller to accept just the comment_id as the 2nd parameter, instead of a full WP_Comment object. Only the comment_id is needed in the method, this avoids having to include another `get_comment()` call. 
- Renames a variable in the `create_item()` method of the Posts controller from `$post` -> `$prepared_post` to be more explicit.
- Minor fixes/clarifications to the rest_insert_* hook docs

Props rachelbaker, joehoyle
Fixes #38905.
Built from https://develop.svn.wordpress.org/trunk@39348


git-svn-id: http://core.svn.wordpress.org/trunk@39288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 15:33:31 +00:00
Pascal Birchler 98e8bf7ba2 Embeds: Correctly remove security attribute from iframes in IE 10 and IE 11.
This was originally added in 4.4, but presumably broke with [35708], which prevented these browsers from actually reaching the relevant code section.
Let's make embeds work again in IE 10 and IE 11.

Fixes #38694.
Built from https://develop.svn.wordpress.org/trunk@39347


git-svn-id: http://core.svn.wordpress.org/trunk@39287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 13:38:33 +00:00
Helen Hou-Sandí 70fc99e323 Theme starter content: Add support for featured images and page templates.
Featured image support means that attachments can now be imported. Media can be sideloaded from within theme or plugin directories. Like other posts, attachments are auto-drafts until customizer changes are published, and are not duplicated when they already exist in the customized state. Attachment IDs can be used for any number of purposes, much like post IDs. Twenty Seventeen now includes 3 images used as featured images to best showcase the multi-section homepage setup.

As featured image IDs are stored in post meta, it also made sense to add support for page templates. Twenty Seventeen does not include any such templates, but the functionality can be quite important for displaying themes to their best effect.

props westonruter, helen, flixos90.
fixes #38615.

Built from https://develop.svn.wordpress.org/trunk@39346


git-svn-id: http://core.svn.wordpress.org/trunk@39286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 09:53:33 +00:00
Weston Ruter 6b5d960453 Customize: Clean up docs and code style for customize changes in 4.7.
* Adds missing `resolve`/`fail` for promise returned by `loadThemePreview`.
* Adds missing jsdoc blocks and tags.
* Adds missing phpdoc and makes corrections.

See #37770.
Fixes #38908.

Built from https://develop.svn.wordpress.org/trunk@39345


git-svn-id: http://core.svn.wordpress.org/trunk@39285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 06:05:32 +00:00
Joe Hoyle e20ded7e75 REST API: Make JS Client store schema in session storage.
Props adamsilverstein.
Fixes #38895.
Built from https://develop.svn.wordpress.org/trunk@39344


git-svn-id: http://core.svn.wordpress.org/trunk@39284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:55:30 +00:00
Joe Hoyle 14654d9539 REST API: Allow unsetting of page templates in update requests.
Sending a request to update a page with the template property set to an empty string resulted in an error because “” was not a valid value in the enum.

Props lucasstark, swissspidy.
Fixes #38877.
Built from https://develop.svn.wordpress.org/trunk@39343


git-svn-id: http://core.svn.wordpress.org/trunk@39283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:47:30 +00:00
Joe Hoyle d711f2c18d REST API: Update “resource” strings to use the appropriate nouns.
Props ramiy.
Fixes #38811.
Built from https://develop.svn.wordpress.org/trunk@39342


git-svn-id: http://core.svn.wordpress.org/trunk@39282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:42:30 +00:00
David A. Kennedy 68f5457770 Twenty Seventeen: Ensure edit button label displays properly in other languages
This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.

Props tg29359, afercia, odysseygate.

Fixes #38876.

Built from https://develop.svn.wordpress.org/trunk@39341


git-svn-id: http://core.svn.wordpress.org/trunk@39281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 00:44:30 +00:00
Joe McGill 46b2ef90be Twenty Seventeen: CSS coding standards fixes.
This makes a few adjustments to CSS to bring them inline with WordPress
CSS coding standards including:

* Font weights should be defined using numeric values
* Do not pad parentheses with spaces

This also fixes a couple of typos to inline comments.

Props netweb for initial patch.
Fixes #38901.
Built from https://develop.svn.wordpress.org/trunk@39340


git-svn-id: http://core.svn.wordpress.org/trunk@39280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 20:47:33 +00:00
Helen Hou-Sandí 96960d8ed6 Twenty Seventeen: Ensure galleries display correctly in IE11.
It appears IE11 needs an explicit width for an `inline-block` parent element.

props derrickkoo, afercia.
fixes #38872.

Built from https://develop.svn.wordpress.org/trunk@39339


git-svn-id: http://core.svn.wordpress.org/trunk@39279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 15:51:36 +00:00
Peter Wilson 0b8740d868 Themes: Prevent unneeded database updates in `wp_get_custom_css_post()`.
When a custom header image was set but custom CSS was not, `wp_get_custom_css_post()` was generating an UPDATE query on every frontend request.

In theme options the header image meta data is stored as an object. In `update_option()` this hits an edge case as the resource IDs of the old and new values never match.

This changes the logic of `wp_get_custom_css_post()` to ensure `set_theme_mod()` is only called when the custom CSS has changed.

Props bradyvercher, helen.
Fixes #38866.

Built from https://develop.svn.wordpress.org/trunk@39338


git-svn-id: http://core.svn.wordpress.org/trunk@39278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 11:41:34 +00:00
Rachel Baker d87fe366a9 REST API: Set the comment `type` to a readonly property in the schema.
Document the type property as `readonly` and remove the default value. After #38820 it is no longer possible to set the type property on a comment to anything a custom type.

Props jnylen0, rachelbaker.
Fixes #38886.
Built from https://develop.svn.wordpress.org/trunk@39337


git-svn-id: http://core.svn.wordpress.org/trunk@39277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 22:56:30 +00:00
Helen Hou-Sandí 2406fe498c Plugin install: De-duplicate a conditional, introduced in [38172].
props ChrisWiegman.
fixes #38190.

Built from https://develop.svn.wordpress.org/trunk@39336


git-svn-id: http://core.svn.wordpress.org/trunk@39276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 21:33:30 +00:00
Joe Hoyle 014bb86248 REST API: Update description strings to match already existing ones in the admin.
Props dimadin.
Fixes #38807.
Built from https://develop.svn.wordpress.org/trunk@39335


git-svn-id: http://core.svn.wordpress.org/trunk@39275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 20:41:30 +00:00
Andrew Ozz 9925a4ebb5 TinyMCE: avoid calling `editor.focus()` on loading the content in the editor. It may trigger scroll-into-view in the browser. Call the quirks fix in TinyMCE directly.
Props gitlost.
Fixes #38511.
Built from https://develop.svn.wordpress.org/trunk@39334


git-svn-id: http://core.svn.wordpress.org/trunk@39274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 20:15:31 +00:00
Weston Ruter 277d4d0ab0 Customize: Prevent selective refresh from causing infinite fallback refreshes when nav menu contains invalid items.
Invalid nav menu items are exported as settings in the customize controls since it `is_admin()`, but any such `nav_menu_item` settings are excluded from the preview since it's the frontend. Selective refresh for nav menus needs to ignore the syncing of any such `nav_menu_item` settings that are `_invalid` since they are never rendered, and when a nav menu only contains invalid items, an infinite fallback refresh can ensue.

Fixes #38890.

Built from https://develop.svn.wordpress.org/trunk@39333


git-svn-id: http://core.svn.wordpress.org/trunk@39273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 19:16:32 +00:00
Weston Ruter 3284f9a989 Customize: Remove iframe-specific behaviors from customize preview when previewing on frontend and not contained inside iframe.
* Strip out `customize_messenger_channel` from preview window URL when not contained in iframe.
* Allow interacting with unpreviewable links and forms when previewing customized state on frontend.

See #30937.
Fixes #38867.

Built from https://develop.svn.wordpress.org/trunk@39332


git-svn-id: http://core.svn.wordpress.org/trunk@39272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 16:56:30 +00:00
Dominik Schilling 2328e7b17a I18N: In `wp_dropdown_languages()` rename the new `show_site_locale_default` argument to `show_option_site_default`.
This makes it consistent with arguments of other `wp_dropdown_*()` functions.

Props SergeyBiryukov.
See #38632.
Fixes #38871.
Built from https://develop.svn.wordpress.org/trunk@39331


git-svn-id: http://core.svn.wordpress.org/trunk@39271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 16:14:30 +00:00
Dominik Schilling f5b6731777 I18N: Add an additional caching layer for `_load_textdomain_just_in_time()`.
Previously, if no translation files exist for a text domain, `_load_textdomain_just_in_time()` went through the entire process each time it was called. This results in an increased call to `get_locale()` and its `locale` filter.
This change splits the logic into `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()`. The former, which is used by `_load_textdomain_just_in_time()`, caches the result of the latter. It also removes some non-working code from `WP_Locale_Switcher::load_translations()`.

Props jrf, swissspidy, sharkomatic, ocean90.
Fixes #37997.
Built from https://develop.svn.wordpress.org/trunk@39330


git-svn-id: http://core.svn.wordpress.org/trunk@39270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 16:07:33 +00:00
Ryan McCue 863505cf81 REST API: Trim trailing slashes from routes.
WordPress' rewrites do this usually, but the behaviour was inconsistent when using non-pretty permalinks.

Props joehoyle.
Fixes #38873.

Built from https://develop.svn.wordpress.org/trunk@39329


git-svn-id: http://core.svn.wordpress.org/trunk@39269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 05:46:30 +00:00
Ryan McCue ca9f71e9b2 REST API: Correctly map meta keys to field names.
This accidentally assumed $name was the same as $meta_key, which ruined the whole point of $name.

Props tharsheblows, joehoyle.
Fixes #38786.

Built from https://develop.svn.wordpress.org/trunk@39328


git-svn-id: http://core.svn.wordpress.org/trunk@39268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 05:41:30 +00:00
Ryan McCue 4e05ff6a11 REST API: Disable anonymous commenting by default.
Adding a brand new anonymous comment method is a potential conduit for spam. Since it's still useful functionality, we're now hiding it behind a filter to allow plugins and themes to turn it on if they do want it.

Props helen, rachelbaker, joehoyle.
Fixes #38855.

Built from https://develop.svn.wordpress.org/trunk@39327


git-svn-id: http://core.svn.wordpress.org/trunk@39267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 05:32:33 +00:00
John Blackbourn c2d709e9d6 I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882

Built from https://develop.svn.wordpress.org/trunk@39326


git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
Sergey Biryukov 1b2ed70f39 I18N: Move the support forums URL in update-related HTTP API error messages to a separate translatable string that is already used elsewhere.
Props ramiy, SergeyBiryukov.
Fixes #38880.
Built from https://develop.svn.wordpress.org/trunk@39325


git-svn-id: http://core.svn.wordpress.org/trunk@39265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:52:32 +00:00
John Blackbourn 40af377f57 Remove an erroneous `@TODO` introduced in [39323].
See #38882

Built from https://develop.svn.wordpress.org/trunk@39324


git-svn-id: http://core.svn.wordpress.org/trunk@39264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:26:30 +00:00
John Blackbourn 4cf5550d8d I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.
Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882

Built from https://develop.svn.wordpress.org/trunk@39323


git-svn-id: http://core.svn.wordpress.org/trunk@39263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:22:32 +00:00
Joe Hoyle 5b97952cab REST API: Merge two error messages for edit / update.
Props ramiy.
Fixes #38879.
Built from https://develop.svn.wordpress.org/trunk@39322


git-svn-id: http://core.svn.wordpress.org/trunk@39262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-20 22:36:31 +00:00
Sergey Biryukov 9b23ccfc29 REST API: Update error messages in `WP_REST_Comments_Controller` to use the common text for permission errors.
Props ramiy.
Fixes #38875.
Built from https://develop.svn.wordpress.org/trunk@39321


git-svn-id: http://core.svn.wordpress.org/trunk@39261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-20 11:46:34 +00:00
Weston Ruter 3c7e23297e Customize: Ensure that `WP_Customize_Manager::save_changeset_post()` returns `setting_validities` even for supplied values that are unchanged from values in changeset.
Check setting existence and authorization via `WP_Customize_Manager::validate_setting_values()` even for `null` values to account for custom params being added to settings, preventing failures from being silently ignored.

See #38705, #30937.
Fixes #38865.

Built from https://develop.svn.wordpress.org/trunk@39320


git-svn-id: http://core.svn.wordpress.org/trunk@39260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 22:39:33 +00:00
Gary Pendergast c04452a81f Emoji: Update Twemoji fallback to version 2.2.2.
This removes support for the skin tone modifier on emoji involving two or more people. This functionality is opposed by Apple and Google, so there is unlikely to be an input mechanism for such emoji, they oppose it on the grounds that they "...do not think a mechanism should be supported that only permits depiction of multi-person groups (or elements) in which each person has the same skin tone."

See their official notification for further details: http://www.unicode.org/L2/L2016/16332-remove-multi-emb.pdf

This change does not require a CDN update, as no emoji were altered or added, only removed.

See #38113.


Built from https://develop.svn.wordpress.org/trunk@39319


git-svn-id: http://core.svn.wordpress.org/trunk@39259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 11:05:32 +00:00
Weston Ruter 224ee52ea7 Customize: Ensure `WP_Customize_Setting::value()` returns previewed value for custom types utilizing the `customize_value_{$id_base}` filter.
Fixes #38864.

Built from https://develop.svn.wordpress.org/trunk@39318


git-svn-id: http://core.svn.wordpress.org/trunk@39258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 06:00:34 +00:00
Helen Hou-Sandí 7ba9399fbd Twenty Seventeen: Avoid an undefined index notice after [39291].
props westonruter.
see #38847.

Built from https://develop.svn.wordpress.org/trunk@39317


git-svn-id: http://core.svn.wordpress.org/trunk@39257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 04:55:35 +00:00
Sergey Biryukov 1c110b8474 I18N: Use 'WordPress hook name' instead of 'PHP hook name' in translator comments added in [39315].
See #38862.
Built from https://develop.svn.wordpress.org/trunk@39316


git-svn-id: http://core.svn.wordpress.org/trunk@39256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:44:30 +00:00
Sergey Biryukov 725a04d815 I18N: Add translator comments for strings in `_deprecated_*()` functions.
See #38862.
Built from https://develop.svn.wordpress.org/trunk@39315


git-svn-id: http://core.svn.wordpress.org/trunk@39255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:39:33 +00:00
Sergey Biryukov 285a774cad I18N: Remove unnecessary `__()` calls in `_rotate_image_resource()` and `_flip_image_resource()`.
Use `_deprecated_function()`'s native strings.

Props ramiy.
Fixes #38862.
Built from https://develop.svn.wordpress.org/trunk@39314


git-svn-id: http://core.svn.wordpress.org/trunk@39254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:30:31 +00:00
Sergey Biryukov 4811484433 REST API: Merge some more permission error strings missed in [39309].
See #38857.
Built from https://develop.svn.wordpress.org/trunk@39313


git-svn-id: http://core.svn.wordpress.org/trunk@39253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:21:31 +00:00
Sergey Biryukov dca7d8d0ea Text Changes: Merge strings referring to `list_users` capability.
See #38857.
Built from https://develop.svn.wordpress.org/trunk@39312


git-svn-id: http://core.svn.wordpress.org/trunk@39252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:16:30 +00:00
Sergey Biryukov 518fc0a05b I18N: Merge two 'RSS Error:' strings.
Props ramiy.
Fixes #38861.
Built from https://develop.svn.wordpress.org/trunk@39311


git-svn-id: http://core.svn.wordpress.org/trunk@39251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:56:31 +00:00
Sergey Biryukov a1f285641f REST API: After [39306], move `author_ip` argument to the correct place.
See #38822.
Built from https://develop.svn.wordpress.org/trunk@39310


git-svn-id: http://core.svn.wordpress.org/trunk@39250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:51:30 +00:00
Sergey Biryukov 5ded4db04c REST API: Merge and clarify some permission error strings.
Fixes #38857.
Built from https://develop.svn.wordpress.org/trunk@39309


git-svn-id: http://core.svn.wordpress.org/trunk@39249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:46:32 +00:00
Sergey Biryukov b1ed607578 Text Changes: Merge and clarify some permission error strings in the admin.
See #38857.
Built from https://develop.svn.wordpress.org/trunk@39308


git-svn-id: http://core.svn.wordpress.org/trunk@39248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:38:31 +00:00
Sergey Biryukov 529e242a39 I18N: Merge two 'ERROR:' strings.
Props ramiy.
Fixes #38860.
Built from https://develop.svn.wordpress.org/trunk@39307


git-svn-id: http://core.svn.wordpress.org/trunk@39247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:09:30 +00:00
Sergey Biryukov 4afa19184a REST API: After [39302], clarify `author_ip` parameter in error message.
Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ramiy.
Fixes #38822.
Built from https://develop.svn.wordpress.org/trunk@39306


git-svn-id: http://core.svn.wordpress.org/trunk@39246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:06:30 +00:00
Sergey Biryukov 0f31b1da72 REST API: Merge two similar permission error strings in `class-wp-rest-comments-controller.php`.
We're checking if `current_user_can( 'moderate_comments' )` here, not the specific comment permissions.

See #38857.
Built from https://develop.svn.wordpress.org/trunk@39305


git-svn-id: http://core.svn.wordpress.org/trunk@39245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 00:10:31 +00:00
Sergey Biryukov 9cb0a09d1f REST API: Merge two similar permission error strings.
Props ramiy.
Fixes #38857.
Built from https://develop.svn.wordpress.org/trunk@39304


git-svn-id: http://core.svn.wordpress.org/trunk@39244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 23:53:30 +00:00
Mike Schroder e12d3813f0 Media: Allow override of PDF setup for multiple pages or DPI.
After [39187], WordPress started loading only the first page of a PDF.

This is appropriate for performance, but made it impossible to
write plugins that read other pages without overriding `load()`.

Introduces `WP_Image_Editor_Imagick->pdf_setup()`, to allow an override
to change WordPress' rendering DPI defaults or which pages are loaded.

Fixes #38832. See #38522, #31050.
Props markoheijnen, joemcgill, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@39303


git-svn-id: http://core.svn.wordpress.org/trunk@39243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 22:22:32 +00:00
Rachel Baker 0fdb955ce8 REST API: On Comment create, limit the ability to set the `author_ip` value directly.
Users without the moderate_comments capability can no longer set the `author_ip` property directly, and instead receive a `WP_Error` if they attempt to do so. Otherwise, the `author_ip property` is populated from `$_SERVER['REMOTE_ADDR']` if present and a valid IP value. Finally, fallback to 127.0.0.1 as a last resort.

Props dd32, rachelbaker, joehoyle.
Fixes #38819.
Built from https://develop.svn.wordpress.org/trunk@39302


git-svn-id: http://core.svn.wordpress.org/trunk@39242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 21:13:32 +00:00
Helen Hou-Sandí 234ae480ee Autoprefixer for [39249].
Fixes one errant value and re-aligns some existing prefixed property values so they don't get doubled when precommit/postcss is run again in the future.

props davidakennedy.
see #29158.

Built from https://develop.svn.wordpress.org/trunk@39301


git-svn-id: http://core.svn.wordpress.org/trunk@39241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 21:06:30 +00:00
David A. Kennedy b08d9893f6 Twenty Seventeen: Make all Codex links in DocBlocks use HTTPS
Props johnpgreen.

Fixes #38854.

Built from https://develop.svn.wordpress.org/trunk@39300


git-svn-id: http://core.svn.wordpress.org/trunk@39240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 20:49:31 +00:00
Ella Iseulde Van Dorpe a003a7f1bb TinyMCE: fix automatic scroll on page load.
Set focus when new content is loaded in the editor, but not when it's the initial load.

Fixes #38511.


Built from https://develop.svn.wordpress.org/trunk@39299


git-svn-id: http://core.svn.wordpress.org/trunk@39239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 20:38:31 +00:00
Joe Hoyle 0c14c16ced REST API: Clarify parameters when used in error strings.
Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ocean90, ramiy, danielbachhuber.
Fixes #38822.
Built from https://develop.svn.wordpress.org/trunk@39298


git-svn-id: http://core.svn.wordpress.org/trunk@39238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 20:20:32 +00:00
David A. Kennedy aaf3fe71dd Twenty Seventeen: Adds `background-attachment: fixed;` to devices that should support it
iOS  disables this feature under the hood, but it also distorts the images – unlike other mobile devices that don't support it. So this adds a  check for both `background-attachment: fixed` support or whether it’s an iOS device - passing it adds the class `background-fixed` which is used to add the proper styles.

It also lowers the media query so the parallax-like style is present on a wider range of screens since this bug can be better targeted and avoided. In this way, screens that aren't the offending devices aren't punished merely based on screen size.

Props joemcgill, laurelfulford, helen.

Fixes #38395.

Built from https://develop.svn.wordpress.org/trunk@39297


git-svn-id: http://core.svn.wordpress.org/trunk@39237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 20:11:30 +00:00
Joe Hoyle a38b863ae4 REST API: Change “ipv4” types to “ip” to support ipv6.
Stop presuming IP address are IPv4, instead make the type “ip” to be agnostic of IP version. This fixes requests with ipv6 addresses for comments in core.

Props dd32, schlessera, danielbachhuber.
Fixes #38818.
Built from https://develop.svn.wordpress.org/trunk@39296


git-svn-id: http://core.svn.wordpress.org/trunk@39236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 19:33:31 +00:00
Joe Hoyle 81c5b03029 REST API: Check read permissions on posts when viewing comments.
With a few tests for getting / creating comments to reflect core behaviour.

Props timmyc.
Built from https://develop.svn.wordpress.org/trunk@39295


git-svn-id: http://core.svn.wordpress.org/trunk@39235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 19:07:30 +00:00
Helen Hou-Sandí bbdf00c95c Twenty Seventeen: Rename the starter content menus to match the menu area names.
Saves strings and is more descriptive.

props davidakennedy.
see #38615.

Built from https://develop.svn.wordpress.org/trunk@39294


git-svn-id: http://core.svn.wordpress.org/trunk@39234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 19:05:29 +00:00
Rachel Baker 0f4d6f99cc REST API: Add test case for `users/me` endpoint that the `context` param defaults to `view`.
Props danielbachhuber.
See #38842.
Built from https://develop.svn.wordpress.org/trunk@39293


git-svn-id: http://core.svn.wordpress.org/trunk@39233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 18:59:30 +00:00
Rachel Baker 3f6131c2e6 REST API: Remove the `karma` property and query parameter from the Comments endpoints.
WordPress has not used the `karma` property internally for the past 8 years. There is no need to expose it in the REST API endpoints. Sites that use `karma` can include it using the `register_rest_field()` function.

Props dd32, danielbachhuber.
Fixes #38821.
Built from https://develop.svn.wordpress.org/trunk@39292


git-svn-id: http://core.svn.wordpress.org/trunk@39232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 18:53:29 +00:00
David A. Kennedy 7d96057b8b Twenty Seventeen: Ensure the use of proper image size for custom header image
The `sizes` attribute was calculated incorrectly, resulting in the browser downloading the wrong resource. This filters the attribute to correct that.

Before the filter, the `img` contained:
`sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px"`

And after:
`sizes="100vw"`

Props joemcgill, transl8or.

Fixes #38847.

Built from https://develop.svn.wordpress.org/trunk@39291


git-svn-id: http://core.svn.wordpress.org/trunk@39231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 18:43:30 +00:00
Rachel Baker 191e085fa3 REST API: On comment create, return an error if the `type` property is set to anything other than `comment`.
Of the default comment_types, only comments are expected to be created via the REST API endpoint. Comments do not have registered types the way that Posts do, so we do not have a method to accurately check permissions for arbitrary comment types.

Props dd32, boonebgorges, rachelbaker.
Fixes #38820.
Built from https://develop.svn.wordpress.org/trunk@39290


git-svn-id: http://core.svn.wordpress.org/trunk@39230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 18:37:30 +00:00
Rachel Baker ccb4c7c8b9 REST API: Allow `parent` property to be explicitly set to `0` when creating or updating a Post.
Props lucasstark, danielbachhuber.
Fixes #38852.
Built from https://develop.svn.wordpress.org/trunk@39289


git-svn-id: http://core.svn.wordpress.org/trunk@39229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 18:12:31 +00:00
Rachel Baker 735fa34d42 REST API: On comment create, return an error if the `post` parameter does not relate to a valid WP_Post object.
Return a `WP_Error` object for attempts to create a comment without an empty or invalid `post` ID.

Props dd32, jnylen0, rachelbaker.
Fixes #38816.
Built from https://develop.svn.wordpress.org/trunk@39288


git-svn-id: http://core.svn.wordpress.org/trunk@39228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 16:56:30 +00:00
Rachel Baker 10bddfac39 REST API: On comment create, fallback to the `user_agent` header value.
If a user-agent is not explicitly provided in the `author_user_agent` parameter, fallback to the `user_agent` value in the request header.

Props dd32, jnylen0, rachelbaker.
Fixes #38817.
Built from https://develop.svn.wordpress.org/trunk@39287


git-svn-id: http://core.svn.wordpress.org/trunk@39227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 16:22:33 +00:00
Helen Hou-Sandí 000cd0c68d Twenty Seventeen: Remove some extraneous function calls.
fixes #38848.

Built from https://develop.svn.wordpress.org/trunk@39286


git-svn-id: http://core.svn.wordpress.org/trunk@39226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 06:36:32 +00:00
Weston Ruter 560e93ec80 Customize: Remove obsolete edit shortcut style rules from Twenty Seventeen.
Props celloexpressions.
Fixes #38776.

Built from https://develop.svn.wordpress.org/trunk@39285


git-svn-id: http://core.svn.wordpress.org/trunk@39225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 05:22:31 +00:00
Ella Iseulde Van Dorpe 32b3a7f772 TinyMCE: remove extra space in tooltip.
This prevents wrapping and looks better, even though there seems to be some space between the other control key characters.

See #38063.


Built from https://develop.svn.wordpress.org/trunk@39284


git-svn-id: http://core.svn.wordpress.org/trunk@39224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 23:59:30 +00:00
Peter Wilson 9bc6aa1570 Taxonomy: Update `register_taxonomy` hook to use `WP_Taxonomy` object.
Casts `WP_Taxonomy` to an array for passing to the `register_taxonomy` hook. This maintains backward compatibility with the processed arguments used prior to WordPress 4.7.

Fixes #38765.

Built from https://develop.svn.wordpress.org/trunk@39283


git-svn-id: http://core.svn.wordpress.org/trunk@39223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 23:35:32 +00:00
Ella Iseulde Van Dorpe 79b3576650 TinyMCE views: fix Firefox issues.
* Set focus before rendering to prevent reload in Firefox.
* Rerender views if they are unloaded.
* Remove timeout added in [29513].
* Fix argument in wp.mce.views.render.
* Empty views on hide. Missed in #36434.

Props gitlost, azaozz, iseulde.
Fixes #38511.


Built from https://develop.svn.wordpress.org/trunk@39282


git-svn-id: http://core.svn.wordpress.org/trunk@39222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 20:32:32 +00:00
Sergey Biryukov 2fadd7a895 Docs: Use 3-digit, x.x.x style semantic versioning for `@since 4.7.0` entries.
See #37770.
Built from https://develop.svn.wordpress.org/trunk@39281


git-svn-id: http://core.svn.wordpress.org/trunk@39221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 18:28:30 +00:00
Sergey Biryukov 480501c6a8 Taxonomy: Prevent `wp_list_categories()` from producing not well-nested output if `hide_title_if_empty` is true.
Props chesio.
Fixes #38839. See #33460.
Built from https://develop.svn.wordpress.org/trunk@39280


git-svn-id: http://core.svn.wordpress.org/trunk@39220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 18:02:30 +00:00
Joe McGill 5e88248a44 Twenty Seventeen: Additional default header image optimizations.
This is a follow-up to [39248] that applies a bit more compression to
the default header image in Twenty Seventeen.

Props Presskopp, lukecavanagh.
Fixes #38793.
Built from https://develop.svn.wordpress.org/trunk@39279


git-svn-id: http://core.svn.wordpress.org/trunk@39219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 17:13:30 +00:00
Sergey Biryukov acc30b09d7 Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.
Props ramiy, SergeyBiryukov.
Fixes #38808.
Built from https://develop.svn.wordpress.org/trunk@39278


git-svn-id: http://core.svn.wordpress.org/trunk@39218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 15:53:33 +00:00
Andrea Fercia 5c86bfd201 Small coding standards cleanup of wp-custom-header.js.
Small coding standards cleanup of wp-custom-header.js after [39272].

Built from https://develop.svn.wordpress.org/trunk@39277


git-svn-id: http://core.svn.wordpress.org/trunk@39217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 09:04:31 +00:00
Weston Ruter 2cabe7aef1 Customize: Add unit tests for importing theme starter content.
Props welcher, westonruter.
See #38114, #38533, #38615.
Fixes #38540.

Built from https://develop.svn.wordpress.org/trunk@39276


git-svn-id: http://core.svn.wordpress.org/trunk@39216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 08:18:32 +00:00
Gary Pendergast 7329283f7e Database: Add support for `LIKE`-escaped tables in `::get_table_from_query()`.
The `SHOW TABLES LIKE` query can be used to search for tables that match a pattern, `wp\_123\_%`, for example. While this isn't the name of an actual table, the `wp_123_` prefix can be used by database drop-ins to direct the query correctly. This change removes the escaping and `%` modifier, to provide this usable prefix.

Props andy, pento.
Fixes #38751.


Built from https://develop.svn.wordpress.org/trunk@39275


git-svn-id: http://core.svn.wordpress.org/trunk@39215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 04:21:31 +00:00
Boone Gorges bd11f7b84a Comments: Query used to fill comment descendants should reset 'offset' and 'number' params.
Descendant queries should not inherit the 'offset' and 'number'
parameters of the parent query, or descendants will be missed.

Previously: [38497].

See #37696.
Built from https://develop.svn.wordpress.org/trunk@39274


git-svn-id: http://core.svn.wordpress.org/trunk@39214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 03:03:30 +00:00
Joe McGill 72606bed34 Twenty Seventeen: Add styles for custom header video controls.
Following [39272], this uses the `header_video_settings` filter to modify
the default video header control markup and adds theme specific styles
for the play/pause button.

Props melchoyce, laurelfulford, joemcgill, davidakennedy, bradyvercher.
Fixes #38697.
Built from https://develop.svn.wordpress.org/trunk@39273


git-svn-id: http://core.svn.wordpress.org/trunk@39213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 23:38:29 +00:00
Joe McGill 5ef714db18 Themes: Improve a11y and extendability of custom video headers.
This adds play/pause controls to video headers, along with voice
assistance, using `wp.a11y.speak`, to make custom video headers more
accessible. To make styling the play/pause button easier for themes,
CSS has been omitted from the default implementation.

This also includes a refactor of the `wp.customHeader` code to introduce
a `BaseHandler` class, which can be extended by plugins and themes to modify
or enhance the default video handlers.

Props davidakennedy, afercia, bradyvercher, joemcgill, adamsilverstein, rianrietveld.
Fixes #38678.
Built from https://develop.svn.wordpress.org/trunk@39272


git-svn-id: http://core.svn.wordpress.org/trunk@39212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 23:26:31 +00:00
Weston Ruter c2bc6df69a Customize: Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a `customize-loader` iframe.
Fixes #38833.

Built from https://develop.svn.wordpress.org/trunk@39271


git-svn-id: http://core.svn.wordpress.org/trunk@39211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 22:17:29 +00:00
Weston Ruter 4664f80711 Customize: Prevent edit shortcut buttons from being inserted into container elements in the `head` or into elements which should not get interactive children.
See #27403, #38672.
Fixes #38830.

Built from https://develop.svn.wordpress.org/trunk@39270


git-svn-id: http://core.svn.wordpress.org/trunk@39210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 20:37:30 +00:00
Dominik Schilling e4a83d2e6f Users: In `edit_user()` fall back to site's locale instead of `en_US` for invalid user locales.
See #38632, #29783.
Fixes #38798.
Built from https://develop.svn.wordpress.org/trunk@39269


git-svn-id: http://core.svn.wordpress.org/trunk@39209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 20:12:31 +00:00
Weston Ruter 7db38b916a Customize: Allow URL for Codex link in Additional CSS section to be translated.
Props odysseygate, ocean90, westonruter.
See #35395.
Fixes #38823.

Built from https://develop.svn.wordpress.org/trunk@39268


git-svn-id: http://core.svn.wordpress.org/trunk@39208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 18:42:32 +00:00
Sergey Biryukov fd2fd9e3f3 Tests: Add a missing `$message` argument for `assertEquals()` in [39265].
See #23626.
Built from https://develop.svn.wordpress.org/trunk@39267


git-svn-id: http://core.svn.wordpress.org/trunk@39207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 13:43:31 +00:00
Sergey Biryukov b92266a72b REST API: After [39252] and [39264], uppercase some more 'ID' references in translatable strings.
See #38791.
Built from https://develop.svn.wordpress.org/trunk@39266


git-svn-id: http://core.svn.wordpress.org/trunk@39206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 13:28:37 +00:00
Sergey Biryukov b20d435803 Tests: Use `assertEquals()`' native functionality for delta comparison in `test_wp_convert_bytes_to_hr()`.
See #23626.
Built from https://develop.svn.wordpress.org/trunk@39265


git-svn-id: http://core.svn.wordpress.org/trunk@39205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 13:15:31 +00:00
Sergey Biryukov ce74afdae2 REST API: Uppercase 'ID' in endpoint descriptions and error messages for consistency with other strings.
See #38791.
Built from https://develop.svn.wordpress.org/trunk@39264


git-svn-id: http://core.svn.wordpress.org/trunk@39204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 12:18:33 +00:00
Helen Hou-Sandí 2f4988c898 Post-4.7 beta 4 bump.
Built from https://develop.svn.wordpress.org/trunk@39263


git-svn-id: http://core.svn.wordpress.org/trunk@39203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 01:54:30 +00:00
Helen Hou-Sandí 19f8905c69 WordPress 4.7 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@39262


git-svn-id: http://core.svn.wordpress.org/trunk@39202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 01:35:30 +00:00
Helen Hou-Sandí 2d9ac64c9f Theme starter content: Add reference IDs for most default widgets.
Some widgets that require more configuration are not included, such as RSS and Custom Menu. Tag Cloud is also not included because fresh sites do not have any tags to display.

Also adds a search widget to a Twenty Seventeen footer widget area.

see #38615.

Built from https://develop.svn.wordpress.org/trunk@39261


git-svn-id: http://core.svn.wordpress.org/trunk@39201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 00:40:32 +00:00
Helen Hou-Sandí fd761208fc Theme starter content: Refine the content for pages.
see #38615.

Built from https://develop.svn.wordpress.org/trunk@39260


git-svn-id: http://core.svn.wordpress.org/trunk@39200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 00:29:31 +00:00
Sergey Biryukov 74c9f82ef2 REST API: Unify some more permission error messages.
Props ramiy.
Fixes #38803.
Built from https://develop.svn.wordpress.org/trunk@39259


git-svn-id: http://core.svn.wordpress.org/trunk@39199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 23:36:31 +00:00
Sergey Biryukov a7af7c89a4 Text Changes: Unify permission error messages in `wp-admin/users.php`.
Props ramiy.
Fixes #38804.
Built from https://develop.svn.wordpress.org/trunk@39258


git-svn-id: http://core.svn.wordpress.org/trunk@39198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 22:25:30 +00:00
Sergey Biryukov 07cf16f7ba REST API: Unify permission error messages.
Props ramiy.
Fixes #38803.
Built from https://develop.svn.wordpress.org/trunk@39257


git-svn-id: http://core.svn.wordpress.org/trunk@39197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 22:23:30 +00:00
Helen Hou-Sandí d4603ec9b7 Theme starter content: Add more social link items to select from.
New: Foursquare, GitHub, LinkedIn, Pinterest, and YouTube. They are also now all alphabetized.

see #38615.

Built from https://develop.svn.wordpress.org/trunk@39256


git-svn-id: http://core.svn.wordpress.org/trunk@39196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 21:20:31 +00:00
Helen Hou-Sandí 8485582c8a Theme starter content: Revamp the credits widget into an about widget.
The credits widget from the original commit was a nice test to see the date changing, but isn't really very inspirational. Also, implement it in Twenty Seventeen.

see #38615.

Built from https://develop.svn.wordpress.org/trunk@39255


git-svn-id: http://core.svn.wordpress.org/trunk@39195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 21:08:30 +00:00
Sergey Biryukov ec0043c279 I18N: Remove `<code>` tags from translatable strings in `wp-includes/class-wp-customize-manager.php`.
Props ramiy.
Fixes #38802.
Built from https://develop.svn.wordpress.org/trunk@39254


git-svn-id: http://core.svn.wordpress.org/trunk@39194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 20:54:30 +00:00
Sergey Biryukov a45e419926 Text Changes: Unify permission error message in `wp-ajax-response.js`.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@39253


git-svn-id: http://core.svn.wordpress.org/trunk@39193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 20:42:30 +00:00
Sergey Biryukov 9c2ea0b8c7 REST API: Remove two duplicate strings, use the ones we already have.
See #38791.
Built from https://develop.svn.wordpress.org/trunk@39252


git-svn-id: http://core.svn.wordpress.org/trunk@39192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 20:40:29 +00:00
Sergey Biryukov cc14606094 REST API: Unify permission error messages.
Props ramiy.
See #38791, #34521.
Built from https://develop.svn.wordpress.org/trunk@39251


git-svn-id: http://core.svn.wordpress.org/trunk@39191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 20:37:32 +00:00
Joe Hoyle d049f72459 REST API: Clean up argument and property types.
There's a couple of places where we were missing type notes for arguments, which mainly affects documentation.

Props jnylen0.
Fixes #38792.

Built from https://develop.svn.wordpress.org/trunk@39250


git-svn-id: http://core.svn.wordpress.org/trunk@39190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 18:16:30 +00:00
Helen Hou-Sandí 19bb9c2fe0 Customize: More visible focus and hover states for close and back buttons.
props celloexpressions, folletto.
fixes #29158.

Built from https://develop.svn.wordpress.org/trunk@39249


git-svn-id: http://core.svn.wordpress.org/trunk@39189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 18:11:31 +00:00
Joe McGill 984ef6288a Twenty Seventeen: Compress the default header image.
This replaces the default `header.jpg` with a compressed version.
The original was 209KB and the new version is 143KB with almost no
distinguishable visual loss.

Props Presskopp.
Fixes #38793.
Built from https://develop.svn.wordpress.org/trunk@39248


git-svn-id: http://core.svn.wordpress.org/trunk@39188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 18:01:33 +00:00
Andrea Fercia dff34d5988 Accessibility: Improve the Post Attributes meta box fields labels.
With [38951] the support for custom page templates has been extended to all post
types. By making the visible meta box titles real labels, accessibility improves
for all users and form fields have meaningful labels.

Fixes #38790.

Built from https://develop.svn.wordpress.org/trunk@39247


git-svn-id: http://core.svn.wordpress.org/trunk@39187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 16:01:30 +00:00
Joe McGill 36ac7287b0 Media: Make PDF preview sizes filterable.
This adds a new filter, `fallback_intermediate_image_sizes`, which
can be used to modify the array of image sizes created for previewing
PDFs in the media library and checks for the existence of sizes before
processing any image representations of a PDF.

Fixes #38594.
Built from https://develop.svn.wordpress.org/trunk@39246


git-svn-id: http://core.svn.wordpress.org/trunk@39186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 13:26:30 +00:00
Sergey Biryukov 65fb74561b REST API: After [39238] and [39239], move the remaining translator comments to preceding line.
See #38791.
Built from https://develop.svn.wordpress.org/trunk@39245


git-svn-id: http://core.svn.wordpress.org/trunk@39185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 13:07:33 +00:00
Dominik Schilling a800e652c6 Docs: Apply documentation standards to the new `get_available_languages` filter.
See #38788.
Built from https://develop.svn.wordpress.org/trunk@39244


git-svn-id: http://core.svn.wordpress.org/trunk@39184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 09:52:32 +00:00
Weston Ruter 011391007c Customize: Ensure edit shortcuts have same background color regardless of theme colors.
Fixes #38776.

Built from https://develop.svn.wordpress.org/trunk@39243


git-svn-id: http://core.svn.wordpress.org/trunk@39183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 09:14:31 +00:00
Weston Ruter 31d4be0293 Customize: Add `!important` `line-height` to edit shortcut buttons.
Ensure that icon inside edit shortcut is centered when theme defines default `line-height` for `button` elements.

Fixes #38787.

Built from https://develop.svn.wordpress.org/trunk@39242


git-svn-id: http://core.svn.wordpress.org/trunk@39182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 09:08:31 +00:00
Weston Ruter 8efc416f64 Customize: Allow starter content to apply in a new theme when switching from another theme containing changes.
* Ensure that starter content can apply from theme B after previewing starter content in theme A.
* Introduce new `starter_content` flag in changeset setting params which is used to capture whether a value is starter content and thus can be overridden.
* Create changeset up-front with `starter_content` flags instead of waiting for `AUTOSAVE_INTERVAL`.
* Eliminate instantiation of settings for widget instances in favor of directly calling `sanitize_widget_js_instance`. This eliminates issues with looking for widgets before they are registered.
* Ensure that non-placeholders (inline arrays instead of string references) can be supplied in starter content.
* Re-use auto-draft posts as starter content across theme switches.
* Introduce `starter_content` param for `WP_Customize_Manager::save_changeset_post()` which is `false` except when starter content is being loaded on a `fresh_site`.

See #38114.
Fixes #38541.

Built from https://develop.svn.wordpress.org/trunk@39241


git-svn-id: http://core.svn.wordpress.org/trunk@39181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 09:03:32 +00:00
Peter Wilson 11998b4169 Themes: Remove front page restriction from video header functions.
Adds a callback for determining when video headers should be displayed in themes supporting custom headers. By default, video headers are only displayed on the front page of a site.

Theme authors may set a custom callback by passing `'video-active-callback' => 'mytheme_video_active_callback'` as an argument. The default callback is `is_front_page()`.

This introduces the new function `is_header_video_active()` - returns `true` on pages that should display video headers. The return value can be filtered using the new filter of the same name.

Props flixos90, bradyvercher, peterwilsoncc, joemcgill.
Fixes #38738.

Built from https://develop.svn.wordpress.org/trunk@39240


git-svn-id: http://core.svn.wordpress.org/trunk@39180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 07:16:33 +00:00
Ryan McCue 0f5a44e093 REST API: Move translator comments to preceding line.
Inline translator comments break POT file generation.

Props dd32.
See #38791.

Built from https://develop.svn.wordpress.org/trunk@39239


git-svn-id: http://core.svn.wordpress.org/trunk@39179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 05:39:32 +00:00
Ryan McCue 705f17cea2 REST API: Add translator comments to text with placeholders.
Props dimadin.
Fixes #38791.

Built from https://develop.svn.wordpress.org/trunk@39238


git-svn-id: http://core.svn.wordpress.org/trunk@39178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 04:28:31 +00:00
Weston Ruter de0835dead Customize: Only show video header controls if previewing front page; show explanatory notice when controls are hidden.
Also include todo for the `header_video` control's `button_labels`. See #38796.

Props westonruter, joemcgill, celloexpressions.
Fixes #38778.

Built from https://develop.svn.wordpress.org/trunk@39237


git-svn-id: http://core.svn.wordpress.org/trunk@39177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 03:47:30 +00:00
Peter Wilson 21248ce3ab Posts, Post Types: Improve sanitisation of templates' post types.
Prevents post type templates ignoring post types due to invalid characters. Each entry in the `Template Post Type` comment is run through `sanitize_key()` to match the sanitisation used by `register_post_type()`.

Fixes #38766.

Built from https://develop.svn.wordpress.org/trunk@39236


git-svn-id: http://core.svn.wordpress.org/trunk@39176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 03:37:31 +00:00
Gary Pendergast fc1255a2c7 I18N: Add the `get_available_languages` filter.
Sometimes, a language file may not exist in exactly the format or location that `get_available_languages()` expects it to be in - for sites with this level of customisation, they need to be able to add their own language files to the list of those available.

Props yoavf.
Fixes #38788.


Built from https://develop.svn.wordpress.org/trunk@39235


git-svn-id: http://core.svn.wordpress.org/trunk@39175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 01:19:31 +00:00
Weston Ruter 8e6753cead Customize: Use video-specific labels for buttons in Header Video media control.
See #38172.

Built from https://develop.svn.wordpress.org/trunk@39234


git-svn-id: http://core.svn.wordpress.org/trunk@39174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 00:22:30 +00:00
Weston Ruter a69d66bac3 Customize: Adjust layout for edit shortcuts only when shown.
Add theme-specific positioning of edit shortcuts in Twenty Fourteen and Twenty Seventeen.

Props sirbrillig, sstoqnov, westonruter.
Fixes #38651.

Built from https://develop.svn.wordpress.org/trunk@39233


git-svn-id: http://core.svn.wordpress.org/trunk@39173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 00:15:30 +00:00
Tammie Lister 56723c61c6 Twenty Seventeen: Fix for mobile menu parent items requiring double tap
After further review from the accessibility team, it was determined that the menu items with sub-menus don't need the aria-haspopup attribute.

Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397


Built from https://develop.svn.wordpress.org/trunk@39232


git-svn-id: http://core.svn.wordpress.org/trunk@39172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 22:34:31 +00:00
Helen Hou-Sandí 79cabf64b1 Theme starter content: Add context to all strings.
fixes #38770.

Built from https://develop.svn.wordpress.org/trunk@39231


git-svn-id: http://core.svn.wordpress.org/trunk@39171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 21:38:32 +00:00
Dominik Schilling c3dc173799 I18N: Don't use `get_available_languages()` in `_load_textdomain_just_in_time()`.
`get_available_languages()` is only designed to work with translations for core. Using it for plugins/themes means unnecessary `strpos()` checks and incomplete results for plugins/themes whose names are beginning with `admin-` or `ms-`.

Props swissspidy, ocean90.
Fixes #38590.
Built from https://develop.svn.wordpress.org/trunk@39230


git-svn-id: http://core.svn.wordpress.org/trunk@39170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 21:07:30 +00:00
Weston Ruter 9daebf050a Customize: Maximize height of Custom CSS `textarea` without causing doubled scrollbars.
Textarea will fill vertical height of Custom CSS section for browsers that support `calc()` and when plugins don't add other controls to the section. Also run CSS autoprefixer.

Props michaelarestad, westonruter.
See #35395.
Fixes #38755.

Built from https://develop.svn.wordpress.org/trunk@39229


git-svn-id: http://core.svn.wordpress.org/trunk@39169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 19:12:30 +00:00
Weston Ruter 05a9259cc5 Customize: Improve styles for hover, focus, and active states on edit shortcuts.
Props michaelarestad.
Fixes #38758.

Built from https://develop.svn.wordpress.org/trunk@39228


git-svn-id: http://core.svn.wordpress.org/trunk@39168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 18:49:30 +00:00
Weston Ruter dfbcdae985 Customize: Use selective refresh for custom header changes when possible.
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.

Props bradyvercher, westonruter.
See #38639.
Fixes #38737.

Built from https://develop.svn.wordpress.org/trunk@39227


git-svn-id: http://core.svn.wordpress.org/trunk@39167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 18:41:32 +00:00
Tammie Lister 9ef40ced2f Twenty Fourteen: Removes video header support
Support was added to test implementation but never completed. This removes the test implementation.

Props davidakennedy
Fixes #38783

Built from https://develop.svn.wordpress.org/trunk@39226


git-svn-id: http://core.svn.wordpress.org/trunk@39166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 17:17:31 +00:00
Tammie Lister 9e110f8aed Twenty Seventeen: Resolves focused controls hidden by the top menu.
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the  nav menu.

Props afercia, davidakennedy, Fencer04
Fixes #38476


Built from https://develop.svn.wordpress.org/trunk@39225


git-svn-id: http://core.svn.wordpress.org/trunk@39165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 17:01:30 +00:00
Tammie Lister 1c2343e4ea Twenty Seventeen: Fixes custom header text color issues
Removes default header text color and updates and updates selectors.

Props laurelfulford, davidakennedy, Idealien
Fixes #38391


Built from https://develop.svn.wordpress.org/trunk@39224


git-svn-id: http://core.svn.wordpress.org/trunk@39164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 16:49:32 +00:00
Joe Hoyle a4fa8c528f REST API: Make all collection params filterable.
For developers wanting to add their own registered collection parameters, they can now use the `rest_$type_collection_params` filter. This brings consistency with the already existing `rest_$post_type_collection_params`.

Fixes #38710.
Props jnylen0.

Built from https://develop.svn.wordpress.org/trunk@39223


git-svn-id: http://core.svn.wordpress.org/trunk@39163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 16:42:31 +00:00
Joe Hoyle 5c90d9ed8e REST API: Validate and Sanitize registered meta based off the schema.
With the addition of Array support in our schema validation functions, it's now possible to use these in the meta validation and sanitization steps. Also, this increases the test coverage of using registered via meta the API significantly.

Fixes #38531.
Props rachelbaker, tharsheblows.

Built from https://develop.svn.wordpress.org/trunk@39222


git-svn-id: http://core.svn.wordpress.org/trunk@39162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 16:36:33 +00:00
David A. Kennedy b6e848e638 Twenty Seventeen: Make sure theme JavaScript follows proper coding standards
Props sstoqnov, afercia.

Fixes #38752.

Built from https://develop.svn.wordpress.org/trunk@39221


git-svn-id: http://core.svn.wordpress.org/trunk@39161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 11:41:31 +00:00
David A. Kennedy f5cdba121f Twenty Seventeen: Make custom header preview match front end in Customizer when changed
* Toggles `has-header-image` body class  in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.

Props bradyvercher.

Fixes #38627.
See #38391.

Built from https://develop.svn.wordpress.org/trunk@39220


git-svn-id: http://core.svn.wordpress.org/trunk@39160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 11:23:32 +00:00
Ryan McCue 65664731e9 REST API: Improve validation for usernames and passwords.
Also improves the slashing of user data in the REST API to avoid data loss.

Props jnylen0.
Fixes #38739.

Built from https://develop.svn.wordpress.org/trunk@39219


git-svn-id: http://core.svn.wordpress.org/trunk@39159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 07:13:31 +00:00
Weston Ruter c3f31ce550 Customize: Remove root panel description text which notes that edit shortcuts can be toggled by clicking anywhere in the preview.
Amends [39131], in which this method of toggling edit shortcuts was removed.
Props presskopp.
See #27403.

Built from https://develop.svn.wordpress.org/trunk@39218


git-svn-id: http://core.svn.wordpress.org/trunk@39158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 04:33:32 +00:00
Andrew Ozz 0c2b137a60 TinyMCE: fix black outline around `_moz_abspos`. This is added in Firefox in paragraphs inserted after a non-editable block.
See #38757.
Built from https://develop.svn.wordpress.org/trunk@39217


git-svn-id: http://core.svn.wordpress.org/trunk@39157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-14 02:34:31 +00:00
David A. Kennedy 126c7e4c72 Twenty Seventeen: Adds numbers to the table of contents in `style.css`
Props karmatosed.

Fixes #38767.

Built from https://develop.svn.wordpress.org/trunk@39216


git-svn-id: http://core.svn.wordpress.org/trunk@39156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 23:45:32 +00:00
David A. Kennedy d902f1f167 Twenty Seventeen: Fix Customizer preview display issues in IE9
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.

Props laurelfulford.

Fixes #38722.

Built from https://develop.svn.wordpress.org/trunk@39215


git-svn-id: http://core.svn.wordpress.org/trunk@39155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 23:31:31 +00:00
Weston Ruter fd166077ad Customize: Prevent the "Hide Controls" button label from overrunning the device preview buttons.
Adds translation context for "Hide Controls" strings so translators can supply shorter strings where space is constrained. Adds styles to fade-out long the "Hide Controls" label where it would run into the device preview buttons.

Props westonruter, ocean90.
Fixes #38762.

Built from https://develop.svn.wordpress.org/trunk@39214


git-svn-id: http://core.svn.wordpress.org/trunk@39154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 19:00:35 +00:00
Helen Hou-Sandí 81f9cc26a1 Media: Clearly indicate that PDF thumbnails are just document previews.
This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.

Built from https://develop.svn.wordpress.org/trunk@39213


git-svn-id: http://core.svn.wordpress.org/trunk@39153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 16:39:31 +00:00
Dion Hulse 35a0240fb2 WP_HTTP: Map internal Requests hooks to WordPress actions.
This change introduces a `requests-{$hook}` action which can be used to hook into Requests hooks, and restores the `http_api_curl` action.

Props rmccue.
Fixes #37843.

Built from https://develop.svn.wordpress.org/trunk@39212


git-svn-id: http://core.svn.wordpress.org/trunk@39152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 10:36:29 +00:00
Dion Hulse dd0411161d Updates: Allow background updates to update multiple plugins/themes in the same request.
Due to the `clear_update_cache` parameter not being respected, update caches were being cleared incorrectly which prevented multiple plugins to be updated at the same time in background updates - failing with a `fs_unavailable` error message.

Fixes #38024

Built from https://develop.svn.wordpress.org/trunk@39211


git-svn-id: http://core.svn.wordpress.org/trunk@39151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 09:53:32 +00:00
Dion Hulse 5f7bbe66d7 Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.

Built from https://develop.svn.wordpress.org/trunk@39210


git-svn-id: http://core.svn.wordpress.org/trunk@39150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 07:42:31 +00:00
Weston Ruter e5b82c250f Customize: Improve extensibility of Custom CSS.
* Add `customize_value_custom_css` filter to `WP_Customize_Custom_CSS::value()` method.
* Introduce `customize_update_custom_css_post_content_args` filter in `WP_Customize_Custom_CSS::update()` method.
* Make clear that `wp_get_custom_css()` and `wp_get_custom_css` filter are specifically for obtaining the value to render/display. Eliminate use of `wp_get_custom_css()` when getting the setting value. Use the underlying `post_value` directly when `is_previewed`.
* Move anonymous functions handing JS previewing for `custom_logo`, `custom_css`, and `background` into named functions on the `wp.customize.settingPreviewHandlers` to allow plugins to override/extend preview logic.
* Update `_custom_background_cb` to always print a `style` tag wen in the customizer preview, and update background preview logic to replace existing style element instead of appending a new style to the head so that background changes don't unexpectedly override any Custom CSS in the preview's stylesheet cascade.

Props westonruter, georgestephanis.
See #22058.
Fixes #38672.

Built from https://develop.svn.wordpress.org/trunk@39209


git-svn-id: http://core.svn.wordpress.org/trunk@39149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 02:43:29 +00:00
David A. Kennedy fe01b8b926 Twenty Seventeen: Fix typos in font family translator comment
Props dimadin.

Fixes #38740.

Built from https://develop.svn.wordpress.org/trunk@39208


git-svn-id: http://core.svn.wordpress.org/trunk@39148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 01:30:30 +00:00
David A. Kennedy 1b5ffcd3f0 Twenty Seventeen: Update screen-reader-text to reset word-wrap
This resets the property to normal where needed and, to be safe, uses `!important`. It avoids screen readers reading out words ignoring spaces between words in some cases.

Props afercia.

Fixes #38764.

Built from https://develop.svn.wordpress.org/trunk@39207


git-svn-id: http://core.svn.wordpress.org/trunk@39147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 00:26:30 +00:00
Tammie Lister 41cf4e1656 Twenty Seventeen: Keyboard navigation on Safari 10 fix
This resolves the weird behaviour on Safari 10 has some weird behaviour.

Props rianrietveld, swisspidy, afercia, sami.keijonen, arush, davidakennedy
Fixes #38387


Built from https://develop.svn.wordpress.org/trunk@39206


git-svn-id: http://core.svn.wordpress.org/trunk@39146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-12 23:39:34 +00:00
Joe McGill 956818f5eb Customize: Rename "Header Visuals" to "Header Media".
"Header Visuals" is a bit vague since the title/tagline are arguably
also “header visuals”. "Header Media" is more descriptive and is
consistent with how we refer to images/videos throughout core.

Props bradyvercher.
Fixes #38756.
Built from https://develop.svn.wordpress.org/trunk@39205


git-svn-id: http://core.svn.wordpress.org/trunk@39145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 23:24:30 +00:00
Andrew Ozz 5e8f67540e TinyMCE: fix freezing the editor when wpautop is disabled and a paragraph starts with a lot of white space characters.
Fixes #38294.
Built from https://develop.svn.wordpress.org/trunk@39204


git-svn-id: http://core.svn.wordpress.org/trunk@39144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 23:07:29 +00:00
Dominik Schilling 788761c601 Multisite: Rename the `$user` parameter to `$user_login` in `wpmu_signup_blog_notification()` and `wpmu_signup_user_notification()`.
[38961] added a `$user = get_user_by( 'login', $user );` call which was overriding the `$user` string variable for the login name. The change to `$user_login` makes this clear.

Props johnjamesjacoby.
Fixes #38763.
Built from https://develop.svn.wordpress.org/trunk@39203


git-svn-id: http://core.svn.wordpress.org/trunk@39143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 22:20:33 +00:00
Weston Ruter 2185609a33 Customize: Remove left-margin guard from edit shortcuts and adjust for small screen sizes.
Removes the `.customize-partial-edit-shortcut-left-margin` class which was not effective on some themes, created a worse experience for other themes, and which did not recalculate when the preview was reflowed or resized. Now some small-width media queries are added to handle common cases while more dramatic issues can be handled by the theme. Also renames `Partial.positionEditShortcut()`to `Partial.addEditShortcutToPlacement()` which is a more accurate description of its function.

Props sirbrillig, sstoqnov.
See #38651, #27403.

Built from https://develop.svn.wordpress.org/trunk@39202


git-svn-id: http://core.svn.wordpress.org/trunk@39142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 09:47:43 +00:00
Helen Hou-Sandí a7596d8f30 Post-4.7 beta 3 bump.
Built from https://develop.svn.wordpress.org/trunk@39201


git-svn-id: http://core.svn.wordpress.org/trunk@39141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 03:32:31 +00:00
Helen Hou-Sandí d25e781b78 WordPress 4.7 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@39200


git-svn-id: http://core.svn.wordpress.org/trunk@39140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-11 03:19:32 +00:00
Weston Ruter 2b81ceddf9 Customize: Prevent previewer from appearing to freeze when refreshing too fast.
Fixes race condition issue where a previous iframe fails to get destroyed, leaving a iframe pending loading persistently shown.

Props nikeo, westonruter.
Fixes #38728.

Built from https://develop.svn.wordpress.org/trunk@39199


git-svn-id: http://core.svn.wordpress.org/trunk@39139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 22:43:32 +00:00
Helen Hou-Sandí 99f0a4de76 Twenty Seventeen: Better RTL positioning for scroll down arrow.
props adamsilverstein.
fixes #38706.

Built from https://develop.svn.wordpress.org/trunk@39198


git-svn-id: http://core.svn.wordpress.org/trunk@39138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 13:54:30 +00:00
Helen Hou-Sandí 1b2e28c575 Customize: Ensure RTL version of `customize-preview.css` is loaded.
props adamsilverstein.
see #27403, #38706.

Built from https://develop.svn.wordpress.org/trunk@39197


git-svn-id: http://core.svn.wordpress.org/trunk@39137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 13:53:32 +00:00
Joe Hoyle f325af9caa REST API: Allow updating a comment without the content present.
For all resources in the REST API, sending partial updates is supported. This fixes needing to _always_ specify comment content.

Props jnylen.
Fixes #38720.

Built from https://develop.svn.wordpress.org/trunk@39196


git-svn-id: http://core.svn.wordpress.org/trunk@39136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 03:35:30 +00:00
Aaron Jorbin 0e2dd4d85f Build/Test tools: Add "apply" as alias for "patch"
The command applies a patch, so apply makes just as much sense. Additionally, this is to help translate dev tools into Australian.

Props netweb.
Fixes #38724.

Built from https://develop.svn.wordpress.org/trunk@39195


git-svn-id: http://core.svn.wordpress.org/trunk@39135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 03:22:31 +00:00
Helen Hou-Sandí f94285d68c Customize: Make "Add New Page" buttons less intrusive.
They now better match the existing add functionality from the category metabox and are better separated from the surrounding inputs. All hail `.button-link`.

fixes #38164. see #35126.

Built from https://develop.svn.wordpress.org/trunk@39194


git-svn-id: http://core.svn.wordpress.org/trunk@39134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:56:30 +00:00
Joe Hoyle 215e5351cc REST API: Fix test for unfiltered_html under multisite.
See #38726.

Built from https://develop.svn.wordpress.org/trunk@39193


git-svn-id: http://core.svn.wordpress.org/trunk@39133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:48:30 +00:00
Joe Hoyle 3138878aa5 REST API: Use wp_slash rather than addslashes.
See #38726.
Props dd32.

Built from https://develop.svn.wordpress.org/trunk@39192


git-svn-id: http://core.svn.wordpress.org/trunk@39132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:39:30 +00:00
Joe Hoyle 67da42825e REST API: Add `rest_base` to response objects of `wp/v2/taxonomies` and `wp/v2/types`
Though we have the `_links.collection` available, having this value can be useful to know post type / taxonomy urls if you need to build them another way.

Props youknowriad, jnylen0.
Fixes #38607.

Built from https://develop.svn.wordpress.org/trunk@39191


git-svn-id: http://core.svn.wordpress.org/trunk@39131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:21:30 +00:00
Joe Hoyle e66d2478ee REST API: `unfiltered_html` and slashing: terms.
Follow-up to #38609 and #38704; handle slashes correctly for taxonomy terms.

Props westonruter, jnylen0.
Fixes #38726, see #38609.

Built from https://develop.svn.wordpress.org/trunk@39190


git-svn-id: http://core.svn.wordpress.org/trunk@39130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:10:30 +00:00
John Blackbourn 7e11873b43 Build/Test Tools: Re-use a bunch of fixtures in test classes for user and XMLRPC tests.
Shaves a couple of seconds off of the tests.

See #30017, #38716

Built from https://develop.svn.wordpress.org/trunk@39189


git-svn-id: http://core.svn.wordpress.org/trunk@39129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 01:54:33 +00:00
John Blackbourn b9033ad6a1 Docs: Improve the documentation for parameters which accept `OBJECT`, `ARRAY_A`, and `ARRAY_N` as parameters.
See #37770

Built from https://develop.svn.wordpress.org/trunk@39188


git-svn-id: http://core.svn.wordpress.org/trunk@39128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 23:00:32 +00:00
Mike Schroder 5cdb46c16a Media: Only load first PDF page for thumbnails.
To improve performance, directly load the first page of uploaded PDFs
to reduce the total clock time necessary to generate thumbnails.

Props dglingren, lukecavanagh, helen, johnbillion, mikeschroder.
See #38522.
Built from https://develop.svn.wordpress.org/trunk@39187


git-svn-id: http://core.svn.wordpress.org/trunk@39127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 21:05:30 +00:00
Weston Ruter 3b008dc2a0 Customize: Eliminate use of flexbox for edit shortcuts.
Props sirbrillig.
See #27403.
Fixes #38660.

Built from https://develop.svn.wordpress.org/trunk@39186


git-svn-id: http://core.svn.wordpress.org/trunk@39126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 20:55:33 +00:00
Weston Ruter ad80e08c17 Customize: Split out `custom_css` query logic from `wp_get_custom_css()` into a re-usable `wp_get_custom_css_post()` function to also be used when updating.
Props georgestephanis, westonruter.
See #38672, #35395.

Built from https://develop.svn.wordpress.org/trunk@39185


git-svn-id: http://core.svn.wordpress.org/trunk@39125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 20:43:30 +00:00
Tammie Lister 8e3e901559 Twenty Seventeen fix for Travis Error
Removed semi-colo on line 46

Props swissspidy

Built from https://develop.svn.wordpress.org/trunk@39184


git-svn-id: http://core.svn.wordpress.org/trunk@39124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 16:55:31 +00:00
Tammie Lister 6c435f5afb Twenty Seventeen: Fixes focused controls hidden by top menu.
When a page is scrolled, the top nav menu became fixed. This resolves that.

Props afercia, Fencer04, davidakennedy
Fixes #38476


Built from https://develop.svn.wordpress.org/trunk@39183


git-svn-id: http://core.svn.wordpress.org/trunk@39123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 16:13:34 +00:00
Ryan McCue a2bbbddb9e REST API: Include template in all post type schemas.
[38951] added templates to all post types, but didn't add them to the schema.

Props swissspidy.
Fixes #38698.

Built from https://develop.svn.wordpress.org/trunk@39182


git-svn-id: http://core.svn.wordpress.org/trunk@39122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 07:12:32 +00:00
Weston Ruter 5b676af8ff Customize: Store modifying user ID with setting change written into changeset and restore current user when setting is being saved.
Restoring the current user context when saving a setting ensures filters apply as expected, such as Kses. When a user is not associated with a given setting change, continue to override `capability` to be `exist` when saving. Skip overwriting setting values in a changeset that have not changed, facilitating concurrent editing and amending a changeset by a user with fewer privileges.

See #30937.
Fixes #38705.

Built from https://develop.svn.wordpress.org/trunk@39181


git-svn-id: http://core.svn.wordpress.org/trunk@39121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 07:03:30 +00:00
Weston Ruter 5b633c548e Customize: Prevent `post_content` and `post_name` from being modified when trashing `customize_changeset` posts.
See #30937.
Fixes #38719.

Built from https://develop.svn.wordpress.org/trunk@39180


git-svn-id: http://core.svn.wordpress.org/trunk@39120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 05:45:32 +00:00
Ryan McCue 3a449ea543 Roles/Capabilities: Add meta-caps for comment, term, and user meta.
Additionally, use these meta-caps in the REST API endpoints.

Previously, register_meta()'s auth_callback had no effect for non-post meta. This introduces `{add,edit,delete}_{comment,term,user}_meta` meta-caps to match the existing post meta capabilities. These are currently only used in the REST API.

Props tharsheblows, boonebgorges.
Fixes #38303, fixes #38412.

Built from https://develop.svn.wordpress.org/trunk@39179


git-svn-id: http://core.svn.wordpress.org/trunk@39119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 03:42:30 +00:00
Weston Ruter 054d2c2565 Customize: Rename remaining instances `unfiltered_css` meta capability to `edit_css` in unit tests.
Amends [39175].
See #38672, #35395.

Built from https://develop.svn.wordpress.org/trunk@39178


git-svn-id: http://core.svn.wordpress.org/trunk@39118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:48:30 +00:00
Ryan McCue 4060c68f85 REST API: Fire correct hooks when creating users on multiste.
`add_user_to_blog()` is now called, ensuring the correct hooks are called, along with setting the primary blog and clearing relevant caches.

Props jeremyfelt.
Fixes #38526.

Built from https://develop.svn.wordpress.org/trunk@39177


git-svn-id: http://core.svn.wordpress.org/trunk@39117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:35:30 +00:00
David A. Kennedy fa4cbf29f1 Twenty Seventeen: Fix badly pixelated images on iOS devices
The CSS property `background-attachment: fixed` is disabled in some mobile browsers for performance reasons. So here, the fix increases the breakpoint where the `background-attachment: fixed` is applied to the front page images. Doing this removes the fixed backgrounds and the issue from all smaller screens, but the downside is that it also removes the fixed backgrounds from smaller laptops. It's also possible future devices could fall into this breakpoint, but this seems to be the most practical solution.

Props laurelfulford.

Fixes #38395.

Built from https://develop.svn.wordpress.org/trunk@39176


git-svn-id: http://core.svn.wordpress.org/trunk@39116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:13:00 +00:00
Weston Ruter 08712b4baa Customize: Rename `unfiltered_css` meta capability to `edit_css`; add `revisions` support to `custom_css` post type.
Props lukecavanagh, georgestephanis, westonruter.
See #38672, #35395.

Built from https://develop.svn.wordpress.org/trunk@39175


git-svn-id: http://core.svn.wordpress.org/trunk@39115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:12:30 +00:00
John Blackbourn cf786e592c Build/Test Tools: Utilise `assertWPError()` and `assertNotWPError()` in more places.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39174


git-svn-id: http://core.svn.wordpress.org/trunk@39114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 00:02:30 +00:00
John Blackbourn 11d46ae3a8 Build/Test Tools: Utilise `assertFileExists()` and `assertFileNotExists()` in more places.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39173


git-svn-id: http://core.svn.wordpress.org/trunk@39113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:50:33 +00:00
John Blackbourn 6941992403 Themes: Re-use fixtures in the `wp_get_document_title()` tests.
See #38716

Built from https://develop.svn.wordpress.org/trunk@39172


git-svn-id: http://core.svn.wordpress.org/trunk@39112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:32:33 +00:00
Aaron Jorbin 8ee453a8b3 Cleanup .orig file accidentally added.
Introduced in [39165].

Unprops joemcgill.


Built from https://develop.svn.wordpress.org/trunk@39171


git-svn-id: http://core.svn.wordpress.org/trunk@39111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:30:34 +00:00
Aaron Jorbin 8ee1fe8cea Posts, Post Types: Fix themes tests broken in [39168]
[39168] introduced a new theme to the tests, but it wasn't taken into account in Tests_Theme_ThemeDir::test_theme_list.

See #38696.


Built from https://develop.svn.wordpress.org/trunk@39170


git-svn-id: http://core.svn.wordpress.org/trunk@39110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:23:31 +00:00
Pascal Birchler 548ac82b06 I18N: Add ability to change user's locale back to site's locale.
Previously there was no way to remove the user locale setting again, even though that might be desirable.

This adds a new 'Site Default' option to the user-specific language setting by introducing a new `show_site_locale_default` argument to `wp_dropdown_languages()`.

Props ocean90.
See #29783.
Fixes #38632.
Built from https://develop.svn.wordpress.org/trunk@39169


git-svn-id: http://core.svn.wordpress.org/trunk@39109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:01:31 +00:00
Pascal Birchler 2f7f8d526b Posts, Post Types: Fix post type templates with child themes.
After [38951] added support for post type templates beyond pages, this fixes an issue where an empty meta box would be shown when using child themes.

Fixes #38696.
Built from https://develop.svn.wordpress.org/trunk@39168


git-svn-id: http://core.svn.wordpress.org/trunk@39108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 22:41:30 +00:00
Pascal Birchler d8cbc61020 Date/Time: Improve `date_i18n()` timezone tests.
This uses a timezone without DST for the tests covering `date_i18n()`.

Fixes #37910.
Built from https://develop.svn.wordpress.org/trunk@39167


git-svn-id: http://core.svn.wordpress.org/trunk@39107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 22:32:30 +00:00
Drew Jaynes 7eeab12b1a Docs: Notate the incoming `$theme` object members for `WP_Theme_Install_List_Table::single_row()` as a proper hash notation.
h/t coffee2code.
See #37770.

Built from https://develop.svn.wordpress.org/trunk@39166


git-svn-id: http://core.svn.wordpress.org/trunk@39106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 20:16:31 +00:00
Joe McGill 5704743a78 Themes: Remove Vimeo logic from `header_video_settings()`.
Following [39148] and [39128], this removes the mime type logic for
Vimeo URLs from `get_header_video_settings()` and removes remaining
Vimeo reference from `_validate_external_header_video()` docs.

Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39165


git-svn-id: http://core.svn.wordpress.org/trunk@39105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 19:20:32 +00:00
David A. Kennedy 35035be00b Twenty Seventeen: Improve SVG markup, providing more options customization
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028.
* Add whitespace around `<use>`, from #38387.

Props sami.keijonen, swissspidy, laurelfulford.

Fixes #38659.
See #38387.

Built from https://develop.svn.wordpress.org/trunk@39164


git-svn-id: http://core.svn.wordpress.org/trunk@39104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 18:01:33 +00:00
Dominik Schilling 45d5d6ddb5 Customize: Autoprefixer for [39149].
See #38667.
Built from https://develop.svn.wordpress.org/trunk@39163


git-svn-id: http://core.svn.wordpress.org/trunk@39103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 15:25:32 +00:00
Joe Hoyle c15065dddf REST API: Remove get_allowed_query_vars() now `filter` is gone.
Now all public query vars are not supoprted via `?filter` in the REST API, we can remove the get_allowed_query_vars() method and filter. To provide developers with a good altnerative to `filter`, the `"rest_{$this->post_type}_collection_params"` filter has been added.

Props rmccue, rachelbacker, danielbachhuber.
Fixes #38629.

Built from https://develop.svn.wordpress.org/trunk@39162


git-svn-id: http://core.svn.wordpress.org/trunk@39102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 14:08:32 +00:00
Joe Hoyle 8de95582e2 REST API: Remove rest_get_post filter and `get_post` abstraction.
This filter was originally introduced in https://github.com/WP-API/WP-API/pull/2535 to support Customizer Changesets (née Transactions). This is a super broad filter and doesn't really fit with the design of the API, nor is it (arguably) the right level to do this.

Props rmccue.
Fixes #38701.

Built from https://develop.svn.wordpress.org/trunk@39161


git-svn-id: http://core.svn.wordpress.org/trunk@39101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 13:09:33 +00:00
Ryan McCue f8d6cb3260 REST API: Remove more emoji from tests.
More from [39156].

See #38609.

Built from https://develop.svn.wordpress.org/trunk@39160


git-svn-id: http://core.svn.wordpress.org/trunk@39100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 07:39:33 +00:00
Ryan McCue e592f3b1eb REST API: Embiggen the test email address.
We no longer want a@b.c to be valid, so let's make it a@b.co instead.

Props dd32.
See #38506.

Built from https://develop.svn.wordpress.org/trunk@39159


git-svn-id: http://core.svn.wordpress.org/trunk@39099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:46:31 +00:00
Ryan McCue d6a5c68516 REST API: Require 6 characters for comment email addresses.
The regular comments API requires 6 characters rather than 3, so we need to match this.

Props mangeshp, dd32.
Fixes #38506.

Built from https://develop.svn.wordpress.org/trunk@39158


git-svn-id: http://core.svn.wordpress.org/trunk@39098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:42:32 +00:00
Ryan McCue caabc52753 REST API: Respect unfiltered_html for HTML comment fields.
Same as [39155], but for comments, natch.

Props jnylen0.
Fixes #38704, see #38609.

Built from https://develop.svn.wordpress.org/trunk@39157


git-svn-id: http://core.svn.wordpress.org/trunk@39097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:36:31 +00:00
Ryan McCue 1239980fad REST API: Remove ship emoji from slashing tests.
Introduced in [39155], but not necessary for the slashing tests. These fail on 5.3, which encodes the emoji as HTML entities.

Props dd32.
See #38609.

Built from https://develop.svn.wordpress.org/trunk@39156


git-svn-id: http://core.svn.wordpress.org/trunk@39096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:26:30 +00:00
Ryan McCue f1975b18ea REST API: Respect unfiltered_html for HTML post fields.
This necessitates a change to our slashing code as well. Ah slashing, the cause of, and solution to, all of life's problems.

Props jnylen0.
Fixes #38609.

Built from https://develop.svn.wordpress.org/trunk@39155


git-svn-id: http://core.svn.wordpress.org/trunk@39095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 05:55:32 +00:00
Ryan McCue 8760c9a91d REST API: Change attachment caption & description to objects.
Just like excerpt and content for regular posts, these have transformations applied that can make the content significantly different from the raw value.

Props jnylen0.
Fixes #38679.

Built from https://develop.svn.wordpress.org/trunk@39154


git-svn-id: http://core.svn.wordpress.org/trunk@39094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 04:29:32 +00:00
Weston Ruter 25a052bac7 Customize: Fix loading of theme screenshots in themes section and remove erroneous borders on hover.
Fixes regressions introduced in [38648].

Props delawski, mckernanin.
See #34391.
Fixes #38222.

Built from https://develop.svn.wordpress.org/trunk@39153


git-svn-id: http://core.svn.wordpress.org/trunk@39093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:47:30 +00:00
David A. Kennedy 1d8d59a21a Twenty Seventeen: Fix post navigation font legibility issue
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.

Props laurelfulford.

Fixes #38670.

Built from https://develop.svn.wordpress.org/trunk@39152


git-svn-id: http://core.svn.wordpress.org/trunk@39092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:07:34 +00:00
Weston Ruter 1363813c6b Customize: Move Custom CSS control `placeholder` help text to setting `default` value.
The `WP_Customize_Custom_CSS_Setting::value()` method now returns the `default` if `wp_get_custom_css()` returns empty.

Props westonruter, afercia, helen.
See #35395.
Fixes #38685.

Built from https://develop.svn.wordpress.org/trunk@39151


git-svn-id: http://core.svn.wordpress.org/trunk@39091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 18:13:34 +00:00
Ella Iseulde Van Dorpe c1ff206bac TinyMCE: wptextpattern: Fix inline patterns.
* Allow spaces inside inline pattern text, unless the delimiter stands alone.
* Add more unit tests.
* Add more inline docs.

Part props azaozz.
Fixes #37693.


Built from https://develop.svn.wordpress.org/trunk@39150


git-svn-id: http://core.svn.wordpress.org/trunk@39090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 23:38:33 +00:00
Weston Ruter 5ea1e6fd80 Customize: Allow tab characters in custom CSS input.
Pressing `Esc` followed by `Tab` allows for tabbing to the next element.

Props afercia, coffee2code, westonruter.
See #35395.
Fixes #38667.

Built from https://develop.svn.wordpress.org/trunk@39149


git-svn-id: http://core.svn.wordpress.org/trunk@39089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 19:09:33 +00:00
Joe McGill 68b4181985 Customize: Remove Vimeo validation for external videos.
Following [39128], this removes the validation logic for Vimeo URLs from
`_validate_external_header_video()` since WP does not support the
display of videos from Vimeo by default.

This also includes a change to using `esc_url_raw()` instead of `esc_url()`
on the URL value to avoid unexpected behavior from the inclusion of HTML
entities.

Props peterwilsoncc, westonruter.
Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39148


git-svn-id: http://core.svn.wordpress.org/trunk@39088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 18:32:35 +00:00
Andrea Fercia 7b3445c312 Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
See #37513.

Built from https://develop.svn.wordpress.org/trunk@39147


git-svn-id: http://core.svn.wordpress.org/trunk@39087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 16:28:33 +00:00
David A. Kennedy 4c5f80c839 Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.

The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.

Props joemcgill.

Fixes #38390.

Built from https://develop.svn.wordpress.org/trunk@39146


git-svn-id: http://core.svn.wordpress.org/trunk@39086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 00:45:31 +00:00
Weston Ruter 9f288ff12a Customize: For Header Image, ensure "Previously uploaded" and "Suggested" headings are hidden when lists are empty.
Fixes regression introduced with the addition of control notifications in [37476]. The container element for notifications is injected after the `.customize-control-title` element if the `.customize-control-notifications-container` element does not already exist in the control's template. Also adds missing margin between current image and uploaded images.

Props bradyvercher.
See #34893.
Fixes #38561.

Built from https://develop.svn.wordpress.org/trunk@39145


git-svn-id: http://core.svn.wordpress.org/trunk@39085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 23:15:33 +00:00
Weston Ruter 8f9f75598b Customize: Remove edit shortcut toggle button from preview since visibility is now linked with pane visibility.
Amends [39131].
Props westonruter, sirbrillig.
See #27403.
Fixes #38668.

Built from https://develop.svn.wordpress.org/trunk@39144


git-svn-id: http://core.svn.wordpress.org/trunk@39084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 20:54:30 +00:00
Helen Hou-Sandí ec82f421ad Post-4.7 beta 2 bump.
Built from https://develop.svn.wordpress.org/trunk@39143


git-svn-id: http://core.svn.wordpress.org/trunk@39083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:41:30 +00:00
Helen Hou-Sandí 2bbf7b5034 WordPress 4.7 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@39142


git-svn-id: http://core.svn.wordpress.org/trunk@39082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:19:26 +00:00
Aaron Jorbin 53c8c68365 Administration: Ensure collapse menu is usable with a keyboard
Currently, the "Collapse menu" item is not focusable and keyboard users can't collapse/expand the admin menu. This aims to fix it so that screen readers no longer announce it as a clickable but it remains unfocusable and thus unusable. So it's now a button.

Quoting joedolson at WordCamp Chicago 2014:
"If it's supposed to act like a button, it should be a button."

Also includes a grunt:precommit run that picked up some postcss changes to src/wp-includes/css/customize-preview.css

Fixes #29958.
Props ajercia, ipm-frommen for an iterative patch, valendesigns for an iterative patch, GaryJ for feedback, joedolson for feedback, helen for feedback



Built from https://develop.svn.wordpress.org/trunk@39141


git-svn-id: http://core.svn.wordpress.org/trunk@39081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:57 +00:00
Helen Hou-Sandí 1281a28382 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.

Built from https://develop.svn.wordpress.org/trunk@39140


git-svn-id: http://core.svn.wordpress.org/trunk@39080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:26 +00:00
John Blackbourn fa5b5199e8 Editor: Correct the docblock for the `wp_default_editor` filter.
Props dimadin
See #38327

Built from https://develop.svn.wordpress.org/trunk@39139


git-svn-id: http://core.svn.wordpress.org/trunk@39079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:56 +00:00
Weston Ruter 8ec767c21f Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.
Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.

Built from https://develop.svn.wordpress.org/trunk@39138


git-svn-id: http://core.svn.wordpress.org/trunk@39078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:26 +00:00
Weston Ruter 1a3e930383 Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.

Built from https://develop.svn.wordpress.org/trunk@39137


git-svn-id: http://core.svn.wordpress.org/trunk@39077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:57 +00:00
Weston Ruter f4c3b8352e Customize: Use `button` with `svg` as click target instead of `:before` content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.

Built from https://develop.svn.wordpress.org/trunk@39136


git-svn-id: http://core.svn.wordpress.org/trunk@39076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:26 +00:00
David A. Kennedy 495b2d835f Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.

Built from https://develop.svn.wordpress.org/trunk@39135


git-svn-id: http://core.svn.wordpress.org/trunk@39075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:55 +00:00
Dominik Schilling abada1fbdc I18N: In `get_user_locale()` ensure that `$user_id` isn't a falsy value before calling `get_user_by()`.
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39134


git-svn-id: http://core.svn.wordpress.org/trunk@39074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:26 +00:00
Weston Ruter 6ccb29bee0 Customize: No-op `edit_post_link()` when in customizer preview.
Edit links can be restored in plugins by removing the `__return_empty_string` function from the `get_edit_post_link` filter at the `customize_preview_init` action.

Fixes #38648.

Built from https://develop.svn.wordpress.org/trunk@39133


git-svn-id: http://core.svn.wordpress.org/trunk@39073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:56 +00:00
Weston Ruter e4b4f3efe3 Customize: For toggling visibility of the controls pane, rename "Collapse (Sidebar)" to "Hide Controls" and "Expand Sidebar" to "Expand Controls".
Fixes #38647.

Built from https://develop.svn.wordpress.org/trunk@39132


git-svn-id: http://core.svn.wordpress.org/trunk@39072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:27 +00:00
Weston Ruter 726cd04bac Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.

Built from https://develop.svn.wordpress.org/trunk@39131


git-svn-id: http://core.svn.wordpress.org/trunk@39071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:57 +00:00
Dominik Schilling 727e859b3e Load: Remove unused global imports in `wp_load_translations_early()`.
See #38535.
Built from https://develop.svn.wordpress.org/trunk@39130


git-svn-id: http://core.svn.wordpress.org/trunk@39070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:27 +00:00
David A. Kennedy 0a3d034962 Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.

Built from https://develop.svn.wordpress.org/trunk@39129


git-svn-id: http://core.svn.wordpress.org/trunk@39069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:57 +00:00
Joe McGill 50b2c6cf2c Customize: Remove Vimeo reference from description for external header videos.
Vimeo's API requires a Pro account to display videos as background videos
(i.e., without player controls), thus we shouldn't support Vimeo
URLs by default in custom header videos. This removes the reference of Vimeo
from the control description in the customizer.

Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39128


git-svn-id: http://core.svn.wordpress.org/trunk@39068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:28 +00:00
Pascal Birchler b1ee6c64d9 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

This re-introduces [39069], but now with additional tests and a `function_exists( 'wp_get_current_user' )` check in `get_user_locale()` in case it gets used early.

Props swissspidy, ocean90.
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39127


git-svn-id: http://core.svn.wordpress.org/trunk@39067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:59 +00:00
Rachel Baker 5564716a07 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.
Built from https://develop.svn.wordpress.org/trunk@39126


git-svn-id: http://core.svn.wordpress.org/trunk@39066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:29 +00:00
Pascal Birchler 557496ce83 I18N: Move `load_textdomain()` tests to separate file.
See #38485.
Built from https://develop.svn.wordpress.org/trunk@39125


git-svn-id: http://core.svn.wordpress.org/trunk@39065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:00 +00:00
David A. Kennedy 6c82930a5d Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.

Built from https://develop.svn.wordpress.org/trunk@39124


git-svn-id: http://core.svn.wordpress.org/trunk@39064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:31 +00:00
Joe McGill 8fa49e77bd Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder
strings in place of the template directory URI, which WordPress transforms
in several places by running the value of
`get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`.

This fixes a few places where WordPress skipped the `sprintf()` step and
referenced the `get_theme_support()` value directly.

Props bradyvercher for initial patch.
See #38557.
Built from https://develop.svn.wordpress.org/trunk@39123


git-svn-id: http://core.svn.wordpress.org/trunk@39063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:01 +00:00
Dominik Schilling 89cab4e197 I18N: Show "Settings saved." in the correct language after switching the site language.
This simplifies the logic by comparing `get_user_locale()` before and after an settings update.

Props swissspidy, ocean90.
See #29783, #29281.
Fixes #38482.
Built from https://develop.svn.wordpress.org/trunk@39122


git-svn-id: http://core.svn.wordpress.org/trunk@39062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:31 +00:00
Joe McGill 60db5df85f Themes: Improve reliability of URL used in `get_header_image_tag()`.
`get_header_image_tag()` relies on the data returned by `get_custom_header()`
to build the attributes for the header `<img>` element. However,
`get_custom_header()` relies on data from the `header_image_data` theme
mod rather than the `header_image` theme mod that `get_header_image()` uses.
This can create inconsistencies when no header image is set, but a theme
supports a default header image.

This fixes the issue by making `get_custom_image_tag()` rely on the URL
returned by `get_header_image()` instead.

Props bradyvercher.
Fixes #38633.
Built from https://develop.svn.wordpress.org/trunk@39121


git-svn-id: http://core.svn.wordpress.org/trunk@39061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:02 +00:00
Weston Ruter ea5f4179a7 Customize: Prevent collapsing expanded panel/section/control when `Esc` is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.

Built from https://develop.svn.wordpress.org/trunk@39120


git-svn-id: http://core.svn.wordpress.org/trunk@39060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:08:33 +00:00
Aaron Jorbin 32be6f7bb7 Bump grunt-contrib-uglify from 1.0.1 to 2.0.0
Sets `screwIE8` to false as it is now enabled by default

Files Changed:
build/wp-admin/js/customize-nav-menus.min.js
build/wp-admin/js/customize-widgets.min.js
build/wp-includes/js/customize-loader.min.js

Changelog:
2016-07-19   v2.0.0   Update uglify-js to v2.7.0. screwIE8 is enabled by default.
2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix beautify when passed as an object. Fix docs about report values.

See #38199.


Built from https://develop.svn.wordpress.org/trunk@39117


git-svn-id: http://core.svn.wordpress.org/trunk@39059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:40:34 +00:00
Aaron Jorbin 21ddb65fcc Bump grunt-contrib-cssmin from v1.0.0 to v1.0.2
Changelog:
2016-08-31   v1.0.2   Fix issues for node 6.
2016-03-16   v1.0.1   Downgrade maxmin to support Node.js 0.10.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39116


git-svn-id: http://core.svn.wordpress.org/trunk@39058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:32:32 +00:00
Aaron Jorbin c8bf15c41c Bump grunt-contrib-compress from 1.1.0 to 1.3.0
Changelog:
2016-05-24   v1.3.0   Update to Archiver 1.0. Fix node 6 support.
2016-03-24   v1.2.0   Dependency update.

See #38199

Built from https://develop.svn.wordpress.org/trunk@39115


git-svn-id: http://core.svn.wordpress.org/trunk@39057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:28:32 +00:00
Aaron Jorbin 8ed617ad9f Bump autoprefixer from 6.5.0 to 6.5.1
Changelog
Fix selectors with :-- prefix support.

See #38199.

M    package.json

Built from https://develop.svn.wordpress.org/trunk@39114


git-svn-id: http://core.svn.wordpress.org/trunk@39056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:18:36 +00:00
Aaron Jorbin ffdac5599b Bump grunt-contrib-qunit from 1.1.0 to 1.2.0
Changlog:
2016-04-14   v1.2.0   Add support for filtering running modules using command line (--modules) Removed 'grunt.warn' output from error.onError handler, onus now on end user binding to event. Update docs.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39113


git-svn-id: http://core.svn.wordpress.org/trunk@39055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:14:44 +00:00
Weston Ruter 985a1f6a97 Customize: Prevent syncing unmodified settings from controls into preview to guard against triggering an infinite reload due to selective refresh fallback behavior.
If a value is sanitized in PHP and differs from the JS value in the pane, a `change` event for the setting is triggered upon refresh. This should be avoided since the value just came from the server as being sanitized. This also fixes periodic issue where selective refresh happens immediately after a full refresh.

Fixes #37032.

Built from https://develop.svn.wordpress.org/trunk@39112


git-svn-id: http://core.svn.wordpress.org/trunk@39054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:07:32 +00:00
Ryan McCue 721cf281a3 REST API: Only provide JSON error code on PHP 5.3+.
json_last_error() was only added to PHP 5.3.0, so we can't provide the information for older versions.

See #38547.

Built from https://develop.svn.wordpress.org/trunk@39111


git-svn-id: http://core.svn.wordpress.org/trunk@39053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:57:30 +00:00
Aaron Jorbin 63ba4592e1 Bump grunt-sass from 1.1.0 to 1.2.1
diff: https://github.com/sindresorhus/grunt-sass/compare/v1.1.0...v1.2.1

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39110


git-svn-id: http://core.svn.wordpress.org/trunk@39052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:55:52 +00:00
Joe Hoyle 6b08485cfa REST API: Return error when JSON decoding fails.
If you send a request to the REST API with invalid JSON in body than it will now return a error. This assists developers if they accidentally send invalid JSON and wonder why their data appears to be ignored.

Props rmccue.
Fixes #38547.

Built from https://develop.svn.wordpress.org/trunk@39109


git-svn-id: http://core.svn.wordpress.org/trunk@39051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:05:36 +00:00
Rachel Baker 8c9f4f812a REST API: Return a `WP_Error` when a user does not have permission to create or update a post with the provided terms.
Add the 'assign_term' check for post create and update.

Props boonebgorges, johnbillion.
Fixes #38505.
Built from https://develop.svn.wordpress.org/trunk@39108


git-svn-id: http://core.svn.wordpress.org/trunk@39050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 03:16:30 +00:00
Joe McGill 37318fe73f Media: Sanity check array value in `wp_prepare_attachment_for_js()`.
This adds a sanity check to the return value of the `image_downsize` filter
in `wp_prepare_attachment_for_js()` to avoid undefined offest notices.

Props justinbusa for initial patch.
Fixes 34437.
Built from https://develop.svn.wordpress.org/trunk@39107


git-svn-id: http://core.svn.wordpress.org/trunk@39049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:23:29 +00:00
Joe Hoyle d544c6ddd0 REST API: Switch to stable version of JSON Schema.
Props danielbachhuber.
Fixes #38635.

Built from https://develop.svn.wordpress.org/trunk@39106


git-svn-id: http://core.svn.wordpress.org/trunk@39048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:22:29 +00:00
Rachel Baker dcb12c35cf REST API: Clean-up our validation callbacks and add missing array `items` properties in our endpoint schemas.
Props joehoyle, jnylen0.
Fixes #38617.
Built from https://develop.svn.wordpress.org/trunk@39105


git-svn-id: http://core.svn.wordpress.org/trunk@39047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:18:29 +00:00
Joe Hoyle 901c4ed17a REST API: Support querying for multiple post statuses.
Multiple post statuses can be specified by the usual CSV or array-propper format.

Props jnylen0, kadamwhite, websupporter.
Fixes #38420.

Built from https://develop.svn.wordpress.org/trunk@39104


git-svn-id: http://core.svn.wordpress.org/trunk@39046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:46:29 +00:00
Rachel Baker 676ae9fc2b REST API: Use the `items` attribute for the taxonomies `types` schema property for proper sanitization/validation.
Props danielbachhuber, joehoyle.
Fixes #38631.
Built from https://develop.svn.wordpress.org/trunk@39103


git-svn-id: http://core.svn.wordpress.org/trunk@39045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:26:28 +00:00
Joe McGill 89a70eb859 Themes: Remove jQuery dependency from wp-custom-header.js.
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.

This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.

Props adamsilverstein, joemcgill.
Fixes #38550.
Built from https://develop.svn.wordpress.org/trunk@39102


git-svn-id: http://core.svn.wordpress.org/trunk@39044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:21:28 +00:00
Rachel Baker 94ab2f9b16 REST API: Return an error when the length of a comment field is too long.
Introduces `wp_check_comment_data_max_lengths()` which allows both the REST API comments endpoints and `wp_handle_comment_submission()` to check the length of the comment content, author name, author url, and author email fields against their respective database columns.

Props rachelbaker, mangeshp, salcode, pento.
Fixes #38477.
Built from https://develop.svn.wordpress.org/trunk@39101


git-svn-id: http://core.svn.wordpress.org/trunk@39043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:12:31 +00:00
Weston Ruter c0b41d8fee Customize: Prevent PHP warning in applying widget starter content on fresh installs.
Fixes PHP warning triggered by calling `max()` on `$widget_numbers` when there are no widget instances of the type yet. Also makes sure that widget instances start at 2 instead of 1.

See #38114.

Built from https://develop.svn.wordpress.org/trunk@39100


git-svn-id: http://core.svn.wordpress.org/trunk@39042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 00:00:32 +00:00
Pascal Birchler ceeb8ddb46 Plugins: Improve Ajax search of installed plugins.
Removes the highlight from the current filter when performing an Ajax search and adds it back when clearing the search input.

Fixes #37657.
Built from https://develop.svn.wordpress.org/trunk@39099


git-svn-id: http://core.svn.wordpress.org/trunk@39041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:47:30 +00:00
Helen Hou-Sandí 6485e5e3cf Menus: Use a label of "Display location" for individual nav menu settings.
While "Menu/Theme locations" was descriptive of what the choices listed were, in the context of editing an individual nav menu it is more descriptive to use a setting label that tells you what it is you are affecting for that nav menu, which is where it will be displayed. Technically multiple locations can be chosen, but in practice that appears to be rare enough that we can avoid an awkward "location(s)" type string.

props Fencer04 for the initial patch.
fixes #38525.

Built from https://develop.svn.wordpress.org/trunk@39098


git-svn-id: http://core.svn.wordpress.org/trunk@39040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:11:31 +00:00
Joe Hoyle 5666292dda REST API: Include `taxonomies` as an attribute of post types.
Add the taxonomies for a post type to the `/wp/v2/types` endpoint, so clients know which taxonomies are available for which post types.

Props danielbachhuber.
Fixes #38438, #38631.

Built from https://develop.svn.wordpress.org/trunk@39097


git-svn-id: http://core.svn.wordpress.org/trunk@39039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:51:30 +00:00
Joe Hoyle 37858faf96 REST API: Add en_US to the locales enum.
Props ocean90.
Fixes #38528. 

Built from https://develop.svn.wordpress.org/trunk@39096


git-svn-id: http://core.svn.wordpress.org/trunk@39038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:21:32 +00:00
Dominik Schilling 9bc3830845 Query: Add tests for `WP_Query::is_single()` and `get_body_class()` with attachments.
See [39052]
See #38225.
Built from https://develop.svn.wordpress.org/trunk@39095


git-svn-id: http://core.svn.wordpress.org/trunk@39037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:23:28 +00:00
Tammie Lister 40dc499cda Twenty Seventeen: Unifies the labels for front page sections
Front page sesctions # Content were labelled in Customizer Theme Options but the preview called it Panel # placeholder. This unifies that.

Props Clorith, ahortin, celloexpressions, davidakennedy
Fixes #38567


Built from https://develop.svn.wordpress.org/trunk@39094


git-svn-id: http://core.svn.wordpress.org/trunk@39036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:09:32 +00:00
Ryan McCue 34cf5d8934 REST API: Allow querying for multiple `slug` values.
Props jnylen0, rachelbaker.
Fixes #38579.

Built from https://develop.svn.wordpress.org/trunk@39093


git-svn-id: http://core.svn.wordpress.org/trunk@39035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 07:14:29 +00:00
Ryan McCue 624def0ec3 REST API: Add update and delete endpoints to /users/me
Now that /users/me is a standalone resource, it should have all the standard endpoints for a resource.

Props pento.
Fixes #38521 (hopefully).

Built from https://develop.svn.wordpress.org/trunk@39092


git-svn-id: http://core.svn.wordpress.org/trunk@39034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:53:32 +00:00
Ryan McCue 3fef086ede REST API: Set default sanitize callback if type is set.
Props joehoyle, ChopinBach, jnylen0.
Fixes #38593.

Built from https://develop.svn.wordpress.org/trunk@39091


git-svn-id: http://core.svn.wordpress.org/trunk@39033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:28:29 +00:00
Ryan McCue 862724274e REST API: Add locale to user resource.
Props ocean90, joehoyle.
Fixes #38528.

Built from https://develop.svn.wordpress.org/trunk@39090


git-svn-id: http://core.svn.wordpress.org/trunk@39032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:24:29 +00:00
Ryan McCue a911bf7e2c REST API: Avoid default sanitization for polymorphic params.
Some parameters (`title`, `content`, etc) are objects in the output, but allow objects or strings to be sent in updates for a more ergonomic interface. This is pretty weird behaviour, so the default sanitisation doesn't handle this. We instead handle this ourselves in the preparation.

Props joehoyle, rachelbaker.
Fixes #38529.

Built from https://develop.svn.wordpress.org/trunk@39089


git-svn-id: http://core.svn.wordpress.org/trunk@39031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:02:29 +00:00
Gary Pendergast 6f13b8291d Roles: Fix a PHP error introduced in [39082].
The now deprecated `WP_Roles::reinit()` method was trying to call `__deprecated_function()`, instead of `_deprecated_function()`.

See 23016.


Built from https://develop.svn.wordpress.org/trunk@39088


git-svn-id: http://core.svn.wordpress.org/trunk@39030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:55:30 +00:00
Ryan McCue d7bdd72510 REST API: Change method of merging parameters.
`array_merge()` incorrectly reindexes numeric parameters, causing things like `{"123": true}` to be "dropped".

Props sswells, joehoyle.
Fixes #38306.

Built from https://develop.svn.wordpress.org/trunk@39087


git-svn-id: http://core.svn.wordpress.org/trunk@39029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:53:31 +00:00
Helen Hou-Sandí dab566d973 Mail: Set a better error code when triggering `wp_mail_failed`.
This error code is now... wait for it... `wp_mail_failed`. Previously, this would have been the originating PHPMailer error code, which could be `0`, which would then fail (pass?) the `empty()` check in the `WP_Error` constructor, thereby rendering the error object fairly useless. The PHPMailer error code is now located within the `WP_Error` data.

props Kau-Boy, stephenharris.
fixes #35598.

Built from https://develop.svn.wordpress.org/trunk@39086


git-svn-id: http://core.svn.wordpress.org/trunk@39028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 04:27:34 +00:00
Ryan McCue ba039f7546 REST API: Remove the Location redirect for the /users/me endpoint.
This is a re-commit of [38980], which was reverted in [38990].

Props youknowriad, jnylen0, pento.
Fixes #38521.

Built from https://develop.svn.wordpress.org/trunk@39085


git-svn-id: http://core.svn.wordpress.org/trunk@39027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 03:44:30 +00:00
Ryan McCue 08ea66490b REST API: Only expose formats supported by the current theme.
While it's valid to save any format to the database, and WordPress is totally fine with that, we should only include the formats specified by the theme in the schema.

Props danielbachhuber.
Fixes #38610.

Built from https://develop.svn.wordpress.org/trunk@39084


git-svn-id: http://core.svn.wordpress.org/trunk@39026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 03:37:32 +00:00
Gary Pendergast 933d5cf733 Docs: Add the parameter name for the `wp_roles_init` action.
[39082] missed adding the name of the parameter to the docs of the `wp_roles_init` action.

Props johnbillion for the catch.
See #23016.


Built from https://develop.svn.wordpress.org/trunk@39083


git-svn-id: http://core.svn.wordpress.org/trunk@39025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 00:57:31 +00:00
Gary Pendergast e79fa03329 Roles/Capabilities: Add a new `wp_roles_init` filter.
Historically, it's been difficult to extend user roles, but reasonable to work around by waiting until after `init` has fired, to add custom roles and capabilities. With the addition of Locale Switching, Core now potentially loads roles before `init` has fired, leaving a window where custom roles and capabilities are not handled.

The new filter allows plugins to add their own custom roles whenever they're initialised (on page load, or when switching sites, for example), so that they can always be obeyed.

`WP_Roles` has also been tidied up a little bit, to remove duplicate code.

Props johnjamesjacoby, pento.
Fixes #23016.


Built from https://develop.svn.wordpress.org/trunk@39082


git-svn-id: http://core.svn.wordpress.org/trunk@39024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 00:31:32 +00:00
David A. Kennedy 4b3a9de5b5 Twenty Seventeen: Fix `supportsInlineSVG()` being unnecessarily called twice
* Also, fix spacing inconsistency in comment.

Props tywayne.

Fixes #38556.

Built from https://develop.svn.wordpress.org/trunk@39081


git-svn-id: http://core.svn.wordpress.org/trunk@39023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 21:24:30 +00:00
Tammie Lister 9cf5aa4381 Twenty Seventeen: Sticky icon fix to stop appearing in regular post flow
The sticky icon was appearing in posts it shouldn't have, not just when stuck. This fixes that.

Props laurelfulford, mageshp, davidakennedy
Fixes #38534


Built from https://develop.svn.wordpress.org/trunk@39080


git-svn-id: http://core.svn.wordpress.org/trunk@39022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:56:30 +00:00
Tammie Lister 2b611c2b1d Twenty Seventeen: Fixes ul inside ol being wrongly ordered.
Now the listing displays correctly.

Props tg29359, Soean, laurelfulford, davidakennedy
Fixes #38515


Built from https://develop.svn.wordpress.org/trunk@39079


git-svn-id: http://core.svn.wordpress.org/trunk@39021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:53:30 +00:00
David A. Kennedy 9510f68efa Twenty Seventeen: Update page layout setting for all use cases
* Makes sure the page layout setting also applies to pages, and is not completely hidden from them when a sidebar widget is present. Pages do not have a sidebar, so that was incorrect.
* Updates description in Customizer for brevity and accuracy.
* Applies setting to archive pages as well.
* Updates CSS to reflect changes.

Props celloexpressions, laurelfulford.

Fixes #38538.

Built from https://develop.svn.wordpress.org/trunk@39078


git-svn-id: http://core.svn.wordpress.org/trunk@39020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:40:31 +00:00
Ella Iseulde Van Dorpe feb8ccf3d6 TinyMCE: wptextpattern: Fix undo shortcut for inline patterns
Fixes #37092.


Built from https://develop.svn.wordpress.org/trunk@39077


git-svn-id: http://core.svn.wordpress.org/trunk@39019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:34:32 +00:00
Helen Hou-Sandí 2d07c3196e Only set `fresh_site` during an actual fresh install.
props westonruter.
fixes #38533.

Built from https://develop.svn.wordpress.org/trunk@39076


git-svn-id: http://core.svn.wordpress.org/trunk@39018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:16:31 +00:00
Ella Iseulde Van Dorpe 84c108db02 TinyMCE: wptextpattern: Handle unconverted inline patterns
Make sure the right text is matched when it already contains characters of the pattern.
Adds two more unit tests.

Fixes #37693.


Built from https://develop.svn.wordpress.org/trunk@39075


git-svn-id: http://core.svn.wordpress.org/trunk@39017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:06:36 +00:00
John Blackbourn 5c7aa3c5b8 Editor: Correct the description of the parameter passed to the `wp_default_editor` filter.
Props goto10
Fixes #38327

Built from https://develop.svn.wordpress.org/trunk@39074


git-svn-id: http://core.svn.wordpress.org/trunk@39016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:56:30 +00:00
David A. Kennedy 906eb80953 Twenty Seventeen: Remove unnecessary l10n variables
* Relies on header skip link instead of l10n variables in JavaScript.
* Fixes issue where scroll down arrow appeared next to the navigation on the front page with no header image or video. It now only appears with a big header.

Props enodekciw, laurelfulford.

Fixes #38502.

Built from https://develop.svn.wordpress.org/trunk@39073


git-svn-id: http://core.svn.wordpress.org/trunk@39015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:00:32 +00:00
David A. Kennedy 3711c0664d Twenty Seventeen: Replace remaining Genericons with Font Awesome icons
* Replaces: icon-pinned with icon-thumb-tack
* Replaces: icon-next with icon-arrow-right
* Replaces: icon-previous with icon-arrow-left
* Replaces: icon-expand with icon-angle-down
* Removes: Path, Polldaddy

Props sami.keijonen, melchoyce, laurelfulford.

Fixes #38488.

Built from https://develop.svn.wordpress.org/trunk@39072


git-svn-id: http://core.svn.wordpress.org/trunk@39014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 17:26:32 +00:00
Jeremy Felt 04f376e0aa Multisite: Use `get_network()` in `WP_UnitTest_Factory_For_Network`.
`wp_get_network()` was deprecated in 4.6.

Props johnjamesjacoby.
Fixes #38602.

Built from https://develop.svn.wordpress.org/trunk@39071


git-svn-id: http://core.svn.wordpress.org/trunk@39013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 16:52:33 +00:00
John Blackbourn 766ff15532 I18N: Revert [39069] as it needs some more work.
See #38485

Built from https://develop.svn.wordpress.org/trunk@39070


git-svn-id: http://core.svn.wordpress.org/trunk@39012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 16:07:32 +00:00
Pascal Birchler 8bdd37fc58 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39069


git-svn-id: http://core.svn.wordpress.org/trunk@39011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 09:24:29 +00:00
Pascal Birchler 8df80ae3ee I18N: Show available timezones in the user's locale on the settings screen.
Adds a `$locale` parameter to `wp_timezone_choice()` to only reload translations when necessary.

Props yale01.
See #38485.
Built from https://develop.svn.wordpress.org/trunk@39068


git-svn-id: http://core.svn.wordpress.org/trunk@39010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 09:16:31 +00:00
Pascal Birchler d7d8768ffd I18N: Remove unused `$wpdb` global from `get_locale()` after [39005].
Originally added in [38976], but reverted soon after.

Props johnjamesjacoby.
Fixes #38601.
Built from https://develop.svn.wordpress.org/trunk@39067


git-svn-id: http://core.svn.wordpress.org/trunk@39009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 07:38:31 +00:00
Aaron Jorbin 1aae56f53a Update link in register_meta about 4.6 changes
The blog post, while originally canonical, was later updated to include additional changes. The ticket includes all the changes and alot of rational for why things changed.

Props Mista-Flo, DrewAPicture, morganestes.
Fixes #38254.


Built from https://develop.svn.wordpress.org/trunk@39066


git-svn-id: http://core.svn.wordpress.org/trunk@39008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 06:54:34 +00:00
Dion Hulse 69c9d9222e Themes: Update the unit tests to handle [39064] and #31550.
`test_default_theme_in_default_theme_list()` was always being skipped after #31550, this causes it to once again check that the unit tests are up to date and include the latest default theme.
`test_default_themes_have_textdomain()` didn't play happy when a default theme wasn't installed on a site.

See #31550, #29925, #38551.

Built from https://develop.svn.wordpress.org/trunk@39065


git-svn-id: http://core.svn.wordpress.org/trunk@39007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 03:14:32 +00:00
Dion Hulse 70b1d2071b Upgrade: Install new themes upon upgrade again.
This partially reverts [35738], which has shown to provide a bad user experience for users seeking to experiment with TwentySeventeen.

This will result in TwentySixteen being installed in addition to TwentySeventeen.

See #38551.

Built from https://develop.svn.wordpress.org/trunk@39064


git-svn-id: http://core.svn.wordpress.org/trunk@39006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 01:24:35 +00:00
John Blackbourn 0ff0dcc7de Plugins: Correct the `since` docs for the various `plugin_action_links` filters.
Props tfrommen, SergeyBiryukov

Built from https://develop.svn.wordpress.org/trunk@39063


git-svn-id: http://core.svn.wordpress.org/trunk@39005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:38:47 +00:00
John Blackbourn babd79fb36 Posts, Post Types: Prevent users from being able to delete a protected meta field from a post.
Previously a user could remove a protected meta field by using their browser developer tools to alter the form field properties in the Custom Fields meta box, given that they know the ID of the protected meta field. This change prevents this by preventing any change to a protected meta field, including changing its key.

Props ajoah, johnbillion, peterwilsoncc
Fixes #38293

Built from https://develop.svn.wordpress.org/trunk@39062


git-svn-id: http://core.svn.wordpress.org/trunk@39004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 19:30:32 +00:00
Joe Hoyle 6ee8f33660 REST API: Sanitize arrays being sent as CSVs.
In #38586 the ability to parse arrays as csv was introduced, however it didn't add any support for validating csv arrays. This adds such sanitization, and also a good amount of unit tests for all sanitization baed off schema.

See #38586.

Built from https://develop.svn.wordpress.org/trunk@39061


git-svn-id: http://core.svn.wordpress.org/trunk@39003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 17:08:31 +00:00
Weston Ruter 1c45ae618c Customize: Ensure state query params persist in preview through calls to `history.pushState()` & `history.replaceState()`.
Allow history to be manipulated before DOM ready by sourcing state params from the current URL instead of from the `wp.customize.settings` object, since they will be the same anyway. This fixes a JS error since `wp.customize.settings` is not defined before DOM ready.

Amends [38810].
See #30937.
Fixes #38592.

Built from https://develop.svn.wordpress.org/trunk@39060


git-svn-id: http://core.svn.wordpress.org/trunk@39002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 16:42:30 +00:00
Andrea Fercia 4356a28b52 Administration: remove a leftover check from get_submit_button.
Props sstoqnov.
Fixes #34891.

Built from https://develop.svn.wordpress.org/trunk@39059


git-svn-id: http://core.svn.wordpress.org/trunk@39001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 16:39:32 +00:00
Joe Hoyle f1591eccca REST API: Add support for "integer" type for meta and options
Previously Settings only supported "number" which meant it was possible to push floats to things like posts_per_page. This means now developers can also specify `type => ineger` in meta nad settings resgration.

Props flixos90.
Fixes #38393.

Built from https://develop.svn.wordpress.org/trunk@39058


git-svn-id: http://core.svn.wordpress.org/trunk@39000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 16:07:31 +00:00
Boone Gorges 1dd88e334b Taxonomy: Remove redundant 'get_terms_args' filter call from `WP_Term_Query`.
Introduced in [37572]. The correct 'get_terms_args' filter call is in
`WP_Term_Query::get_terms()`.

Props Tkama.
Fixes #38589.
Built from https://develop.svn.wordpress.org/trunk@39057


git-svn-id: http://core.svn.wordpress.org/trunk@38999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 15:47:33 +00:00
Gary Pendergast 03e34ab461 REST API: Allow a CSV list of user roles to be passed to `/users`.
After [39048], this changes explicitly parses the list of user roles as slugs, and adds tests.

Props jnylen0.
Fixes #38557.


Built from https://develop.svn.wordpress.org/trunk@39056


git-svn-id: http://core.svn.wordpress.org/trunk@38998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 11:11:29 +00:00
Gary Pendergast 9862543913 REST API: Allow a CSV list of term IDs to be passed to `/posts`.
[39048] added CSV support to array types, this change explicitly parses term lists as IDs, and adds tests.

Props timmydcrawford, pento.
Fixes #38553.


Built from https://develop.svn.wordpress.org/trunk@39055


git-svn-id: http://core.svn.wordpress.org/trunk@38997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 11:06:31 +00:00
Drew Jaynes 33b8bb3cf3 Docs: Clarify descriptions for `home_url()` and `get_home_url()` on the true effect of the `$scheme` parameter.
Part props thomaswm.
Props stevenlinx.
Fixes #36468.

Built from https://develop.svn.wordpress.org/trunk@39054


git-svn-id: http://core.svn.wordpress.org/trunk@38996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 07:06:32 +00:00
Drew Jaynes 3a02481d9e Docs: Fix an incorrect pseudo-parameter referenced in the hook doc for the `widget_tag_cloud_args` filter.
Props backermann.
Fixes #37654.

Built from https://develop.svn.wordpress.org/trunk@39053


git-svn-id: http://core.svn.wordpress.org/trunk@38995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:40:49 +00:00
Drew Jaynes 568838bebd Docs: Update the DocBlock description for `WP_Query::is_single()` to mention that it works for any post types excluding pages.
Props ryankienstra.
Fixes #38225.

Built from https://develop.svn.wordpress.org/trunk@39052


git-svn-id: http://core.svn.wordpress.org/trunk@38994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:34:34 +00:00
Drew Jaynes 5f4497f0af Docs: Fix multiple trivial typos throughout a variety of core files.
Props ottok.
Fixes #38489.

Built from https://develop.svn.wordpress.org/trunk@39051


git-svn-id: http://core.svn.wordpress.org/trunk@38993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:28:32 +00:00
Peter Wilson c7691ceb36 Themes: Exit `wp-custom-header.js` early in browsers wihout modern events.
Adds a check for `window.addEventListener` support before attempting to use it. In browsers without support, the file is exited early to avoid throwing a JavaScript error.

Fixes #38585.

Built from https://develop.svn.wordpress.org/trunk@39050


git-svn-id: http://core.svn.wordpress.org/trunk@38992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:17:29 +00:00
Drew Jaynes 9635867540 Docs: The `query_vars` filter used in the REST posts controller should be notated as a duplicate rather than a new hook.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39049


git-svn-id: http://core.svn.wordpress.org/trunk@38991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 05:50:29 +00:00
Gary Pendergast 54b378e411 REST API: Allow parameters defined as `array` to be sent as CSVs.
This allows parameters that are often handled as CSVs to be properly parsed.

Fixes #38586.


Built from https://develop.svn.wordpress.org/trunk@39048


git-svn-id: http://core.svn.wordpress.org/trunk@38990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 05:45:32 +00:00
Ryan McCue 4dab905dba REST API: Support password on non-post post types.
The password field was incorrectly only added to "post" post types, but is supported for all post types in the Dashboard UI.

Props jnylen0.
Fixes #38582.

Built from https://develop.svn.wordpress.org/trunk@39047


git-svn-id: http://core.svn.wordpress.org/trunk@38989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 03:53:32 +00:00
Gary Pendergast 6c1e98d1fb REST API: Add support for arrays in schema validation and sanitization.
By allowing more fine-grained validation and sanitisation of endpoint args, we can ensure the correct data is being passed to endpoints.

This can easily be extended to support new data types, such as CSV fields or objects.

Props joehoyle, rachelbaker, pento.
Fixes #38531.


Built from https://develop.svn.wordpress.org/trunk@39046


git-svn-id: http://core.svn.wordpress.org/trunk@38988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 01:48:41 +00:00
John Blackbourn 8c811f8f90 XML-RPC: Correctly handle empty and duplicate comments.
This prevents `wp_die()` being sent in response to an XML-RPC call that attempts to submit a duplicate comment, and correctly returns an error in response to an attempt to submit an empty comment.

Props markoheijnen, websupporter.
Fixes #14452, #38466.
See #36901

Built from https://develop.svn.wordpress.org/trunk@39045


git-svn-id: http://core.svn.wordpress.org/trunk@38987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 01:27:31 +00:00
Gary Pendergast dbc4b87b7f REST API: Allow Content-Type on CORS requests.
This allows `POST` requests with a wider variety of `Content-Type' headers - `Content-Type: application/json`, for example.

Props jnylen0.
Fixes #37994.


Built from https://develop.svn.wordpress.org/trunk@39044


git-svn-id: http://core.svn.wordpress.org/trunk@38986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 00:34:33 +00:00
Rachel Baker b7e6c43c64 REST API: Correctly test the roles parameter when creating a user in `WP_Test_REST_Users_Controller`.
Props jnylen0.
Fixes #38575.
Built from https://develop.svn.wordpress.org/trunk@39043


git-svn-id: http://core.svn.wordpress.org/trunk@38985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 00:28:29 +00:00
Gary Pendergast 69539eb2a7 REST API: Add `PATCH` to CORS allowed methods.
Editable resources in the REST API accept the `PATCH` method, but the CORS headers don't mention it.

Props jnylen0.
Fixes #38546.


Built from https://develop.svn.wordpress.org/trunk@39042


git-svn-id: http://core.svn.wordpress.org/trunk@38984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 00:19:30 +00:00
Rachel Baker d15f7b5f44 REST API: Delete temporary files during teardown of `WP_Test_REST_Attachments_Controller`.
Props jnylen0.
Fixes #38574.
Built from https://develop.svn.wordpress.org/trunk@39041


git-svn-id: http://core.svn.wordpress.org/trunk@38983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 23:32:35 +00:00
Dominik Schilling ba9b3cf6a6 I18N: Don't use `get_user_option()` for retrieving user's language.
`get_user_option()` checks for both option types, site and network. Since `locale` is only a network option we can directly access the field via `WP_User`s magic getter.

Props johnjamesjacoby.
Fixes #38578.
Built from https://develop.svn.wordpress.org/trunk@39040


git-svn-id: http://core.svn.wordpress.org/trunk@38982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 22:26:31 +00:00
Dominik Schilling cf571b12c1 I18N: Use correct value for the `for` attribute of the user language setting label.
Props johnjamesjacoby.
Fixes #38576.
Built from https://develop.svn.wordpress.org/trunk@39039


git-svn-id: http://core.svn.wordpress.org/trunk@38981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 21:58:38 +00:00
Weston Ruter 015cb27b87 Customize: Prevent auto-draft post/page stubs from being saved with empty slugs or published with non-unique slugs.
* Allow `WP_Customize_Nav_Menus::insert_auto_draft_post()` to take full post array to pass to `wp_insert_post()`, except for `post_status`. Require `post_title`. 
* Ensure empty `post_name` gets explicitly set to slugified `post_title`.
* Explicitly allow only `post_type` and `post_title` params in `WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()`.
* Use `wp_update_post()` instead of `wp_publish_post()` to ensure unique slugs are assigned to published auto-draft posts.
* Re-use `WP_Customize_Nav_Menus::insert_auto_draft_post()` when inserting stubs from starter content.
 
See #38114, #38013, #34923.
Fixes #38539.

Built from https://develop.svn.wordpress.org/trunk@39038


git-svn-id: http://core.svn.wordpress.org/trunk@38980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 20:21:33 +00:00
Drew Jaynes 0181e937c5 Docs: Add a slightly less ambiguous list of return types for `rest_ensure_response()`.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39037


git-svn-id: http://core.svn.wordpress.org/trunk@38979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:53:29 +00:00
Drew Jaynes 993b3a5c6e Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Users_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39036


git-svn-id: http://core.svn.wordpress.org/trunk@38978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:52:30 +00:00
John Blackbourn 5b0d11791f Role/Capability: Introduce capability tests for promoting, removing, and deleting users, and capability tests for editing comments.
Also introduces a shared fixture for a super admin user.

See #38236

Built from https://develop.svn.wordpress.org/trunk@39035


git-svn-id: http://core.svn.wordpress.org/trunk@38977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:31:33 +00:00
Drew Jaynes b8f14e00ef Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_User_Meta_Fields` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39034


git-svn-id: http://core.svn.wordpress.org/trunk@38976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:28:30 +00:00
Drew Jaynes 90c17ccbf1 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Terms_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39033


git-svn-id: http://core.svn.wordpress.org/trunk@38975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:21:30 +00:00
Drew Jaynes b71e62b9eb Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Term_Meta_Fields` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39032


git-svn-id: http://core.svn.wordpress.org/trunk@38974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:09:32 +00:00
Drew Jaynes 7d7d0c8599 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Taxonomies_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39031


git-svn-id: http://core.svn.wordpress.org/trunk@38973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:07:33 +00:00
Drew Jaynes 5dfa0c4cee Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Settings_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39030


git-svn-id: http://core.svn.wordpress.org/trunk@38972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 18:01:30 +00:00
Drew Jaynes 2452f69485 REST: Fix some errant `else if` conditions and add a few missing periods on inline comments.
Props mrahmadawais.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39029


git-svn-id: http://core.svn.wordpress.org/trunk@38971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 17:54:30 +00:00
Drew Jaynes 596ee8bc9d Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Revisions_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39028


git-svn-id: http://core.svn.wordpress.org/trunk@38970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 17:50:29 +00:00
Drew Jaynes 1ef0a5514e REST: Fix a yoda condition in `WP_REST_Request::get_parameter_order()` and add a missing period for an inline comment in `WP_REST_Request::from_url().
Props mrahmadawais.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39027


git-svn-id: http://core.svn.wordpress.org/trunk@38969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 17:42:45 +00:00
Drew Jaynes e84b257852 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Posts_Controller` class.
Props Soean, mrahmadawais, flixos90, DrewAPicture.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39026


git-svn-id: http://core.svn.wordpress.org/trunk@38968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 17:37:35 +00:00
Drew Jaynes 7d488bd2b1 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Post_Types_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39025


git-svn-id: http://core.svn.wordpress.org/trunk@38967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 16:51:30 +00:00
Drew Jaynes 04f0340a96 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Post_Statuses_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39024


git-svn-id: http://core.svn.wordpress.org/trunk@38966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 16:44:38 +00:00
Drew Jaynes c4df9d63ba Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Post_Meta_Fields` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39023


git-svn-id: http://core.svn.wordpress.org/trunk@38965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 16:36:32 +00:00
Drew Jaynes 9ce98d98ac Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Meta_Fields` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39022


git-svn-id: http://core.svn.wordpress.org/trunk@38964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 16:33:30 +00:00
Drew Jaynes 718f9fe868 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39021


git-svn-id: http://core.svn.wordpress.org/trunk@38963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 16:20:29 +00:00
John Blackbourn 2d0d9cfbf9 Customize: Avoid using `assertNotFalse()` in tests because it's not available in PHPUnit 3.6.
See #35395

Built from https://develop.svn.wordpress.org/trunk@39020


git-svn-id: http://core.svn.wordpress.org/trunk@38962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 15:42:36 +00:00
Andrea Fercia 791c72dd4d Accessibility: Remove target=_blank from the help tab links in network.php.
Stop taking control of users' browsers.

Props wolly.
Fixes #38572. See #23432.

Built from https://develop.svn.wordpress.org/trunk@39019


git-svn-id: http://core.svn.wordpress.org/trunk@38961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 15:19:37 +00:00
Weston Ruter ddea523daf Customize: Prevent toggling edit shortcuts when doing shift-click or when clicking on a descendent of an interactive element.
See #38532, #27403.
Fixes #38554.

Built from https://develop.svn.wordpress.org/trunk@39018


git-svn-id: http://core.svn.wordpress.org/trunk@38960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 14:59:31 +00:00
John Blackbourn 328922cc82 Customize: Correct the CRUD tests for custom CSS on multisite.
See #35395

Built from https://develop.svn.wordpress.org/trunk@39017


git-svn-id: http://core.svn.wordpress.org/trunk@38959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 14:04:30 +00:00
John Blackbourn 2b6ceeb465 Customize: Correct the capability mapping and associated tests for the `unfiltered_css` capability.
Fixes #35395

Built from https://develop.svn.wordpress.org/trunk@39016


git-svn-id: http://core.svn.wordpress.org/trunk@38958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 12:47:31 +00:00
Drew Jaynes e2e47a192d Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Comments_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39015


git-svn-id: http://core.svn.wordpress.org/trunk@38957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 06:55:30 +00:00
Drew Jaynes 7d25657c01 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Comment_Meta_Fields` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39014


git-svn-id: http://core.svn.wordpress.org/trunk@38956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 06:34:31 +00:00
Drew Jaynes 4247471355 Tests: Helps to also update the hour and not just the timezone to temporarily fix a test broken due to Daylight Saving Time changes in Europe.
Built from https://develop.svn.wordpress.org/trunk@39013


git-svn-id: http://core.svn.wordpress.org/trunk@38955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 05:54:29 +00:00
Drew Jaynes e94d4a2589 Tests: Temporarily fix a test failing due to European Daylight Saving Time changes.
Built from https://develop.svn.wordpress.org/trunk@39012


git-svn-id: http://core.svn.wordpress.org/trunk@38954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 05:44:36 +00:00
Drew Jaynes 08b0407367 Docs: Add much more complete and syntactically correct documentation throughout the `WP_REST_Attachments_Controller` class.
Props Soean, mrahmadawais, flixos90.
See #38398.

Built from https://develop.svn.wordpress.org/trunk@39011


git-svn-id: http://core.svn.wordpress.org/trunk@38953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 05:40:37 +00:00
Weston Ruter 5015bd55a2 Customize: Reveal controls pane when clicking on edit shortcuts in mobile preview.
Re-use `paneVisible` state to also manage whether the mobile `preview-only` class is applied to the overlay.

Props seancjones.
See #36678, #36678, #27403.
Fixes #38080.

Built from https://develop.svn.wordpress.org/trunk@39010


git-svn-id: http://core.svn.wordpress.org/trunk@38952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 04:23:44 +00:00
Weston Ruter 2dd904df5e Customize: Fix message grammar for `custom_css` validity error when imbalanced characters possibly due to `content` CSS property.
Props Presskopp.
See #35395.
Fixes #38564.

Built from https://develop.svn.wordpress.org/trunk@39009


git-svn-id: http://core.svn.wordpress.org/trunk@38951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 04:04:32 +00:00
John Blackbourn 2f7f2c68f0 Role/Capability: Reuse a fixture in a couple more unit tests.
See #30017

Built from https://develop.svn.wordpress.org/trunk@39008


git-svn-id: http://core.svn.wordpress.org/trunk@38950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 00:33:42 +00:00
Dominik Schilling 102273e472 XML-RPC: Fix truncated warning message added in [38883].
See #37122.
Built from https://develop.svn.wordpress.org/trunk@39007


git-svn-id: http://core.svn.wordpress.org/trunk@38949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 21:32:33 +00:00
Andrea Fercia fd40a16ad1 Accessibility: Improve the form labels on the Add New User screen.
On the Multisite - single site "Add New User" screen, some form fields have more
than one label associated with them. Form controls should have at most one
associated label element. If more than one label element is associated to the
control, assistive technologies may not read the appropriate label.

Additionally, labels can be associated to their related form fields either
explicitly (using a `for` attribute referencing the field ID) or implicitly
(using the label to wrap the field). As a best practice, never do both and
prefer explicitly associated labels when possible.

Props Ankit K Gupta.
Fixes #38459.

Built from https://develop.svn.wordpress.org/trunk@39006


git-svn-id: http://core.svn.wordpress.org/trunk@38948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 12:54:30 +00:00
Dominik Schilling a1d18b7b8a I18N: Don't initialize `WP_Locale_Switcher` in `wp_load_translations_early()`.
`wp_load_translations_early()` is used when WordPress isn't fully initialized. Therefore using the `WP_Locale_Switcher` with `get_locale()`/`get_user_locale()` can cause PHP fatal errors.
This reverts [38976] and [38977], and instead removes `WP_Locale_Switcher` from `wp_load_translations_early()`.

See #29783.
Fixes #38535.
Built from https://develop.svn.wordpress.org/trunk@39005


git-svn-id: http://core.svn.wordpress.org/trunk@38947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 11:23:33 +00:00
Tammie Lister 67bd634b69 Twenty Seventeen: Fixes unexpected behaviour of scroll down arrow
This ensures the arrorw disappears once the top menu sticks.

Props LittleBigThing, davidakennedy
Fixes #38555


Built from https://develop.svn.wordpress.org/trunk@39004


git-svn-id: http://core.svn.wordpress.org/trunk@38946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 09:45:31 +00:00
Weston Ruter 9da43bc2c8 Customize: Move Additional CSS section toward end of list by assigning priority higher than default.
Props Mista-Flo.
Fixes #38524.

Built from https://develop.svn.wordpress.org/trunk@39003


git-svn-id: http://core.svn.wordpress.org/trunk@38945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 05:11:29 +00:00
Weston Ruter d71afc0d9a Customize: Mark newly-added page/post stubs as added (with checkmark) when they are inserted into the list of available items.
Props ryankienstra, celloexpressions.
See #34923.
Fixes #38499.

Built from https://develop.svn.wordpress.org/trunk@39002


git-svn-id: http://core.svn.wordpress.org/trunk@38944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 05:06:31 +00:00
David A. Kennedy ce81b7a849 Twenty Seventeen: Adds missing theme text domains to starter content
* Also, changes the top menu label so it has better context when read alone by assistive technology.

Props anilbasnet.

Fixes #38542.

Built from https://develop.svn.wordpress.org/trunk@39001


git-svn-id: http://core.svn.wordpress.org/trunk@38943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 23:44:33 +00:00
David A. Kennedy 42f804e4cb Twenty Seventeen: Don't modify excerpt link in admin
* Since this is a filter the original value is returned if `is_admin()` is true.
* Removes portion of the doc block since function is not pluggable.

Props mangeshp.

Fixes #38510.

Built from https://develop.svn.wordpress.org/trunk@39000


git-svn-id: http://core.svn.wordpress.org/trunk@38942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 23:16:34 +00:00
David A. Kennedy f7552bbf53 Twenty Seventeen: Remove excessive escaping in `color-patterns.php`
Uses `absint()` to escape when getting value. Removes `esc_attr` from each instance of the variable.

Props fencer04.

Fixes #38449.

Built from https://develop.svn.wordpress.org/trunk@38999


git-svn-id: http://core.svn.wordpress.org/trunk@38941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 21:53:46 +00:00
Tammie Lister 9fccac28d8 Twenty Seventeen: Hidden article tags on home page fix
This prevents the issue of hidden article tags on home page.

Props ElectricFeet, iv.dimova. morettigeorgiev, davidakennedy
Fixes #38404

M    twentyseventeen/inc/template-tags.php
M    twentyseventeen/style.css

Built from https://develop.svn.wordpress.org/trunk@38998


git-svn-id: http://core.svn.wordpress.org/trunk@38940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 21:01:34 +00:00
Andrew Ozz 3807829ac4 TinyMCE: if the current editor configuration is without toolbars, prevent errors when adding the labels for custom shortcuts.
Fixes #38063.
Built from https://develop.svn.wordpress.org/trunk@38997


git-svn-id: http://core.svn.wordpress.org/trunk@38939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 20:07:32 +00:00
David A. Kennedy a8b19ca223 Twenty Seventeen: Fix broken and crowded pagination navigation on small screens
* Hides page numbers visually at smaller screen sizes.
* Reduced padding around `.wrap` class on smaller screens.
* Fixed issue with the page numbers not displaying the underline on `:hover`. This has been updated in the custom colors files, too.

Props laurelfulford, caspie.

Fixes #38394.

Built from https://develop.svn.wordpress.org/trunk@38996


git-svn-id: http://core.svn.wordpress.org/trunk@38938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 17:38:42 +00:00
Helen Hou-Sandí 529ca4d134 Post-4.7 beta 1 bump.
Built from https://develop.svn.wordpress.org/trunk@38995


git-svn-id: http://core.svn.wordpress.org/trunk@38937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 04:33:42 +00:00
Helen Hou-Sandí 7343b3bf40 WordPress 4.7 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@38992


git-svn-id: http://core.svn.wordpress.org/trunk@38935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 03:01:43 +00:00
Weston Ruter 75535c596b Customize: Introduce starter content and site freshness state.
A theme can opt-in for tailored starter content to apply to the customizer when previewing the theme on a fresh install, when `fresh_site` is at its initial `1` value. Starter content is staged in the customizer and does not go live unless the changes are published. Initial starter content is added to Twenty Seventeen.

* The `fresh_site` flag is cleared when a published post or page is saved, when widgets are modified, or when the customizer state is saved.
* Starter content is registered via `starter-content` theme support, where the argument is an array containing `widgets`, `posts`, `nav_menus`, `options`, and `theme_mods`. Posts/pages in starter content are created with the `auto-draft` status, re-using the page/post stubs feature added to nav menus and the static front page controls.
* A `get_theme_starter_content` filter allows for plugins to extend a theme's starter content.
* Starter content in themes can/should re-use existing starter content items in core by using named placeholders.
* Import theme starter content into customized state when fresh site.
* Prevent original_title differences from causing refreshes if title is present.
* Ensure nav menu item url is set according to object when previewing.
* Make sure initial saved state is false if there are dirty settings without an existing changeset.
* Ensure dirty settings are cleaned upon changeset publishing.

Props helen, westonruter, ocean90.
Fixes #38114, #38533.

Built from https://develop.svn.wordpress.org/trunk@38991


git-svn-id: http://core.svn.wordpress.org/trunk@38934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:57:35 +00:00
Gary Pendergast 60eb1ddc5c REST API: Revert [38980].
`/users/me` still needs attention, but this change wasn't quite ready.

See #38521.


Built from https://develop.svn.wordpress.org/trunk@38990


git-svn-id: http://core.svn.wordpress.org/trunk@38933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:07:35 +00:00
Joe McGill f9f6dd7958 Customizer: Fix name of a partial in `export_header_video_settings()`
Following [38985], this updates a check for partials being set in
`export_header_video_settings()` to use the correct name.

Props bradyvercher.
See #38172.
Built from https://develop.svn.wordpress.org/trunk@38989


git-svn-id: http://core.svn.wordpress.org/trunk@38932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 01:51:31 +00:00
David A. Kennedy 69c8c4ede0 Twenty Seventeen: Make border colors for panels match WordPress UI
Also, fixes the visibility of the borders for panels after the header videos commit.

Props celloexpressions.

Fixes #38408.
See #38172.

Built from https://develop.svn.wordpress.org/trunk@38988


git-svn-id: http://core.svn.wordpress.org/trunk@38931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 23:24:32 +00:00
David A. Kennedy 1ccea74e32 Twenty Seventeen: Fix issue with missing background color in dark color scheme.
A background color style that was added to the front page during video header implementation did not get included in the `colors-dark.css`, causing a display issue with the dark color scheme.

Props laurelfulford.

See #38172.

Built from https://develop.svn.wordpress.org/trunk@38987


git-svn-id: http://core.svn.wordpress.org/trunk@38930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 23:01:30 +00:00
David A. Kennedy 769e718d2c Twenty Seventeen: Improve user and developer experience with the customizer integration
* Rename customizer JS files to customize-preview.js and customize-controls.js to align with the core file naming and make it clearer where each file runs.
* Only show the colorscheme_hue control when there's a custom color scheme.
* Update preview JS handling for revised front page section handling, see below.
* Remove all references to "Theme Customizer" in code comments. It hasn't been called that since before 4.0.
* Clarify the purpose of the JS files by updated the code comments in the file headers.
* Improve code readability.
* Make the arbitrary number of front page sections filterable, for UI registration and output.
* Rename twentyseventeen_sanitize_layout to twentyseventeen_sanitize_page_layout to be clearer about what it sanitizes in case child themes or plugins consider reusing it.
* Rename page_options setting/control to page_layout as that's more reflective of what that option does; and again, helps for potential extensions.
* Make the page layout option contextual to pages and the sidebar being inactive, as the option only applies when there is no sidebar (per its description).
* Condense options into a single section.
* Add selective refresh for front page sections.
* Locate active_callback functions within customizer.php so that they're easier to find when editing customizer registrations, similarly to sanitize callbacks.
* Adjust the styling for placeholders for panels that aren't active. 
* Ensure that the new visible edit shortcuts don't have any issues.

Props celloexpressions.

Fixes #38426.

Built from https://develop.svn.wordpress.org/trunk@38986


git-svn-id: http://core.svn.wordpress.org/trunk@38929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 22:09:40 +00:00
Joe McGill 030bc377dd Themes: Enable video in custom headers.
This adds the ability for themes to add support for videos in custom headers
by passing `'video' => true` as an argument when adding theme support for
custom headers.

Custom video headers are managed through the “Header Visuals” (i.e. “Header Image”)
panel in the Customizer where you can select a video from the media library or set a
URL to an external video (YouTube for now) for use in custom headers.

This introduces several new functions:

`has_header_video()` – Check whether a header video is set or not.
`get_header_video_url()` – Retrieve header video URL for custom header.
`the_header_video_url()` – Display header video URL.
`get_header_video_settings()` – Retrieve header video settings.
`has_custom_header()` – Check whether a custom header is set or not.
`get_custom_header_markup()` – Retrieve the markup for a custom header.
`the_custom_header_markup()` – Print the markup for a custom header.

And a new file, `wp-includes/js/wp-custom-header.js` that handles loading videos
in custom headers.

This also enables video headers in the Twenty Seventeen and Twenty Fourteen themes.

Props davidakennedy, celloexpressions, bradyvercher, laurelfulford, joemcgill.
Fixes #38172.
Built from https://develop.svn.wordpress.org/trunk@38985


git-svn-id: http://core.svn.wordpress.org/trunk@38928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 21:51:31 +00:00
Andrea Fercia 7b0abd1cea Accessibility: Hide the Toolbar sub-menu icons from assistive technologies.
CSS generated content is going to be rendered for speech output more and more in
the next future. When it's not intended to be available for speech output, for
example with font icons, then special care should be used to hide it from
assistive technologies. At the moment, the only reliable way to do this is making 
use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.

Built from https://develop.svn.wordpress.org/trunk@38984


git-svn-id: http://core.svn.wordpress.org/trunk@38927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:53:30 +00:00
Andrea Fercia 7a60d6571c Accessibility: Remove inappropriate content from the Posts and Edit screens headings.
Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@38983


git-svn-id: http://core.svn.wordpress.org/trunk@38926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:39:39 +00:00
Rachel Baker 4a37a04d0f REST API: Return `WP_Error` when a client is attempting to update an option with a non-scalar value to `null`.
A `null` value is returned in the response for any option that has a non-scalar value.

To protect clients from accidentally including the `null` values from a response object in a request, we do not allow options with non-scalar values to be updated to `null`. Without this added protection a client could mistakenly delete all options that have non-scalar values from the database.

Props joehoyle, rachelbaker.
Fixes #38527.
Built from https://develop.svn.wordpress.org/trunk@38982


git-svn-id: http://core.svn.wordpress.org/trunk@38925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 16:08:45 +00:00
Andrea Fercia 432f5e76b2 Accessibility: Improve the Menus post type meta boxes pagination links.
- adds hidden text to the pagination links
- slightly increases the links clickable area
- fixes a JS error when clicking on the current page number
- avoids to generate nested `<div>` elements at each click 

Props xavortm, cwpnolen, afercia.

Fixes #35577.

Built from https://develop.svn.wordpress.org/trunk@38981


git-svn-id: http://core.svn.wordpress.org/trunk@38924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 15:23:31 +00:00
Rachel Baker d42acc530c REST API: Remove the Location header redirect for the /users/me endpoint.
Props youknowriad jnylen0.
Fixes #38521.
Built from https://develop.svn.wordpress.org/trunk@38980


git-svn-id: http://core.svn.wordpress.org/trunk@38923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 14:37:36 +00:00
Weston Ruter a6d3ba96e8 Customize: Add all dynamic settings for nav menus and nav menu items before previewing to ensure new entries (placeholders) will be recognized.
See #30937.

Built from https://develop.svn.wordpress.org/trunk@38979


git-svn-id: http://core.svn.wordpress.org/trunk@38922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 08:30:30 +00:00
Pascal Birchler e8af4e510d I18N: Apply the `locale` filter when returning early in `get_locale()`.
See [38976].
See #29783.
Built from https://develop.svn.wordpress.org/trunk@38978


git-svn-id: http://core.svn.wordpress.org/trunk@38921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 06:40:33 +00:00
Weston Ruter 62445cd41b Customize: Check for existence of controls and settings for background properties before attempting to access.
Amends [38948].
See #22058.
Fixes #38523.

Built from https://develop.svn.wordpress.org/trunk@38977


git-svn-id: http://core.svn.wordpress.org/trunk@38920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 05:02:35 +00:00
Gary Pendergast 1c5c130af9 I18N: Fix a PHP fatal when `get_locale()` is called before `$wpdb` is ready.
If WPDB needs to bail early, it loads the translations, which need to load the locale. Without WPDB, we can't get any database options, so can only rely on what's been loaded so far.

Fixes #29783.


Built from https://develop.svn.wordpress.org/trunk@38976


git-svn-id: http://core.svn.wordpress.org/trunk@38919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 03:43:49 +00:00
Boone Gorges f2a7e841eb Share fixtures in REST API endpoint tests.
As sparrows' tears shed steadily
Make widest rivers filled,

`setUp()` routines run prodig'ly
Add minutes to a build.

So cull ye fixtures profligate!
Direct thine frugal gaze!

Our savings here - a half-minute -
When multiplied: Amaze!

See #30017.
Built from https://develop.svn.wordpress.org/trunk@38975


git-svn-id: http://core.svn.wordpress.org/trunk@38918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 02:57:41 +00:00
Boone Gorges 493f76a3d2 REST API: Use `wp_get_object_terms()` when fetching terms for a post object.
The WP-API plugin originally used a custom method for fetching object
terms in a way that supported the object cache and also accepted all
parameters for `get_terms()`. In [38667], the internals of
`wp_get_object_terms()` were modified to use `WP_Term_Query`, thus
delivering in a native fashion the features that the API had
previously achieved bespokely.

Fixes #38504.
Built from https://develop.svn.wordpress.org/trunk@38974


git-svn-id: http://core.svn.wordpress.org/trunk@38917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 01:42:32 +00:00
Gary Pendergast 582c8a12d2 Customize: Remove an unused variable.
The cleanup in [38972] missed a variable that is no longer being used.

Fixes #27403.


Built from https://develop.svn.wordpress.org/trunk@38973


git-svn-id: http://core.svn.wordpress.org/trunk@38916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 00:31:29 +00:00
Weston Ruter 022ee8ec36 Customize: Remove unnecessary code for edit shortcuts which is no longer required due to moving buttons inside of partial placement containers.
Props sirbrillig.
Amends [38967].
See #27403.

Built from https://develop.svn.wordpress.org/trunk@38972


git-svn-id: http://core.svn.wordpress.org/trunk@38915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:38:33 +00:00
Rachel Baker 21e0f964e3 REST API: Add the `default_comment_status` and `default_ping_status` options to the setting endpoint.
Props joehoyle.
See #38490.
Built from https://develop.svn.wordpress.org/trunk@38971


git-svn-id: http://core.svn.wordpress.org/trunk@38914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:21:01 +00:00
Andrew Ozz 95720f3b7c TinyMCE: after chats in #core-editor and #desing on Slack, the decision is to not remove Heading 1 for beta1.
See #38049.
Built from https://develop.svn.wordpress.org/trunk@38970


git-svn-id: http://core.svn.wordpress.org/trunk@38913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:01:33 +00:00
Tammie Lister 4233a600bf Twenty Seventeen: Placeholder styling
These were designed but never implemented.

Props melchoyce, davidakennedy
Fixes #38519


Built from https://develop.svn.wordpress.org/trunk@38969


git-svn-id: http://core.svn.wordpress.org/trunk@38912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 21:56:29 +00:00
Rachel Baker d359ffc270 REST API: Remove experimental `filter` wrapper parameter from the Posts Controller class.
Hiding WP_Query params under the filter key (instead of allowing them to be top-level params) was one of our biggest complaints from users of v1 of our REST API. This walks back the re-introduction of the `filter` param during Beta 15, which introduced an "inconsistent mess" and "exposing WP_Query through filter has and will continue to be difficult to support." See https://github.com/WP-API/WP-API/issues/2799.

Props websupporter, rachelbaker.
Fixes #38378.
Built from https://develop.svn.wordpress.org/trunk@38968


git-svn-id: http://core.svn.wordpress.org/trunk@38911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 21:37:31 +00:00
Weston Ruter 71afe657b6 Customize: Add edit shortcuts in customizer preview to visually expose editable elements and focus on the corresponding controls when clicked.
* Edit shortcuts show initially for a moment and then fade away so as to not get in the way of the preview. 
* Visibility of edit shortcuts is toggled by clicking/touching anywhere inert in the document.
* Implements UI for mobile and touch devices which do not support shift-click.
* Adds `editShortcutVisibility` state.
* Adds new methods to `wp.customize.selectiveRefresh.Partial` for managing edit shortcuts.

Incorporates aspects of the Customize Direct Manipulation feature plugin.

Props sirbrillig, mattwiebe, celloexpressions, melchoyce, westonruter, afercia.
Fixes #27403.

Built from https://develop.svn.wordpress.org/trunk@38967


git-svn-id: http://core.svn.wordpress.org/trunk@38910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 20:03:32 +00:00
David A. Kennedy 834b7c608e Twenty Seventeen: Implement selective refresh for site title and tagline
Adding the `opacity` property to the site title prevents opacity from changing during selective refreshes in the Customizer preview.

Props celloexpressions.

Fixes #38513.

Built from https://develop.svn.wordpress.org/trunk@38966


git-svn-id: http://core.svn.wordpress.org/trunk@38909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 18:43:42 +00:00
Andrea Fercia 6fe17e2a3d Administration: Better accessibility for the "Post locked" indicator.
- hides the locked icon from assistive technologies
- adds hidden text to indicate the post is locked
- moves the info about who's currently editing to the top of the title table cell

Props mariovalney.
Fixes #38185.

Built from https://develop.svn.wordpress.org/trunk@38965


git-svn-id: http://core.svn.wordpress.org/trunk@38908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:59:29 +00:00
David A. Kennedy a6df2cced5 Twenty Seventeen: Fix header height on sub-pages.
Moves `setNavProps` so it's no longer only fired on load when the scroll down arrow is present.

Props laurelfulford.

Fixes #38496.

Built from https://develop.svn.wordpress.org/trunk@38964


git-svn-id: http://core.svn.wordpress.org/trunk@38907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:39:31 +00:00
David A. Kennedy 3103b1ac78 Twenty Seventeen: Make table styles more consistent
* Removes the left padding on the first cell in a row, and the right padding on the last cell in each row - the padding is still there between cells, so the contents don't meet.
* Does the opposite for RTL, and fixes some spacing issues.
* Updates the editor styles to match.

Props laurelfulford, snacking.

Fixes #38447.

Built from https://develop.svn.wordpress.org/trunk@38963


git-svn-id: http://core.svn.wordpress.org/trunk@38906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:25:40 +00:00
David A. Kennedy 24ab3657cb Twenty Seventeen: Improve front end display in Internet Explorer 8
* Fixes the display issues with the header. The header doesn't look exactly like it does in newer browsers, but it's closer.
* Gets the font sizes a bit more consistent with how it looks like other browsers.
* IE8 doesn't support SVGs, so it's using the fallback styles for some of the icons. The fallbacks are limited to the absolutely necessary icons - so there is one for the submenu dropdown toggle icon, but not for the little 'hamburger' and X that sit in front of the 'menu' button.

Props laurelfulford.

Fixes #38472.

Built from https://develop.svn.wordpress.org/trunk@38962


git-svn-id: http://core.svn.wordpress.org/trunk@38905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 16:43:34 +00:00
Dominik Schilling 7819e2b4ba I18N: Introduce a locale-switching function.
With the introduction of user-specific languages in [38705] it's necessary to be able to switch translations on the fly. For example emails should be sent in the language of the recipient and not the one of the current user.

This introduces a new `WP_Locale_Switcher` class which is used for switching locales and translations. It holds the stack of locales whenever `switch_to_locale( $locale )` is called. With `restore_previous_locale()` you can restore the previous locale. `restore_current_locale()` empties the stack and sets the locale back to the initial value.

`switch_to_locale()` is added to most of core's email functions, either with the value of `get_locale()` (site language) or `get_user_locale()` (user language with fallback to site language).

Props yoavf, tfrommen, swissspidy, pbearne, ocean90.
See #29783.
Fixes #26511.
Built from https://develop.svn.wordpress.org/trunk@38961


git-svn-id: http://core.svn.wordpress.org/trunk@38904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 15:36:31 +00:00
Boone Gorges 91b518a716 REST API: Use term-specific caps for permission checks in term update and delete endpoints.
See #38505.
Built from https://develop.svn.wordpress.org/trunk@38960


git-svn-id: http://core.svn.wordpress.org/trunk@38903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:52:29 +00:00
Sergey Biryukov 919f08fd2d Comments: In `comment_form()`, bail early if comments for the post are closed.
Props jipmoors.
Fixes #38514.
Built from https://develop.svn.wordpress.org/trunk@38959


git-svn-id: http://core.svn.wordpress.org/trunk@38902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:48:29 +00:00
John Blackbourn bc5c87710e Administration: Standardise the docblocks for the `handle_bulk_actions-*` filters.
Props ericlewis, Veraxus
Fixes #16031

Built from https://develop.svn.wordpress.org/trunk@38958


git-svn-id: http://core.svn.wordpress.org/trunk@38901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:45:29 +00:00
John Blackbourn d2173fd5b0 Administration: Switch to `handle_network_bulk_actions-{$screen}` for the bulk listing screen actions in the network admin area.
Props ericlewis, Veraxus
See #16031

Built from https://develop.svn.wordpress.org/trunk@38957


git-svn-id: http://core.svn.wordpress.org/trunk@38900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:37:29 +00:00
John Blackbourn 6161ad9020 Formatting: Don't overwrite the status header for Ajax responses that use output buffering or otherwise set their headers early.
Fixes #35666

Built from https://develop.svn.wordpress.org/trunk@38956


git-svn-id: http://core.svn.wordpress.org/trunk@38899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:32:28 +00:00
Dominik Schilling 49c5fb895d I18N: Add `$user_id` argument to `get_user_locale()`.
This allows to retrieve the locale of any user with the additional fallback to the site locale.

Fixes #38512.
See #29783, #26511.
Built from https://develop.svn.wordpress.org/trunk@38955


git-svn-id: http://core.svn.wordpress.org/trunk@38898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:15:32 +00:00