Commit Graph

36272 Commits

Author SHA1 Message Date
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
Andrew Ozz b8ee9d17c1 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.
Merges [39678] to the 4.7 branch.
Fixes #39368.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39679 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 01:58:57 +00:00
Boone Gorges a428ffc53d 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.

Merges [39663] to the 4.7 branch.

Props rachelbaker.
Fixes #39280.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39664 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-02 20:06:59 +00:00
Rachel Baker cb502d5e91 General: Update copyright year to 2017 in license.txt.
Props Nikschavan.
Merges [39659] to the 4.7 branch.
Fixes #39433.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39661 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-02 18:50:35 +00:00
Dion Hulse 16f887ddae 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.
Merges [39657] to the 4.7 branch.
Fixes #39057.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39658 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 07:45:05 +00:00
Dion Hulse 45c6d6490b 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).

Merges [39612] to the 4.7 branch.
Fixes #39250.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39654 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 06:23:56 +00:00
Dion Hulse b4f2e14878 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.
Merges [39622] to the 4.7 branch.
Fixes #39101.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39653 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 06:12:53 +00:00
Dion Hulse 8a19063818 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, peterwilsoncc.
Merges [39649] to the 4.7 branch.
Fixes #39328 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39652 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 05:54:40 +00:00
Dion Hulse d0e1d5db64 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.
Merges [39616] to the 4.7 branch.
Fixes #39270.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39651 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 05:48:42 +00:00
Dion Hulse 4b367cfcd4 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.
Merges [39635] to the 4.7 branch.
Fixes #39272.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39650 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-30 05:46:58 +00:00
Dion Hulse d11e7f4a65 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, peterwilsoncc, voldemortensen.
Merges [39645] to the 4.7 branch.
Fixes #37210 for trunk.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39646 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-29 02:59:24 +00:00
Rachel Baker 7b4f4be327 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.

Merges [39563] to the 4.7  branch.

Props kkoppenhaver, rachelbaker, jnylen0.
Fixes #39042.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39642 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-27 17:48:10 +00:00
Rachel Baker 7d2dd7c861 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.

Merges [39640] to the 4.7  branch.

Props dshanske for initial patch.
Fixes #39380.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39641 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-27 17:41:59 +00:00
Ella van Dorpe 02978beace Editor: Let the Add New link disappear in DFW mode.
The link was moved outside the heading in [38983].

Merges [39619] to the 4.7 branch.
Fixes #39313.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39634 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 14:55:31 +00:00
Gary Pendergast 82af7aba8d 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.

Merge of [39617] to the 4.7 branch.

Props gitlost.
Fixes #39231. See #38594.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39633 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:52:54 +00:00
Gary Pendergast 012cbda992 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.

Merge of [39623] to the 4.7 branch.

Props westonruter.
Fixes #39355.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39632 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:47:43 +00:00
Gary Pendergast b1882aa8f1 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.

Merge of [39621] to the 4.7 branch.

Props shazahm1hotmailcom, JPry, jnylen0.
Fixes #39300.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39631 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:33:15 +00:00
Gary Pendergast 81cc13dd49 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.

Merge of [39620] to the 4.7 branch.

Props dreamon11, ChopinBach.
Fixes #39293.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39630 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:29:24 +00:00
Gary Pendergast fab33a89e5 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.

Merge of [39598] to the 4.7 branch.

Props jblz, tyxla.
Fixes #39092.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39629 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:18:24 +00:00
Gary Pendergast 092fa83f60 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.

Merges [39597] to the 4.7 branch.

Props jnylen0.
Fixes #38700.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39628 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:12:06 +00:00
Gary Pendergast ef084ac427 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.

Merges [39626] to the 4.7 branch.

Fixes #39327.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39627 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-21 05:07:05 +00:00
Dion Hulse 7e49d80783 Feeds: Do not translate the `lastBuildDate` field in RSS feeds.
Props stevenkword.
Partial Merge of [39613] to the 4.7 branch.
Fixes #39141.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39615 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 06:43:48 +00:00
Dion Hulse 2e6ae93cf2 Taxonomy: Restore the ability to use string-based `$args` in `wp_get_object_terms()`.
Props tyxla.
Merges [39578] to the 4.7 branch.
Fixes #39215.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39611 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:49:02 +00:00
Dion Hulse 8cbd30e3ce 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.

Props jnylen0.
Merges [39595] to the 4.7 branch.
Fixes #38977.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39610 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:45:50 +00:00
Dion Hulse 321599cc46 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, jnylen0.
Merges [39594] to the 4.7 branch.
Fixes #39150.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39609 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:42:23 +00:00
Dion Hulse 4d3fb455f5 Posts, Post Types: Ensure `is_page_template()` can only return true when viewing a singular post query.
Props natereist, dlh, johnbillion.
Merges [39599] to the 4.7 branch.
Fixes #39211.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39608 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:40:01 +00:00
Dion Hulse c41a10ecb1 PDF Images: Avoid a PHP Warning when attempting to process a file without an extension.
Props chandrapatel for initial patch.
Merges [39580] to the 4.7 branch.
Fixes #39195.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39607 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:38:41 +00:00
Dion Hulse 746b590ee7 Customize: Prevent edit shortcut from losing event handler after selective refresh.
Props sirbrillig.
Merges [39581] to the 4.7 branch.
See #27403.
Fixes #39100.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39606 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:37:41 +00:00
Dion Hulse 4ce30a06ff 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.
Merges [39565] to the 4.7 branch.
Fixes #39132.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39605 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 05:36:33 +00:00
Adam Silverstein 126ba8a400 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.
Merges [39603] to the 4.7 branch.
Fixes #39070.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39604 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-15 13:01:26 +00:00
Ella van Dorpe c30742ceaf Editor: Remove target=_blank when unchecked in the link modal.
Merges [39601] to the 4.7 branch.
Fixes #39276.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39602 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-14 20:58:36 +00:00
Konstantin Obenland 652e264ef7 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.
Merges [39586] to the 4.7 branch.
Fixes #39246.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39587 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 09:33:56 +00:00
Dion Hulse 55e4ca9b6f Customize: Prevent navigation in preview when clicking on child elements of preview links that have non-previewable URLs.
Props westonruter.
Merges [39584] to the 4.7 branch.
Fixes #39098.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39585 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 08:25:45 +00:00
Dion Hulse 46611f6153 De-Emphasise the minor (x.y.Z) version in `readme.html` by including only the major version for the 4.7 branch.
See #35554


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39582 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 07:59:10 +00:00
Dion Hulse 720311ae72 Bump the version in `package.json` to 4.7.1 after [39576].
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39579 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 06:06:51 +00:00