Ensures that links with `javascript:`, `mailto:` and other protocols work as expected in the customizer preview.
Props westonruter.
Merges [40064] to the 4.7 branch.
Fixes#39797.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40096 602fd350-edb4-49c9-b593-d223f7449a82
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, westonruter.
Merges [39951] to the 4.7 branch.
See #27403.
Fixes#39498.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40095 602fd350-edb4-49c9-b593-d223f7449a82
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].
Merges [39994] to the 4.7 branch.
See #38015.
Fixes#39600.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40094 602fd350-edb4-49c9-b593-d223f7449a82
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, peterwilsoncc.
Merges [39949] to the 4.7 branch.
Fixes#39564.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40092 602fd350-edb4-49c9-b593-d223f7449a82
For UX and accessibility reasons, it's better to always avoid playing videos automatically.
Props bor0.
Merges [40089] to the 4.7 branch.
Fixes#39560.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40090 602fd350-edb4-49c9-b593-d223f7449a82
Fixes bad conditions in `WP_Customize_Setting::get_root_value()` and `WP_Customize_Setting::set_root_value()`.
Props dlh, westonruter.
Amends [35007].
Merges [40036] to the 4.7 branch.
See #32103.
Fixes#36952.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40088 602fd350-edb4-49c9-b593-d223f7449a82
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, peterwilsoncc.
See #30210.
Merges [40030] to the 4.7 branch.
Fixes#39157.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40085 602fd350-edb4-49c9-b593-d223f7449a82
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, adamsilverstein.
Merges [40040] to the 4.7 branch.
Fixes#39341.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40084 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [40080] to the 4.7 branch.
Fixes#39466.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40081 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [39923] to the 4.7 branch.
Fixes#39432.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40079 602fd350-edb4-49c9-b593-d223f7449a82
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.
Props jnylen0.
Merges [40063] to the 4.7 branch.
Fixes#39871.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40078 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [40039] to the 4.7 branch.
Fixes#39774.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40075 602fd350-edb4-49c9-b593-d223f7449a82
This changeset reverts [38381], which caused inconsistencies in the way the
REST API fetches posts and other objects.
Merge of [39992] to the 4.7 branch.
See #38792, #37738.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39993 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merge of [39954] to the 4.7 branch.
See #38792.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39957 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [39848] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39849 602fd350-edb4-49c9-b593-d223f7449a82
Only show users that have authored a post of a post type that has `show_in_rest` set to true.
Props rachelbaker, jnylen0.
Merges [39843] to 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39844 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merges [39831] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39832 602fd350-edb4-49c9-b593-d223f7449a82
The required version should be 4.7 and also adds more information to changelog.
Props @ocean90 @Presskopp
Merges [39744] to 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39745 602fd350-edb4-49c9-b593-d223f7449a82
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
Merges [39742] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39743 602fd350-edb4-49c9-b593-d223f7449a82
Add some documentation to the default starter content.
Merge of [39720] to the 4.7 branch.
Props sanket.parmar, celloexpressions.
See #39109.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39721 602fd350-edb4-49c9-b593-d223f7449a82
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, rmccue.
Merges [39684] to the 4.7 branch.
Fixes#39047.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39697 602fd350-edb4-49c9-b593-d223f7449a82
These styles should only be applied by theme stylesheets as needed.
Props sirbrillig.
Reverts parts of [39202] and [39233].
See #38651.
Merges [39685] to the 4.7 branch.
Fixes#39349.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39695 602fd350-edb4-49c9-b593-d223f7449a82