Commit Graph

23210 Commits

Author SHA1 Message Date
Dion Hulse 15a94f7c00 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.
Merges [39547] to the 4.7 branch.
Fixes #39175.

Built from https://develop.svn.wordpress.org/branches/4.7@39574


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 02:11:33 +00:00
Dion Hulse c3f619e2d0 Customize: Trim whitespace for URLs supplied for `external_header_video` to prevent `esc_url_raw()` from making them invalid.
Props tyxla.
See #38172.
Merges [39560] to the 4.7 branch.
Fixes #39125.

Built from https://develop.svn.wordpress.org/branches/4.7@39573


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 02:06:32 +00:00
Dion Hulse 900cd6c47d Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control.
Props westonruter.
Merges [39562] to the 4.7 branch.
Fixes #39102.

Built from https://develop.svn.wordpress.org/branches/4.7@39572


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 02:04:34 +00:00
Dion Hulse 5fa8150d16 Customize: Use selected user language for edit shortcuts in preview instead of site language.
Props ocean90.
Merges [39545] to the 4.7 branch.
Fixes #39009.

Built from https://develop.svn.wordpress.org/branches/4.7@39571


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:59:34 +00:00
Dion Hulse edcebaa160 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`.

Props westonruter.
See #30937, [38810].
Merges [39558] to the 4.7 branch.
Fixes #39103.


Built from https://develop.svn.wordpress.org/branches/4.7@39570


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:57:33 +00:00
Dion Hulse 6663e03ced 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.
Merges [39546] to the 4.7 branch.
Fixes #39145.

Built from https://develop.svn.wordpress.org/branches/4.7@39568


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:46:35 +00:00
Dion Hulse 30bb628489 Customize: Prevent single quotes (apostrophes) in `custom_css` values from unexpectedly causing false positives for unbalanced character validation errors.
Props westonruter.
See #39218, #35395.
Merges [39559] to the 4.7 branch.
Fixes #39198.

Built from https://develop.svn.wordpress.org/branches/4.7@39567


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:45:35 +00:00
Dion Hulse 6738759b0c 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.
Merges [39487] to the 4.7 branch.
Fixes #39010.

Built from https://develop.svn.wordpress.org/branches/4.7@39566


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:40:32 +00:00
Helen Hou-Sandí 16cabf6b50 WordPress 4.7 "Vaughan".
It's very sassy.

Built from https://develop.svn.wordpress.org/branches/4.7@39524


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 18:39:32 +00:00
Helen Hou-Sandí 563dc76e7b About page: Update video and REST API reference URLs.
props ocean90, kadamwhite, coffee2code.
see #38616 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39523


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 18:25:14 +00:00
Helen Hou-Sandí 537f4728bd Remove 4.7 cruft from `$_old_files`.
fixes #39113.

Built from https://develop.svn.wordpress.org/branches/4.7@39521


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 17:18:34 +00:00
Helen Hou-Sandí e489c7e378 Post-RC3 bump.
Built from https://develop.svn.wordpress.org/branches/4.7@39519


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 07:23:33 +00:00
Helen Hou-Sandí 8ea5b3b2d2 WordPress 4.7 RC3.
Built from https://develop.svn.wordpress.org/branches/4.7@39516


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 06:59:33 +00:00
Joe McGill f594693fcd 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 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39515


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 06:58:34 +00:00
Helen Hou-Sandí 8ab4a55cbe About page: Imagery and beautification.
Still to come: responsive images, optimized videos, and CDN URLs.

merges [39512] to the 4.7 branch.
props melchoyce, helen, ramiabraham.
see #38616.

Built from https://develop.svn.wordpress.org/branches/4.7@39513


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 04:02:33 +00:00
Weston Ruter 0c0fa13a66 Customize: Prevent infinite full refresh from occurring when selective refresh falls back for a nav menu that has items excluded from rendering via filtering.
Merges [39510] onto 4.7 branch.
Fixes #38612 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39511


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 02:53:35 +00:00
Dominik Schilling e58ec083da Comments: Merge a similar string between comments.php, XML-RPC and the REST API comments controller.
Merge of [39508] to the 4.7 branch.

Props ramiy.
See #39013.
Built from https://develop.svn.wordpress.org/branches/4.7@39509


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 20:18:33 +00:00
Weston Ruter 92c3c3453b 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.
Merges [39506] onto 4.7 branch.
Fixes #39078 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39507


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 19:39:34 +00:00
Weston Ruter 0e7cc25529 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.
Merges [39504] onto 4.7 branch.
Fixes #39081 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39505


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:57:35 +00:00
Weston Ruter c34a4c0ba3 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.
Merges [39502] onto 4.7 branch.
Fixes #39071 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39503


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:49:35 +00:00
Andrew Ozz 16161be6ac TinyMCE: fix the styling of notices generated by the editor UI.
Props: mor10, karmatosed, azaozz.
Fixes #38917 for 4.7.
Built from https://develop.svn.wordpress.org/branches/4.7@39501


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 15:10:33 +00:00
Weston Ruter ac2345ca32 Customize: Ensure `textarea` for Custom CSS displays as code (in LTR) when an RTL language is active.
Merges [39499] onto 4.7 branch.
Fixes #39085 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39500


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 14:00:35 +00:00
Dominik Schilling 8da7adb54f 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.

Merge of [39496] to the 4.7 branch.

Props davidakennedy.
See #38858.
Built from https://develop.svn.wordpress.org/branches/4.7@39498


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 09:36:33 +00:00
Dominik Schilling 13ff476cc1 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.

Merge of [39495] to the 4.7 branch.

Props peterwilsoncc, davidakennedy.
See #39073.
Built from https://develop.svn.wordpress.org/branches/4.7@39497


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 09:30:37 +00:00
Rachel Baker d6497ddf70 Comments: Merge similar strings between comments.php and the REST API comments controller.
Merges [39490] to the 4.7 branch.

Props ramiy.
Fixes #39014 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39491


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 20:37:34 +00:00
Rachel Baker a1005ad7f9 REST API: Merge similar date strings in the revisions and comments controllers.
Merges [39488] to the 4.7 branch.

Props ramiy.
Fixes #39016 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39489


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 20:27:35 +00:00
Helen Hou-Sandí 082fa8f5ad 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 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39485


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:24:33 +00:00
Helen Hou-Sandí 70f46a9e84 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 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39484


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 19:23:37 +00:00
Andrew Nacin 3c4d5d2e6f Build/Test Tools: Specify exact node version in package.json.
Enforce it in the tests.

Merges [39478] to the 4.7 branch.

see #35105, #38657.

Built from https://develop.svn.wordpress.org/branches/4.7@39480


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:38:34 +00:00
Weston Ruter 8f1a4c9a56 Customize: Ensure a `custom_css` post insertion gets an initial post revision.
Merges [39477] onto 4.7 branch.
Props georgestephanis, westonruter.
Fixes #39032 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39479


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

Built from https://develop.svn.wordpress.org/branches/4.7@39476


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:27:22 +00:00
Helen Hou-Sandí f012d52928 Post-RC2 bump.
Built from https://develop.svn.wordpress.org/branches/4.7@39474


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 06:17:35 +00:00
Helen Hou-Sandí 4fd3246c0d WordPress 4.7 RC2.
Built from https://develop.svn.wordpress.org/branches/4.7@39473


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 06:05:37 +00:00
Andrew Nacin d150dd35b2 REST API: Register the admin_email setting in single site only.
Merges [39470] and [39471] to the 4.7 branch.

fixes #38990.

Built from https://develop.svn.wordpress.org/branches/4.7@39472


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:42:36 +00:00
Gary Pendergast c720c0df8c 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.

Merge of [39468] to the 4.7 branch.

Props peterwilsoncc.
Fixes #39005.


Built from https://develop.svn.wordpress.org/branches/4.7@39469


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:18:33 +00:00
Helen Hou-Sandí 1c4c7086a5 Custom CSS: Change the help link to something better for users.
fixes #39015 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39467


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:12:33 +00:00
Gary Pendergast ea244bef6e 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()`.

Merge of [39464] to the 4.7 branch.

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


Built from https://develop.svn.wordpress.org/branches/4.7@39465


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 05:09:32 +00:00
Gary Pendergast dae13be262 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.

Merges [39462] to the 4.7 branch.

Props ketuchetan, rahulsprajapati.
Fixes #39023.


Built from https://develop.svn.wordpress.org/branches/4.7@39463


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:50:32 +00:00
Gary Pendergast 250f92a59e REST API: Use the correct error message when editing a single term.
Merges [39460] to the 4.7 branch.

Props ramiy, johnbillion.
Fixes #39017.


Built from https://develop.svn.wordpress.org/branches/4.7@39461


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:44:33 +00:00
Gary Pendergast b41001d4a1 Load: Re-add `class-wp-upgrader-skins.php`, `class-feed.php`, `locale.php`, and `session.php`.
Several files were removed during 4.7 that can be loaded externally, so we need to keep them, though their use is now deprecated.

Merges [39449], [39450], [39453], [39455], and [39456] to the 4.7 branch.
Fixes #39027.


Built from https://develop.svn.wordpress.org/branches/4.7@39459


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:30:34 +00:00
Gary Pendergast 7847fee343 REST API: Merge similar strings in a comments endpoint parameter description.
Merge of [39457] to the 4.7 branch.

Props ramiy.
Fixes #39036.


Built from https://develop.svn.wordpress.org/branches/4.7@39458


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:24:34 +00:00
Dion Hulse 83c0a40c05 Revert [38677] from the 4.7 branch.
This avoids fatal errors caused with recursive calling of term functions within the `get_terms` filter.

See #21760.

Built from https://develop.svn.wordpress.org/branches/4.7@39454


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 04:05:34 +00:00
Helen Hou-Sandí 93734bcbcb Twenty Seventeen: Improve ARIA for the nav menu.
The `onResizeARIA()` function was not very useful and buggy.

props afercia.
fixes #39029, #39026 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39452


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-03 03:44:32 +00:00
Helen Hou-Sandí d344c40f57 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 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39448


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 23:03:34 +00:00
Rachel Baker afa325993e 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.

Merges [39444] into the 4.7 branch.
Props flixos90, hnle, dd32, rachelbaker, jnylen0, ChopinBach, joehoyle, pento.

Fixes #38971 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39446


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

merges [39420], [39432], [39433], [39442], [39443] to the 4.7 branch.

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

Built from https://develop.svn.wordpress.org/branches/4.7@39445


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:45:15 +00:00
Rachel Baker 3adc537233 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. 

Merges [39440] to the 4.7 branch.

Props flixos90, hnle, dd32, rachelbaker, joehoyle, pento.
Fixes #38971 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39441


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:21:33 +00:00
Jeremy Felt 4726c85ee5 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.

Merges [34938] onto 4.7 branch.

Props jnylen0, rachelbaker.
Fixes #38962 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39439


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:16:33 +00:00
Rachel Baker 19ba92e401 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.

Merges [39436] onto 4.7 branch.

Props timmydcrawford, jnylen0, rachelbaker, pento.
Fixes #38989 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39437


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 22:05:35 +00:00
Weston Ruter 4727124583 Customize: Fix posts limit query arg for `WP_Query` from incorrect `number` to `posts_per_page`.
Merges [39434] onto 4.7 branch.
Props dlh.
Fixes #39022 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39435


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 16:19:34 +00:00
Gary Pendergast 0b152a7f2c Plugins: Add a `current_priority()` method to `WP_Hook`.
This allows plugins to determine the currently running priority of a filter.

Merges [39430] to the 4.7 branch.

Fixes #39007.


Built from https://develop.svn.wordpress.org/branches/4.7@39431


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 07:11:32 +00:00
Gary Pendergast 77022af062 Readme: Update recommendations to PHP 7, and to include HTTPS.
See https://wordpress.org/news/2016/12/moving-toward-ssl/

Merges [39428] to the 4.7 branch.

Fixes #39024.


Built from https://develop.svn.wordpress.org/branches/4.7@39429


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 07:04:34 +00:00
Gary Pendergast 43eb2619e9 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.

Merges [39426] to the 4.7 branch.

Props jeremyfelt.
Fixes #39000.


Built from https://develop.svn.wordpress.org/branches/4.7@39427


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:59:34 +00:00
Aaron Jorbin 27af8391d0 Build/Test Tools: Remove PHP 7.1 from allowed failures
[39424] for 4.7

🎉 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/branches/4.7@39425


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:44:33 +00:00
Helen Hou-Sandí 4a0443e0db 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 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39423


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:34:32 +00:00
Helen Hou-Sandí 909e795ba4 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 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39422


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:33:32 +00:00
Helen Hou-Sandí e28ec68af6 Twenty Seventeen: Hide front section panels on page load of Customizer.
Props sstoqnov.

Fixes #38951 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39421


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 06:32:36 +00:00
Joe McGill f57ee7c1f1 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 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39416


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 05:47:45 +00:00
Joe McGill d81e03da4e 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 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39414


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 05:20:35 +00:00
Weston Ruter 90cd5e5f80 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.

Merges [39411] to 4.7 branch.
See #38114.
Fixes #38928 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39412


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:26:34 +00:00
Weston Ruter 816196aee7 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.
Merges [39409] into 4.7 branch.
See #30937.
Fixes #38943 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39410


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:07:33 +00:00
Rachel Baker b460e1fd0d REST API: Add test for creating a comment with an invalid post ID.
Props @jnylen0.

Merges [39375] to the 4.7 branch.
Fixes #38991 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39408


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 03:43:35 +00:00
Rachel Baker a332bb92d2 REST API: Correct the admin_email setting description for single site installs.
Display different descriptions for multisite or single site installations.

Props johnbillion, ocean90.

Merges [39406] to the 4.7 branch.
Fixes #38990 for 4.7

Built from https://develop.svn.wordpress.org/branches/4.7@39407


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 03:06:33 +00:00
Weston Ruter 41118e509a 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.
Merges [39404] onto the 4.7 branch.
Fixes #38972 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39405


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:52:47 +00:00
Rachel Baker 1d9a15ad4a 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.

Merges [39402] to the 4.7 branch.
Fixes #38958 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39403


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:46:43 +00:00
Rachel Baker cb6bdc2d4c 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.

Merges [39400] to the 4.7 branch.
Fixes #38984 for 4.7.
Built from https://develop.svn.wordpress.org/branches/4.7@39401


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:19:32 +00:00
Mike Schroder bc1df6bef1 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.

Merges [39396] to the 4.7 branch.

Fixes #38965 for 4.7.
Props joemcgill, clorith, mikeschroder.

Built from https://develop.svn.wordpress.org/branches/4.7@39399


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:28:32 +00:00
Helen Hou-Sandí 7b69275632 Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Merges [39397] to the 4.7 branch.
Fixes #38980 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39398


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:12:34 +00:00
Weston Ruter 71169d688a 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 for 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39395


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:42:32 +00:00
Helen Hou-Sandí 02fa7656d1 Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Merges [39392] to the 4.7 branch.
Fixes #38927 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39394


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:39:31 +00:00
Dominik Schilling 29e03dd26c Docs: Document the usage of the global `$wpdb` in `_filter_query_attachment_filenames()`.
Merge of [39390] to the 4.7 branch.

Props mt8.biz.
See #38973.
Built from https://develop.svn.wordpress.org/branches/4.7@39391


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:21:32 +00:00
Dominik Schilling 849d8db4fc 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.

Merge of [39388] to the 4.7 branch.

Props presskopp.
See #38939.
Built from https://develop.svn.wordpress.org/branches/4.7@39389


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:07:36 +00:00
Dominik Schilling f50646d6c4 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 );
}}}

Merge of [39386] to the 4.7 branch.

Props celloexpressions.
See #38949.
Built from https://develop.svn.wordpress.org/branches/4.7@39387


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:57:35 +00:00
Dominik Schilling 413896af01 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.

Merge of [39384] to the 4.7 branch.

Props rianrietveld.
See #38970.
Built from https://develop.svn.wordpress.org/branches/4.7@39385


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:18:33 +00:00
Dominik Schilling 08ff35374b Options: Pass the `$passed_default` parameter to the `default_option_{$option}` filter in `add_option()`.
This was missed in [38910].

Merge of [39382] to the 4.7 branch.

Props joehoyle, lucasstark.
See #38176, #38930.
Built from https://develop.svn.wordpress.org/branches/4.7@39383


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 21:32:34 +00:00
Joe McGill 9650704689 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 for 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39381


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

Built from https://develop.svn.wordpress.org/branches/4.7@39379


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

Built from https://develop.svn.wordpress.org/branches/4.7@39377


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 17:45:34 +00:00
Helen Hou-Sandí 6d161ba61a Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39374


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 05:49:34 +00:00
Gary Pendergast fa7b15c74e 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.

Merge of [39371] to the 4.7 branch.

Props jnylen0.
See #38975.

Built from https://develop.svn.wordpress.org/branches/4.7@39372


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 03:28:36 +00:00
Dion Hulse 158d1b55b4 WP_Hook: Re-initialize any actions added directly to `$wp_filter` by `advanced-cache.php`.
Props dd32, ocean90.
Merges [39369] to the 4.7 branch.
Fixes #38929.

Built from https://develop.svn.wordpress.org/branches/4.7@39370


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 05:39:31 +00:00
Andrew Nacin 28ba2c0911 Build: Remove fsevents from npm-shrinkwrap.json
fsevents is macOS only, and npm-shrinkwrap tries to force it onto other architectures, causing build failures. Upstream: https://github.com/npm/npm/issues/2679.

fixes #38657 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39368


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:59:54 +00:00
Weston Ruter a8ef25ce7b 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 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39366


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:59:01 +00:00
Dominik Schilling acd9d9fad3 Build/Test Tools: Add npm-shrinkwrap.json to 4.7.
By shrinkwraping our dependencies, the same versions of everything will be installed no matter what rules the dependency package.json has specified.

Fixes #38657.
Built from https://develop.svn.wordpress.org/branches/4.7@39358


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:11:52 +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