Commit Graph

17806 Commits

Author SHA1 Message Date
desrosj
8718b2cae6 Media: Increase number of media items displayed per page.
Increase the number of media items displayed per page from 40 to 80 to improve the experience for users navigating the library on sites with a large quantity of media in the library.

Props AlGala, antpb, hellofromTonya, joedolson, SergeyBiryukov, wb1234, peterwilsoncc.
Merges [51632] to the 5.8 branch.
Fixes #53827.
Built from https://develop.svn.wordpress.org/branches/5.8@51643


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-19 15:01:57 +00:00
desrosj
8145e21ca2 Media: Fix layout of media library modal on narrow screens.
Reduces the right margin of the media library modal on small and medium width screens to remove excess white-space. On very narrow screens this was preventing the media icons from displaying.

Props andraganescu, desrosj, joedolson, moch11, mukesh27, sabernhardt, SergeyBiryukov, zieladam, peterwilsoncc.
Merges [51631] to the 5.8 branch.
Fixes #53679.
Built from https://develop.svn.wordpress.org/branches/5.8@51642


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-19 15:00:59 +00:00
desrosj
b9d1f9170d Customize: Hide native control on background position field.
Hide the browser's native radio button on the custom background position selector in the Customizer and the legacy background screen. This fixes an issue causing both to display.

Props mukesh27, ravipatel, sabernhardt, walbo, peterwilsoncc.
Merges [51637] to the 5.8 branch.
Fixes #53803.
Built from https://develop.svn.wordpress.org/branches/5.8@51640


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-19 13:47:00 +00:00
desrosj
d6c021e728 Docs: Fix typo in the get_block_editor_settings() description.
Follow-up to [50776].

Props tmatsuur, pbearne, SergeyBiryukov.
Merges [51611] to the 5.8 branch.
Fixes #53922.
Built from https://develop.svn.wordpress.org/branches/5.8@51621


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-16 18:42:57 +00:00
desrosj
0609cdd83c Editor: Preserve the original template keys when preparing a list of page templates.
Previously, the original "404" template key was lost when "Default template" is merged into the available templates array, as the `array_merge()` function renumbers numeric keys. Later, when we merge templates on the client side, this caused duplicate "404" templates to appear in the dropdown.

By replacing the `array_merge()` call with `array_replace()`, we make sure to keep the original numeric keys.

Props Mamaduka, Toro_Unit, youknowriad, SergeyBiryukov.
Merges [51595] to the 5.8 branch.
Fixes #53898.
Built from https://develop.svn.wordpress.org/branches/5.8@51620


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-16 18:41:00 +00:00
desrosj
77cdaf8e92 Menus: Hide bulk-select on new menu page.
Prevent the bulk-select option from displaying when adding a new menu. This also prevents the option from displaying when an administrator first visits the menu page and no menus are set.

Props dlh, sabernhardt, peterwilsoncc.
Merges [51539] to the 5.8 branch.
Fixes #53654.
Built from https://develop.svn.wordpress.org/branches/5.8@51596


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-10 19:36:59 +00:00
desrosj
3616f5bf0b Editor: Prevent block-editor JavaScript loading in other editors.
Add a check to `wp_add_iframed_editor_assets_html()` confirming the edit post screen is using the block-editor before including block-editor specific JavaScript. For the classic and other editors the function returns early without any output.

Props swissspidy, desrosj, peterwilsoncc.
Merges [51540] to the 5.8 branch.
Fixes #53696.
Built from https://develop.svn.wordpress.org/branches/5.8@51593


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-10 16:35:04 +00:00
Peter Wilson
2b90cc4361 Block Editor: Add missing border setting on button block.
This commit fixes a regression on WordPress 5.8 that made the border radius setting on the buttons block disappear.

Props Mamaduka, daisyo, priethor, desrosj, mikeschroder.
Merges [51538] to the 5.8 branch.
Fixes #53697.


Built from https://develop.svn.wordpress.org/branches/5.8@51547


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-05 00:44:58 +00:00
Peter Wilson
e9dd9dddb1 Upgrade/Install: Avoid creating nonce during installation.
This avoids a "Table `wp_options` doesn't exist" database error when trying to create a nonce for password reset button.

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 is not available during installation, we can safely skip creating a nonce.

Follow-up to [39684], [50129].

Props schlessera, swissspidy, sanketchodavadiya, hellofromTonya, SergeyBiryukov.
Merges [51525] to the 5.8 branch.
Fixes #53830.


Built from https://develop.svn.wordpress.org/branches/5.8@51546


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-05 00:33:00 +00:00
desrosj
720a2a7035 Themes: Add "Template Editing" to the list of WordPress theme features.
Follow-up to [meta11158].

Props poena, desrosj, SergeyBiryukov.
Merges [51510] to the 5.8 branch.
Fixes #53556. See #meta5802.
Built from https://develop.svn.wordpress.org/branches/5.8@51516


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-30 12:24:59 +00:00
desrosj
2c3326126b I18n: Fix broken loop in WP_Theme_JSON_Resolver
Related issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/33552.

The loop in `WP_Theme_JSON_Resolver` to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping.

Follow-up to [50959].

Props schlessera.
Merges [51472] to the 5.8 branch.
Fixes #53738.
Built from https://develop.svn.wordpress.org/branches/5.8@51515


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-30 12:22:00 +00:00
desrosj
89bd77009b Upgrade/Install: Add files for 5.8 to the $_old_files list that were missed.
Follow up to [51133], [51459].

Props WFMattR, audrasjb, ocean90, johnbillion, pbiron.
Merges [51497] to the 5.8 branch.
Fixes #53702.
Built from https://develop.svn.wordpress.org/branches/5.8@51509


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 13:06:58 +00:00
desrosj
94da59e312 Docs: Correct a comment about WebP constants in wp-includes/compat.php.
Follow-up to [50810], [50814].

Props GaryJ, rtm909, SergeyBiryukov.
Merges [51474] to the 5.8 branch.
Fixes #53680.
Built from https://develop.svn.wordpress.org/branches/5.8@51508


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 13:05:01 +00:00
desrosj
f6b7f4c3e9 Media: Check the posts_per_page value in wp_ajax_query_attachments() before using it as a divisor.
This avoids a "Division by zero" PHP warning if a plugin changes the `posts_per_page` value to zero.

Follow-up to [51145].

Props 2linctools, kapilpaul, audrasjb, SergeyBiryukov.
Merges [51485] to the 5.8 branch.
Fixes #53773.
Built from https://develop.svn.wordpress.org/branches/5.8@51507


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 13:02:58 +00:00
desrosj
a1a9f6c5c6 Help/About: Add / character to <img> and <source> tags.
While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.

Follow-up to [47493], [48834], [50556], [51418].

Props radixweb, ankitmaru, TobiasBg, sabernhardt, audrasjb, SergeyBiryukov.
Merges [51473] to the 5.8 branch.
Fixes #53716.
Built from https://develop.svn.wordpress.org/branches/5.8@51506


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 12:55:56 +00:00
desrosj
839f0444e3 External Libraries: Correct the underscore version used when registering.
The correct version is `1.13.1`.

Follow up to [50650], [50778].

Props david.binda.
Merges [51469] to the 5.8 branch.
Fixes #53713.
Built from https://develop.svn.wordpress.org/branches/5.8@51505


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 12:54:58 +00:00
desrosj
34e087e366 External Libraries: Correct the jquery-form version used when registering.
The correct version is `4.3.0`.

Follow up to [50546].

Props david.binda.
Merges [51468] to the 5.8 branch.
Fixes #53714.
Built from https://develop.svn.wordpress.org/branches/5.8@51504


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 12:53:59 +00:00
desrosj
f093f1bbae External Libraries: Correct the hoverIntent version used when registering.
Follow up to [50521].

Props david.binda.
Merges [51467] to the 5.8 branch.
Fixes #53715.
Built from https://develop.svn.wordpress.org/branches/5.8@51503


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 12:52:58 +00:00
desrosj
8de7e19046 Build/Test Tools: Remove the check for changes to version-controlled files in the Test Old Branch workflow.
This workflow does not perform a `git checkout` and is only used to dispatch workflows for old branches, so this check is not needed here.

Merges [51498] to the 5.8 branch.
Fixes #53799.
Built from https://develop.svn.wordpress.org/branches/5.8@51502


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-28 12:51:00 +00:00
Peter Wilson
ae830d4e4b Bundled Themes: Version Bump 2010, 2011 and 2012.
Version bump three bundled themes to avoid file not found and fatal errors introduced for child themes during the 5.8 release cycle.

* Twenty Ten: Version 3.5 (fatal error & 404)
* Twenty Eleven: Version 3.9 (404)
* Twenty Twelve: Version 3.5 (404)

These updates will be released mid 5.8.1 cycle due to the severity of the issues.

Follow up to [51482,51483].

Props dd32, peterwilsoncc.
Merges [51486] to the 5.8 branch.
Fixes #53777.


Built from https://develop.svn.wordpress.org/branches/5.8@51489


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-26 03:26:57 +00:00
Peter Wilson
22bbec22de Bundled Themes: Use correct path for loading images in block patterns.
By using `get_template_directory_uri()` instead of `get_stylesheet_directory_uri()`, we make sure to include the images from the parent theme.

This avoids displaying missing images in block patterns when using a child theme of Twenty Ten, Twenty Eleven, or Twenty Twelve.

Follow-up to [51033], [51103], [51106].

Props audrasjb, SergeyBiryukov.
Merges [51483] to the 5.8 branch.
Fixes #53769.


Built from https://develop.svn.wordpress.org/branches/5.8@51488


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-26 03:24:57 +00:00
Peter Wilson
538f14245c Twenty Ten: Use correct path for loading block patterns.
By using `get_template_directory()` instead of `get_stylesheet_directory()`, we make sure to include the `block-patterns.php` file from the parent theme.

This avoids a PHP fatal error when using a child theme of Twenty Ten.

Follow-up to [51106].

Props ryelle, sabernhardt, loranrendel, SergeyBiryukov.
Merges [51482] to the 5.8 branch.
Fixes #53752.

Built from https://develop.svn.wordpress.org/branches/5.8@51487


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-26 03:20:59 +00:00
desrosj
3658f5d190 Post WordPress 5.8 version bump.
The 5.8 branch is now 5.8.1-alpha.
Built from https://develop.svn.wordpress.org/branches/5.8@51466


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-20 17:48:58 +00:00
desrosj
add7651d0b WordPress 5.8.
Built from https://develop.svn.wordpress.org/branches/5.8@51464


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-20 16:07:00 +00:00
Peter Wilson
ce8a07686a Upgrade/Install: Add additional files to $_old_files for 5.8.
Follow up to [51134].

Props desrosj.
Merges [51459] to the 5.8 branch.
Fixes #53367.


Built from https://develop.svn.wordpress.org/branches/5.8@51460


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 01:27:57 +00:00
Peter Wilson
6b59938770 Build/Test Tools: Update the caniuse browser data and regenerate CSS.
This includes three minor updates to generated CSS files:

- A single `-webkit-` prefix is removed for `min-width`, which was required for Safari <= 10.1 (0.06% total global usage). WordPress only supports the last two versions.
- 2 instances where the `-o-` prefix are added for `tab-size`. This appears to be for Opera Mobile, which has creeped back over the 1% global usage.

Props peterwilsoncc, jorbin, desrosj.
Merges [51456] to the 5.8 branch.
Fixes #53686.

Built from https://develop.svn.wordpress.org/branches/5.8@51458


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 00:56:57 +00:00
desrosj
ee3c9c41bc Bundled Themes: Bump bundled theme versions for WordPress 5.8.
This bumps the version for all bundle themes in preparation for release with WordPress 5.8. The new versions are as follows:

- Twenty Twenty-One: 1.4
- Twenty Twenty: 1.8
- Twenty Nineteen: 2.1
- Twenty Seventeen: 2.8
- Twenty Sixteen: 2.5
- Twenty Fifteen: 3.0
- Twenty Fourteen: 3.2
- Twenty Thirteen: 3.4
- Twenty Twelve: 3.4
- Twenty Eleven: 3.8
- Twenty Ten: 3.4

Props mukesh27, kapilpaul, peterwilsoncc.
Merges [51455] to the 5.8 branch.
Fixes #53277.
Built from https://develop.svn.wordpress.org/branches/5.8@51457


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-19 00:45:00 +00:00
desrosj
cfde1a37e5 Post WordPress 5.8 RC4 version bump.
Built from https://develop.svn.wordpress.org/branches/5.8@51447


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 22:03:58 +00:00
desrosj
37be93859d WordPress 5.8 RC4.
Built from https://develop.svn.wordpress.org/branches/5.8@51446


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 21:35:57 +00:00
desrosj
a01a99951e Block Editor: Backport fixes targeted for WordPress 5.8 RC4.
This includes:

- Suggestion List: Check if a node exists to scroll into view.
- Autocomplete: reset state for empty text.
- Adds auxiliary class names for editor styles in the widgets editor.
- Extract snackbars into a separate component.
- Rich text: run input rules after composition end.
- iframe: load inline styles.
- Multi select: select all: restore ref callback.
- Writing flow: allow select all from empty selection.
- Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute.
- Add the percent unit to the default units in Core. 

Props desrosj, youknowriad.
Merges [51443] to the 5.8 branch.
Fixes #53397.
Built from https://develop.svn.wordpress.org/branches/5.8@51445


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 21:14:20 +00:00
desrosj
3ffa646c8c Media: Document edge cases with the new image_editor_output_format filter.
More testing has revealed that the `image_editor_output_format` filter has some interesting edge cases that developers should be aware of when electing to use this filter (see #53667 and #53668).

Because this is a new filter that was intended to be used for experimenting with different ways to handle generating image sizes and has not yet been adopted in the wild, expanding the inline documentation is an acceptable temporary solution while these edge cases are explored further and addressed.

Props mikeschroder, antpb, desrosj, adamsilverstein, ianmjones.
Merges [51442] to the 5.8 branch.
See #53667, #53668, #35725.
Built from https://develop.svn.wordpress.org/branches/5.8@51444


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 21:10:59 +00:00
desrosj
41fca9e8ba Media: Fix JS error in Media Library when infinite scroll enabled.
Wrap call to this.updateLoadMoreView() is wrapped in a check that infinite scroll is disabled to prevent JS errors.

Props wildworks, joedolson.
Merges [51440] to the 5.8 branch.
Fixes #53672.
Built from https://develop.svn.wordpress.org/branches/5.8@51441


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 17:29:57 +00:00
desrosj
94a93212ba Widgets: Prevent widgets unintentionally being moved to the inactive sidebar.
This fixes a bug where widgets are unintentionally moved to the `wp_inactive_widgets` sidebar when batch updates occur through the REST API.

When batch requests are processed, only `$_wp_sidebars_widgets` is updated by previous calls to `WP_REST_Widgets_Controller::create_item()`. `$sidebars_widgets` is not aware of the new widget’s intended location, and `retrieve_widgets()` mistakenly flags the widget as inactive.

Calling `wp_get_sidebars_widgets()` before `retrieve_widgets()` ensures both global variables match and is intended as a temporary fix until the root cause of the problem can be fixed.

Props zieladam, htmgarcia, timothyblynjacobs.
Merges [51432] to the 5.8 branch.
Fixes #53657.
Built from https://develop.svn.wordpress.org/branches/5.8@51439


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 15:42:58 +00:00
desrosj
d06c747962 Media: When resizing WebP images set the compression to "lossy" by default. Fixes a bug where the compression was set to "lossless" when the uploaded WebP images have extended file format (VP8X).
Props adamsilverstein, mikeschroder, mmxxi, linux4me2, azaozz.
Merges [51435] to the 5.8 branch.
Fixes #53653.
Built from https://develop.svn.wordpress.org/branches/5.8@51437


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-15 13:01:58 +00:00
desrosj
cb85548d7c Privacy: Ensure the copy button actually copies the suggested privacy policy text.
Follow up to [50609].

Props walbo, SergeyBiryukov.
Merges [51431] to the 5.8 branch.
Fixes #53652. See #52891.
Built from https://develop.svn.wordpress.org/branches/5.8@51433


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 17:14:58 +00:00
desrosj
7cb25d196b Post WordPress 5.8 RC3 version bump.
Built from https://develop.svn.wordpress.org/branches/5.8@51429


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 01:02:56 +00:00
desrosj
73dfd406da WordPress 5.8 RC3.
Built from https://develop.svn.wordpress.org/branches/5.8@51428


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 00:40:58 +00:00
desrosj
82b9b1a3a5 Editor: Second round of package updates ahead of RC3.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj.
Merges [51426] to the 5.8 branch.
Fixes #53397.
Built from https://develop.svn.wordpress.org/branches/5.8@51427


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-14 00:03:19 +00:00
desrosj
eba698dba1 Widgets: Validate HTML before saving block widgets.
Props talldanwp, noisysocks, kevin940726, peterwilsoncc.
Merges [51414] and [51423] to the 5.8 branch.
Built from https://develop.svn.wordpress.org/branches/5.8@51424


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 18:04:58 +00:00
desrosj
5658a2d03c Block Editor: Include the fixes targeted for WordPress 5.8 RC3.
This includes the following fixes:
 - Safari: see if compositing layer size is more reasonable when position fixed divs are not inserted into content.
 - Site Logo Block: update Site Logo block UI and option syncing.
 - Fix moving inner blocks in the Widgets Customizer.
 - Allow themes to provide empty values for color.duotone and spacing.units
 - Update getTermsInfo() to workaround parsing issue for translatable strings.
 - Specify what settings can be part of settings.layout.
 - Update conditions to hide duotone panel.
 - Prevent entering invalid values in the Query Loop block config.
 - Prevent color panel from showing as empty.
 - Avoid calling gutenberg_ functions within code shipped through WordPress Core.

Props desrosj, youknowriad.
Merges [51421] to the 5.8 branch.
Fixes #53397.
Built from https://develop.svn.wordpress.org/branches/5.8@51422


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 17:15:20 +00:00
ryelle
cfba8e5850 Help/About: Update the About section for 5.8.
Update the image links to use the CDN. Use regular text color for headings. Fix two string issues. Remove unnecessary wp-components script & style.
Use a larger image for theme.json on retina screens, and update the spacing of sections on the page.

Props nao, audrasjb, karmatosed, desrosj, javiarce, milana_cap.
Merges [51413] and [51418] to the 5.8 branch.
See #52775.


Built from https://develop.svn.wordpress.org/branches/5.8@51420


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 16:18:59 +00:00
desrosj
52977d997c Widgets: Replace wp.editor references in the legacy text widget.
This changes the references to `wp.editor` in the text widget’s JavaScript to `wp.oldEditor`, which is the new location for the old `editor` script that was previously available at `window.wp.editor`. 

Follow up to [51387-51388,51390].

Props spacedmonkey, zieladam, SergeyBiryukov.
Merges [51409] to the 5.8 branch.
Fixes #53437.
Built from https://develop.svn.wordpress.org/branches/5.8@51416


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 13:46:04 +00:00
desrosj
7523e1376b Widgets: Use wp_sidebar_description() to retrieve a sidebar’s description.
This switches `WP_REST_Sidebars_Controller` to use `wp_sidebar_description()` for retrieving the description of a given sidebar instead of referencing the value in the `$wp_registered_sidebars` global variable directly.

`wp_sidebar_description()` uses `wp_kses()` to only allow the default list of `$allowed_tags` to be present in a sidebar’s description.

Props timothyblynjacobs, desrosj, SergeyBiryukov.
Merges [51408] to the 5.8 branch.
Fixes #53646.
Built from https://develop.svn.wordpress.org/branches/5.8@51412


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 00:10:58 +00:00
desrosj
acd6e52e4f Docs: Various documentation fixes following [51129].
- Typo corrections in filter descriptions.
- DocBlocks are now now wrapped to the next line after 80 characters, and not extending beyond 120 total characters wide.
- Remove unnecessary repeated references to the suggested replacement hooks.
- Adjustments to the indentation for consistency with other emails in Core, allowing the `phpcs:ignore` comment to be removed. 

Props SergeyBiryukov.
Merges [51410] to the 5.8 branch.
Fixes #44314.
Built from https://develop.svn.wordpress.org/branches/5.8@51411


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-13 00:07:59 +00:00
desrosj
7e8542281a TinyMCE: ensure initialization runs in all cases on 'interactive' and 'complete' readyState.
Fixes a rare bug when the init code is inserted in the DOM after the page has finished loading.

Props Collizo4sky, azaozz.
Merges [51402] to the 5.8 branch.
Fixes #53632.
Built from https://develop.svn.wordpress.org/branches/5.8@51407


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 13:29:00 +00:00
desrosj
ed40b04676 Bundled Themes: Correct comment formatting in inc/block-patterns.php.
Follow-up to [51045], [51103].

Props kapilpaul, SergeyBiryukov.
See #53359, #52627.
Built from https://develop.svn.wordpress.org/branches/5.8@51406


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-12 13:27:01 +00:00
desrosj
7a157307d8 Docs: Some documentation improvements for wp_check_widget_editor_deps():
- Add missing short description for the function.
- Correct function names in `_doing_it_wrong()` calls.
- Document the usage of `$wp_scripts` and `$wp_styles` globals.
- Update syntax for multi-line comment per the documentation standards. 

Follow-up to [51387], [51388].

Props SergeyBiryukov.
Merges [51390] to the 5.8 branch.
See #53437, #53569.
Built from https://develop.svn.wordpress.org/branches/5.8@51394


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 17:59:58 +00:00
desrosj
69868c9648 Widgets: Warn when wp-editor script or wp-edit-post style is enqueued in widgets editor
It is common that plugins erroneously have `wp-editor` or `wp-edit-post` as a
dependency in a script that is loaded in the new widgets editor. This is a smell
since both `@wordpress/editor` and `@wordpress/edit-post` assume the existence
of a global "post" object which the widgets editor does not have.

[51387] fixes the user-facing errors typically caused by this mistake, but we
can go a step further and warn developers about this by calling
`_doing_it_wrong()` when we detect that the `wp-editor` script or `wp-edit-post`
style is enqueued alongside `wp-edit-widgets` or `wp-customize-widgets`.

Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu, dlh, noisysocks.
Merges [51388] to the 5.8 branch.
Fixes #53569. See #53437.
Built from https://develop.svn.wordpress.org/branches/5.8@51393


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 17:57:59 +00:00
desrosj
5962e1f19f Editor: Merge conflicting wp.editor objects into single, non-conflicting object
The `wp-editor` script (`@wordpress/editor` npm package) is exposed as
`window.wp.editor` in WP Admin. This causes problems, though, as many older
scripts expect to see the older `editor` script available at `window.wp.editor`.

The solution is to export all the members of the older `window.wp.editor` module
in the newer module to maintain backwards compatibility.

Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu, noisysocks.
Merges [51387] to the 5.8 branch.
See #53437.
Built from https://develop.svn.wordpress.org/branches/5.8@51392


git-svn-id: http://core.svn.wordpress.org/branches/5.8@51003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 17:54:57 +00:00
desrosj
dda2b793fe Block Editor: Fix for theme.json: color.duotone and spacing.units should allow empty sets.
This commit fixes an issue with the color.duotone & spacing.units in which empty values didn't override previous origins, resulting in that a theme couldn't provide an empty set for this via its theme.json.

Props nosolosw, youknowriad, aristath, jorgefilipecosta.
Merges [51383] to the 5.8 branch.
Fixes #53175.
Built from https://develop.svn.wordpress.org/branches/5.8@51386


git-svn-id: http://core.svn.wordpress.org/branches/5.8@50997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-09 01:06:58 +00:00