Commit Graph

24139 Commits

Author SHA1 Message Date
Dominik Schilling 419c8d97ce Embeds: URL encode YouTube video IDs for broader compatibility.
Built from https://develop.svn.wordpress.org/trunk@40160


git-svn-id: http://core.svn.wordpress.org/trunk@40099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 11:42:40 +00:00
Jeremy Felt 28f838ca3e Validate video and audio metadata.
Built from https://develop.svn.wordpress.org/trunk@40148


git-svn-id: http://core.svn.wordpress.org/trunk@40087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 08:01:43 +00:00
Boone Gorges 2282cd8cf1 Taxonomy: When querying terms, ensure `$taxonomies` is an array.
This avoids PHP notices that otherwise arise when no `taxonomy`
parameter is passed to `get_terms()` or `WP_Term_Query`.

Props dlh.
Fixes #39932.
Built from https://develop.svn.wordpress.org/trunk@40147


git-svn-id: http://core.svn.wordpress.org/trunk@40086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-03 03:02:43 +00:00
Boone Gorges b6572af5d2 Taxonomy: Improve 'Parent' label when editing taxonomy terms.
Instead of the hardcoded 'Parent', use the `parent_item` label.

Props abrain, dlh.
Fixes #34545.
Built from https://develop.svn.wordpress.org/trunk@40146


git-svn-id: http://core.svn.wordpress.org/trunk@40085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-03 02:54:42 +00:00
Boone Gorges ac6a3c76e4 Taxonomy: Take 'parent' into account when checking for terms with duplicate names.
Terms with duplicate names are not allowed at the same level of a
taxonomy hierarchy. The name lookup introduced in [34809] did not
properly account for the 'parent' parameter, with the result that
the duplicate-name restriction was tighter than intended (terms
with duplicate names could not be created at different levels of
a single hierarchy).

Props mikejolley.
Fixes #39984.
Built from https://develop.svn.wordpress.org/trunk@40145


git-svn-id: http://core.svn.wordpress.org/trunk@40084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-03 02:50:41 +00:00
Boone Gorges 5ac6ecab48 Taxonomy: Improve precision of duplicate name checks when inserting terms.
`wp_insert_term()` does not allow for terms with the same name to exist
at the same hierarchy level, unless the second term has a unique slug.
When this logic was refactored in [31792] and [34809], a bug was
introduced whereby it was possible to bypass the no-same-named-sibling
check in cases where the first term had a non-auto-generated slug
(ie, where the name was 'Foo' but the slug something other than 'foo',
such that the second term would get the non-matching slug 'foo').

This changeset fixes this issue by ensuring that the duplicate name
check runs both in cases where there's an actual slug clash *and* in
cases where no explicit `slug` has been provided to `wp_insert_term()`.
The result is a more reliable error condition:
`wp_insert_term( 'Foo' ... )` will always fail if there's a sibling
'Foo', regardless of the sibling's slug.

Props mikejolley.
See #39984.
Built from https://develop.svn.wordpress.org/trunk@40144


git-svn-id: http://core.svn.wordpress.org/trunk@40083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-03 02:40:45 +00:00
Boone Gorges d29924e496 Improve formatting in `wp_term_is_shared()` docblock.
Props netweb.
Fixes #40004.
Built from https://develop.svn.wordpress.org/trunk@40143


git-svn-id: http://core.svn.wordpress.org/trunk@40080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-02 02:28:41 +00:00
Boone Gorges 04a7ef2b67 Tests: Starter content tests should use copies of images stored in /tmp.
This ensures that generated thumbnails are kept out of the version-
controlled `DIR_TESTDATA` directory.

Props bor0.
Fixes #40008.
Built from https://develop.svn.wordpress.org/trunk@40142


git-svn-id: http://core.svn.wordpress.org/trunk@40079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-02 02:26:44 +00:00
John Blackbourn ae890935b3 Build/Test Tools: Only attempt to disable Xdebug on stable builds of PHP.
Unstable builds of PHP (nightly and hhvm) don't have the Xdebug extension enabled. Attempting to disable it results in a build error.

See #39978

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


git-svn-id: http://core.svn.wordpress.org/trunk@40076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-28 00:04:44 +00:00
John Blackbourn 6a578af528 Build/Test Tools: Disable Xdebug when testing on Travis.
This should have some performance benefits, but I guess we'll need to wait and see.

See #39978

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


git-svn-id: http://core.svn.wordpress.org/trunk@40075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 22:54:43 +00:00
Joe McGill f8c7aa6208 Media: Skip PDF preview tests when image editor doens't support.
Following [40130] tests fail on environments that don't support PDF
previews because the expected meta data doesn't get written.

See #39875.
Built from https://develop.svn.wordpress.org/trunk@40131


git-svn-id: http://core.svn.wordpress.org/trunk@40068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 17:51:45 +00:00
Joe McGill d6bec79fe7 Media: Keep PDF previews from overwriting files.
Since support for PDF previews were added in [38949], it's possible
that the generated image file could overwrite an existing image file
with the same name. This uses `wp_unique_filename()` to avoid this
issue and adds a '-pdf' identifier on the end of filenames.

Props gitlost, derosj, mikeschroder, joemcgill.
Fixes #39875. See #31050.
Built from https://develop.svn.wordpress.org/trunk@40130


git-svn-id: http://core.svn.wordpress.org/trunk@40067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 15:39:47 +00:00
Mike Schroder f780259d88 Media: After [40123], Feature check `setImageOrientation`.
In [40123], `WP_Image_Editor_Imagick` started using
`Imagick::setImageOrientation` and `Imagick::ORIENTATION_TOPLEFT`,
but had no equivalent feature check.

While they were introduced more than 9 years ago, it's important
to double-check everything is available before using with Imagick.

Fixes #37140.
Built from https://develop.svn.wordpress.org/trunk@40129


git-svn-id: http://core.svn.wordpress.org/trunk@40066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 04:22:51 +00:00
John Blackbourn 76f44d242b Comments: When commenting on a draft post, display a friendly error message if the user can view the post.
This prevents the unhelpful white screen of death when a user who can view the post (eg. preview it) leaves a comment while the post is in draft.

Props sagarprajapati, milindmore22, mayurk, swissspidy
Fixes #39650

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


git-svn-id: http://core.svn.wordpress.org/trunk@40065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 00:23:40 +00:00
John Blackbourn 9e095f0791 Mail: Ensure entities in the site title are decoded when used in the body of the new user email.
Props ajoah
Fixes #39446

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


git-svn-id: http://core.svn.wordpress.org/trunk@40064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-26 22:20:44 +00:00
Andrea Fercia c3a2b57241 Media: Restore correct upload errors displaying after [37610].
Props codegeass, MatheusGimenez, joemcgill.
Fixes #39516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-26 18:15:43 +00:00
Joe McGill 8e56992132 Media: Fix unit tests for MIME checks on multisite.
A few of the multisite tests were failing after [40124] because
multisite filters `upload_mimes` with the `check_upload_mimes()`
function to reduce the set of allowed MIME types. This fixes those
errors by skipping the tests for adding additional MIME types and
only tests file types assumed to be allowed.

See #39550.
Built from https://develop.svn.wordpress.org/trunk@40125


git-svn-id: http://core.svn.wordpress.org/trunk@40062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-26 16:06:45 +00:00
Joe McGill 87ad9e31ab Media: Reduce failing uploads following 4.7.1.
[39831] introduced more strict MIME type checking for uploads, which
resulted in unintetionally blocking several filetypes that were
previously valid. This change uses  a more targeted approach to MIME
validation to restore previous behavior for most types.

Props blobfolio, iandunn, ipstenu, markoheijnen, xknown, joemcgill.
Fixes #39550, #39552.
Built from https://develop.svn.wordpress.org/trunk@40124


git-svn-id: http://core.svn.wordpress.org/trunk@40061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-25 16:08:44 +00:00
Mike Schroder 454acad22e Media: Reset Exif orientation after rotate in `WP_Image_Editor_Imagick`.
Due to inconsistencies in the way browsers handle Exif orientation data,
if a user manually rotates an image within WordPress, set the Exif orientation to
the default (1) so that the image displays with the same rotation/flip in every browser.

Props sanchothefat, triplejumper12, joemcgill, azaozz, markoheijnen, mikeschroder.
See #14459.
Fixes #37140.
Built from https://develop.svn.wordpress.org/trunk@40123


git-svn-id: http://core.svn.wordpress.org/trunk@40060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-25 05:26:41 +00:00
James Nylen 0c005fdb0e REST API: Fix behavior of `sticky` posts filter when no posts are sticky.
Previously, when getting posts from the API with `sticky=true`, if there were no sticky posts set, the query would return all posts  as if the `sticky` argument was not set.  In this situation, the query should return an empty array instead.

A `sticky=true` query that should return an empty array (in the previous situation, or with `include` and no intersecting post IDs) was also broken in that it would query the post with ID 1.

Finally, this commit significantly improves test coverage for the `sticky` filter argument, including direct testing of the `WHERE` clauses generated by `WP_Query`.

Props ryelle.
Fixes #39947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-25 05:03:42 +00:00
James Nylen a5ad623bfd REST API: Update the client test fixtures after changes to post formats.
This commit updates the `wp-api-generated.js` fixture file after recent changes to the way post formats work in the API.

See #39232.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-25 04:46:41 +00:00
James Nylen 889c790eb6 REST API: Allow setting post formats even if they are not supported by the theme.
A `post_format` not used by the current theme, but supported by core is not a wrong/broken piece of information.  It's just not used at this point in time.  Therefore we should allow setting and retrieving any of the standard post formats supported in core, even if the current theme doesn't use them.

After this commit, a post's `format` value can survive a round trip through the API, which is a good general design principle for an API.

Props JPry, iseulde, davidakennedy, Drivingralle.
Fixes #39232.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 23:30:44 +00:00
Sergey Biryukov d303e3d9ca Plugins: After [38703], adjust the selector for checkbox selection to account for nested tables.
Props afercia, swissspidy, reldev.
Fixes #39739.
Built from https://develop.svn.wordpress.org/trunk@40118


git-svn-id: http://core.svn.wordpress.org/trunk@40055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 23:10:44 +00:00
Andrew Ozz 9c1d14b875 TinyMCE: preserve empty image alt attributes.
Props afercia.
Fixes #39912 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40110


git-svn-id: http://core.svn.wordpress.org/trunk@40047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 20:41:43 +00:00
Adam Silverstein bc1fc91ec8 REST API: JS client - QUnit tests for custom namespace route discovery.
Add QUnit tests for the parsing of custom namespace routes. Add a custom schema fixture based on the `wp-js-widgets` plugin. Test that the client can parse the widget namespace in the schema and correctly construct the expected group of models and collections. Also includes a small unrelated QUnit fix to ensure nav-menu test passes when it is loaded without its tests executing as well as a small jshint fix, adding a missing semicolon since [40107].

Props jnylen0.
Fixes #39561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 18:40:40 +00:00
James Nylen 78b298f0f3 REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API.
Internally, WordPress uses a special `post_date_gmt` value of `0000-00-00 00:00:00` to indicate that a draft's date is "floating" and should be updated whenever the post is saved.  This makes it much more difficult for API clients to know the correct date of a draft post.

This commit provides a best guess at a `date_gmt` value for draft posts in this situation using the `date` field and the site's current timezone offset.

Props joehoyle.
Fixes #38883.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 18:15:44 +00:00
Adam Silverstein 33286df4c1 Themes: enable browser history support in add new theme screen.
Enable history support for the new theme screen, including navigating theme details and closing the details modal. Theme selection is now also bookmark-able, so linking to a URL like `/wp-admin/theme-install.php?theme=twentyseventeen` correctly opens the theme preview.

Props dd32.
Fixes #36613.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 17:48:42 +00:00
Felix Arntz eb8457d3f4 REST API: Do not allow access to users from a different site in multisite.
It has been unintendedly possible to both view and edit users from a different site than the current site in multisite environments. Moreover, when passing roles to a user in an update request, that user would implicitly be added to the current site.

This changeset removes the incorrect behavior for now in order to be able to provide a proper REST API workflow for managing multisite users in the near future. Related unit tests have been adjusted as well.

Props jnylen0, jeremyfelt, johnjamesjacoby.
Fixes #39701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-23 22:37:44 +00:00
James Nylen 7d421b2042 REST API: Correctly parse body parameters for DELETE requests.
DELETE was inadvertently omitted from the list of non-POST HTTP methods that should be able to accept body parameters.  Parameters passed to DELETE requests as JSON are already parsed correctly; this commit fixes `application/x-www-form-urlencoded` parameters as well.

Props mnelson4.
Fixes #39933.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-23 20:10:44 +00:00
James Nylen 6e9d23220a REST API: Ensure that tests pass if extra endpoints are registered.
Many plugins and themes use the WP core test suite to run their unit tests, so the API tests shouldn't fail if there are extra endpoints registered in non-core namespaces.

Props rachelbaker.
Fixes #39264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-23 15:50:46 +00:00
Sergey Biryukov 564d6a0c90 Docs: Update the description of `is_singular()` and `WP_Query::is_singular()` to be parsed correctly by developer.wordpress.org.
Props grapplerulrich.
Fixes #39948.
Built from https://develop.svn.wordpress.org/trunk@40103


git-svn-id: http://core.svn.wordpress.org/trunk@40040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-23 10:30:43 +00:00
Felix Arntz 55df308b4d Multisite: Use `WP_Network_Query` in `WP_Network::get_by_path()`.
An additional unit test has been introduced to verify the method works properly when using an external object cache.

Props spacedmonkey, jeremyfelt.
Fixes #37217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-22 10:42:45 +00:00
James Nylen b6ce4e2830 REST API: Fix multiple issues with setting dates of posts and comments.
This commit modifies the `rest_get_date_with_gmt` function to correctly parse local and UTC timestamps with or without timezone information.

It also ensures that the REST API can edit the dates of draft posts by setting the `edit_date` flag to `wp_update_post`.

Overall this commit ensures that post and comment dates can be set and updated as expected.

Fixes #39256.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-21 18:18:45 +00:00
Sergey Biryukov c4e78a8d8b About page: Remove `autoplay` and `loop` attributes on "Theme Starter Content", "Edit Shortcuts", and "Video Headers" videos, originally added as a part of [39512].
For UX and accessibility reasons, it's better to always avoid playing videos automatically.

Props bor0.
Fixes #39560.
Built from https://develop.svn.wordpress.org/trunk@40089


git-svn-id: http://core.svn.wordpress.org/trunk@40026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-20 13:01:42 +00:00
Dion Hulse 2808758334 Customize: Update the introduced version in the docs for the `get_header_video_url` filter to 4.7.3.
See #39512.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-20 06:48:08 +00:00
Weston Ruter 0343f50561 Customize: Prevent vertical clipping of thumbnail in header image customizer control.
Removes some method overrides on `wp.customize.HeaderTool.ChoiceView` introduced in [27497].

See #21785.
Props bradyvercher.
Fixes #38559.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-20 00:10:49 +00:00
Rachel Baker da8ae2facd REST API: Include the `status` property in `view` context responses from the Posts endpoints.
Previously the status for a Post (or other post_types) was only exposed under the `edit` context, which doesn't really make much sense considering we support querying by post status without authentication. Originally introduced in v2.0 beta 1: 69f617d749 without any explanation in the commit message.

Props dhanendran, jnylen0, rachelbaker.
Fixes #39466.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-19 04:32:41 +00:00
James Nylen cf4e085207 REST API: Skip generating the client test fixtures in multisite mode.
There are a couple of changes to the generated API schemas between single-site and multisite mode - for example, the `url` and `email` settings are not present in the settings endpoint (see #39005).

To avoid unexpected changes to the `wp-api-generated.js` fixture file, skip generating the client test fixtures when running the test suite in multisite mode.

See #39264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-18 19:30:45 +00:00
Adam Silverstein c7b217cee9 JavaScript: when starting Backbone history, stop if previously started.
Prevent a potential error condition if Backbone history is started by a plugin or theme before core tries to start it. 

Props tfrommen.
Fixes #39612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 22:00:42 +00:00
Adam Silverstein 518ff1576b REST API: JavaScript client - improve route discovery for custom namespaces.
Fix parsing of custom namespace routes. Transform class names, removing dashes and capitalizing each word/route part so a route path of `widgets/recent-posts` becomes a collection with the name `WidgetsRecentPosts`. Correct parent route part when routes are longer than expected, reversing parse direction.

Props westonruter, jazbek.
Fixes #39561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 20:54:44 +00:00
Pascal Birchler 8ce61a87f4 I18N: Update translators comment after [40072].
Props ocean90.
See #39898.
Built from https://develop.svn.wordpress.org/trunk@40073


git-svn-id: http://core.svn.wordpress.org/trunk@40010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 10:21:41 +00:00
Pascal Birchler db1ff39224 I18N: Fix broken `sprintf()` after [40067].
See #39898.
Built from https://develop.svn.wordpress.org/trunk@40072


git-svn-id: http://core.svn.wordpress.org/trunk@40009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 10:15:44 +00:00
Dion Hulse 30cb64a011 Media: Avoid PHP Warnings in `get_post_galleries()` when processing empty `[gallery]` shortcodes and avoid returning the incorrect results when the global `$post` does not match the provided post ID.
Props dd32, joemcgill, seanchayes.
Fixes #39277, #39304.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 06:46:42 +00:00
Dion Hulse c50113dc8d HTTP API: Restore backwards compatibility with the `http_api_curl` filter - it expects that the handle parameter is passed as a reference, however [39212] missed that.
Props pento.
Fixes #39783.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 05:06:44 +00:00
Sergey Biryukov 69ab181f01 I18N: Remove `<code>` tags from translatable strings in `wp-includes/customize/class-wp-customize-custom-css-setting.php`.
Fixes #39898.
Built from https://develop.svn.wordpress.org/trunk@40067


git-svn-id: http://core.svn.wordpress.org/trunk@40004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 02:23:42 +00:00
James Nylen 23e4694e0c REST API: Skip generating the client test fixtures in PHP 5.2 and 5.3.
Follow-up to [40065] - `JSON_*` constants are differently unsupported in PHP 5.2 and 5.3, which caused other, more different failures.

Also bring back `JSON_UNESCAPED_SLASHES` because the generated output looks nicer this way.

Fixes #39264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 00:13:41 +00:00
James Nylen cb100a0539 REST API: Fix the client test fixture generation in PHP 5.2 and 5.3.
Remove `JSON_UNESCAPED_SLASHES` from the `wp_json_encode` call - this constant is not supported in PHP < 5.4, and we don't polyfill it either.

Also make the PHPUnit test suite correctly exit with a non-zero exit code when `wp-tests-config.php` is not present.  This was causing `grunt restapi-jsclient` to incorrectly proceed to its second step even when the first step failed with this error.

Props ocean90.
Fixes #39264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-16 23:30:43 +00:00
Weston Ruter 34b179876e Customize: Skip intercepting non-HTTP(S) links in customizer preview just as jump links are ignored.
Ensures that links with `javascript:`, `mailto:` and other protocols work as expected in the customizer preview.

Fixes #39797.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-16 21:21:45 +00:00
James Nylen cb7a9a731d REST API: Cast revision author ID to int.
The `post_author` field is a string internally, but we need to cast it to an integer in the REST API.  This was already done for posts, but not for revisions.  The field is already declared as an integer in both controllers.

Fixes #39871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-16 20:09:45 +00:00
Sergey Biryukov 59d33e90da Docs: Correct `@return` value type for `wp_nav_menu()`.
Props chesio.
Fixes #39890.
Built from https://develop.svn.wordpress.org/trunk@40062


git-svn-id: http://core.svn.wordpress.org/trunk@39999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-16 16:09:43 +00:00
Adam Silverstein 0bcfc08b3f REST API: improve test fixture generation, normalizing data.
Add a data normalization pass when generating data fixtures for the REST API endpoints. Ensures that the `wp-api-generated.js` fixture won't change between test runs. Set more default properties and use fixed values for any properties that can't be easily controlled (object IDs and derivatives like link). Generate the fixture file with JSON_PRETTY_PRINT so that future diffs are easier to follow.

Props jnylen0, netweb.
Fixes #39264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-15 17:59:42 +00:00
Adam Silverstein e322b0eb77 Media: debounce the media grid search, avoiding duplicate requests.
Add a debounce wrapper to the media grid search handler. The search callback is now fired after a 300 ms typing pause.

Remove redundant handlers for 'search' and 'change', preventing multiple/duplicate search callbacks.

Props certainstrings, joemcgill, Kelderic, batmoo.
Fixes #38911.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-15 17:29:44 +00:00
Andrea Fercia ca44bbd134 Buttons: Fix a few `.button-link` glitches after [40052].
Removes some stray underlines. Explicitly set the button text to be left aligned.

Props Cheffheid, f.staude, Presskopp.

See #34242.
Fixes #35126, #38712.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-14 18:42:46 +00:00
Adam Silverstein 1d337dec33 REST API: Add QUnit tests for wp-api.js and PHPUnit fixture generation.
Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection.

The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests.

Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`.

Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together.

Props jnylen0, welcher.
Fixes #39264.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-14 04:23:43 +00:00
John Blackbourn 1100cca947 Themes: Add template type and template candidates as parameters to the `{$type}_template` filter.
Props mschadegg
Fixes #39525

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


git-svn-id: http://core.svn.wordpress.org/trunk@39994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-12 21:25:42 +00:00
James Nylen bccb15166a WP_Query: Add tests for the combination of `orderby=post__in` and `order`.
This commit adds test cases for the interaction (or more accurately, lack of
interaction) between `orderby=post__in` and the `order` parameter.

Props fibonaccina.
See #39055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-12 18:07:42 +00:00
Weston Ruter f3644a702e Customize: Ensure edit shortcuts get re-created for nested partials when a parent partial is refreshed.
Fixes issue where the edit shortcut for a nav menu gets dropped when the containing Custom Menu widget is updated.

See #39101.
Fixes #39353.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-11 03:35:43 +00:00
Sergey Biryukov fe0b8a2aaf Pings/Trackbacks: Avoid scheduling multiple `do_pings` events in `_publish_post_hook()`.
Props ethitter.
Fixes #39828.
Built from https://develop.svn.wordpress.org/trunk@40054


git-svn-id: http://core.svn.wordpress.org/trunk@39991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-10 03:09:43 +00:00
Sergey Biryukov 62dc0e6c57 Docs: Add missing `meta_type` and `meta_compare` arguments to `WP_Term_Query::__construct()` and `get_terms()` docblocks.
Props 1naveengiri.
Fixes #39825.
Built from https://develop.svn.wordpress.org/trunk@40053


git-svn-id: http://core.svn.wordpress.org/trunk@39990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-10 02:28:43 +00:00
Andrea Fercia d33301821b Buttons: Improve the `.button-link` CSS class for link-like buttons.
Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.

Props Cheffheid, afercia.

See #34242.
Fixes #35126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-09 16:47:44 +00:00
Scott Taylor 9bf3844ef9 Media: in `wp.media.view.DeleteSelectedPermanentlyButton`, move destructive async operations outside of the `selection` loop.
Fixes #39780.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-08 19:44:41 +00:00
Scott Taylor 907e8cbd66 Media: in `wp.media.view.Toolbar.refresh()`, check for a selection before iterating over models.
Props chandrapatel.
Fixes #39511.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-08 19:17:43 +00:00
Pascal Birchler 71fb840a24 Taxonomy: Disallow overriding the `name` property when registering a taxonomy.
Props wpfo for initial patch.
Fixes #39308.
Built from https://develop.svn.wordpress.org/trunk@40049


git-svn-id: http://core.svn.wordpress.org/trunk@39986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-06 19:39:42 +00:00
Sergey Biryukov 6de5a9f8e3 Docs: Add a note to `retrieve_password_message` filter that password reset email will not be sent if the filtered message is empty.
Props sudar.
Fixes #39788.
Built from https://develop.svn.wordpress.org/trunk@40048


git-svn-id: http://core.svn.wordpress.org/trunk@39985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-06 04:16:42 +00:00
Sergey Biryukov 234f2040a8 Docs: Use third-person singular verb for `rest_avatar_sizes` filter description.
See #39130.
Built from https://develop.svn.wordpress.org/trunk@40047


git-svn-id: http://core.svn.wordpress.org/trunk@39984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-06 02:58:40 +00:00
Sergey Biryukov e29bbcd167 Docs: Use third-person singular verb for `wp_get_custom_css` filter description.
See #39130.
Built from https://develop.svn.wordpress.org/trunk@40046


git-svn-id: http://core.svn.wordpress.org/trunk@39983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-06 02:57:42 +00:00
Sergey Biryukov a972390e61 Customize: Introduce `get_header_video_url` filter for the return value of `get_header_video_url()`.
Props sanket.parmar, celloexpressions.
Fixes #39512.
Built from https://develop.svn.wordpress.org/trunk@40045


git-svn-id: http://core.svn.wordpress.org/trunk@39982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-06 02:52:41 +00:00
Pascal Birchler a95486acdc General: Add tests for `wp_parse_slug_list()`.
Props danielbachhuber.
See #35582.
Built from https://develop.svn.wordpress.org/trunk@40044


git-svn-id: http://core.svn.wordpress.org/trunk@39981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-05 20:35:42 +00:00
Sergey Biryukov 47aab2faad Docs: Clarify that `get_the_category_list()` and `the_category()` display links as an unordered list by default.
See #39130.
Built from https://develop.svn.wordpress.org/trunk@40043


git-svn-id: http://core.svn.wordpress.org/trunk@39980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-05 15:16:44 +00:00
Sergey Biryukov cff9bc5a43 Docs: Clarify that `has_excerpt()` checks if the post has a custom excerpt, not some generated excerpt.
See #35487.
Built from https://develop.svn.wordpress.org/trunk@40042


git-svn-id: http://core.svn.wordpress.org/trunk@39979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-05 14:35:46 +00:00
Weston Ruter 85b4cddebf Customize: Extend auto-draft life of a `customize_changeset` post whenever modified.
Keep bumping the date for the auto-draft to preserve it from garbage-collection via `wp_delete_auto_drafts()` after 7 days.

See #30937.
Fixes #39713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-05 06:39:41 +00:00
Adam Silverstein 717aeab3cc REST API: JavaScript client should use `_.extend` when merging objects.
Correct an issue during the client's dynamic route discovery in `wp.api.utils.decorateFromRoute` where `_.union` potentially failed if used on objects.

Props ketuchetan.
Fixes #39341.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-03 21:46:43 +00:00
Sergey Biryukov 8f855f46b0 Media: In `wp_unique_filename()`, use explicit type casting when incrementing `$number`.
This prevents the "non-numeric value encountered" warning in PHP 7.1, caused by trying to increment an empty string on the first loop iteration.

Props drrobotnik for initial patch.
Fixes #39774.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-03 20:58:42 +00:00
Sergey Biryukov e0e9568e24 REST API: After [38947], improve the wording of the message to clarify that `rest_authentication_errors` is a filter.
See #38446.
Built from https://develop.svn.wordpress.org/trunk@40038


git-svn-id: http://core.svn.wordpress.org/trunk@39975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-01 21:32:47 +00:00
James Nylen 19ae50d9fa REST API: Improve posts orderby tests
This commit adds tests for `orderby=relevance` combined with a search term in the REST API.

It also improves tests for the `orderby` parameter in `WP_REST_Posts_Controller` by looking at the generated SQL query instead of creating a bunch of carefully arranged test objects.  This should be much more robust, and we can use this approach in other places (such as #39055).

Fixes #39079.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-01 20:32:04 +00:00
Weston Ruter e34ee2f25b Customize: Ensure root values are accessible in multidimensional custom setting types.
Fixes bad conditions in `WP_Customize_Setting::get_root_value()` and `WP_Customize_Setting::set_root_value()`.

Props dlh.
Amends [35007].
See #32103.
Fixes #36952.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-01 01:40:52 +00:00
Sergey Biryukov 222ee437fe Update/Install: Give context to "Deleted! string to allow for differentiation between theme and plugin translations.
Props swissspidy.
See #39747. See #37290.
Built from https://develop.svn.wordpress.org/trunk@40035


git-svn-id: http://core.svn.wordpress.org/trunk@39972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 09:59:40 +00:00
Sergey Biryukov 9264813949 Update/Install: Give context to some more install/update strings to allow for differentiation between theme and plugin translations.
Fixes #39747. See #37290.
Built from https://develop.svn.wordpress.org/trunk@40034


git-svn-id: http://core.svn.wordpress.org/trunk@39971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 09:27:41 +00:00
Sergey Biryukov a6215fd8ac I18N: Use a consistent translator comment ("accessibility text") for strings used in `aria-label` attributes.
See #32000.
Built from https://develop.svn.wordpress.org/trunk@40033


git-svn-id: http://core.svn.wordpress.org/trunk@39970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 08:55:41 +00:00
Sergey Biryukov cb46332a82 Text Changes: Remove periods from checkbox labels in Discussion meta box to improve consistency throughout the admin.
Checkbox labels generally don't have periods, unless it's a complete sentence.

Props juhise.
Fixes #33780.
Built from https://develop.svn.wordpress.org/trunk@40032


git-svn-id: http://core.svn.wordpress.org/trunk@39969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 07:05:39 +00:00
Boone Gorges e836e47a8a Avoid PHP notices in `get_post_type_archive_template()`.
The function should fail more gracefully when called in the context
where `get_query_var( 'post_type' )` doesn't represent an actual post
type.

Props technopolitica, dlh.
Fixes #38374.
Built from https://develop.svn.wordpress.org/trunk@40031


git-svn-id: http://core.svn.wordpress.org/trunk@39968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-30 19:32:42 +00:00
Peter Wilson c957e3acb0 Feeds: Prevent empty feeds from returning 404 errors.
Partial revert of [38929].

This reverts the source code from the commit for #30210 to prevent valid but empty feeds from returning 404 file not found errors for the home and custom feeds.

The tests in the commit that remain applicable are retained.

Props pavelevap for reporting, stevenkword for initial patch.
See #30210.
Fixes #39157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 23:09:41 +00:00
Sergey Biryukov 8e84504401 Link Manager: Correct version number for `_deprecated_argument()` in `xfn_check()`.
Props grapplerulrich.
Fixes #39737.
Built from https://develop.svn.wordpress.org/trunk@40029


git-svn-id: http://core.svn.wordpress.org/trunk@39966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 22:14:40 +00:00
Sergey Biryukov 9d7ea04936 I18N: Merge similar strings in `_deprecated_argument()` calls.
Add translator comments.

Props ramiy, SergeyBiryukov.
Fixes #39020.
Built from https://develop.svn.wordpress.org/trunk@40028


git-svn-id: http://core.svn.wordpress.org/trunk@39965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 11:50:41 +00:00
Sergey Biryukov b0bcea2a18 Docs: Clarify that `wp_list_pages()` and `get_pages()` only work with hierarchical post types.
Props doublehhh.
Fixes #39369.
Built from https://develop.svn.wordpress.org/trunk@40027


git-svn-id: http://core.svn.wordpress.org/trunk@39964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 10:59:42 +00:00
Sergey Biryukov e1906ab3f1 Embeds: After [31148], list correct method in `WP_oEmbed::$compat_methods`.
Props LewisCowles.
Fixes #39292.
Built from https://develop.svn.wordpress.org/trunk@40026


git-svn-id: http://core.svn.wordpress.org/trunk@39963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 07:32:43 +00:00
Pascal Birchler b076f7e4a8 Plugins: Remove trailing pipe symbol in sub navigation after updating the last plugin.
Props sagarprajapati.
Fixes #39655.
Built from https://develop.svn.wordpress.org/trunk@40025


git-svn-id: http://core.svn.wordpress.org/trunk@39962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-28 17:01:46 +00:00
David A. Kennedy 1015c3b3a0 Twenty Seventeen: Rename "Sidebar" widget area for clarity
Renames the "Sidebar" widget area to "Blog Sidebar" and adjust its description to set better expectations for users as to where it appears in the theme.

Props apmarshall 

Fixes #39567.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-28 00:25:42 +00:00
David A. Kennedy ca0274c2ce Bundled Themes: Allow category display in post preview even when only one category
The category is not shown in the preview. And because of how `themename_categorized_blog()` function in each theme returns false for 1 or fewer categories,  and in this case it won't show the new category.

The patch uses `is_preview()` to fix that in Twenty Fourteen, Fifteen and Seventeen.

Props lancewillett.

Fixes #39531.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 22:09:42 +00:00
David A. Kennedy bccec366ca Twenty Fourteen: Fix fatal errors in WordPress versions before 4.0.0
The line of code throwing the error was introduced in WordPress 4.5 in r37040 "Customize: Require opt-in for selective refresh of widgets". Since `is_customize_preview()` was introduced in 4.0.0 and Twenty Fourteen should work from WordPress 3.6 and up, this caused the issue.

The patch adds an `is_customize_preview` function if it's missing.

Props adamsilverstein.

Fixes #39407.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 20:31:42 +00:00
Andrea Fercia 4ca4ff999a Accessibility: Make the inline uploader button a real button.
See `wp.media.view.UploaderWindow`.

Fixes #39305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 18:32:41 +00:00
Adam Silverstein a6d772108d Media: ensure JavaScript initialized when media edit screen is loaded directly.
Fix a JavaScript error when the media edit screen is loaded directly via a url such as `/wp-admin/post.php?post={post_id}&action=edit&image-editor`. Add a check in `imgLoaded` for `this.hold.sizer` which is set up during initialization and required for the cropping tool. Call `init` if this is undefined.

Props NoseGraze.
Fixes #38138.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 18:30:43 +00:00
Andrew Ozz 69c29935d5 TinyMCE: improve the previews for embedded WordPress posts:
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js

Fixes #39513.
Built from https://develop.svn.wordpress.org/trunk@40019


git-svn-id: http://core.svn.wordpress.org/trunk@39956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 04:25:44 +00:00
Weston Ruter b6281dbd75 Customize: Trim whitespace from nav menu item titles so that the underlying object's original title appears as input placeholder and in the control's title.
Whitespace is trimmed from titles in PHP when saved in any case, so this aligns the client-side behavior with what happens on the server.

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@39931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 18:08:40 +00:00
Boone Gorges fe1e3dba98 Revert to pre-4.7 behavior for fetching object instances by id.
This changeset reverts [38381], which caused inconsistencies in the way the
REST API fetches posts and other objects.

See #38792, #37738.
Built from https://develop.svn.wordpress.org/trunk@39992


git-svn-id: http://core.svn.wordpress.org/trunk@39929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 16:53:41 +00:00
Joe Hoyle 9463f7640b REST API: Fix unit tests for posts out of bounds errors
Previously we were assuming pagination headers would be sent when the request for posts is out of bounds. Instead presume it will return an error.

See #39061.
Built from https://develop.svn.wordpress.org/trunk@39991


git-svn-id: http://core.svn.wordpress.org/trunk@39928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 15:16:43 +00:00
Dominik Schilling 21264a31e0 Press This: Do not show Categories & Tags UI for users who cannot assign terms to posts anyways.
Built from https://develop.svn.wordpress.org/trunk@39968


git-svn-id: http://core.svn.wordpress.org/trunk@39905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:58:44 +00:00
Joe Hoyle 99cf07d882 REST API: Return an error if the page number is out of bounds.
Return an error from the REST API if a page number larger than the total pages count is requested.

Props morganestes.
Fixes #39061.
Built from https://develop.svn.wordpress.org/trunk@39967


git-svn-id: http://core.svn.wordpress.org/trunk@39904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:54:41 +00:00
John Blackbourn 4482f92070 Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field.
Built from https://develop.svn.wordpress.org/trunk@39956


git-svn-id: http://core.svn.wordpress.org/trunk@39893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:41:44 +00:00
Joe Hoyle e357195ce3 REST API: Unify object access handling for simplicity.
Rather than repeating ourselves, unifying the access into a single method keeps everything tidy. While we're at it, add in additional schema handling for common parameters.

See #38792.
Built from https://develop.svn.wordpress.org/trunk@39954


git-svn-id: http://core.svn.wordpress.org/trunk@39891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:39:41 +00:00
Dominik Schilling 85384297a6 Query: Ensure that queries work correctly with post type names with special characters.
Built from https://develop.svn.wordpress.org/trunk@39952


git-svn-id: http://core.svn.wordpress.org/trunk@39889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:33:45 +00:00
Weston Ruter a44f8db73d Customize: Always enqueue `customize-preview` stylesheet in the customizer preview to style selective refresh and visual edit shortcuts.
Enqueues the style along with the `customize-preview` script in the manager instead of via the `widgets` and `nav_menus` components, ensuring that the stylesheet is loaded for users who cannot manage widgets or nav menus.

Props dlh.
See #27403.
Fixes #39498.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 03:47:41 +00:00
Sergey Biryukov d10f451770 Docs: Add missing file header to `wp-admin/includes/noop.php`, introduced in [34037].
Props carl-alberto.
Fixes #39690.
Built from https://develop.svn.wordpress.org/trunk@39950


git-svn-id: http://core.svn.wordpress.org/trunk@39887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-25 23:10:43 +00:00
Peter Wilson 1a18262fd5 Menus: Prevent notice thrown in class-walker-page.php.
Calling `Walker_Page::walk()` directly was causing an `Undefined index: item_spacing` notice to be thrown, this adds an `isset()` check to prevent it.

Props bhargavbhandari90.
Fixes #39564.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 23:29:42 +00:00
Felix Arntz 832b16b966 Multisite: Show menu items in `My Sites > Network Admin` admin bar menu based on more precise capability checks.
Previously the menu items would all be displayed solely based on the `manage_network` capability. This change provides parity with the network admin menu.

Unit tests for the network admin menu functionality of `wp_admin_bar_my_sites_menu()` have been added.

Props chandrapatel.
Fixes #39082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 16:29:40 +00:00
Felix Arntz 82dc367cd4 Multisite: Replace `is_super_admin()` with a proper capability check when showing a notice about `WPLANG`.
In multisite, the notice is displayed to users that have the `manage_network_options` capability. In non-multisite, the notice is displayed to users with the `manage_options` capability.

Props Dhaval Parekh.
Fixes #39207. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 13:13:41 +00:00
Felix Arntz 34ad21bcfa Multisite: Remove unnecessary `is_super_admin()` check when adding an existing user to a site.
Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited.

Props supercoder.
Fixes #39220. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 12:03:43 +00:00
Felix Arntz 36fa7f72c0 Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to import new users.
Props bhargavbhandari90.
Fixes #39212. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:39:40 +00:00
Felix Arntz ff74a4cb7b Multisite: Replace `is_super_admin()` with `manage_network` when showing a message to the network administrator in `wp-signup.php`.
Props jignesh.nakrani.
Fixes #39209. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:08:42 +00:00
Felix Arntz 6fcb0e8b7f Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to change the role of oneself.
Props abhishek kaushik.
Fixes #39204. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:04:44 +00:00
Sergey Biryukov 64694c6742 Twenty Seventeen: Improve typography for Simplified Chinese (`zh_CN`).
Props ze3kr, Dharm1025.
Fixes #39379.
Built from https://develop.svn.wordpress.org/trunk@39942


git-svn-id: http://core.svn.wordpress.org/trunk@39879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 07:27:44 +00:00
Sergey Biryukov ca832f66f3 Text Changes: Add a period to the only `wp_die()` message that didn't have it: "Invalid plugin page".
Props Presskopp.
Fixes #39664.
Built from https://develop.svn.wordpress.org/trunk@39941


git-svn-id: http://core.svn.wordpress.org/trunk@39878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-22 02:33:42 +00:00
Sergey Biryukov bf1e6d1226 Docs: After [39939], "locales" should be plural.
See #39658.
Built from https://develop.svn.wordpress.org/trunk@39940


git-svn-id: http://core.svn.wordpress.org/trunk@39877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-21 17:26:41 +00:00
Sergey Biryukov bee96601bd I18N: Add support for Bosnian locale in `remove_accents()`.
Applies "letter D with stroke" replacement made in [38646] for Serbian (`sr_RS`) to Bosnian (`bs_BA`) as well.

Props H3llas for the report.
Fixes #39658.
Built from https://develop.svn.wordpress.org/trunk@39939


git-svn-id: http://core.svn.wordpress.org/trunk@39876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-21 17:16:43 +00:00
Sergey Biryukov 35d5918a1d Posts, Post Types: Preserve author filter in list table after entering a page number in paging input.
Props sagarprajapati.
Fixes #39523.
Built from https://develop.svn.wordpress.org/trunk@39938


git-svn-id: http://core.svn.wordpress.org/trunk@39875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-21 02:22:26 +00:00
Sergey Biryukov 8f0e75db16 Users: Preserve role filter in list table after entering a page number in paging input.
Props kailanitish90, sagarprajapati.
Fixes #39435.
Built from https://develop.svn.wordpress.org/trunk@39937


git-svn-id: http://core.svn.wordpress.org/trunk@39874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-21 02:21:43 +00:00
Sergey Biryukov 4fbcfe3a8c Docs: After [38672], update `$type` parameter description for `submit_button()` and `get_submit_button()`.
Remove the mention of `secondary` and `delete` classes as core values, add `small` and `large`.

Props afercia.
Fixes #23477.
Built from https://develop.svn.wordpress.org/trunk@39936


git-svn-id: http://core.svn.wordpress.org/trunk@39873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 20:37:42 +00:00
Felix Arntz 41fc0c0f5a Multisite: Replace `is_super_admin()` with `manage_network_users` when trying to add an existing user via username.
Props dhanendran.
Fixes #39202. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:49:41 +00:00
Felix Arntz c22fea9120 Multisite: Replace `is_super_admin()` with `manage_network_users` when checking for users autocomplete capabilities.
Props ashokkumar24.
Fixes #39201. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:43:42 +00:00
Felix Arntz 6e5cd6d397 Multisite: Replace `is_super_admin()` with `manage_network_options` in `wp-admin/options.php`.
Props sathyapulse.
Fixes #39200. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:39:41 +00:00
Felix Arntz dd23a8f48c Multisite: Do not check for `is_super_admin()` when trying to set user settings.
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.

Props chandrapatel for initial patch.
Fixes #39199. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:33:41 +00:00
Sergey Biryukov e9056c039d REST API: Add `group` and description to `WP_Test_REST_Request_Validation`.
Props danielbachhuber.
Fixes #39654.
Built from https://develop.svn.wordpress.org/trunk@39931


git-svn-id: http://core.svn.wordpress.org/trunk@39868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:13:40 +00:00
Felix Arntz c8de21c0c5 Multisite: Display correct scheme for the main site in `site-info.php`.
Props greatislander.
Fixes #39365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 17:03:41 +00:00
Felix Arntz 8062df694f Multisite: Correct and improve i18n strings in `wp-signup.php`.
The strings addressing the network administrator in `wp-signup.php` were still using the old terminology of blogs and sites. Furthermore concatenation of the strings has been removed to make them i18n-friendly.

Props jignesh.nakrani, SergeyBiryukov.
Fixes #39611.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 16:52:39 +00:00
Adam Silverstein 8d8f5616b7 Menus: trigger an event when menu items are added or removed.
Fire a `menu-item-added` event after a menu item is added to the DOM. Fire a `menu-removing-item` event before a menu item is removed from the DOM. Enables hooking into and responding to menu changes.

Props welcher, adamsilverstein.
Fixes #31218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 16:15:42 +00:00
Sergey Biryukov 0b338e2f58 Customize: Remove redundant context for "Reorder" and "Done" strings in nav menu and widget area controls to ensure consistent translations.
Props pavelevap, Presskopp.
Fixes #33747.
Built from https://develop.svn.wordpress.org/trunk@39927


git-svn-id: http://core.svn.wordpress.org/trunk@39864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 06:00:42 +00:00
Sergey Biryukov 6f8644aeb2 Media: Pass the current attachment object to `display_media_states` filter, for consistency with `display_post_states`.
Props pbiron, chriseverson.
Fixes #39628.
Built from https://develop.svn.wordpress.org/trunk@39926


git-svn-id: http://core.svn.wordpress.org/trunk@39863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 05:20:41 +00:00
Sergey Biryukov 371c072b38 Media: After [36837], check the correct theme modification name for custom logo in `_media_states()`.
Props pbiron, mitraval192.
Fixes #39627.
Built from https://develop.svn.wordpress.org/trunk@39925


git-svn-id: http://core.svn.wordpress.org/trunk@39862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-19 02:03:41 +00:00
Weston Ruter 3e6c892f89 Customize: Allow custom post types to be used in starter content.
Changes `WP_Customize_Nav_Menus::insert_auto_draft_post()` so it can be invoked for a `post_type` that is not registered (yet).

See #38615, #38114.
Fixes #39610.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-19 00:01:46 +00:00
Ryan McCue 1326d9e2c7 REST API: Correctly serve the index with PATH_INFO
When hitting the index, untrailingslashit() would make the REST route empty, which would then use the fallback inside WP_REST_Server. This isn't a problem most of the time, but WP_REST_Server contains a fallback to PATH_INFO. Combined with PATH_INFO permalinks, this would give a 404 on the API index, as it attempts to look up a route for "/wp-json/".

Props ccprog.
Fixes #39432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 05:40:40 +00:00
Ryan McCue dc133c3f2d REST API: Allow shortcircuiting rest_pre_insert_comment
rest_pre_insert_{post_type} allows returning a WP_Error from the filter to shortcircuit actually creating the object, so it makes sense to do so for comments too.

Props dspilka.
Fixes #39578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 05:18:41 +00:00
Gary Pendergast 096b09d941 dbDelta: Ignore index subparts when checking for duplicate indices.
If index lengths change in table definitions, we don't recreate the index - instead, we throw a database error, as `dbDelta()` tries to create a new index with the same name.

It's better to leave the index as is, MySQL doesn't have an efficient process for resizing indices, and dropping/creating is a slow process which we don't want to trigger automatically.

Fixes #34870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 04:01:42 +00:00
Sergey Biryukov 3c1ce66767 Users: Introduce `signup_site_meta` and `signup_user_meta` for filtering signup metadata in `wpmu_signup_blog()` and `wpmu_signup_user()`, respectively.
Props Mista-Flo.
Fixes #39223.
Built from https://develop.svn.wordpress.org/trunk@39920


git-svn-id: http://core.svn.wordpress.org/trunk@39857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 03:53:42 +00:00
Sergey Biryukov 4a1108b9f9 Build/Test Tools: Add `assertNotFalse()` method to `WP_UnitTestCase` and use it where appropriate.
Props peterwilsoncc.
Fixes #39219.
Built from https://develop.svn.wordpress.org/trunk@39919


git-svn-id: http://core.svn.wordpress.org/trunk@39856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 03:40:43 +00:00
Sergey Biryukov 6b89d68cc1 Build/Test Tools: Correctly reference function names in `@covers` entries.
Props pbearne.
Fixes #39235.
Built from https://develop.svn.wordpress.org/trunk@39918


git-svn-id: http://core.svn.wordpress.org/trunk@39855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 02:44:43 +00:00
Sergey Biryukov 54001e2756 List Tables: Pass the `$which` parameter to `restrict_manage_posts` filter instance in `WP_Media_List_Table`, missed in [37422].
Props wpsmith.
Fixes #38772.
Built from https://develop.svn.wordpress.org/trunk@39917


git-svn-id: http://core.svn.wordpress.org/trunk@39854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 02:38:42 +00:00
Andrew Ozz 66a39611f6 TinyMCE: strip browser inserted `<u>` and <font>` tags from inside links when copying and pasting in IE and Edge.
Fixes #39570.
Built from https://develop.svn.wordpress.org/trunk@39916


git-svn-id: http://core.svn.wordpress.org/trunk@39853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 01:25:44 +00:00
Gary Pendergast 1071dfb4ec User Query: Cast `$user_total` as an `int`.
The `$user_total` member of `WP_User_Query`, and corresponding `get_total()` method, have always been documented as returning an `int`. `$user_total`, however, is populated by `$wpdb->get_var()`, which returns 
a string (containing an integer value). Casting the return value from `get_var()` as an `int` rectifies this discrepency.

Props runciters.
Fixes #39297.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 23:24:45 +00:00
Andrew Ozz 458746f631 Tests: `wpautop()` should not add extra `</p>` before `<figcaption>`.
Props pbearne.
See #39307.
Built from https://develop.svn.wordpress.org/trunk@39914


git-svn-id: http://core.svn.wordpress.org/trunk@39851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 17:57:43 +00:00
James Nylen fa20ce762a REST API: Improve test coverage of single user endpoint for public data.
Add test coverage for requests of a single user resource for authors of post types registered as:

- public = true, show_in_rest = true: success without auth.
- public = true, show_in_rest = false: fail without auth.
- public = false, show_in_rest = true: success without auth.
- public = false, show_in_rest = false: fail without auth.

See #38878.
Fixes #39546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 16:21:43 +00:00
Andrew Ozz 85ee190163 Formatting: fix `wpautop()` to stop adding paragraph tags around `<figcaption>`.
Fixes #39307 for trunk.
Built from https://develop.svn.wordpress.org/trunk@39912


git-svn-id: http://core.svn.wordpress.org/trunk@39849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 01:06:40 +00:00
Andrew Ozz ee3052fdbe Docs: some improvements/fixes for editor.js.
See #38933.
Built from https://develop.svn.wordpress.org/trunk@39911


git-svn-id: http://core.svn.wordpress.org/trunk@39848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 00:49:41 +00:00
Andrew Ozz 82a8065f70 TinyMCE: ensure the inline toolbar is shown and properly positioned when there are several wpview blocks in the editor and the user selects one after the other.
Props gitlost.
Fixes #38849.
Built from https://develop.svn.wordpress.org/trunk@39910


git-svn-id: http://core.svn.wordpress.org/trunk@39847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 00:22:43 +00:00
Sergey Biryukov 1ba4484186 Twenty Seventeen: Remove duplicate `global $post` declaration in `twentyseventeen_front_page_section()`.
Props ixkaito.
Fixes #39590.
Built from https://develop.svn.wordpress.org/trunk@39909


git-svn-id: http://core.svn.wordpress.org/trunk@39846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 12:50:39 +00:00
Sergey Biryukov 4d546a12cf I18N: Reference correct placeholder in a translator comment added in [30333].
See #30264.
Built from https://develop.svn.wordpress.org/trunk@39908


git-svn-id: http://core.svn.wordpress.org/trunk@39845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 08:07:43 +00:00
Sergey Biryukov 9ba7ab1cfc Users: Display the name of user being edited on Edit User screen.
Props seanchayes.
Fixes #28182.
Built from https://develop.svn.wordpress.org/trunk@39907


git-svn-id: http://core.svn.wordpress.org/trunk@39844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 07:14:39 +00:00
Sergey Biryukov 649d554294 Themes: Add a unit test for `get_theme_feature_list()` to make sure that the list of theme features pulled from the WordPress.org API returns the expected data structure.
Props iandunn.
Fixes #28121.
Built from https://develop.svn.wordpress.org/trunk@39906


git-svn-id: http://core.svn.wordpress.org/trunk@39843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 06:50:43 +00:00
Sergey Biryukov 6e3073c1eb Posts, Post Types: Increase the height of post slug input to prevent certain characters from being cut in Firefox on Windows.
Props Ankit K Gupta, Presskopp.
Fixes #28084.
Built from https://develop.svn.wordpress.org/trunk@39905


git-svn-id: http://core.svn.wordpress.org/trunk@39842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 04:03:43 +00:00
Andrew Ozz 35c91b7c0d TinyMCE: prevent the inline toolbar from appearing on partially selected wpview nodes. This can happen when HTML is initially loaded in the editor and wpview is the first node, or sometimes on repeatedly pasting the same wpview.
Props gitlost.
Fixes #38849.
Built from https://develop.svn.wordpress.org/trunk@39904


git-svn-id: http://core.svn.wordpress.org/trunk@39841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 03:00:43 +00:00
Andrew Ozz 45f3ee380c TinyMCE: when inserting a wpview, place the caret after is so the user can continue typing without interruption.
Props iseulde.
Fixes #39337.
Built from https://develop.svn.wordpress.org/trunk@39903


git-svn-id: http://core.svn.wordpress.org/trunk@39840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:41:40 +00:00
Andrew Ozz 90f441e1b4 TinyMCE: improve removal of spaces from empty paragraphs when loading HTML in the editor.
Fixes #39437.
Built from https://develop.svn.wordpress.org/trunk@39902


git-svn-id: http://core.svn.wordpress.org/trunk@39839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:06:41 +00:00
Sergey Biryukov 82e17902a9 Twenty Seventeen: Correct `@param` entries for `twentyseventeen_custom_colors_css` filter.
Props Soean.
Fixes #39575.
Built from https://develop.svn.wordpress.org/trunk@39901


git-svn-id: http://core.svn.wordpress.org/trunk@39838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 15:03:41 +00:00
Sergey Biryukov b75023ee1a Docs: Add missing `@param` type for `wp_cache_get_last_changed()`.
Props afzalmultani, Soean.
Fixes #39571.
Built from https://develop.svn.wordpress.org/trunk@39900


git-svn-id: http://core.svn.wordpress.org/trunk@39837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 14:16:44 +00:00
Sergey Biryukov d2a6ea340e REST API: Update unit tests to account for the string changes in [39896].
See #39054.
Built from https://develop.svn.wordpress.org/trunk@39899


git-svn-id: http://core.svn.wordpress.org/trunk@39836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 05:15:42 +00:00
Sergey Biryukov 5d83b14893 Build/Test Tools: After [29858], update `.jsintrc` to use spaces, not tabs.
Props netweb.
Fixes #39359.
Built from https://develop.svn.wordpress.org/trunk@39898


git-svn-id: http://core.svn.wordpress.org/trunk@39835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:45:41 +00:00
Sergey Biryukov 2a7400c956 Administration: Improve tab character width in Plugins and Themes editor.
Props afercia.
Fixes #38684.
Built from https://develop.svn.wordpress.org/trunk@39897


git-svn-id: http://core.svn.wordpress.org/trunk@39834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:41:41 +00:00
Sergey Biryukov b3c28838f7 REST API: Improve error messages for number relational validation.
Props jblz.
Fixes #39054.
Built from https://develop.svn.wordpress.org/trunk@39896


git-svn-id: http://core.svn.wordpress.org/trunk@39833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:38:40 +00:00
Sergey Biryukov 8603da629f Taxonomy: Add an explanation for "Parent" dropdown for hierarchical custom taxonomies.
Props F J Kaiser, raggedrobins, DrewAPicture, diddledan, SergeyBiryukov.
Fixes #23447.
Built from https://develop.svn.wordpress.org/trunk@39895


git-svn-id: http://core.svn.wordpress.org/trunk@39832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:19:39 +00:00
Sergey Biryukov 139a58b70a Twenty Seventeen: Remove extra asterisk from a translator comment so the comment could be parsed correctly.
Props swissspidy.
See #39116.
Built from https://develop.svn.wordpress.org/trunk@39894


git-svn-id: http://core.svn.wordpress.org/trunk@39831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 21:37:43 +00:00
Sergey Biryukov 36cb41145e Docs: In `wp_set_object_terms()`, add a note that passing an empty value as `$terms` argument will remove all related terms.
Props barryceelen.
Fixes #36690.
Built from https://develop.svn.wordpress.org/trunk@39893


git-svn-id: http://core.svn.wordpress.org/trunk@39830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:54:42 +00:00
Sergey Biryukov a1319d63a0 Widgets: In `unregister_sidebar()`, rename the `$name` parameter to `$sidebar_id` for consistency with `is_registered_sidebar()`.
Also correct the parameter type in `@param` entry.

Props Soean, tmatsuur.
Fixes #35147.
Built from https://develop.svn.wordpress.org/trunk@39892


git-svn-id: http://core.svn.wordpress.org/trunk@39829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:38:54 +00:00
Sergey Biryukov 11d81ecc7c Media: Use a consistent error message for file type errors on uploading.
Props pavelevap, jackreichert.
Fixes #33242.
Built from https://develop.svn.wordpress.org/trunk@39891


git-svn-id: http://core.svn.wordpress.org/trunk@39828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:29:43 +00:00
Sergey Biryukov 327a11ad65 Docs: Use a consistent description for `$plugin` parameter in various plugin API functions.
See #36333.
Built from https://develop.svn.wordpress.org/trunk@39890


git-svn-id: http://core.svn.wordpress.org/trunk@39827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:16:41 +00:00
Sergey Biryukov a989f0b168 Docs: Improve the DocBlock for `validate_plugin()`.
Props theMikeD.
Fixes #36333.
Built from https://develop.svn.wordpress.org/trunk@39889


git-svn-id: http://core.svn.wordpress.org/trunk@39826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:15:42 +00:00
Sergey Biryukov 8b9a3a08bf Docs: After [37083], change "HEX format" to "3- or 6-digit hexadecimal form" for clarity.
Props swissspidy, theMikeD.
Fixes #36336.
Built from https://develop.svn.wordpress.org/trunk@39888


git-svn-id: http://core.svn.wordpress.org/trunk@39825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 05:56:40 +00:00
Sergey Biryukov 351a3b6d69 Docs: Make `$meta` parameter description in multisite signup and registration functions more consistent.
See #38781.
Built from https://develop.svn.wordpress.org/trunk@39887


git-svn-id: http://core.svn.wordpress.org/trunk@39824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 05:21:41 +00:00
Sergey Biryukov 3f59be8c97 Users: In `wpmu_signup_blog()` and `wpmu_signup_user()`, pass unserialized signup meta data to `after_signup_site` and `after_signup_user` filters introduced in [34112], to match the documented value.
Props MaximeCulea.
Fixes #38781.
Built from https://develop.svn.wordpress.org/trunk@39886


git-svn-id: http://core.svn.wordpress.org/trunk@39823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:57:39 +00:00
Sergey Biryukov a4f106ff9d I18N: Move "Site Language" setting above "Timezone".
This brings all locale-specific site settings closer together and prevents the language setting from being pushed down by unrelated settings added by plugins.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:28:40 +00:00
Sergey Biryukov 32564f9332 Themes: Use curly braces for variables inside strings in `get_page_template() to explicitly specify the end of the variable name.
Props kuck1u.
Fixes #38625.
Built from https://develop.svn.wordpress.org/trunk@39884


git-svn-id: http://core.svn.wordpress.org/trunk@39821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:13:42 +00:00
Joe McGill 52897df8cd Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831].

Props gitlost.
See #11946.
Built from https://develop.svn.wordpress.org/trunk@39850


git-svn-id: http://core.svn.wordpress.org/trunk@39787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:36:39 +00:00
Joe McGill 0df85f5bab Tests: Replace broken codeispoetry.png file.
This also updates the test filename in
`WP_Test_REST_Attachments_Controller::test_create_item_default_filename_title()`
to accurately match the actual file name.
Built from https://develop.svn.wordpress.org/trunk@39848


git-svn-id: http://core.svn.wordpress.org/trunk@39786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:25:41 +00:00
Aaron Campbell daf358983c REST API: Change which users are shown in the users endpoint.
Only show users that have authored a post of a post type that has `show_in_rest` set to true.

Props rachelbaker, jnylen0.
See #38878.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 14:14:42 +00:00
Joe McGill 8eff927823 Media: Improve image filetype checking.
This adds a new function `wp_get_image_mime()` which is used by
`wp_check_filetype_and_ext()` to validate image files using
`exif_imagetype()` if available instead of `getimagesize()`.

`getimagesize()` is less performant than `exif_imagetype()` and is
dependent on GD. If `exif_imagetype()` is not available, it falls back to
`getimagesize()` as before.

If `wp_check_filetype_and_ext()` can't validate the filetype, we now return
`false` for ext/MIME values.

See #11946.
Built from https://develop.svn.wordpress.org/trunk@39831


git-svn-id: http://core.svn.wordpress.org/trunk@39769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 13:08:44 +00:00
Dominik Schilling c9ea1de144 Updates: Translate plugin data on the Updates screen.
Built from https://develop.svn.wordpress.org/trunk@39808


git-svn-id: http://core.svn.wordpress.org/trunk@39746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 10:37:48 +00:00
Dominik Schilling ce7fb2934d Themes: Fix markup for theme name fallbacks.
Built from https://develop.svn.wordpress.org/trunk@39807


git-svn-id: http://core.svn.wordpress.org/trunk@39745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 10:34:44 +00:00
Jeremy Felt cea9e2dc62 Multisite: Use `wp_rand()` in signup key creation.
Built from https://develop.svn.wordpress.org/trunk@39795


git-svn-id: http://core.svn.wordpress.org/trunk@39733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:30:42 +00:00
Jeremy Felt 061e878881 Mail: Disable wp-mail.php when `mailserver_url` is mail.example.com.
Built from https://develop.svn.wordpress.org/trunk@39772


git-svn-id: http://core.svn.wordpress.org/trunk@39710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:13:43 +00:00
Aaron Campbell 03e5c0314a Add nonce for widget accessibility mode.
Props vortfu.

See #23328.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:32:41 +00:00
Dion Hulse 5eb452d15b Update PHPMailer to 5.2.22.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.21...v5.2.22

Fixes #37210 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:23:41 +00:00
Sergey Biryukov 3fd9465cc1 Docs: Make `@deprecated` entry for `wp_kses_js_entities()`, deprecated in [38785], consistent with other entries.
Props stevenkword, teinertb.
Fixes #39541.
Built from https://develop.svn.wordpress.org/trunk@39758


git-svn-id: http://core.svn.wordpress.org/trunk@39696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 22:09:42 +00:00
Sergey Biryukov c07571de67 Docs: Change `@param` type for `$user_object` in `WP_Users_List_Table::single_row()` from `object` to `WP_User` to be more accurate.
Props sebastian.pisula.
Fixes #39536.
Built from https://develop.svn.wordpress.org/trunk@39757


git-svn-id: http://core.svn.wordpress.org/trunk@39695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 12:45:44 +00:00
Sergey Biryukov 9234febe06 Posts, Post Types: Use an existing string for "Invalid post type" error message.
Props ramiy.
Fixes #39171.
Built from https://develop.svn.wordpress.org/trunk@39756


git-svn-id: http://core.svn.wordpress.org/trunk@39694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 02:40:42 +00:00
Sergey Biryukov fd0564d2bc Docs: Remove incorrect `@param` tags for `admin_print_footer_scripts-{$hook_suffix}` and `admin_footer-{$hook_suffix}` dynamic actiona.
Remove `@global` tags as well as they are not suited to describe a function parameter and are documented in the description of the actions.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-09 14:38:41 +00:00
Sergey Biryukov fdc2b34124 Docs: Move `install_global_terms()` DocBlock after the `function_exists()` call.
Props keesiemeijer.
Fixes #39526.
Built from https://develop.svn.wordpress.org/trunk@39754


git-svn-id: http://core.svn.wordpress.org/trunk@39692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-09 14:31:44 +00:00
Sergey Biryukov 14454e3b0b Docs: Use correct closing tag in `submit_field` description in `comment_form()`.
Props truongwp.
Fixes #39508.
Built from https://develop.svn.wordpress.org/trunk@39753


git-svn-id: http://core.svn.wordpress.org/trunk@39691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 14:51:44 +00:00
Sergey Biryukov 1d05544828 Twenty Seventeen: Expand a changelog entry added in [39742] with the new item name.
See #39489, [39575].
Built from https://develop.svn.wordpress.org/trunk@39752


git-svn-id: http://core.svn.wordpress.org/trunk@39690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 13:12:39 +00:00
Sergey Biryukov 03c6dc1002 Customize: Correct a comment in `get_theme_starter_content()` added in [39561].
The item name is `link_home`, not `home_link`.

See #39104.
Built from https://develop.svn.wordpress.org/trunk@39751


git-svn-id: http://core.svn.wordpress.org/trunk@39689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 13:11:41 +00:00
Tammie Lister 979152be92 Twenty Seventeen: add more details about filter and requires version
The required version should be 4.7 and also adds more information to changelog.

Props @ocean90 @Presskopp


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


git-svn-id: http://core.svn.wordpress.org/trunk@39684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:15:52 +00:00
Tammie Lister b5908ad8c8 Twenty Seventeen: version bump and update changelog
Adds in changelog since last version and all the changes listed in readme.txt.
Bumps version numbers in style.css and readme.txt.

Props @ocean90


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


git-svn-id: http://core.svn.wordpress.org/trunk@39682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:14:38 +00:00
Sergey Biryukov d054731b2b Docs: Add missing `@since` entry for `Walker::unset_children()`.
Props chiragpatel.
Fixes #39506.
Built from https://develop.svn.wordpress.org/trunk@39741


git-svn-id: http://core.svn.wordpress.org/trunk@39681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:14:00 +00:00
Sergey Biryukov 6032bd6e32 Docs: Use 3-digit, x.x.x style semantic versioning for `@since` entries in `wp-admin/js/image-edit.js`.
See #38748.
Built from https://develop.svn.wordpress.org/trunk@39740


git-svn-id: http://core.svn.wordpress.org/trunk@39680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:13:20 +00:00
Sergey Biryukov e8c65e0df1 Docs: Use 3-digit, x.x.x style semantic versioning for `@since` entries in `wp-admin/js/word-count.js`.
See #37718.
Built from https://develop.svn.wordpress.org/trunk@39739


git-svn-id: http://core.svn.wordpress.org/trunk@39679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:12:39 +00:00
Sergey Biryukov e654c81f10 Docs: Add documentation for `wp-admin/js/editor.js`.
Props terwdan, ireneyoast.
Fixes #38933.
Built from https://develop.svn.wordpress.org/trunk@39738


git-svn-id: http://core.svn.wordpress.org/trunk@39678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:11:57 +00:00
Sergey Biryukov 008c1f7e60 Docs: Correct `@access` entries for `WP_Locale::init()` and `WP_Locale::register_globals()`.
Props keesiemeijer.
Fixes #39504.
Built from https://develop.svn.wordpress.org/trunk@39737


git-svn-id: http://core.svn.wordpress.org/trunk@39677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:11:16 +00:00
Sergey Biryukov 64675a6a0b Docs: Add missing `@since` entries for `WP_Theme` class methods.
Props keesiemeijer.
Fixes #39503.
Built from https://develop.svn.wordpress.org/trunk@39736


git-svn-id: http://core.svn.wordpress.org/trunk@39676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:10:35 +00:00
Sergey Biryukov b971410d2f Docs: Correct `@access` entry for `WP_User::filter` property.
Add missing `@since` entries for `WP_User::back_compat_keys` and `WP_User::init()`.

Props keesiemeijer, prosti.
Fixes #39502, #39278.
Built from https://develop.svn.wordpress.org/trunk@39735


git-svn-id: http://core.svn.wordpress.org/trunk@39675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:09:55 +00:00
Sergey Biryukov ff749bc66c Docs: Correct `@access` entries and duplicate hook references in `WP_Customize_Selective_Refresh`.
Props keesiemeijer.
Fixes #39501.
Built from https://develop.svn.wordpress.org/trunk@39734


git-svn-id: http://core.svn.wordpress.org/trunk@39674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:09:13 +00:00
Sergey Biryukov f6cd778c84 Twenty Seventeen: Correct `@param` entries for `twentyseventeen_content_width`, `twentyseventeen_custom_colors_saturation` and `twentyseventeen_social_links_icons` filters.
Props Jaydeep Rami, BharatKambariya.
Fixes #39488.
Built from https://develop.svn.wordpress.org/trunk@39733


git-svn-id: http://core.svn.wordpress.org/trunk@39673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:08:33 +00:00
Sergey Biryukov 2f50816f32 Twenty Seventeen: Correct `@param` entry for `twentyseventeen_front_page_sections` filter.
Props ketuchetan, priyankabehera155.
Fixes #39488.
Built from https://develop.svn.wordpress.org/trunk@39732


git-svn-id: http://core.svn.wordpress.org/trunk@39672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:07:52 +00:00
Dominik Schilling 2e81d3ed88 Twenty Seventeen: Introduce a theme-specific filter `twentyseventeen_starter_content` for customizing the starter content array.
Add some documentation to the default starter content.

Props sanket.parmar, celloexpressions.
Fixes #39109.
Built from https://develop.svn.wordpress.org/trunk@39720


git-svn-id: http://core.svn.wordpress.org/trunk@39660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:02:58 +00:00
Sergey Biryukov 93d4caaccd Docs: Add missing `@param` tag for `show_post_locked_dialog` filter.
Props keesiemeijer.
Fixes #39479.
Built from https://develop.svn.wordpress.org/trunk@39710


git-svn-id: http://core.svn.wordpress.org/trunk@39650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:59:04 +00:00
Sergey Biryukov 6e5d66c10e Docs: Move `install_network()` DocBlock after the `function_exists()` call.
Props keesiemeijer.
Fixes #39478.
Built from https://develop.svn.wordpress.org/trunk@39709


git-svn-id: http://core.svn.wordpress.org/trunk@39649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:58:23 +00:00
Sergey Biryukov ead8c38f38 Docs: Add variable to `@param` entry for `whitelist_options` filter.
Props keesiemeijer.
Fixes #39477.
Built from https://develop.svn.wordpress.org/trunk@39708


git-svn-id: http://core.svn.wordpress.org/trunk@39648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:57:42 +00:00
Dion Hulse 9f381dbea6 Customizer: Don't query for postmeta for Custom CSS (for not-current-themes) and Customizer Changeset posts.
Props dlh.
Fixes #39194.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 08:12:42 +00:00
Dion Hulse 577a192ebd Mail: In PHPMailer 5.2.7 the case of the `Send()` method changed to `send()`, update our call for consistency with the library.
Props michalzuber.
Fixes #39469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 08:10:42 +00:00
Dion Hulse 8912d6b134 Updates: Properly define `$filesystemForm` to handle error in modals.
Ammends [39657].
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 07:24:43 +00:00
Weston Ruter 2ed703ed78 Customize: Ensure `theme_mod`-cache of `custom_css` lookup of `-1` short-circuits a `WP_Query` from being made.
Props dlh.
See #35395.
Fixes #39259.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 07:13:42 +00:00
Dion Hulse b5dbe61dab Upgrade: Fix the installation of TwentySeventeen upon upgrade from an early version.
This reverts part of [31124] which incorrectly caused `$old_wp_version` to equal the version of WordPress being upgraded to due to global variable access changes.

See #38551, #30799.
Fixes #39138 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 06:13:41 +00:00
Weston Ruter 5468850b10 Customize: Update `customize.php` URL with `changeset_uuid` param the instant a change is made instead of deferring until the changeset update request responds.
Props asalce.
Fixes #39227.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 05:18:43 +00:00
Weston Ruter ea0f8b53f1 Customize: Remove extra left padding in core for site title and widgets in preview.
These styles should only be applied by theme stylesheets as needed.

Props sirbrillig.
Reverts parts of [39202] and [39233].
See #38651.
Fixes #39349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 04:33:43 +00:00
Ryan McCue a676166a63 Upgrade/Install: Avoid creating nonce during installation.
When installing and using database-saved salts, wp_create_nonce() causes database errors as wp_salt() attempts to insert into the not-yet-created options table. Since authentication isn't available during installation, we can safely skip creating a nonce.

Props nullvariable, pento, dd32.
Fixes #39047.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 04:11:43 +00:00
Ryan McCue 952b6873e7 Feeds: Don't override the Content-Type header inside fetc_feed()
SimplePie can set the Content-Type header automatically with the correct charset for convenience, but we already force the charset to match the site's, making it redundant at best. At worst, SimplePie incorrectly overrides the content-type for non-HTML content (such as API requests).

Props dlh, stevenkword.
Fixes #39066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 03:06:42 +00:00
Adam Silverstein c8a3496ebe REST API: Add error handling for fetch error in `buildModelGetter` of wp-api.js.
When a call to a model getter method fails, reject the returned deferred object. Enables better handling of fetch errors.

Props westonruter, adamsilverstein.
Fixes #39314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 03:03:42 +00:00
Andrew Ozz e2166de4b0 Always add `page-template-default` class to the editor body when the template is not specified. This matches the behavior on the front-end.
Props timph (for the detailed bug report), azaozz.
Fixes #39368 for trunk.
Built from https://develop.svn.wordpress.org/trunk@39678


git-svn-id: http://core.svn.wordpress.org/trunk@39618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 01:53:43 +00:00
Weston Ruter ef882e918e Customize: Prevent removal of underline upon hover/focus for nav menu deletion links.
Props monikarao.
Amends [38503].
See #37527.
Fixes #39444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 19:13:40 +00:00
Sergey Biryukov 7a83036227 Docs: Correct the DocBlock for `get_header_video_url()`.
Props keesiemeijer.
Fixes #39468.
Built from https://develop.svn.wordpress.org/trunk@39676


git-svn-id: http://core.svn.wordpress.org/trunk@39616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:44:43 +00:00
Sergey Biryukov 64bb76d122 Docs: Correct `@since` and `@access` tags for `WP_Term_Query::get_terms()` and `WP_Term_Query::parse_orderby_meta()`.
Props keesiemeijer.
Fixes #39467.
Built from https://develop.svn.wordpress.org/trunk@39675


git-svn-id: http://core.svn.wordpress.org/trunk@39615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:39:43 +00:00
Sergey Biryukov 868f642cc1 Docs: Correct `@access` tag for `WP_Customize_Partial::id_data` property.
Props keesiemeijer.
Fixes #39464.
Built from https://develop.svn.wordpress.org/trunk@39674


git-svn-id: http://core.svn.wordpress.org/trunk@39614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:36:41 +00:00
Sergey Biryukov 88d2bb035a Docs: Add missing `@since` and `@access` tags for `WP_Widget_Form_Customize_Control::to_json()` and `::render_content()`.
Props keesiemeijer.
Fixes #39463.
Built from https://develop.svn.wordpress.org/trunk@39673


git-svn-id: http://core.svn.wordpress.org/trunk@39613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:34:44 +00:00
Sergey Biryukov 625849cc60 Docs: Add missing `@since` and `@access` tags for `WP_Date_Query::is_first_order_clause()`.
Props keesiemeijer.
#39462.
Built from https://develop.svn.wordpress.org/trunk@39672


git-svn-id: http://core.svn.wordpress.org/trunk@39612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:26:43 +00:00
Sergey Biryukov fd78085a92 Docs: Correct `rest_insert_*` duplicate hook references in REST API.
Props keesiemeijer.
Fixes #39371.
Built from https://develop.svn.wordpress.org/trunk@39671


git-svn-id: http://core.svn.wordpress.org/trunk@39611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:23:40 +00:00
Sergey Biryukov b737cce497 Docs: Add missing `session_token_manager` duplicate hook reference in `wp-includes/class-wp-session-tokens.php`.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39670


git-svn-id: http://core.svn.wordpress.org/trunk@39610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:22:42 +00:00
Sergey Biryukov d16bdab87d Docs: Correct `comment_email` duplicate hook reference in `wp-admin/includes/class-wp-comments-list-table.php`.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39669


git-svn-id: http://core.svn.wordpress.org/trunk@39609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:21:41 +00:00
Sergey Biryukov 179a40d969 Docs: Add missing duplicate hook references in `wp-admin/includes/ajax-actions.php`.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39668


git-svn-id: http://core.svn.wordpress.org/trunk@39608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:20:44 +00:00
Sergey Biryukov f3a9d2bd9a I18N: Add post type context to "Featured Image" post labels.
Fixes #39458.
Built from https://develop.svn.wordpress.org/trunk@39667


git-svn-id: http://core.svn.wordpress.org/trunk@39607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 08:40:41 +00:00
Sergey Biryukov 962db75ace Posts, Post Types: Add a `@since` entry for `archives` post type label introduced in [35382].
See #16075.
Built from https://develop.svn.wordpress.org/trunk@39666


git-svn-id: http://core.svn.wordpress.org/trunk@39606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 08:21:43 +00:00
Dion Hulse 5eb2277dce Shortcodes: Clarify the docs for `pre_do_shortcode_tag` and `do_shortcode_tag`.
Props dhanendran.
Fixes #39294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-03 04:00:18 +00:00
Boone Gorges 324e79a506 Ignore the 'comment_order' setting when determining comment pagination.
[38740] incorrectly introduced logic that changed a comment's page when
'comment_order' was set to 'desc'. This is in violation of the design
of the comment pagination system: a comment's page is designed not to
change when 'comment_order' or 'default_comment_page' are changed.
See #31101.

Props rachelbaker.
Fixes #39280.
Built from https://develop.svn.wordpress.org/trunk@39663


git-svn-id: http://core.svn.wordpress.org/trunk@39603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 20:00:31 +00:00
Boone Gorges 5fc3bbbfd2 Don't double-escape `terms` payload in `WP_Tax_Query::transform_query()`.
`terms` values are passed through `sanitize_term_field()` with the 'db'
flag, which add slashes. Because `terms` are subsequently run through
`esc_sql()`, these slashes must be removed. See [36348], which added
a similar step to sanitization in `get_terms()`.

Props bcworkz.
Fixes #39315.
Built from https://develop.svn.wordpress.org/trunk@39662


git-svn-id: http://core.svn.wordpress.org/trunk@39602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 19:40:19 +00:00
Rachel Baker 66551de94c REST API: Add missing assertions to the view and embed context response data for the Users Controller.
Adds tests for responses where `context != 'edit'` the following properties are not included in the response data:
- `email`
- `locale`
- `registered_date`

Props thepelkus, jnylen0.
Fixes #39399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 18:43:44 +00:00
Rachel Baker 5c5dbc95f4 General: Update copyright year to 2017 in license.txt.
Props Nikschavan.
Fixes #39433.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 17:58:42 +00:00
Dion Hulse 05f07e13d9 Updates: Show the Authentication key settings after selecting the SSH transport in both the modal, and also on the plugin/theme updates screen.
Props afercia.
Fixes #39057 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:44:41 +00:00
Dion Hulse 6066654967 Updates: Remove a stray `"` from a tag.
Props afercia.
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:42:42 +00:00
Dion Hulse 1a40f6b7ae Mail: Ensure that any `phpmailerException` exceptions generated by `setFrom()` are caught to avoid PHP Fatal errors.
This change avoids a PHP fatal error that can be encountered when the specified (or generated) source email is an invalid address, such as `wordpress@_`, it makes no effort to set a valid source, only avoid the fatal error.

See #25239 for correcting the email address.
Fixes #39360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 06:44:40 +00:00
Peter Wilson 25e462dbe7 Taxonomy: Redirect to current taxonomy when adding a term without AJAX.
Fixes a regression in which adding terms via a full page refresh, ie without AJAX, would always redirect to the tags taxonomy.

Props szaqal21.
Fixes #39328 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 03:11:42 +00:00
Rachel Baker c6f8182eb0 REST API: Merge similiar error message strings in the Terms Controller.
Replaces the "doesn't" contraction with "does not" to be consistent with similar strings in `WP_Error` messages when a specified term or parent term is missing in `WP_REST_Terms_Controller`.

Props ramiy, ocean90.
Fixes #39176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 18:45:40 +00:00
Rachel Baker 158f302112 REST API: Add the `supports` property to the Post Type response object.
Includes a new `supports` property in the response object and schema for the `/types` endpoints for users with the `edit_posts` capability for the given post type. The `supports` property returns an object of the features the given post type *supports*.

Props timmydcrawford, tyxla.
Fixes #39033.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 17:28:45 +00:00
Dion Hulse 24767c76d3 Upgrade PHPMailer from 5.2.14 to 5.2.21.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.14...v5.2.21

Props sebastian.pisula, MattyRob, sfpt, dd32.
Fixes #37210 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 02:53:44 +00:00
Dion Hulse 4efebd4b71 Filesystem: Add `return` statement to `WP_Filesystem_ftpsockets->rmdir`
Props tymvie.
Fixes #39405.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-28 03:52:42 +00:00
Rachel Baker df256f9fee REST API: Remove errant annotation from `test_get_items_pagination_headers()` method.
Removes the debugging group notation left in the `WP_Test_REST_Users_Controller` and `WP_Test_REST_Posts_Controller` classes pagination headers method. Introduced in [38832].

Props sanket.parmar.
Fixes #39398.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 18:04:43 +00:00
Rachel Baker 82c7fd2493 Comments: Fix placement of the `wp_update_comment_data` filter to safeguard filtered data from triggering a database error.
Introduced in [38674], the `wp_update_comment_data` filter took place after the `$data` was sliced and prepared for the database update statement. The location of the filter assumed the result of anyone applying it would not change the data type or make structural modifications or additions to the $data array. 😅

This moves the `wp_update_comment_data` filter to take place before the `$data` is sliced and prepared for the database update statement.

Props dshanske for initial patch.

Fixes #39380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 17:22:45 +00:00
John Blackbourn 80a839de13 Docs: Misc corrections and additions to inline documentation.
See #39130
Props keesiemeijer

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


git-svn-id: http://core.svn.wordpress.org/trunk@39579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:28:40 +00:00
John Blackbourn d327c92e4b Docs: Add and correct `@since` docs for a variety of functions and methods.
Props keesiemeijer, chris_dev
Fixes #39343, #39357, #39344
See #39130

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


git-svn-id: http://core.svn.wordpress.org/trunk@39578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:21:44 +00:00
Boone Gorges a3ea7ea2e9 Taxonomy: Eliminate redundant and inaccurate dupe check when creating categories from post.php.
The `term_exists()` check is not needed because of existing dupe
checks in `wp_insert_term()`. Furthermore, `term_exists()` conflates
term names and sanitized slugs, so incorrectly marks terms like
'C' and 'C+' as duplicates of one another.

Props garyc40, SergeyBiryukov, kovshenin, MikeHansenMe.
Fixes #16567.
Built from https://develop.svn.wordpress.org/trunk@39637


git-svn-id: http://core.svn.wordpress.org/trunk@39577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-23 03:11:40 +00:00
Boone Gorges af885f45cf Query: Improve documentation for `orderby=relevance` in `WP_Query`.
Props dots.
Fixes #39336.
Built from https://develop.svn.wordpress.org/trunk@39636


git-svn-id: http://core.svn.wordpress.org/trunk@39576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-23 02:31:41 +00:00
David A. Kennedy 7a8e17d50a Twenty Seventeen: Fix incorrect `$content_width` value in theme
This addresses a major bug. Incorrectly setting the `$content_width` causes media embeds to end up with the wrong aspect ratio, among other issues. This fix uses `template_redirect`,  to ensure conditional theme tags can be used. It also defines a default value at `after_theme_setup` so that plugins have something to work with at `init`.

Props sstoqnov, laurelfulford, obenland.

Fixes #39272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-22 23:24:44 +00:00
Gary Pendergast 443bcb03bd Tests: Restore the database connection earlier when switching test groups.
When plugins don't disable the `backupGlobals` PHPUnit option in their own tests, `$wpdb` is backed up and restored between classes of tests. The serialisation process used for this broke the database connection. This previously wasn't a problem, as it was reconnecting before each test.

[38398] introduced some changes that required the connection to be available in `setUpBeforeClass()`, earlier than in was previously reconnecting. This didn't cause warnings in Core, but it did cause warnings for plugins that don't disable the `backupGlobals` option.

The database connection now reconnects in `setUpBeforeClass()`. This change also fixes a few Core tests that weren't calling `parent::setUpBeforeClass()` or `parent::tearDown()` correctly.

Fixes #39327.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-21 04:59:43 +00:00
Boone Gorges 3ef41856bb Taxonomy: Ensure that mods to query vars in `pre_term_query` callbacks have an effect.
Previously, it was possible to modify the `query_vars` array, but
the changes would be ignored after `pre_term_query` had finished
running.

Props jfarthing84.
Fixes #39354.
Built from https://develop.svn.wordpress.org/trunk@39625


git-svn-id: http://core.svn.wordpress.org/trunk@39565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-21 03:02:40 +00:00
David A. Kennedy 4177e37593 Twenty Seventeen: Hardens the logic for calling featured image in `header.php`
This change uses `get_queried_object_id()` here since the `$post` global may not be set before a call to `the_post()`.

Props westonruter.

Fixes #39302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 23:00:43 +00:00
David A. Kennedy 7d70dabf59 Twenty Seventeen: Ensure functions in `customize-controls.js` don't count on Customizer sections always being present
Before, the code assumed the `theme_options` section is always present, but it can be removed by plugins. This way, if it is, no JavaScript errors occur.

Props westonruter.

Fixes #39335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 22:17:40 +00:00
Weston Ruter f7ba137f19 Customize: Fix visible edit shortcuts for `wp_nav_menu()` instances using the `menu` arg (such as in the Custom Menu widget) instead of the `theme_location` arg.
Also fix logic for `focus-control-for-setting` handler to focus on the first control (lowest `priority` value) associated with a given setting instead of the last control encountered when iterating over all controls, as this ensures the first control in a `nav_menu` section is focused rather than the last one.

Props westonruter, sirbrillig.
See #27403.
Fixes #39101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 22:05:43 +00:00
James Nylen 5b39869860 REST API: Improve the `rest_*_collection_params` filter docs and fix the terms filter.
The `rest_{$taxonomy}_collection_params` filter in 4.7 is incorrectly using
single quotes instead of double quotes, which means it is not working correctly
as a dynamic filter.  This fixes the quotes around the filter name, and also
updates the docblocks for the other 3 similar filters for better conformance to
the documentation standards.

Props shazahm1hotmailcom, JPry, jnylen0.
Fixes #39300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 01:37:40 +00:00
James Nylen d515e20a1a REST API: Fix PHP warnings when `get_theme_support( 'post-formats' )` is not an array.
If `add_theme_support( 'post-formats' )` is called with no additional
arguments, then `get_theme_support( 'post-formats' )` returns `true` rather
than an array of supported formats.  Avoid generating PHP warnings in this
situation.

Props dreamon11, ChopinBach.
Fixes #39293.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 00:56:44 +00:00
Ella Iseulde Van Dorpe c7988f1f03 Editor: Let the Add New link disappear in DFW mode.
The link was moved outside the heading in [38983].

Fixes #39313 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-17 10:23:43 +00:00
David A. Kennedy 7ad554f955 Twenty Seventeen: Improves code readability and code standards in files
Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards.

Props sstoqnov.

Fixes #39152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 22:08:47 +00:00
Joe McGill efb191c2ed Media: Allow PDF fallbacks filter to process custom sizes.
This fixes an oversight in [39246], which added a hook for filtering
the array of sizes used for PDF thumbnails, but failed to provide a way
for sizes added through `add_image_size()` to be processed.

Props gitlost.
Fixes #39231. See #38594.
Built from https://develop.svn.wordpress.org/trunk@39617


git-svn-id: http://core.svn.wordpress.org/trunk@39557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 20:30:42 +00:00
Weston Ruter 15ddaa269e Customize: Bump `wp_custom_css_cb` from running at `wp_head` priority 11 to 101 to ensure Custom CSS overrides other CSS.
Aligns `wp_head` action priority with Jetpack's Custom CSS.

Amends [38829].
See #35395, #38672.
Fixes #39270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 07:29:42 +00:00
Dion Hulse 1d342fcdc6 Feeds: Replace the RSS2 `lastBuildDate` date field with the `r` date specifier.
See #39141.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:42:40 +00:00
Dion Hulse f794939ed3 Feeds: Do not translate the `lastBuildDate` field in RSS feeds.
Props stevenkword, dd32.
Fixes #39141

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


git-svn-id: http://core.svn.wordpress.org/trunk@39553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:39:41 +00:00
Dion Hulse c92e916866 Media: Move a variable definition outside of conditionals to ensure it's always available.
This fixes cases where the URL to a PDF preview may be incorrectly calculated when no thumbnails were generated for the PDF (and avoids a PHP Notice at the same time).

Fixes #39250.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:21:41 +00:00
Adam Silverstein bc7a03a33b WP-API: JavaScript client - fix setup of models used by wp.api.collections objects.
Correct setup for the `model` attribute of `wp.api.collections` objects. Set the collection model as a function that returns a new model of the underlying type, instead of setting it as the model prototype. Fixes an issue where models for fetched collections weren't set up properly and didn't have the expected mixin methods such as `getCategories` available.

Props jesseenterprises.
Fixes #39070.

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


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


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


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

Props keesiemeijer
Fixes #39148

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


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

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


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

Props jblz, tyxla.
Fixes #39092.

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


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

Fixes #38700.

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


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

QUnit tests have been updated to reflect tha scoring changes.

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

Fixes #31647.


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


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

Fixes #38977.

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


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

Props JPry.
Fixes #39150.

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


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

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


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

See #37082.

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


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

Props sgolemon.
Fixes #37082.

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


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

Fixes #39065.

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


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

Props iaaxpage.
Fixes #39065. See #37616.

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


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

Fixes #39063. See #37616.

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


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

Props Hristo Sg.
Fixes #39246.

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


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

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


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

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


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

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


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

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


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

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


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

Fixes #39245.

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


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

Props jorbin.
Fixes #39132.

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


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

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

Props salcode, bradyvercher, peterwilsoncc.
Fixes #38903.

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


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

Props kkoppenhaver, rachelbaker, jnylen0.
Fixes #39042.

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


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

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


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

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


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

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


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

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


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

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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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


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

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


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

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


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

Props Christian1012, westonruter.
Fixes #39175.

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Fixes #39059. See #37616.

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


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

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


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

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


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

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


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

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


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

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


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

Props kafleg, ketuchetan.

Fixes #39137.

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


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

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


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

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


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

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


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

Props SergeyBiryukov, afercia.

Fixes #30599.

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


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

See #26601.

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


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

See #26601.

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


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

See #26601.

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


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

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


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

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


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

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


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

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

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


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

props melchoyce, helen, ramiabraham.
see #38616.

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


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

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


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


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

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

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


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

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


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

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


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

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


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

Props davidakennedy.

Fixes #38858.

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


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

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

Props peterwilsoncc, davidakennedy.

Fixes #39073.

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


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

Fixes #38326

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


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

Props: andizer, rensw90.
Fixes #38748.

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


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

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


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

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


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

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


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

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

Props joehoyle, jnylen0.

Fixes #39010.

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


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

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


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

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

Props laurelfulford, peterwilsoncc.

Fixes #39035.

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


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

Props imnok, netweb, melchoyce.

Fixes #38937.

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


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

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


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

see #35105.

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


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

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


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

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


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

fixes #38990.

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


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

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


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

Props peterwilsoncc.
Fixes #39005.


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


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

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


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

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


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


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

Props ketuchetan, rahulsprajapati.
Fixes #39023.


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


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


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


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


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


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

See #39027.


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


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

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


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


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

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


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


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

props afercia.
fixes #39029, #39026.

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


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

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


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


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

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


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


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

Props sstoqnov, davidakennedy.

Fixes #38993.

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


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

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

Fixes #38971.

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


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

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


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

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


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

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

Fixes #38971.

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


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

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

Props jnylen0, rachelbaker.
Fixes #38962.

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


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

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


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

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


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


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

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


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

Fixes #39007.


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


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

Fixes #39024.


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


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

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

Props jeremyfelt.
Fixes #39000.


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


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

See #37625
Props helen, pento, The PHP team

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


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

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

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


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

Props afercia, laurelfulford.

Fixes #38992.

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


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

Props afercia, laurelfulford.

Fixes #38969.

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


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

Fixes #38951.

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


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

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


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

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

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


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

See #38114.
Fixes #38928.

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


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

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

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


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

Props johnbillion, ocean90.
Fixes #38990.

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


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

Props laurelfulford, melchoyce.

Fixes #38972.

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


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

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

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


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

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


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

Fixes #38980.

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


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

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

Adds test.

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


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

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

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


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

Fixes #38927.

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


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


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

Props presskopp.

Fixes #38939.

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


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

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

Props celloexpressions.

Fixes #38949.

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


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

Props rianrietveld.

Fixes #38970.

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


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

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


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

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


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

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


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

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


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

Fixes #38991.

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


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

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


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

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

Fixes #38975.

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


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

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


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


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

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

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


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

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


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

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


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

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


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

See #38727.


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


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

Fixes #38727.


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


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


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


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


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


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


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


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

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


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

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

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


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

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


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

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


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

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


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

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

props westonruter, helen, flixos90.
fixes #38615.

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


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

See #37770.
Fixes #38908.

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


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


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

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


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


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

Props tg29359, afercia, odysseygate.

Fixes #38876.

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


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

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

This also fixes a couple of typos to inline comments.

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


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

props derrickkoo, afercia.
fixes #38872.

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


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

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

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

Props bradyvercher, helen.
Fixes #38866.

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


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

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


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

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


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


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


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

Fixes #38890.

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


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

See #30937.
Fixes #38867.

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


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

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


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

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


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

Props joehoyle.
Fixes #38873.

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


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

Props tharsheblows, joehoyle.
Fixes #38786.

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


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

Props helen, rachelbaker, joehoyle.
Fixes #38855.

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


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

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


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


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

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


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

More to come.

See #38882

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


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


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


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

See #38705, #30937.
Fixes #38865.

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


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

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

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

See #38113.


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


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

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


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

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


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


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


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

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


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


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


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


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


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


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


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


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

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


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

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


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


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

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

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

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


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

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


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

props davidakennedy.
see #29158.

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


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

Fixes #38854.

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


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

Fixes #38511.


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


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

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


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

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

Props joemcgill, laurelfulford, helen.

Fixes #38395.

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


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

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


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

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


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

props davidakennedy.
see #38615.

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


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


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

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


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

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

And after:
`sizes="100vw"`

Props joemcgill, transl8or.

Fixes #38847.

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


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

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


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


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

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


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

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


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

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


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

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


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

See #38063.


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


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

Fixes #38765.

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


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

Props gitlost, azaozz, iseulde.
Fixes #38511.


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


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


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


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

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


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


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

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


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

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


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

Props andy, pento.
Fixes #38751.


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


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

Previously: [38497].

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


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

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


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

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

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


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

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


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

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


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


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

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


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


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


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


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


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


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


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

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

see #38615.

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


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

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


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


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


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


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

see #38615.

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


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

see #38615.

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


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


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


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


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


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

Props jnylen0.
Fixes #38792.

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


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

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


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

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


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

Fixes #38790.

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


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

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


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


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


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

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


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

Fixes #38787.

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


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

See #38114.
Fixes #38541.

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


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

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

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

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

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


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

Props dd32.
See #38791.

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


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

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


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

Props westonruter, joemcgill, celloexpressions.
Fixes #38778.

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


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

Fixes #38766.

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


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

Props yoavf.
Fixes #38788.


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


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

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


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

Props sirbrillig, sstoqnov, westonruter.
Fixes #38651.

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


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

Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397


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


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

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


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

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


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

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

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


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

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


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

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

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


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

Props davidakennedy
Fixes #38783

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


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

Props afercia, davidakennedy, Fencer04
Fixes #38476


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


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

Props laurelfulford, davidakennedy, Idealien
Fixes #38391


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


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

Fixes #38710.
Props jnylen0.

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


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

Fixes #38531.
Props rachelbaker, tharsheblows.

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


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

Fixes #38752.

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


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

Props bradyvercher.

Fixes #38627.
See #38391.

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


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

Props jnylen0.
Fixes #38739.

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


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

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


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


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

Fixes #38767.

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


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

Props laurelfulford.

Fixes #38722.

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


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

Props westonruter, ocean90.
Fixes #38762.

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


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

props folletto, helen.
fixes #38717.

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


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

Props rmccue.
Fixes #37843.

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


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

Fixes #38024

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


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

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


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

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

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


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

Fixes #38740.

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


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

Props afercia.

Fixes #38764.

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


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

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


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


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

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


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


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

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


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

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

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


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


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


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

Props nikeo, westonruter.
Fixes #38728.

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


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

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


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

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


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

Props jnylen.
Fixes #38720.

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


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

Props netweb.
Fixes #38724.

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


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

fixes #38164. see #35126.

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


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

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


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

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


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

Props youknowriad, jnylen0.
Fixes #38607.

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


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

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

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


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

See #30017, #38716

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


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

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


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

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


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

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


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

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


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

Props swissspidy

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


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

Props afercia, Fencer04, davidakennedy
Fixes #38476


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


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

Props swissspidy.
Fixes #38698.

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


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

See #30937.
Fixes #38705.

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


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

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


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

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

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

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


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

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


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

Props jeremyfelt.
Fixes #38526.

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


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

Props laurelfulford.

Fixes #38395.

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


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

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


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

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


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

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


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

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


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

Unprops joemcgill.


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


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

See #38696.


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


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

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

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


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

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


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

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


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

Built from https://develop.svn.wordpress.org/trunk@39166


git-svn-id: http://core.svn.wordpress.org/trunk@39106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 20:16:31 +00:00
Joe McGill 5704743a78 Themes: Remove Vimeo logic from `header_video_settings()`.
Following [39148] and [39128], this removes the mime type logic for
Vimeo URLs from `get_header_video_settings()` and removes remaining
Vimeo reference from `_validate_external_header_video()` docs.

Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39165


git-svn-id: http://core.svn.wordpress.org/trunk@39105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 19:20:32 +00:00
David A. Kennedy 35035be00b Twenty Seventeen: Improve SVG markup, providing more options customization
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028.
* Add whitespace around `<use>`, from #38387.

Props sami.keijonen, swissspidy, laurelfulford.

Fixes #38659.
See #38387.

Built from https://develop.svn.wordpress.org/trunk@39164


git-svn-id: http://core.svn.wordpress.org/trunk@39104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 18:01:33 +00:00
Dominik Schilling 45d5d6ddb5 Customize: Autoprefixer for [39149].
See #38667.
Built from https://develop.svn.wordpress.org/trunk@39163


git-svn-id: http://core.svn.wordpress.org/trunk@39103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 15:25:32 +00:00
Joe Hoyle c15065dddf REST API: Remove get_allowed_query_vars() now `filter` is gone.
Now all public query vars are not supoprted via `?filter` in the REST API, we can remove the get_allowed_query_vars() method and filter. To provide developers with a good altnerative to `filter`, the `"rest_{$this->post_type}_collection_params"` filter has been added.

Props rmccue, rachelbacker, danielbachhuber.
Fixes #38629.

Built from https://develop.svn.wordpress.org/trunk@39162


git-svn-id: http://core.svn.wordpress.org/trunk@39102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 14:08:32 +00:00
Joe Hoyle 8de95582e2 REST API: Remove rest_get_post filter and `get_post` abstraction.
This filter was originally introduced in https://github.com/WP-API/WP-API/pull/2535 to support Customizer Changesets (née Transactions). This is a super broad filter and doesn't really fit with the design of the API, nor is it (arguably) the right level to do this.

Props rmccue.
Fixes #38701.

Built from https://develop.svn.wordpress.org/trunk@39161


git-svn-id: http://core.svn.wordpress.org/trunk@39101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 13:09:33 +00:00
Ryan McCue f8d6cb3260 REST API: Remove more emoji from tests.
More from [39156].

See #38609.

Built from https://develop.svn.wordpress.org/trunk@39160


git-svn-id: http://core.svn.wordpress.org/trunk@39100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 07:39:33 +00:00
Ryan McCue e592f3b1eb REST API: Embiggen the test email address.
We no longer want a@b.c to be valid, so let's make it a@b.co instead.

Props dd32.
See #38506.

Built from https://develop.svn.wordpress.org/trunk@39159


git-svn-id: http://core.svn.wordpress.org/trunk@39099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:46:31 +00:00
Ryan McCue d6a5c68516 REST API: Require 6 characters for comment email addresses.
The regular comments API requires 6 characters rather than 3, so we need to match this.

Props mangeshp, dd32.
Fixes #38506.

Built from https://develop.svn.wordpress.org/trunk@39158


git-svn-id: http://core.svn.wordpress.org/trunk@39098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:42:32 +00:00
Ryan McCue caabc52753 REST API: Respect unfiltered_html for HTML comment fields.
Same as [39155], but for comments, natch.

Props jnylen0.
Fixes #38704, see #38609.

Built from https://develop.svn.wordpress.org/trunk@39157


git-svn-id: http://core.svn.wordpress.org/trunk@39097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:36:31 +00:00
Ryan McCue 1239980fad REST API: Remove ship emoji from slashing tests.
Introduced in [39155], but not necessary for the slashing tests. These fail on 5.3, which encodes the emoji as HTML entities.

Props dd32.
See #38609.

Built from https://develop.svn.wordpress.org/trunk@39156


git-svn-id: http://core.svn.wordpress.org/trunk@39096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:26:30 +00:00
Ryan McCue f1975b18ea REST API: Respect unfiltered_html for HTML post fields.
This necessitates a change to our slashing code as well. Ah slashing, the cause of, and solution to, all of life's problems.

Props jnylen0.
Fixes #38609.

Built from https://develop.svn.wordpress.org/trunk@39155


git-svn-id: http://core.svn.wordpress.org/trunk@39095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 05:55:32 +00:00
Ryan McCue 8760c9a91d REST API: Change attachment caption & description to objects.
Just like excerpt and content for regular posts, these have transformations applied that can make the content significantly different from the raw value.

Props jnylen0.
Fixes #38679.

Built from https://develop.svn.wordpress.org/trunk@39154


git-svn-id: http://core.svn.wordpress.org/trunk@39094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 04:29:32 +00:00
Weston Ruter 25a052bac7 Customize: Fix loading of theme screenshots in themes section and remove erroneous borders on hover.
Fixes regressions introduced in [38648].

Props delawski, mckernanin.
See #34391.
Fixes #38222.

Built from https://develop.svn.wordpress.org/trunk@39153


git-svn-id: http://core.svn.wordpress.org/trunk@39093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:47:30 +00:00
David A. Kennedy 1d8d59a21a Twenty Seventeen: Fix post navigation font legibility issue
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.

Props laurelfulford.

Fixes #38670.

Built from https://develop.svn.wordpress.org/trunk@39152


git-svn-id: http://core.svn.wordpress.org/trunk@39092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:07:34 +00:00
Weston Ruter 1363813c6b Customize: Move Custom CSS control `placeholder` help text to setting `default` value.
The `WP_Customize_Custom_CSS_Setting::value()` method now returns the `default` if `wp_get_custom_css()` returns empty.

Props westonruter, afercia, helen.
See #35395.
Fixes #38685.

Built from https://develop.svn.wordpress.org/trunk@39151


git-svn-id: http://core.svn.wordpress.org/trunk@39091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 18:13:34 +00:00
Ella Iseulde Van Dorpe c1ff206bac TinyMCE: wptextpattern: Fix inline patterns.
* Allow spaces inside inline pattern text, unless the delimiter stands alone.
* Add more unit tests.
* Add more inline docs.

Part props azaozz.
Fixes #37693.


Built from https://develop.svn.wordpress.org/trunk@39150


git-svn-id: http://core.svn.wordpress.org/trunk@39090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 23:38:33 +00:00
Weston Ruter 5ea1e6fd80 Customize: Allow tab characters in custom CSS input.
Pressing `Esc` followed by `Tab` allows for tabbing to the next element.

Props afercia, coffee2code, westonruter.
See #35395.
Fixes #38667.

Built from https://develop.svn.wordpress.org/trunk@39149


git-svn-id: http://core.svn.wordpress.org/trunk@39089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 19:09:33 +00:00
Joe McGill 68b4181985 Customize: Remove Vimeo validation for external videos.
Following [39128], this removes the validation logic for Vimeo URLs from
`_validate_external_header_video()` since WP does not support the
display of videos from Vimeo by default.

This also includes a change to using `esc_url_raw()` instead of `esc_url()`
on the URL value to avoid unexpected behavior from the inclusion of HTML
entities.

Props peterwilsoncc, westonruter.
Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39148


git-svn-id: http://core.svn.wordpress.org/trunk@39088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 18:32:35 +00:00
Andrea Fercia 7b3445c312 Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
See #37513.

Built from https://develop.svn.wordpress.org/trunk@39147


git-svn-id: http://core.svn.wordpress.org/trunk@39087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 16:28:33 +00:00
David A. Kennedy 4c5f80c839 Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.

The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.

Props joemcgill.

Fixes #38390.

Built from https://develop.svn.wordpress.org/trunk@39146


git-svn-id: http://core.svn.wordpress.org/trunk@39086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 00:45:31 +00:00
Weston Ruter 9f288ff12a Customize: For Header Image, ensure "Previously uploaded" and "Suggested" headings are hidden when lists are empty.
Fixes regression introduced with the addition of control notifications in [37476]. The container element for notifications is injected after the `.customize-control-title` element if the `.customize-control-notifications-container` element does not already exist in the control's template. Also adds missing margin between current image and uploaded images.

Props bradyvercher.
See #34893.
Fixes #38561.

Built from https://develop.svn.wordpress.org/trunk@39145


git-svn-id: http://core.svn.wordpress.org/trunk@39085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 23:15:33 +00:00
Weston Ruter 8f9f75598b Customize: Remove edit shortcut toggle button from preview since visibility is now linked with pane visibility.
Amends [39131].
Props westonruter, sirbrillig.
See #27403.
Fixes #38668.

Built from https://develop.svn.wordpress.org/trunk@39144


git-svn-id: http://core.svn.wordpress.org/trunk@39084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 20:54:30 +00:00
Helen Hou-Sandí ec82f421ad Post-4.7 beta 2 bump.
Built from https://develop.svn.wordpress.org/trunk@39143


git-svn-id: http://core.svn.wordpress.org/trunk@39083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:41:30 +00:00
Helen Hou-Sandí 2bbf7b5034 WordPress 4.7 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@39142


git-svn-id: http://core.svn.wordpress.org/trunk@39082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:19:26 +00:00
Aaron Jorbin 53c8c68365 Administration: Ensure collapse menu is usable with a keyboard
Currently, the "Collapse menu" item is not focusable and keyboard users can't collapse/expand the admin menu. This aims to fix it so that screen readers no longer announce it as a clickable but it remains unfocusable and thus unusable. So it's now a button.

Quoting joedolson at WordCamp Chicago 2014:
"If it's supposed to act like a button, it should be a button."

Also includes a grunt:precommit run that picked up some postcss changes to src/wp-includes/css/customize-preview.css

Fixes #29958.
Props ajercia, ipm-frommen for an iterative patch, valendesigns for an iterative patch, GaryJ for feedback, joedolson for feedback, helen for feedback



Built from https://develop.svn.wordpress.org/trunk@39141


git-svn-id: http://core.svn.wordpress.org/trunk@39081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:57 +00:00
Helen Hou-Sandí 1281a28382 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.

Built from https://develop.svn.wordpress.org/trunk@39140


git-svn-id: http://core.svn.wordpress.org/trunk@39080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:26 +00:00
John Blackbourn fa5b5199e8 Editor: Correct the docblock for the `wp_default_editor` filter.
Props dimadin
See #38327

Built from https://develop.svn.wordpress.org/trunk@39139


git-svn-id: http://core.svn.wordpress.org/trunk@39079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:56 +00:00
Weston Ruter 8ec767c21f Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.
Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.

Built from https://develop.svn.wordpress.org/trunk@39138


git-svn-id: http://core.svn.wordpress.org/trunk@39078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:26 +00:00
Weston Ruter 1a3e930383 Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.

Built from https://develop.svn.wordpress.org/trunk@39137


git-svn-id: http://core.svn.wordpress.org/trunk@39077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:57 +00:00
Weston Ruter f4c3b8352e Customize: Use `button` with `svg` as click target instead of `:before` content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.

Built from https://develop.svn.wordpress.org/trunk@39136


git-svn-id: http://core.svn.wordpress.org/trunk@39076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:26 +00:00
David A. Kennedy 495b2d835f Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.

Built from https://develop.svn.wordpress.org/trunk@39135


git-svn-id: http://core.svn.wordpress.org/trunk@39075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:55 +00:00
Dominik Schilling abada1fbdc I18N: In `get_user_locale()` ensure that `$user_id` isn't a falsy value before calling `get_user_by()`.
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39134


git-svn-id: http://core.svn.wordpress.org/trunk@39074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:26 +00:00
Weston Ruter 6ccb29bee0 Customize: No-op `edit_post_link()` when in customizer preview.
Edit links can be restored in plugins by removing the `__return_empty_string` function from the `get_edit_post_link` filter at the `customize_preview_init` action.

Fixes #38648.

Built from https://develop.svn.wordpress.org/trunk@39133


git-svn-id: http://core.svn.wordpress.org/trunk@39073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:56 +00:00
Weston Ruter e4b4f3efe3 Customize: For toggling visibility of the controls pane, rename "Collapse (Sidebar)" to "Hide Controls" and "Expand Sidebar" to "Expand Controls".
Fixes #38647.

Built from https://develop.svn.wordpress.org/trunk@39132


git-svn-id: http://core.svn.wordpress.org/trunk@39072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:27 +00:00
Weston Ruter 726cd04bac Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.

Built from https://develop.svn.wordpress.org/trunk@39131


git-svn-id: http://core.svn.wordpress.org/trunk@39071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:57 +00:00
Dominik Schilling 727e859b3e Load: Remove unused global imports in `wp_load_translations_early()`.
See #38535.
Built from https://develop.svn.wordpress.org/trunk@39130


git-svn-id: http://core.svn.wordpress.org/trunk@39070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:27 +00:00
David A. Kennedy 0a3d034962 Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.

Built from https://develop.svn.wordpress.org/trunk@39129


git-svn-id: http://core.svn.wordpress.org/trunk@39069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:57 +00:00
Joe McGill 50b2c6cf2c Customize: Remove Vimeo reference from description for external header videos.
Vimeo's API requires a Pro account to display videos as background videos
(i.e., without player controls), thus we shouldn't support Vimeo
URLs by default in custom header videos. This removes the reference of Vimeo
from the control description in the customizer.

Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39128


git-svn-id: http://core.svn.wordpress.org/trunk@39068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:28 +00:00
Pascal Birchler b1ee6c64d9 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

This re-introduces [39069], but now with additional tests and a `function_exists( 'wp_get_current_user' )` check in `get_user_locale()` in case it gets used early.

Props swissspidy, ocean90.
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39127


git-svn-id: http://core.svn.wordpress.org/trunk@39067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:59 +00:00
Rachel Baker 5564716a07 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.
Built from https://develop.svn.wordpress.org/trunk@39126


git-svn-id: http://core.svn.wordpress.org/trunk@39066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:29 +00:00
Pascal Birchler 557496ce83 I18N: Move `load_textdomain()` tests to separate file.
See #38485.
Built from https://develop.svn.wordpress.org/trunk@39125


git-svn-id: http://core.svn.wordpress.org/trunk@39065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:00 +00:00
David A. Kennedy 6c82930a5d Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.

Built from https://develop.svn.wordpress.org/trunk@39124


git-svn-id: http://core.svn.wordpress.org/trunk@39064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:31 +00:00
Joe McGill 8fa49e77bd Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder
strings in place of the template directory URI, which WordPress transforms
in several places by running the value of
`get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`.

This fixes a few places where WordPress skipped the `sprintf()` step and
referenced the `get_theme_support()` value directly.

Props bradyvercher for initial patch.
See #38557.
Built from https://develop.svn.wordpress.org/trunk@39123


git-svn-id: http://core.svn.wordpress.org/trunk@39063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:01 +00:00
Dominik Schilling 89cab4e197 I18N: Show "Settings saved." in the correct language after switching the site language.
This simplifies the logic by comparing `get_user_locale()` before and after an settings update.

Props swissspidy, ocean90.
See #29783, #29281.
Fixes #38482.
Built from https://develop.svn.wordpress.org/trunk@39122


git-svn-id: http://core.svn.wordpress.org/trunk@39062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:31 +00:00
Joe McGill 60db5df85f Themes: Improve reliability of URL used in `get_header_image_tag()`.
`get_header_image_tag()` relies on the data returned by `get_custom_header()`
to build the attributes for the header `<img>` element. However,
`get_custom_header()` relies on data from the `header_image_data` theme
mod rather than the `header_image` theme mod that `get_header_image()` uses.
This can create inconsistencies when no header image is set, but a theme
supports a default header image.

This fixes the issue by making `get_custom_image_tag()` rely on the URL
returned by `get_header_image()` instead.

Props bradyvercher.
Fixes #38633.
Built from https://develop.svn.wordpress.org/trunk@39121


git-svn-id: http://core.svn.wordpress.org/trunk@39061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:02 +00:00
Weston Ruter ea5f4179a7 Customize: Prevent collapsing expanded panel/section/control when `Esc` is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.

Built from https://develop.svn.wordpress.org/trunk@39120


git-svn-id: http://core.svn.wordpress.org/trunk@39060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:08:33 +00:00
Aaron Jorbin 32be6f7bb7 Bump grunt-contrib-uglify from 1.0.1 to 2.0.0
Sets `screwIE8` to false as it is now enabled by default

Files Changed:
build/wp-admin/js/customize-nav-menus.min.js
build/wp-admin/js/customize-widgets.min.js
build/wp-includes/js/customize-loader.min.js

Changelog:
2016-07-19   v2.0.0   Update uglify-js to v2.7.0. screwIE8 is enabled by default.
2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix beautify when passed as an object. Fix docs about report values.

See #38199.


Built from https://develop.svn.wordpress.org/trunk@39117


git-svn-id: http://core.svn.wordpress.org/trunk@39059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:40:34 +00:00
Aaron Jorbin 21ddb65fcc Bump grunt-contrib-cssmin from v1.0.0 to v1.0.2
Changelog:
2016-08-31   v1.0.2   Fix issues for node 6.
2016-03-16   v1.0.1   Downgrade maxmin to support Node.js 0.10.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39116


git-svn-id: http://core.svn.wordpress.org/trunk@39058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:32:32 +00:00
Aaron Jorbin c8bf15c41c Bump grunt-contrib-compress from 1.1.0 to 1.3.0
Changelog:
2016-05-24   v1.3.0   Update to Archiver 1.0. Fix node 6 support.
2016-03-24   v1.2.0   Dependency update.

See #38199

Built from https://develop.svn.wordpress.org/trunk@39115


git-svn-id: http://core.svn.wordpress.org/trunk@39057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:28:32 +00:00
Aaron Jorbin 8ed617ad9f Bump autoprefixer from 6.5.0 to 6.5.1
Changelog
Fix selectors with :-- prefix support.

See #38199.

M    package.json

Built from https://develop.svn.wordpress.org/trunk@39114


git-svn-id: http://core.svn.wordpress.org/trunk@39056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:18:36 +00:00
Aaron Jorbin ffdac5599b Bump grunt-contrib-qunit from 1.1.0 to 1.2.0
Changlog:
2016-04-14   v1.2.0   Add support for filtering running modules using command line (--modules) Removed 'grunt.warn' output from error.onError handler, onus now on end user binding to event. Update docs.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39113


git-svn-id: http://core.svn.wordpress.org/trunk@39055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:14:44 +00:00
Weston Ruter 985a1f6a97 Customize: Prevent syncing unmodified settings from controls into preview to guard against triggering an infinite reload due to selective refresh fallback behavior.
If a value is sanitized in PHP and differs from the JS value in the pane, a `change` event for the setting is triggered upon refresh. This should be avoided since the value just came from the server as being sanitized. This also fixes periodic issue where selective refresh happens immediately after a full refresh.

Fixes #37032.

Built from https://develop.svn.wordpress.org/trunk@39112


git-svn-id: http://core.svn.wordpress.org/trunk@39054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:07:32 +00:00
Ryan McCue 721cf281a3 REST API: Only provide JSON error code on PHP 5.3+.
json_last_error() was only added to PHP 5.3.0, so we can't provide the information for older versions.

See #38547.

Built from https://develop.svn.wordpress.org/trunk@39111


git-svn-id: http://core.svn.wordpress.org/trunk@39053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:57:30 +00:00
Aaron Jorbin 63ba4592e1 Bump grunt-sass from 1.1.0 to 1.2.1
diff: https://github.com/sindresorhus/grunt-sass/compare/v1.1.0...v1.2.1

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39110


git-svn-id: http://core.svn.wordpress.org/trunk@39052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:55:52 +00:00
Joe Hoyle 6b08485cfa REST API: Return error when JSON decoding fails.
If you send a request to the REST API with invalid JSON in body than it will now return a error. This assists developers if they accidentally send invalid JSON and wonder why their data appears to be ignored.

Props rmccue.
Fixes #38547.

Built from https://develop.svn.wordpress.org/trunk@39109


git-svn-id: http://core.svn.wordpress.org/trunk@39051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:05:36 +00:00
Rachel Baker 8c9f4f812a REST API: Return a `WP_Error` when a user does not have permission to create or update a post with the provided terms.
Add the 'assign_term' check for post create and update.

Props boonebgorges, johnbillion.
Fixes #38505.
Built from https://develop.svn.wordpress.org/trunk@39108


git-svn-id: http://core.svn.wordpress.org/trunk@39050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 03:16:30 +00:00
Joe McGill 37318fe73f Media: Sanity check array value in `wp_prepare_attachment_for_js()`.
This adds a sanity check to the return value of the `image_downsize` filter
in `wp_prepare_attachment_for_js()` to avoid undefined offest notices.

Props justinbusa for initial patch.
Fixes 34437.
Built from https://develop.svn.wordpress.org/trunk@39107


git-svn-id: http://core.svn.wordpress.org/trunk@39049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:23:29 +00:00
Joe Hoyle d544c6ddd0 REST API: Switch to stable version of JSON Schema.
Props danielbachhuber.
Fixes #38635.

Built from https://develop.svn.wordpress.org/trunk@39106


git-svn-id: http://core.svn.wordpress.org/trunk@39048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:22:29 +00:00
Rachel Baker dcb12c35cf REST API: Clean-up our validation callbacks and add missing array `items` properties in our endpoint schemas.
Props joehoyle, jnylen0.
Fixes #38617.
Built from https://develop.svn.wordpress.org/trunk@39105


git-svn-id: http://core.svn.wordpress.org/trunk@39047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:18:29 +00:00
Joe Hoyle 901c4ed17a REST API: Support querying for multiple post statuses.
Multiple post statuses can be specified by the usual CSV or array-propper format.

Props jnylen0, kadamwhite, websupporter.
Fixes #38420.

Built from https://develop.svn.wordpress.org/trunk@39104


git-svn-id: http://core.svn.wordpress.org/trunk@39046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:46:29 +00:00
Rachel Baker 676ae9fc2b REST API: Use the `items` attribute for the taxonomies `types` schema property for proper sanitization/validation.
Props danielbachhuber, joehoyle.
Fixes #38631.
Built from https://develop.svn.wordpress.org/trunk@39103


git-svn-id: http://core.svn.wordpress.org/trunk@39045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:26:28 +00:00
Joe McGill 89a70eb859 Themes: Remove jQuery dependency from wp-custom-header.js.
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.

This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.

Props adamsilverstein, joemcgill.
Fixes #38550.
Built from https://develop.svn.wordpress.org/trunk@39102


git-svn-id: http://core.svn.wordpress.org/trunk@39044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:21:28 +00:00
Rachel Baker 94ab2f9b16 REST API: Return an error when the length of a comment field is too long.
Introduces `wp_check_comment_data_max_lengths()` which allows both the REST API comments endpoints and `wp_handle_comment_submission()` to check the length of the comment content, author name, author url, and author email fields against their respective database columns.

Props rachelbaker, mangeshp, salcode, pento.
Fixes #38477.
Built from https://develop.svn.wordpress.org/trunk@39101


git-svn-id: http://core.svn.wordpress.org/trunk@39043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:12:31 +00:00
Weston Ruter c0b41d8fee Customize: Prevent PHP warning in applying widget starter content on fresh installs.
Fixes PHP warning triggered by calling `max()` on `$widget_numbers` when there are no widget instances of the type yet. Also makes sure that widget instances start at 2 instead of 1.

See #38114.

Built from https://develop.svn.wordpress.org/trunk@39100


git-svn-id: http://core.svn.wordpress.org/trunk@39042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 00:00:32 +00:00
Pascal Birchler ceeb8ddb46 Plugins: Improve Ajax search of installed plugins.
Removes the highlight from the current filter when performing an Ajax search and adds it back when clearing the search input.

Fixes #37657.
Built from https://develop.svn.wordpress.org/trunk@39099


git-svn-id: http://core.svn.wordpress.org/trunk@39041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:47:30 +00:00
Helen Hou-Sandí 6485e5e3cf Menus: Use a label of "Display location" for individual nav menu settings.
While "Menu/Theme locations" was descriptive of what the choices listed were, in the context of editing an individual nav menu it is more descriptive to use a setting label that tells you what it is you are affecting for that nav menu, which is where it will be displayed. Technically multiple locations can be chosen, but in practice that appears to be rare enough that we can avoid an awkward "location(s)" type string.

props Fencer04 for the initial patch.
fixes #38525.

Built from https://develop.svn.wordpress.org/trunk@39098


git-svn-id: http://core.svn.wordpress.org/trunk@39040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:11:31 +00:00
Joe Hoyle 5666292dda REST API: Include `taxonomies` as an attribute of post types.
Add the taxonomies for a post type to the `/wp/v2/types` endpoint, so clients know which taxonomies are available for which post types.

Props danielbachhuber.
Fixes #38438, #38631.

Built from https://develop.svn.wordpress.org/trunk@39097


git-svn-id: http://core.svn.wordpress.org/trunk@39039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:51:30 +00:00
Joe Hoyle 37858faf96 REST API: Add en_US to the locales enum.
Props ocean90.
Fixes #38528. 

Built from https://develop.svn.wordpress.org/trunk@39096


git-svn-id: http://core.svn.wordpress.org/trunk@39038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:21:32 +00:00
Dominik Schilling 9bc3830845 Query: Add tests for `WP_Query::is_single()` and `get_body_class()` with attachments.
See [39052]
See #38225.
Built from https://develop.svn.wordpress.org/trunk@39095


git-svn-id: http://core.svn.wordpress.org/trunk@39037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:23:28 +00:00
Tammie Lister 40dc499cda Twenty Seventeen: Unifies the labels for front page sections
Front page sesctions # Content were labelled in Customizer Theme Options but the preview called it Panel # placeholder. This unifies that.

Props Clorith, ahortin, celloexpressions, davidakennedy
Fixes #38567


Built from https://develop.svn.wordpress.org/trunk@39094


git-svn-id: http://core.svn.wordpress.org/trunk@39036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:09:32 +00:00
Ryan McCue 34cf5d8934 REST API: Allow querying for multiple `slug` values.
Props jnylen0, rachelbaker.
Fixes #38579.

Built from https://develop.svn.wordpress.org/trunk@39093


git-svn-id: http://core.svn.wordpress.org/trunk@39035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 07:14:29 +00:00
Ryan McCue 624def0ec3 REST API: Add update and delete endpoints to /users/me
Now that /users/me is a standalone resource, it should have all the standard endpoints for a resource.

Props pento.
Fixes #38521 (hopefully).

Built from https://develop.svn.wordpress.org/trunk@39092


git-svn-id: http://core.svn.wordpress.org/trunk@39034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:53:32 +00:00
Ryan McCue 3fef086ede REST API: Set default sanitize callback if type is set.
Props joehoyle, ChopinBach, jnylen0.
Fixes #38593.

Built from https://develop.svn.wordpress.org/trunk@39091


git-svn-id: http://core.svn.wordpress.org/trunk@39033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:28:29 +00:00
Ryan McCue 862724274e REST API: Add locale to user resource.
Props ocean90, joehoyle.
Fixes #38528.

Built from https://develop.svn.wordpress.org/trunk@39090


git-svn-id: http://core.svn.wordpress.org/trunk@39032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:24:29 +00:00
Ryan McCue a911bf7e2c REST API: Avoid default sanitization for polymorphic params.
Some parameters (`title`, `content`, etc) are objects in the output, but allow objects or strings to be sent in updates for a more ergonomic interface. This is pretty weird behaviour, so the default sanitisation doesn't handle this. We instead handle this ourselves in the preparation.

Props joehoyle, rachelbaker.
Fixes #38529.

Built from https://develop.svn.wordpress.org/trunk@39089


git-svn-id: http://core.svn.wordpress.org/trunk@39031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:02:29 +00:00
Gary Pendergast 6f13b8291d Roles: Fix a PHP error introduced in [39082].
The now deprecated `WP_Roles::reinit()` method was trying to call `__deprecated_function()`, instead of `_deprecated_function()`.

See 23016.


Built from https://develop.svn.wordpress.org/trunk@39088


git-svn-id: http://core.svn.wordpress.org/trunk@39030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:55:30 +00:00
Ryan McCue d7bdd72510 REST API: Change method of merging parameters.
`array_merge()` incorrectly reindexes numeric parameters, causing things like `{"123": true}` to be "dropped".

Props sswells, joehoyle.
Fixes #38306.

Built from https://develop.svn.wordpress.org/trunk@39087


git-svn-id: http://core.svn.wordpress.org/trunk@39029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:53:31 +00:00
Helen Hou-Sandí dab566d973 Mail: Set a better error code when triggering `wp_mail_failed`.
This error code is now... wait for it... `wp_mail_failed`. Previously, this would have been the originating PHPMailer error code, which could be `0`, which would then fail (pass?) the `empty()` check in the `WP_Error` constructor, thereby rendering the error object fairly useless. The PHPMailer error code is now located within the `WP_Error` data.

props Kau-Boy, stephenharris.
fixes #35598.

Built from https://develop.svn.wordpress.org/trunk@39086


git-svn-id: http://core.svn.wordpress.org/trunk@39028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 04:27:34 +00:00
Ryan McCue ba039f7546 REST API: Remove the Location redirect for the /users/me endpoint.
This is a re-commit of [38980], which was reverted in [38990].

Props youknowriad, jnylen0, pento.
Fixes #38521.

Built from https://develop.svn.wordpress.org/trunk@39085


git-svn-id: http://core.svn.wordpress.org/trunk@39027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 03:44:30 +00:00
Ryan McCue 08ea66490b REST API: Only expose formats supported by the current theme.
While it's valid to save any format to the database, and WordPress is totally fine with that, we should only include the formats specified by the theme in the schema.

Props danielbachhuber.
Fixes #38610.

Built from https://develop.svn.wordpress.org/trunk@39084


git-svn-id: http://core.svn.wordpress.org/trunk@39026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 03:37:32 +00:00
Gary Pendergast 933d5cf733 Docs: Add the parameter name for the `wp_roles_init` action.
[39082] missed adding the name of the parameter to the docs of the `wp_roles_init` action.

Props johnbillion for the catch.
See #23016.


Built from https://develop.svn.wordpress.org/trunk@39083


git-svn-id: http://core.svn.wordpress.org/trunk@39025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 00:57:31 +00:00
Gary Pendergast e79fa03329 Roles/Capabilities: Add a new `wp_roles_init` filter.
Historically, it's been difficult to extend user roles, but reasonable to work around by waiting until after `init` has fired, to add custom roles and capabilities. With the addition of Locale Switching, Core now potentially loads roles before `init` has fired, leaving a window where custom roles and capabilities are not handled.

The new filter allows plugins to add their own custom roles whenever they're initialised (on page load, or when switching sites, for example), so that they can always be obeyed.

`WP_Roles` has also been tidied up a little bit, to remove duplicate code.

Props johnjamesjacoby, pento.
Fixes #23016.


Built from https://develop.svn.wordpress.org/trunk@39082


git-svn-id: http://core.svn.wordpress.org/trunk@39024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 00:31:32 +00:00
David A. Kennedy 4b3a9de5b5 Twenty Seventeen: Fix `supportsInlineSVG()` being unnecessarily called twice
* Also, fix spacing inconsistency in comment.

Props tywayne.

Fixes #38556.

Built from https://develop.svn.wordpress.org/trunk@39081


git-svn-id: http://core.svn.wordpress.org/trunk@39023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 21:24:30 +00:00
Tammie Lister 9cf5aa4381 Twenty Seventeen: Sticky icon fix to stop appearing in regular post flow
The sticky icon was appearing in posts it shouldn't have, not just when stuck. This fixes that.

Props laurelfulford, mageshp, davidakennedy
Fixes #38534


Built from https://develop.svn.wordpress.org/trunk@39080


git-svn-id: http://core.svn.wordpress.org/trunk@39022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:56:30 +00:00
Tammie Lister 2b611c2b1d Twenty Seventeen: Fixes ul inside ol being wrongly ordered.
Now the listing displays correctly.

Props tg29359, Soean, laurelfulford, davidakennedy
Fixes #38515


Built from https://develop.svn.wordpress.org/trunk@39079


git-svn-id: http://core.svn.wordpress.org/trunk@39021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:53:30 +00:00
David A. Kennedy 9510f68efa Twenty Seventeen: Update page layout setting for all use cases
* Makes sure the page layout setting also applies to pages, and is not completely hidden from them when a sidebar widget is present. Pages do not have a sidebar, so that was incorrect.
* Updates description in Customizer for brevity and accuracy.
* Applies setting to archive pages as well.
* Updates CSS to reflect changes.

Props celloexpressions, laurelfulford.

Fixes #38538.

Built from https://develop.svn.wordpress.org/trunk@39078


git-svn-id: http://core.svn.wordpress.org/trunk@39020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:40:31 +00:00
Ella Iseulde Van Dorpe feb8ccf3d6 TinyMCE: wptextpattern: Fix undo shortcut for inline patterns
Fixes #37092.


Built from https://develop.svn.wordpress.org/trunk@39077


git-svn-id: http://core.svn.wordpress.org/trunk@39019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:34:32 +00:00
Helen Hou-Sandí 2d07c3196e Only set `fresh_site` during an actual fresh install.
props westonruter.
fixes #38533.

Built from https://develop.svn.wordpress.org/trunk@39076


git-svn-id: http://core.svn.wordpress.org/trunk@39018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:16:31 +00:00
Ella Iseulde Van Dorpe 84c108db02 TinyMCE: wptextpattern: Handle unconverted inline patterns
Make sure the right text is matched when it already contains characters of the pattern.
Adds two more unit tests.

Fixes #37693.


Built from https://develop.svn.wordpress.org/trunk@39075


git-svn-id: http://core.svn.wordpress.org/trunk@39017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 20:06:36 +00:00
John Blackbourn 5c7aa3c5b8 Editor: Correct the description of the parameter passed to the `wp_default_editor` filter.
Props goto10
Fixes #38327

Built from https://develop.svn.wordpress.org/trunk@39074


git-svn-id: http://core.svn.wordpress.org/trunk@39016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:56:30 +00:00
David A. Kennedy 906eb80953 Twenty Seventeen: Remove unnecessary l10n variables
* Relies on header skip link instead of l10n variables in JavaScript.
* Fixes issue where scroll down arrow appeared next to the navigation on the front page with no header image or video. It now only appears with a big header.

Props enodekciw, laurelfulford.

Fixes #38502.

Built from https://develop.svn.wordpress.org/trunk@39073


git-svn-id: http://core.svn.wordpress.org/trunk@39015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:00:32 +00:00
David A. Kennedy 3711c0664d Twenty Seventeen: Replace remaining Genericons with Font Awesome icons
* Replaces: icon-pinned with icon-thumb-tack
* Replaces: icon-next with icon-arrow-right
* Replaces: icon-previous with icon-arrow-left
* Replaces: icon-expand with icon-angle-down
* Removes: Path, Polldaddy

Props sami.keijonen, melchoyce, laurelfulford.

Fixes #38488.

Built from https://develop.svn.wordpress.org/trunk@39072


git-svn-id: http://core.svn.wordpress.org/trunk@39014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 17:26:32 +00:00
Jeremy Felt 04f376e0aa Multisite: Use `get_network()` in `WP_UnitTest_Factory_For_Network`.
`wp_get_network()` was deprecated in 4.6.

Props johnjamesjacoby.
Fixes #38602.

Built from https://develop.svn.wordpress.org/trunk@39071


git-svn-id: http://core.svn.wordpress.org/trunk@39013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 16:52:33 +00:00
John Blackbourn 766ff15532 I18N: Revert [39069] as it needs some more work.
See #38485

Built from https://develop.svn.wordpress.org/trunk@39070


git-svn-id: http://core.svn.wordpress.org/trunk@39012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 16:07:32 +00:00
Pascal Birchler 8bdd37fc58 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39069


git-svn-id: http://core.svn.wordpress.org/trunk@39011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 09:24:29 +00:00
Pascal Birchler 8df80ae3ee I18N: Show available timezones in the user's locale on the settings screen.
Adds a `$locale` parameter to `wp_timezone_choice()` to only reload translations when necessary.

Props yale01.
See #38485.
Built from https://develop.svn.wordpress.org/trunk@39068


git-svn-id: http://core.svn.wordpress.org/trunk@39010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 09:16:31 +00:00
Pascal Birchler d7d8768ffd I18N: Remove unused `$wpdb` global from `get_locale()` after [39005].
Originally added in [38976], but reverted soon after.

Props johnjamesjacoby.
Fixes #38601.
Built from https://develop.svn.wordpress.org/trunk@39067


git-svn-id: http://core.svn.wordpress.org/trunk@39009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 07:38:31 +00:00