This prevents non-image fileypes from returning a mime type of "application/octet-stream" when `exif_imagetype()` returns `false`.
Props blobfolio.
Fixes#40017.
Merges [40397] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40403 602fd350-edb4-49c9-b593-d223f7449a82
Introduces WP_Customize_Panel::$auto_expand_sole_section property which allows panels to opt-in to the behavior, which the Widgets panel is made to do by default.
Props delawski, westonruter, melchoyce.
Fixes#37471.
Merges [40395] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40402 602fd350-edb4-49c9-b593-d223f7449a82
Accounts for HTTPS links (port 443) where [40318] only accounted for HTTP links (port 80). Addresses issue in IE11 where the default port number is unexpectedly included on `link.host` for links dynamically created by scripts.
Props mattwiebe.
Amends [40318], [38890].
See #38409.
Fixes#40198.
Merges [40381] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40386 602fd350-edb4-49c9-b593-d223f7449a82
Previously `update_blog_option()` would trigger an invalidation of that site's entire cache although these changes did not affect the content of
these caches. Furthermore changes to the special options `blogname`, `siteurl` and `post_count` should not invalidate the entire cache of that site, but only their respective site details cache. The option `home` now has the same behavior as it also belongs to the site details, but did not invalidate the cache at all previously.
Several new unit tests confirm these changes work as expected.
Fixes#40063.
Merges [40305] and [40333] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40385 602fd350-edb4-49c9-b593-d223f7449a82
Use the same `active_callback` as was supplied previously for the `header_video` control in [39240] where this instance was missed.
Amends [39240].
Props pratikshrestha.
See #38738.
Fixes#40308.
Merges [40379] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40384 602fd350-edb4-49c9-b593-d223f7449a82
Improve jsdoc for `onChangeActive` function. Restores fix from [34557] which got dropped in [38648].
Props dlh, westonruter.
See #34391, #33509.
Fixes#39430.
Merges [40304] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40375 602fd350-edb4-49c9-b593-d223f7449a82
Otherwise CSS specific to the site's locale would be applied, even though the customizer is displayed in the user's locale.
See #29783.
Fixes#40271.
Merges [40368] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40369 602fd350-edb4-49c9-b593-d223f7449a82
After [40059] the CSS class `button-link` uses `text-align: left` by default.
This change now requires to limit as much as possible the use of `button-link`
to controls that should really look like links and to explicitly set
`text-align: center` in a few other cases.
Fixes#39983.
Merges [40358] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40367 602fd350-edb4-49c9-b593-d223f7449a82
Overrides the 404 status during partial refresh requests to serve back 200 so that the request is not deemed a failure and invoke the fallback behavior (full refresh).
See #27355.
Fixes#40018.
Merges [40316] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40366 602fd350-edb4-49c9-b593-d223f7449a82
Always passes the complete `position` object to the jQuery autocomplete widget.
Also checks if an autocomplete instance already exists on the Bulk Edit textarea.
Props davidbenton.
Fixes#40242.
Merges [40357] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40365 602fd350-edb4-49c9-b593-d223f7449a82
Prior to 4.7, term relationships - as set by `wp_set_object_terms()` or
`wp_remove_object_terms()` - did not affect the term query cache. The
introduction of the 'object_ids' parameter in 4.7 means that the query
cache must be aware of object-term relationships. As such, the
'last_changed' incrementor is now invalidated when term relationships
are modified.
This bug only reared its head when delaying term counting, because term
counting performs its own term query cache invalidation.
Merges [40353] to the 4.7 branch.
Props mboynes.
Fixes#40306.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40354 602fd350-edb4-49c9-b593-d223f7449a82
This prevents an additional 301 redirect when clicking on the nav menu item, and it also prevents a scenario where the auth cookie may not be passed
and cause an authentication error when navigating in the customizer.
Props dlh, swissspidy.
Fixes#40112.
Merges [40300] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40338 602fd350-edb4-49c9-b593-d223f7449a82
Avoid a PHP Error when attempting to embed the parent post of an attachment, when the parent post ID is invalid. Instead check if the parent post
object exists before checking the read permission for the parent post.
Props GhostToast.
Fixes#39881.
Merges [40306] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40337 602fd350-edb4-49c9-b593-d223f7449a82
The site's current timezone offset is an important piece of information for any REST API client that needs to manipulate dates. It has not been
previously available.
Expose both the `gmt_offset` (the site's current offset from UTC in hours) and `timezone_string` (which also provides information about daylight
savings time) via the "site info" endpoint (the base `/wp-json` response).
Also update the `wp-api-generated.js` fixture file with the changes to the default API responses.
Props sagarkbhatt.
Fixes#39854.
Merges [40238] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40336 602fd350-edb4-49c9-b593-d223f7449a82
Addresses issue in IE11 where the default port number of `:80` is unexpectedly included on `link.host` for links dynamically created by scripts.
Props westonruter, afercia for testing.
See #38409.
Fixes#40198.
Merges [40318] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40335 602fd350-edb4-49c9-b593-d223f7449a82
Exclude 'node_modules' directories from paths searched in `WP_Theme::scandir()`. Introduces the `theme_scandir_exclusions` filter to allow sites to
exclude any other paths like `bower_components` or `vendor` from being searched for template files.
Props lukasbesch, dd32, swisspidy, rachelbaker.
Fixes#38292.
Merges [40301] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40326 602fd350-edb4-49c9-b593-d223f7449a82
This prevents wrong dates when dealing with DST, see [40115] and [40284].
Props nerrad.
Fixes#40136.
Merges [40284] and [40324] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40325 602fd350-edb4-49c9-b593-d223f7449a82
[38667] changed the way that the filter parameters are built. That
changeset didn't fully account for the pre-4.7 format of `$taxonomies`.
Merge of [40290] to the 4.7 branch.
Props ig_communitysites.
Fixes#40154.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40291 602fd350-edb4-49c9-b593-d223f7449a82
This change moves to specifying the PHPUnit version for all PHP versions, and fixes an issue where the Composer global bin directory is not at `~/.composer/vendor/bin` on the boxes that are used for HHVM builds.
See #40100
Merges [40269] and [40271] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40272 602fd350-edb4-49c9-b593-d223f7449a82
Overriding pluggable functions in the test suite is asking for trouble in the future. In addition, it means the test suite can't be guaranteed to behave the same as core.
This instead introduces a `send_auth_cookies` filter which can be hooked in during the test suite to prevent these functions from attempting to send cookie headers to the client.
Fixes#39367
Merges [40263] and [40264] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40265 602fd350-edb4-49c9-b593-d223f7449a82
* Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
* On Travis CI install and use the node version which is specified in package.json.
* Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
Merge of [40255] and [40257-40259] to the 4.7 branch.
Props netweb, johnbillion.
See #35105, #39822, #40086.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40260 602fd350-edb4-49c9-b593-d223f7449a82
This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.
Props netweb, jorbin
Fixes#39486
Merges [40241] to the 4.7 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40250 602fd350-edb4-49c9-b593-d223f7449a82
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.
Merge of [40120] and [40121] to the 4.7 branch.
Props JPry, iseulde, davidakennedy, Drivingralle.
Fixes#39232.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40137 602fd350-edb4-49c9-b593-d223f7449a82