38077 Commits

Author SHA1 Message Date
Sergey Biryukov
dae28e7c84 REST API: Include viewable attribute on Post Type resource for edit context.
For the block editor to be able to expose the Preview button correctly, it needs to know the `is_post_type_viewable()` setting, this change adds it to the Post Type response.

Props danielbachhuber.
Merges [43007] to the 4.9 branch.
Fixes #43739.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43038 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 04:30:23 +00:00
Sergey Biryukov
c125a27018 General: Introduce a polyfill for is_iterable() function added in PHP 7.1.
Props jrf, schlessera, desrosj.
Merges [43036] to the 4.9 branch.
See #43619.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43037 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 04:16:43 +00:00
Sergey Biryukov
170e2df167 General: Introduce a polyfill for is_countable() function added in PHP 7.3.
Props jrf, ayeshrajans, desrosj.
Merges [43034] to the 4.9 branch.
See #43583.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43035 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 03:46:07 +00:00
Sergey Biryukov
9530731171 Help/About: Move "Get involved" link on Credits screen to the top of the page for better visibility.
Props bridgetwillard, desrosj.
Merges [43032] to the 4.9 branch.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43033 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 03:18:22 +00:00
Sergey Biryukov
09492c6430 Login and Registration: Send nocache_headers() on Multisite signup pages.
Props herregroen.
Merges [43030] to the 4.9 branch.
Fixes #43843.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43031 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 23:09:55 +00:00
Sergey Biryukov
a161ca46fc Plugins: Show the required PHP version in the plugin details view, if specified.
Props xkon.
Merges [42998] to the 4.9 branch.
Fixes #43650.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43029 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 22:51:01 +00:00
Sergey Biryukov
578b1c9c86 Themes: Introduce theme_templates filter for page templates of all post types.
This complements the `theme_{$post_type}_templates` dynamic filter added in [38951].

Props desrosj.
Merges [43025] and [43027] to the 4.9 branch.
Fixes #43872.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43028 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 22:44:31 +00:00
Sergey Biryukov
5a9676cf95 Docs: Correct $id parameter type for old_slug_redirect_post_id filter.
Props dlh.
Merges [42722] to the 4.9 branch.
Fixes #43375.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43026 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 22:36:39 +00:00
Aaron D. Campbell
17322861fc Post 4.9.5 version bump for 4.9 branch
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42959 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 22:41:15 +00:00
Aaron D. Campbell
54ba6de546 Bump 4.9 branch to version 4.9.5
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42933 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 20:16:31 +00:00
Dominik Schilling (ocean90)
e8287f7904 Media: Update minified version of imgAreaSelect after [42874].
Adds imgAreaSelect to the uglify grunt process.

Merge of [42930] to the 4.9 branch.

Props adamsilverstein.
See #41242.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42932 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 19:50:21 +00:00
Dominik Schilling (ocean90)
3b0c5c58a7 Template: Make sure the version string is correctly escaped for use in attributes.
Merge of [42893] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42917 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 16:04:26 +00:00
Dominik Schilling (ocean90)
532f80052e HTTP: Don't treat localhost as same host by default.
Merge of [42894] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42908 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 15:34:19 +00:00
Dominik Schilling (ocean90)
ab7377b194 Login: Use wp_safe_redirect() when redirecting the login page if forced to use HTTPS.
Merge of [42892] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42895 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-03 15:21:58 +00:00
Sergey Biryukov
144a957353 Post WordPress 4.9.5 RC 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42885 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-28 01:38:44 +00:00
Sergey Biryukov
f1aff90c17 WordPress 4.9.5 RC 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42884 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-28 01:07:05 +00:00
Gary Pendergast
c97ecca314 Dashboard: Remove the "Try Gutenberg" callout.
As eager as we all are to see Gutenberg put before a wider audience, there are still a handful of issues that need to be fixed, which won't be done before the 4.9.5 release.

Reverts [42869].
See #41316.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42883 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-28 00:17:26 +00:00
Sergey Biryukov
bacf5e15d2 Twenty Seventeen: Bump version and update the changelog.
Props audrasjb.
Merges [42881] to the 4.9 branch.
Fixes #43572.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42882 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-27 21:11:22 +00:00
Adam Silverstein
e5bdf3a6ff Media: Fix image cropping on touch screen devices.
* In initCrop, handle touch events in addition to mouse events.
* In imageSelect jQuery plugin, accept event.which of 0 as provided by touch events.

Props yahil, alexgso, joemcgill.
Merges [42818] to the 4.9 branch.
Fixes #41242.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42874 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-24 20:25:07 +00:00
Gary Pendergast
1c5b0258b5 Dashboard: Introduce a "Try Gutenberg" callout.
To encourage more people to try Gutenberg, this new Dashboard box allows site users to easily install and try out Gutenberg.

Props pento, melchoyce, joen, karmatosed, joemcgill, SergeyBiryukov, jorbin.

Fixes #41316.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42869 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-22 00:58:32 +00:00
Sergey Biryukov
29cde1d964 Post WordPress 4.9.5 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42868 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-21 02:15:17 +00:00
Sergey Biryukov
1bde2abec1 WordPress 4.9.5 Beta 1
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42867 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-21 02:07:12 +00:00
Sergey Biryukov
b1344949d9 Media: On Media Settings screen, make the pairs of labels and inputs always stacked vertically, on both mobile and desktop screens.
Make `<br />` tags on the screen behave as line breaks again after [41836]. Add a missing fieldset + legend for better accessibility.

Props afercia, RavanH, obenland, garrett-eclipse.
Merges [42864] to the 4.9 branch.
Fixes #42724. See #34539.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42865 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 22:48:42 +00:00
Sergey Biryukov
342cac1a88 Formatting: Avoid a PHP 7.2 warning in wp_kses_attr() when one of $allowedtags elements is an uncountable value.
Props andrei0x309, soulseekah, SergeyBiryukov.
Merges [42860] to the 4.9 branch.
Fixes #43312.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42861 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 21:36:04 +00:00
Sergey Biryukov
99b7b99720 Twenty Seventeen: Underline links in comments.
Props jainnidhi, larrach, audrasjb.
Merges [42713] to the 4.9 branch.
Fixes #43317.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42859 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 21:18:20 +00:00
Dominik Schilling (ocean90)
c2cf0bd9d3 REST API JavaScript Client: Support an empty string for nonce to disable sending the X-WP-Nonce header.
Passing a `nonce` argument with an empty string to `wp.api.init()` now does no longer fall back to `wpApiSettings.nonce`. This makes it possible to stop sending nonce headers, for example to a read-only endpoint on another site in a multisite install.

Merge of [42852] to the 4.9 branch.

Props adamsilverstein, FPCSJames, ocean90, swissspidy.
See #42948, #43266.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42854 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 20:03:59 +00:00
Dominik Schilling (ocean90)
8b569c9ea0 REST API JS Client: Extend custom nonce functionality to collections.
This brings the improved nonce handling from [41553] to collections to remove the direct `wpApiSettings.nonce` dependency.

Merge of [42851] to the 4.9 branch.

Props adamsilverstein, ocean90, swissspidy.
See #43265.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42853 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 19:59:36 +00:00
Dominik Schilling (ocean90)
d82ec65672 Customizer menus: correct oversized viewport after dragging menu items.
Fix an issue where the screen viewport resized to an oversized state on mobile devices after moving sub-menus.

Merge of [42817] to the 4.9 branch.

Props adamsilverstein, kwonye.
Fixes #36884.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42850 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 16:48:05 +00:00
Dominik Schilling (ocean90)
c1a43d358c Comments: Remove unnecessary aria-required attribute from comment_form(), added with the function in [12810].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.

Merge of [42758] to the 4.9 branch.

Props lakenh, afercia, davidakennedy, henry.wright.
Fixes #39045.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42849 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 16:44:43 +00:00
Dominik Schilling (ocean90)
d3703544e0 Media: Grid view - correct placeholder positioning during uploads.
Preventing contextually created attachments from being added to the grid collection in Attachments.validator. Remove the previous filtering introduced in [41937] which caused the placement issue.

Merge of [42739-42740] to the 4.9 branch.

Props lancewillett, Junaidkbr, designsimply, joemcgill.
Fixes #42968.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42848 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 16:19:50 +00:00
Dominik Schilling (ocean90)
b1d5628650 Readme: Update recommended PHP version to 7.2.
Merge of [42358] to the 4.9 branch.

Props otto42, johnbillion, rachelbaker, jorbin.
Fixes #42789.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42847 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 16:12:56 +00:00
Dominik Schilling (ocean90)
566e91a3a4 Customizer: In menus, reset results when closing the 'add items' panel.
Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items.

Merge of [42744] to the 4.9 branch.

Props Blair jersyer, aranwer104, afercia.
See #43333.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42846 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 15:10:01 +00:00
Dominik Schilling (ocean90)
371945241e Multisite: Use a numbered placeholder in sprintf() for the site URL.
Fixes missing site domain in the link and a PHP warning.

Merge of [42844] to the 4.9 branch.

Props Thomas Vitale, conner_bw.
See #41645, #43568.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42845 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 15:06:03 +00:00
Joe McGill
a035fa16b6 Update unit test following r42839.
This updates the expected version number for Hello Dolly in `Tests_Ajax_Update_Plugin::test_update_plugin` following [42839].

See #43555.

Merges [42841] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42842 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-17 20:59:30 +00:00
Joe McGill
3858cc1dd9 Update Hello Dolly lyrics.
This updates the Hello Dolly plugin to remove lines which could be objectionable when shown in the admin out of context, and brings the lyrics more in line with Louis Armstrong's recording.

Props sebastienthivinfocom, birgire, audrasjb, joemcgill.
Fixes #43555.

Merges [42839] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42840 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-17 20:26:10 +00:00
Joe McGill
1d3974aee4 Revert max-width styles on caption shortcodes.
This is a partial revert of [41724], so image captions include an
inline `width` style instead of `max-width`.

This returns the caption shortcode to the pre-4.9.0 behavior, while
retaining the extra unit test coverage added in [41724].

Fixes #43123. See #33981.

Merges [42837] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42838 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-16 20:18:48 +00:00
John Blackbourn
9168a3ed8d Security: Loosen the admin referrer policy header value to allow the referring host to be sent from the admin area in all cases.
This allows referrer-restricted content from third parties (such as images and fonts) to continue working in the admin area.

Props aranwer104, qcmiao

Fixes #43285

Merges [42830] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42831 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-12 10:58:24 +00:00
Mike Schroder
1e1f116671 Media: Correctly allow changing PDF thumbnail crop value.
Corrects logic that kept plugins from setting crop value of intermediate image sizes for rendered PDFs.
Adds test.

Props leemon, SergeyBiryukov, chetan200891, birgire.
Merges [42792] to the 4.9 branch.
Fixes #43226.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42813 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 03:20:52 +00:00
Sergey Biryukov
10bae39c1c General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce, kristastevens for language; dmsnell for original patch; peterwilsoncc.
Merged [42648] and [42719] to the 4.9 branch.
Fixes #38332.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42811 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 00:14:20 +00:00
Sergey Biryukov
d5b9055b03 XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings.
Props dd32.
Merges [42652] to the 4.9 branch.
Fixes #43216.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42806 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:55:25 +00:00
Sergey Biryukov
00868e109a Users: Display partial names in the user listing tables.
This allows showing a name when only the first or last name is provided.

Props shital-patel, antipole.
Merges [42256] and [42257] to the 4.9 branch.
Fixes #42713.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42805 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:47:17 +00:00
Sergey Biryukov
5d59eddd1a Filesystem API: Avoid an infinite loop in wp_mkdir_p() when trying to determine the parent folder with open_basedir restriction in effect.
Props soulseekah, 1265578519-1.
Merges [42801] to the 4.9 branch.
Fixes #43417.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42804 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:44:10 +00:00
Sergey Biryukov
cc33d77ee9 Customize: Correct closing tags in customize_themes_print_templates().
Props johnpgreen, nandorsky.
Merges [42711] to the 4.9 branch.
Fixes #43307.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42803 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:41:29 +00:00
Sergey Biryukov
722fe01d66 Build/Test Tools: Update prefixed CSS properties in about.css.
Firefox 52+ supports unprefixed `column-count` and `column-gap` properties.

Props netweb, afercia.
Merges [42687] to the 4.9 branch.
Fixes #43190.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42802 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:40:01 +00:00
Sergey Biryukov
e4527e89b5 Media: Avoid a PHP warning in wp_calculate_image_srcset() if a plugin returns a non-array value via wp_calculate_image_srcset filter.
Props mrmadhat, codegrau.
Merges [42639] to the 4.9 branch.
Fixes #43201.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42669 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-07 23:48:37 +00:00
Sergey Biryukov
7de6c23590 Post 4.9.4 version bump for 4.9 branch
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42668 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-07 23:18:56 +00:00
John Blackbourn
a72952cf5e Build/Test Tools: Allow code coverage reports to be generated.
This corrects the attribute needed to allow PHPUnit to generate coverage reports, and also adds a blacklist of files and directories that are excluded from coverage reports.

Props schlessera, jipmoors

See #43067, #43240

Merges [42665] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42666 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-07 22:22:18 +00:00
Dion Hulse
e6f1bfe881 Bump the 4.9 branch to version 4.9.4.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42656 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-06 15:41:43 +00:00
Dion Hulse
e477eeed31 Updates: Partially revert [42584], as this branch of code should always be run after a core update check.
This code branch is responsible for running all autoupdates, including plugins and themes - which should run regardless of if there's a core autoupdate available.

This revert does not revert the `$timeout` changes, as these should still use cached data if it's available.
Ideally this should be decoupled from the core update check to allow background updates to operate even when the core update check is disabled or running more often than twice daily.

Merges [42653] to the 4.9 branch.
Fixes #43103, #43235.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42654 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-06 12:46:50 +00:00
Sergey Biryukov
5466203b79 Bump the 4.9 branch to version 4.9.3.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@42650 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-05 20:04:40 +00:00