Commit Graph

9964 Commits

Author SHA1 Message Date
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