44078 Commits

Author SHA1 Message Date
Jonathan Desrosiers
9ea1fb3f30 Branch 5.8
git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51271 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:52:49 +00:00
Jonathan Desrosiers
47b4353470 Post WordPress 5.8 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51270 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:43:41 +00:00
Jonathan Desrosiers
fd3e1b346b WordPress 5.8 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@51269 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 03:15:39 +00:00
Jonathan Desrosiers
36012064f6 Build/Test Tools: Revert [51259-51256,51265].
[51259] introduced a PHP notice that was not actually fixed by [51265]. Reverting these changes in order to investigate further.

See #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51268 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 02:13:30 +00:00
Jonathan Desrosiers
9488d3dc7f Script Loader: Fix PHP notice caused by the viewScript for the core/file block.
This fixes a PHP notice caused by the `viewScript` for the `core/file` block having `.min.js` instead of just `.js`.

`register_block_script_handle()` was incorrectly looking for `view.min.asset.php`, which does not exist, and caused the `_doing_it_wrong()` notice.

This adds a check for `.min.js` in the `viewScript` field of `block.json` and corrects it to `.js` in order to match the expected pattern of `view.asset.php` until a more permanent fix can be created.

Follow up to [51259].

Props ipstenu, pbiron, peterwilsoncc.
See #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51267 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 01:45:10 +00:00
Peter Wilson
2a02de7d53 Upgrade/Install: Notify users of deactivated plugins during upgrade.
This adds a one-off notice to the dashboard in the event WordPress has automatically deactivated a plugin due to incompatibility with the new version of WordPress.

Introduces the new private function `deactivated_plugins_notice()` to display the notice in the dashboard. Introduces the new auto-loaded option `wp_force_deactivated_plugins` to store a list of automatically deactivated plugins; the option is used on both a site and network level.

Follow up to [51180].

Props desrosj, jorbin, azaozz, SergeyBiryukov, peterwilsoncc.
See #53432.



git-svn-id: https://develop.svn.wordpress.org/trunk@51266 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 00:20:52 +00:00
Jonathan Desrosiers
41164a2eaa Script Loader: Add file block assets to the svn-ignore list.
These are automatically generated and should not be committed.

Follow up to [51259].

Props gziolo, youknowriad.
See #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51265 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 19:09:08 +00:00
Kelly Choyce-Dwan
d658851630 Help/About: WordPress 5.8 About Page.
This is the start of the WordPress 5.8 about page, introducing new content and a first pass of the new style.

Props chanthaboune, cbringmann, webcommsat, marybaum, melchoyce, shaunandrews, desrosj, ryelle, oglekler, yvettesonneveld, nalininonstopnewsuk, meher, femkreations, alanjacobmathew, courane01, annezazu, matveb, milana_cap, javiarce, ryokuhi, audrasjb.
See #52775.



git-svn-id: https://develop.svn.wordpress.org/trunk@51264 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 19:06:01 +00:00
Aaron Jorbin
3c1ab395dd Docs: Further Improve documentation for wp_should_load_separate_core_block_assets().
In [51256], the documentation was improved, this further improves it. As scripts are not yet a part of what this function does, they are not mentioned explicitly. Assets is used so that the docs don't need a lot of improvements when scripts do come into play..

Props desrosj, SergeyBiryukov, Jorbin.
See #53505.



git-svn-id: https://develop.svn.wordpress.org/trunk@51263 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 18:44:45 +00:00
Jonathan Desrosiers
5673442b68 Script Loader: Use the provided block version when registering styles.
This updates `register_block_style_handle()` to use the `version` value provided in the `$metadata` parameter for non-Core blocks (when present). This removes the requirement to use `filemtime()` to generate a unique version.

When `version` is not defined within `$metadata`, the script version will fallback to using the current version of WordPress.

The block version should be considered similar to the one specified by plugin developers within the header of the main plugin file.

Props hellofromTonya, gziolo, jorbin, desrosj, walbo, aristath.
Fixes #53507.

git-svn-id: https://develop.svn.wordpress.org/trunk@51262 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 18:23:30 +00:00
Riad Benguella
073a0edcbc Block Editor: Include the latest fixes targetted for 5.8 RC1.
It includes:

 - Add a label for screen reader in categories block gutenberg#33060
 - Remove "is-dark-theme" rules from mixins. gutenberg#33058
 - Adjust widget form margins in the new widget editor gutenberg#33040
 - [Block Library - Query Loop]: Select first Query Loop found from pattern selection gutenberg#32737

See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51261 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 15:51:53 +00:00
Jonathan Desrosiers
fb5f367b92 Docs: Correct @since annotation for WP_Block_Type->view_script.
Follow up to [51259].

Props swissspidy.
See #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51260 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 15:46:55 +00:00
Riad Benguella
51cbe7eeb7 Build: Split packages and blocks to their webpack configs.
This also adds support for the viewScript for blocks fixing 
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51259 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 15:08:16 +00:00
Jonathan Desrosiers
da88164ba5 Build/Test Tools: Add the artifacts directory to svn-ignore and .gitignore.
When E2E tests fail, test snapshots with more details about the failure are placed in this folder.

Props isabel_brison.
Fixes #53549.

git-svn-id: https://develop.svn.wordpress.org/trunk@51258 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 14:44:31 +00:00
Sergey Biryukov
a0efb5bf06 Twenty Seventeen: Avoid JS errors when displaying legacy widgets.
Make sure the `$sidebar` variable is defined and has at least one entry in the array, before adding the `.below-entry-meta` class to elements below the entry meta.

Previously, the theme expected sidebar markup to exist on the page if sidebars are defined, but that markup is missing since only the widget itself and headers/footers of the page are loaded in the iframe used to display legacy widgets (widgets added prior to WordPress 5.8).

Props Clorith, Boniu91, desrosj.
Fixes #53512.

git-svn-id: https://develop.svn.wordpress.org/trunk@51257 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 12:56:41 +00:00
Sergey Biryukov
a4a84bc730 Docs: Improve documentation for wp_should_load_separate_core_block_assets().
This should clarify the purpose of the function and what effect it has on block styles loading.

Props aristath, desrosj, jorbin, SergeyBiryukov.
See #53505.

git-svn-id: https://develop.svn.wordpress.org/trunk@51256 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 11:10:33 +00:00
Jonathan Desrosiers
81e1c2d58b Coding Standards: Apply an alignment fix after composer format.
Follow up to [51254].

See #53375.

git-svn-id: https://develop.svn.wordpress.org/trunk@51255 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 00:39:00 +00:00
Jonathan Desrosiers
2b0c4e11ac Editor: Prevent block stylesheets from loading when they do not exist.
This fixes an issue where block stylesheets were being loaded even if they did not exist, causing 404 errors. The issue presented itself when the site was choosing to load block assets individually through the `should_load_separate_core_block_assets` filter hook.

This also fixes an issue where non-Core blocks would only be registered if they actually had asset files. This prevents developers from adding additional information to a style handle, such as inline styles through `wp_add_inline_style()`.

Props walbo, jorbin, aristath, desrosj, hellofromTonya.
Fixes #53375.

git-svn-id: https://develop.svn.wordpress.org/trunk@51254 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 00:07:53 +00:00
Jonathan Desrosiers
22d7c94964 Twenty Twenty-One: Ensure Duotone images are displayed correctly in Dark Mode.
This reduces the specificity of the CSS selector applying a dimming effect to images so that the new Duotone feature is properly applied to images.

Props walbo.
Fixes #53531.

git-svn-id: https://develop.svn.wordpress.org/trunk@51253 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 23:39:33 +00:00
Marius L. J
b1a6608c61 Site Health: Improve readability of site titles.
This splits up the site title for the Site Health tabs to make it more obvious what page a user is viewing, and which tab under that page. It also removes a possible source of warnings if a user tries accessing a tab that does not exist.

The introduction of this check for existing tabs also improves the accuracy of the active-tab indicator, ensuring the indicator shows up for the default tab, when no other tab has been selected.

Follow-up to [50764].

Props audrasjb, swissspidy.
Fixes #53535.

git-svn-id: https://develop.svn.wordpress.org/trunk@51252 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 23:06:31 +00:00
Jonathan Desrosiers
dda046184c Themes: Remove mention of “FSE” in Core.
Props aristath, jorbin.
Fixes #53497.

git-svn-id: https://develop.svn.wordpress.org/trunk@51251 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 19:10:44 +00:00
Riad Benguella
f800eaf7d1 Block Editor: Package updates including fixes from Gutenberg for WordPress 5.8 RC1.
This includes the fixes from https://github.com/WordPress/gutenberg/pull/33036

See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51250 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 15:59:41 +00:00
Sergey Biryukov
7f58202db9 Docs: Update documentation for WP_Widget_Block per the documentation standards.
Remove unused `$post` global reference.

Follow-up to [50995], [51058], [51063], [51221].

See #52628, #53461.

git-svn-id: https://develop.svn.wordpress.org/trunk@51249 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 08:34:18 +00:00
Robert Anderson
fba7649418 Widgets REST API: Fix non-multi widgets not appearing in wp_inactive_widgets
Registered widgets that do not extend WP_Widget should appear in the
wp_inactive_widgets sidebar by default. Having the widgets REST API call
retrieve_widgets() before serving any request ensures that this will happen.

This is a similar fix to [51235].

Fixes #53534.
Props zieladam, timothyblynjacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@51248 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-28 04:33:36 +00:00
Marius L. J
15d4c97f1e Site Health: Add a unique wrapper for dashboard widget content.
This wraps the inner-content of the Site Health dashboard widget to give a unique target for CSS selectors, restoring the ability to collapse the widget.

The initial implementation targeted the `.inside` class used by all widgets to apply styling to the widget content, but this prevented the widget from being collapsed, as it added grid-styles which other widgets do not use, overriding the usual behavior when toggling widget visibility.

Follow-up to [50833].

Props alanjacobmathew, walbo.
Fixes #53521.

git-svn-id: https://develop.svn.wordpress.org/trunk@51247 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-27 15:55:21 +00:00
Sergey Biryukov
00be7573c6 General: Ensure svn:eol-style is consistently set for all recently added files.
Follow-up to [49135], [49226], [49320], [49478], [49574], [51198].

Fixes #53528.

git-svn-id: https://develop.svn.wordpress.org/trunk@51246 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-27 12:44:45 +00:00
Sergey Biryukov
44f47c9d7d Block Editor: Remove empty blocks/query-loop directory.
The Query Loop block was renamed to Post Template.

Follow-up to [51101].

See #52991.

git-svn-id: https://develop.svn.wordpress.org/trunk@51245 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-27 11:27:30 +00:00
Sergey Biryukov
2eb35fa621 Docs: Document api_version and variations properties in WP_Block_Type::__construct().
Add `@since` tags for all properties added in WordPress 5.5, 5.6, and 5.8.

Follow-up to [47875], [48117], [49224], [50297], [50419], [50527].

Props mbabker.
Fixes #53518.

git-svn-id: https://develop.svn.wordpress.org/trunk@51244 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-26 11:12:52 +00:00
Aaron Jorbin
3c57ccf1b4 Post WordPress 5.8 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51243 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 17:09:17 +00:00
Aaron Jorbin
043ddf9cbd WordPress 5.8 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@51242 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 16:48:50 +00:00
Riad Benguella
a794914408 Block Editor: Update the packages with a number of fixes targeted for Beta 4.
It includes fixes from these two backport PRs: 

 - https://github.com/WordPress/gutenberg/pull/32992
 - https://github.com/WordPress/gutenberg/pull/32956

Props gziolo, ryelle, ntsekouras, desrosj, jorgefilipecosta.
See #53397


git-svn-id: https://develop.svn.wordpress.org/trunk@51241 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 15:50:14 +00:00
Riad Benguella
69ead0f406 Block Editor: Do not load a default font family for themes with theme.json.
This matches the behavior that has been in place in the gutenberg plugin.
The idea is that this makes the editor match the frontend by default for these themes.
If they use a custom font, they'll have to provide it for the editor as editor styles.

Props nosolosw.


git-svn-id: https://develop.svn.wordpress.org/trunk@51240 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 15:31:21 +00:00
Jonathan Desrosiers
eb8c724ea7 REST API: Include the sidebar ID when saving a widget.
This ensures backwards compatibility for code expecting this field to be present.

Props strategio, noisysocks, spacedmonkey.
See #53452.

git-svn-id: https://develop.svn.wordpress.org/trunk@51239 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 15:24:14 +00:00
Jonathan Desrosiers
a3acf737e1 Widgets: Avoid a TypeError when adding a widget in the Customizer.
This fixes a bug where `action` is set to `null` when adding a widget in the Customizer.

Fixes #53488. See #53421, #53419.

git-svn-id: https://develop.svn.wordpress.org/trunk@51238 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 14:49:34 +00:00
Jonathan Desrosiers
e27b245ea6 Docs: Various filter docblock improvements.
Follow up to [50776], [50956], [50983].

See #52920.

git-svn-id: https://develop.svn.wordpress.org/trunk@51237 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 14:39:13 +00:00
Jonathan Desrosiers
4c302c4295 Twenty Twenty-One: Use the theme version when enqueueing theme assets.
This avoids having to interact with the filesystem and ensures browser and proxy caches are only cleared when the file is actually updated.

Props peterwilsoncc, ryelle, aristath, SergeyBiryukov.
Fixes #53502.

git-svn-id: https://develop.svn.wordpress.org/trunk@51236 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 13:36:02 +00:00
Timothy Jacobs
1de9c692f3 REST API: Retrieve latest widgets before loading sidebars.
This fixes issues where sidebars would be unexpectedly missing from the new widgets screen. Running retrieve_widgets syncs sidebars that were registered after the last theme switch.

Props walbo, hellofromTonya, noisysocks.
Fixes #53489.


git-svn-id: https://develop.svn.wordpress.org/trunk@51235 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 13:17:20 +00:00
Sergey Biryukov
67fc415084 Tests: Correct PHPUnit version requirement in tests using ::createPartialMock().
The method was introduced in PHPUnit 5.5, not 6.0.

Follow-up to [48945], [48947] [51226].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51234 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 10:38:23 +00:00
Kelly Choyce-Dwan
8ffb74afd6 Twenty Twenty-One: Add spacing around Query block when there is a background color.
Props scruffian, desrosj, poena.
See #53398.



git-svn-id: https://develop.svn.wordpress.org/trunk@51233 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 01:47:24 +00:00
Jonathan Desrosiers
fc0c7a01f2 Widgets: Fix an “Invalid value” warning when adding a new widget in the Customizer.
This fixes a regression introduced in [50996] where sites that have been opted-out of the block-based widget editor experienced an “Invalid value.” error when adding a new widget to a sidebar in the Customizer.

This was caused by the early return value was changed to `null` from `$value` when set to an empty `array`, resulting in the widget being evaluated as invalid elsewhere.

Props jamesros161, caseymilne, naoki0h, ixkaito, zieladam, noisysocks, hellofromTonya.
Fixes #53479.

git-svn-id: https://develop.svn.wordpress.org/trunk@51232 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 00:07:15 +00:00
Jonathan Desrosiers
5def66daa0 Twenty Twenty: Remove extra margin within the Query Loop block.
Props ryelle, Clorith.
See #53482.

git-svn-id: https://develop.svn.wordpress.org/trunk@51231 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 23:21:26 +00:00
Sergey Biryukov
e2feb7cf77 Coding Standards: Fix WPCS issues in [51227].
This fixes a "Tabs must be used to indent lines; spaces are not allowed" error.

See #53475.

git-svn-id: https://develop.svn.wordpress.org/trunk@51230 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 20:54:43 +00:00
Jonathan Desrosiers
15b43fb360 Coding Standards: Apply an alignment fix from running composer format.
Follow up to [51216].
See #53481.

git-svn-id: https://develop.svn.wordpress.org/trunk@51229 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 19:24:31 +00:00
Jonathan Desrosiers
3dc566ba89 Widgets: Add missing label and description to Customizer controls.
This fixes a bug where the “Move To” dialogue was empty when a theme has multiple widget areas.

Props kevin940726, noisysocks, hellofromTonya.
Fixes #53487.

git-svn-id: https://develop.svn.wordpress.org/trunk@51228 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 19:19:57 +00:00
Andrew Ozz
22bd19e9dd Media: Prevent uploading and show an error message when the server doesn't support editing of WebP images, take II. Add new, better error message for it.
Props antpb, joedolson, iandunn, azaozz.
Fixes #53475.

git-svn-id: https://develop.svn.wordpress.org/trunk@51227 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 19:10:32 +00:00
Sergey Biryukov
f5ae410c33 Tests: Require PHPUnit >= 6 in tests using ::createPartialMock().
This avoids a "Call to undefined method" fatal error when running the tests with PHPUnit 5.4.x, which WordPress still supports as the minimum version.

Follow-up to [48945], [48947].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51226 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 10:04:41 +00:00
Sergey Biryukov
735ecc0ba9 Tests: Use assertSame() in _wp_to_kebab_case() tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [51079], [51198].

See #52482, #52625, #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51225 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-24 06:51:54 +00:00
Joe Dolson
ed84ca68aa Media: Correct undefined variable in wp_ajax_query_attachments.
Fix a misnamed variable introduced in [51145]. Change `$query_args` to correctly defined variable `$query`.

Follow-up to [51145].

props desrosj, audrasjb.
Fixes #50105.

git-svn-id: https://develop.svn.wordpress.org/trunk@51224 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 22:46:46 +00:00
Ian Dunn
c00c116484 Media: Revert r51211 to restore ms-files.php assets.
r51211 accidentally introduced a fatal error for Multisite instances with `ms_files_rewriting` enabled. Reverting removes the error, and the original purpose of the commit can be solved in another way.

Props otto42, barry, ryelle, azaozz.
Fixes #53492. See #53475.


git-svn-id: https://develop.svn.wordpress.org/trunk@51223 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 22:19:54 +00:00
Jonathan Desrosiers
23e2748316 Docs: Remove inaccurate @since tag.
Follow up to [50829,50831,51145,51147].

Props johnbillion.
Fixes #53461. See #50105.

git-svn-id: https://develop.svn.wordpress.org/trunk@51222 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 19:08:22 +00:00