Commit Graph

36256 Commits

Author SHA1 Message Date
Dion Hulse
bb3ffecc32 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, westonruter.
Merges [39686] to the 4.7 branch.
Fixes #39227.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40093 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-21 06:49:39 +00:00
Dion Hulse
dd766aa246 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, 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
2017-02-21 03:50:13 +00:00
Dion Hulse
28bcb22f2f Formatting: fix wpautop() to stop adding paragraph tags around <figcaption>.
Props azaozz, pbearne for tests.
Merges [39912], [39914] to the 4.7 branch.
Fixes #39307 for 4.7.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40091 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-21 03:41:42 +00:00
Sergey Biryukov
b34712067e 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.
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
2017-02-20 13:08:20 +00:00
Dion Hulse
1109726f83 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, 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
2017-02-20 06:49:11 +00:00
Dion Hulse
5a0a298082 Customize: Introduce get_header_video_url filter for the return value of get_header_video_url().
Props sanket.parmar, celloexpressions, SergeyBiryukov.
Merges [40045], [40086] to the 4.7 branch.
Fixes #39512.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40087 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-20 06:47:39 +00:00
Dion Hulse
af53eecf76 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, 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
2017-02-20 06:37:22 +00:00
Dion Hulse
f6c038da0c 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, 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
2017-02-20 06:34:17 +00:00
Dion Hulse
8531c4e5a6 Taxonomy: Disallow overriding the name property when registering a taxonomy.
Props wpfo for initial patch, swissspidy.
Merges [40049] to the 4.7 branch.
Fixes #39308.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40083 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-20 06:15:07 +00:00
Rachel Baker
72294c9caa 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.
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
2017-02-19 04:35:28 +00:00
Rachel Baker
3daa063286 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.
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
2017-02-19 03:27:13 +00:00
Rachel Baker
7be9593b68 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.

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
2017-02-19 03:18:38 +00:00
Sergey Biryukov
c6511562c6 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.
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
2017-02-17 21:23:52 +00:00
Dion Hulse
a345f95664 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.
Merges [40070] to the 4.7 branch.
Fixes #39277, #39304.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40071 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-17 06:46:45 +00:00
Dion Hulse
7759f06d5f 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.
Merges [40068] to the 4.7 branch.
Fixes #39783.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40069 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-17 05:06:23 +00:00
Aaron D. Campbell
51887464fe Post-4.7.2 version bump for 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40018 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 21:57:54 +00:00
Aaron D. Campbell
f36d9405fc Fix version to 4.7.2 not 4.7.3.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39997 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 18:19:00 +00:00
Aaron D. Campbell
c0f14f8f06 Bump 4.7 branch to version 4.7.2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39995 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 18:13:02 +00:00
Boone Gorges
4bc40bf97b 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.

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
2017-01-26 16:56:21 +00:00
John Blackbourn
437de3aec6 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.
Merges [39956] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39990 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 15:11:53 +00:00
Dominik Schilling (ocean90)
f8d636aadb Press This: Do not show Categories & Tags UI for users who cannot assign terms to posts anyways.
Merge of [39968] to the 4.7 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39969 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 14:00:03 +00:00
Dominik Schilling (ocean90)
c9cd77ce11 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.

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
2017-01-26 13:46:54 +00:00
Dominik Schilling (ocean90)
3bbc452bd7 Query: Ensure that queries work correctly with post type names with special characters.
Merge of [39952] to the 4.7 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39953 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-26 13:35:34 +00:00
Aaron D. Campbell
47ce489083 Post-4.7.1 version bump for 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39883 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 21:35:25 +00:00
Aaron D. Campbell
69f767fab8 Only show major version in readme.html for 4.7 branch
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39871 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 17:45:04 +00:00
Joe McGill
173bfd1a32 Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831].

Merges [39850] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39851 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 16:37:51 +00:00
Joe McGill
5e7d198785 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.

Merges [39848] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39849 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 16:27:17 +00:00
Aaron D. Campbell
ebda9908e5 Bump 4.7 branch to version 4.7.1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39845 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 15:14:11 +00:00
Aaron D. Campbell
8214df823f 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.
Merges [39843] to 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39844 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 14:48:04 +00:00
Joe McGill
879f152f69 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.

Merges [39831] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39832 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 13:11:52 +00:00
Dominik Schilling (ocean90)
d59732bd70 Updates: Translate plugin data on the Updates screen.
Merge of [39808] to the 4.7 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39820 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 11:38:25 +00:00
Dominik Schilling (ocean90)
089f7170b1 Themes: Fix markup for theme name fallbacks.
Merge of [39807] to the 4.7 branch.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39809 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 11:07:57 +00:00
Jeremy Felt
dfa88bd587 Multisite: Use wp_rand() in signup key creation.
Merges [39795] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39796 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 05:30:21 +00:00
Dion Hulse
0d96cf34cc 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

Merges [39759] to the 4.7 branch.
Fixes #37210 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39783 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 05:19:28 +00:00
Jeremy Felt
7d686e3ef0 Mail: Disable wp-mail.php when mailserver_url is mail.example.com.
Merges [39772] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39773 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 05:14:43 +00:00
Aaron D. Campbell
1d55a1327d Add nonce for widget accessibility mode.
Props vortfu.

See #23328.

Merges [39760] to 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39761 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-11 01:39:14 +00:00
Aaron D. Campbell
b9fb5a42e3 Add -src back to version
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39750 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 23:03:42 +00:00
Aaron D. Campbell
e20b84909f Post 4.7.1-RC1 version bump
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39749 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 22:43:01 +00:00
Aaron D. Campbell
d332cb2627 WordPress 4.7.1-RC1
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39746 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 17:30:16 +00:00
Aaron D. Campbell
dd78b273ed 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

Merges [39744] to 4.7 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39745 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 17:07:40 +00:00
Aaron D. Campbell
671f160e1f 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

Merges [39742] to the 4.7 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39743 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 17:03:06 +00:00
Dominik Schilling (ocean90)
411e183ab0 Twenty Seventeen: Introduce a theme-specific filter twentyseventeen_starter_content for customizing the starter content array.
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
2017-01-05 19:31:49 +00:00
Dion Hulse
62784396c1 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, 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
2017-01-05 08:17:19 +00:00
Dion Hulse
2e5f4ba323 Customize: Prevent removal of underline upon hover/focus for nav menu deletion links.
Props monikarao.
Amends [38503].
See #37527.
Merges [39677] to the 4.7 branch.
Fixes #39444.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39696 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 08:16:33 +00:00
Dion Hulse
6bfc386e28 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.
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
2017-01-05 08:15:48 +00:00
Dion Hulse
ae00aedc60 Customize: Ensure theme_mod-cache of custom_css lookup of -1 short-circuits a WP_Query from being made.
Props dlh, westonruter.
See #35395.
Merges [39688] to the 4.7 branch.
Fixes #39259.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39694 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 08:14:56 +00:00
Dion Hulse
dd41ff6c2c Customizer: Don't query for postmeta for Custom CSS (for not-current-themes) and Customizer Changeset posts.
Props dlh.
Merges [39692] to the 4.7 branch.
Fixes #39194.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39693 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 08:12:06 +00:00
Dion Hulse
e1c6f72330 Updates: Properly define $filesystemForm to handle error in modals.
Amends [39657].
Merges [39689] to the 4.7 branch.
See #39057.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39690 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 07:27:38 +00:00
Dion Hulse
acf3294e18 Feeds: Don't override the Content-Type header inside fetch_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, rmccue.
Merges [39681] to the 4.7 branch.
Fixes #39066.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39683 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 03:08:14 +00:00
Dion Hulse
ef8c306263 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.
Merges [39680] to the 4.7 branch.
Fixes #39314.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39682 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 03:05:57 +00:00