Commit Graph

31237 Commits

Author SHA1 Message Date
desrosj
49a6a14915 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.
Built from https://develop.svn.wordpress.org/trunk@51239


git-svn-id: http://core.svn.wordpress.org/trunk@50848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 15:25:59 +00:00
desrosj
5e2b659090 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.
Built from https://develop.svn.wordpress.org/trunk@51238


git-svn-id: http://core.svn.wordpress.org/trunk@50847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 14:50:58 +00:00
desrosj
eeb8c63240 Docs: Various filter docblock improvements.
Follow up to [50776], [50956], [50983].

See #52920.
Built from https://develop.svn.wordpress.org/trunk@51237


git-svn-id: http://core.svn.wordpress.org/trunk@50846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 14:40:57 +00:00
desrosj
fe473ccdee 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.
Built from https://develop.svn.wordpress.org/trunk@51236


git-svn-id: http://core.svn.wordpress.org/trunk@50845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 13:37:57 +00:00
TimothyBlynJacobs
dc710243a3 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.

Built from https://develop.svn.wordpress.org/trunk@51235


git-svn-id: http://core.svn.wordpress.org/trunk@50844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 13:18:58 +00:00
Sergey Biryukov
4b17d6b3e9 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.
Built from https://develop.svn.wordpress.org/trunk@51234


git-svn-id: http://core.svn.wordpress.org/trunk@50843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 10:40:00 +00:00
ryelle
1a7033e75f Twenty Twenty-One: Add spacing around Query block when there is a background color.
Props scruffian, desrosj, poena.
See #53398.


Built from https://develop.svn.wordpress.org/trunk@51233


git-svn-id: http://core.svn.wordpress.org/trunk@50842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 01:48:57 +00:00
desrosj
767be550d7 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.
Built from https://develop.svn.wordpress.org/trunk@51232


git-svn-id: http://core.svn.wordpress.org/trunk@50841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 00:08:58 +00:00
desrosj
2f063a72f2 Twenty Twenty: Remove extra margin within the Query Loop block.
Props ryelle, Clorith.
See #53482.
Built from https://develop.svn.wordpress.org/trunk@51231


git-svn-id: http://core.svn.wordpress.org/trunk@50840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 23:22:58 +00:00
Sergey Biryukov
4381bf2ef6 Coding Standards: Fix WPCS issues in [51227].
This fixes a "Tabs must be used to indent lines; spaces are not allowed" error.

See #53475.
Built from https://develop.svn.wordpress.org/trunk@51230


git-svn-id: http://core.svn.wordpress.org/trunk@50839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 20:55:58 +00:00
desrosj
fd27b43fba Coding Standards: Apply an alignment fix from running composer format.
Follow up to [51216].
See #53481.
Built from https://develop.svn.wordpress.org/trunk@51229


git-svn-id: http://core.svn.wordpress.org/trunk@50838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 19:25:58 +00:00
desrosj
90790365ba 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.
Built from https://develop.svn.wordpress.org/trunk@51228


git-svn-id: http://core.svn.wordpress.org/trunk@50837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 19:20:58 +00:00
Andrew Ozz
936a38255b 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.
Built from https://develop.svn.wordpress.org/trunk@51227


git-svn-id: http://core.svn.wordpress.org/trunk@50836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 19:12:00 +00:00
Sergey Biryukov
09fda454d0 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.
Built from https://develop.svn.wordpress.org/trunk@51226


git-svn-id: http://core.svn.wordpress.org/trunk@50835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 10:05:59 +00:00
Sergey Biryukov
3d601880d2 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.
Built from https://develop.svn.wordpress.org/trunk@51225


git-svn-id: http://core.svn.wordpress.org/trunk@50834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-24 06:52:58 +00:00
joedolson
c17e2baa80 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.
Built from https://develop.svn.wordpress.org/trunk@51224


git-svn-id: http://core.svn.wordpress.org/trunk@50833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 22:47:59 +00:00
iandunn
3801e9818a 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.

Built from https://develop.svn.wordpress.org/trunk@51223


git-svn-id: http://core.svn.wordpress.org/trunk@50832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 22:20:59 +00:00
desrosj
5acf559613 Docs: Remove inaccurate @since tag.
Follow up to [50829,50831,51145,51147].

Props johnbillion.
Fixes #53461. See #50105.
Built from https://develop.svn.wordpress.org/trunk@51222


git-svn-id: http://core.svn.wordpress.org/trunk@50831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 19:09:56 +00:00
desrosj
fccc020d29 Docs: Various docblock corrections for code added in 5.8.
Props johnbillion.
See #53461.
Built from https://develop.svn.wordpress.org/trunk@51221


git-svn-id: http://core.svn.wordpress.org/trunk@50830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 19:05:57 +00:00
Sergey Biryukov
a048ac3ccd Tests: Replace assertEquals() with assertSameSets() in text widget tests.
This ensures that not only the array values being compared are equal, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()`, `assertSameSets()`, or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.

Follow-up to [40631], [41132], [48939], [51137].

See #52482, #52625.
Built from https://develop.svn.wordpress.org/trunk@51220


git-svn-id: http://core.svn.wordpress.org/trunk@50829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 16:00:59 +00:00
noisysocks
6ec11e6b55 Widgets: Remove unnecessary gutenberg_ functions
Removes temporary gutenberg_ functions which were required by the Legacy Widget
block until the Legacy Widget block was updated in [51149].

Follows [50996].
Fixes #53441.
Props spacedmonkey.

Built from https://develop.svn.wordpress.org/trunk@51219


git-svn-id: http://core.svn.wordpress.org/trunk@50828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 03:47:58 +00:00
desrosj
74c1893ae0 Post WordPress 5.8 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@51218


git-svn-id: http://core.svn.wordpress.org/trunk@50827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 02:15:59 +00:00
desrosj
986fecb9ff WordPress 5.8 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@51217


git-svn-id: http://core.svn.wordpress.org/trunk@50826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:45:57 +00:00
noisysocks
0bf96b88d3 Widgets: Fix widget preview not working if widget registered via a instance
The register_widget function can be called with a class name or a class
instance. Once called with a class instance, the class instance is converted to
hash as used key in array.

Props spacedmonkey, zieladam.

Built from https://develop.svn.wordpress.org/trunk@51216


git-svn-id: http://core.svn.wordpress.org/trunk@50825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:34:58 +00:00
desrosj
b588426f96 Docs: Fix typo in widgets-block-editor feature documentation.
Follow up to [51214].
Unprops desrosj.
See #53424.
Built from https://develop.svn.wordpress.org/trunk@51215


git-svn-id: http://core.svn.wordpress.org/trunk@50824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:10:57 +00:00
desrosj
94c655c892 Widgets: Add support for the Widgets Editor on after_setup_theme instead of widgets_init.
This better aligns with developer expectations, as `add_theme_support()` and `remove_theme_support()` are meant to be called within functions attached to the `after_setup_theme` hook.

This also adds the `widgets-block-editor` feature to the docblock for `add_theme_support()`. 

Props kevin940726, caseymilne, jamesros161, noisysocks, Mamaduka, audrasjb, zieladam, hellofromTonya, desrosj.
Fixes #53424.
Built from https://develop.svn.wordpress.org/trunk@51214


git-svn-id: http://core.svn.wordpress.org/trunk@50823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 01:08:58 +00:00
desrosj
821327ca70 Editor: Correct variable names in get_block_editor_settings().
Incorrect variable names were leading to unreachable conditional statements.

Follow up to [51149].

Props johnbillion, mukesh27.
See #53458.
Built from https://develop.svn.wordpress.org/trunk@51213


git-svn-id: http://core.svn.wordpress.org/trunk@50822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 00:26:58 +00:00
desrosj
c54b44e75a Build/Test Tools: Add the regenerator-runtime script as a dependency to wp-polyfill.
In [51146], the `core-js` package replaced the deprecated `@babel//polyfill` one. The `core-js` package builds `wp-polyfill` from a configuration provided by `@wordpress/babel-preset-default` instead of copying a one size fits all polyfill.

That change caused an issue where plugins and themes relying on the `regenerator-runtime` script being included in the `wp-polyfill.js` file encountering fatal JavaScript errors.

This adds the `regenerator-runtime` package to Core and registers it as a dependency for `wp-polyfill`. While Core does not require `regenerator-runtime`, it will allow for a smoother transition to using `core-js`.

This dependency will be removed in a future version of WordPress, so developers are encouraged to add `regenerator-runtime` as a dependency for any custom script that requires it.

Follow up to [51146].

Props gziolo, herregroen, jeherve, hellofromtonya, peterwilsoncc.
Fixes #52941.
Built from https://develop.svn.wordpress.org/trunk@51212


git-svn-id: http://core.svn.wordpress.org/trunk@50821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 00:06:13 +00:00
Andrew Ozz
e93093f7ed Media: Prevent uploading and show an error message when the server doesn't support editing of WebP files and image sub-sizes cannot be created.
Props adamsilverstein, desrosj, azaozz
Fixes #53475
Built from https://develop.svn.wordpress.org/trunk@51211


git-svn-id: http://core.svn.wordpress.org/trunk@50820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 23:12:57 +00:00
desrosj
48e31b23f5 Docs: Shorten the copyright notice for the WP_REST_Sidebars_Controller class.
The class has been heavily modified from the original source, so the copyright can be modified to simply reference the original author’s work. The carry forward of the copyright and original code is implied.

Follow up to [50993-50995,51007,51020,51029].

Props SergeyBiryukov, cbringmann, chanthaboune, desrosj.
Fixes #41683.
Built from https://develop.svn.wordpress.org/trunk@51210


git-svn-id: http://core.svn.wordpress.org/trunk@50819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 23:05:58 +00:00
ryelle
0638de4c60 Twenty Nineteen: Update margins on full- and wide-aligned blocks in the editor.
Previously, full width blocks would cause a horizontal scrollbar, and nesting full width blocks would cause the content to be pulled off the screen. Now wide and full width blocks can be nested without any visual issues.

Props aleperez92, Boniu91, onemaggie, hellofromTonya.
Fixes #53428.


Built from https://develop.svn.wordpress.org/trunk@51209


git-svn-id: http://core.svn.wordpress.org/trunk@50818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 22:15:57 +00:00
iandunn
479e9847ed Block Editor: Move caching to endpoint for unique responses.
Now that the pattern API request includes the locale and version, the cache key needs to contain a hash of the query args.

Props ocean90, dd32, timothyblynjacobs
Fixes #53435

Built from https://develop.svn.wordpress.org/trunk@51208


git-svn-id: http://core.svn.wordpress.org/trunk@50817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 21:24:58 +00:00
Felix Arntz
c94c954d02 Media: Add lazy-loading support to block-based widgets.
This changeset adds the `wp_filter_content_tags()` function as a filter to `widget_block_content`.

Props spacedmonkey, walbo, daisyo.
Fixes #53463, #53464.

Built from https://develop.svn.wordpress.org/trunk@51207


git-svn-id: http://core.svn.wordpress.org/trunk@50816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 21:23:57 +00:00
iandunn
0f249041f9 Block Editor: Send locale, version with remote pattern requests.
This information is needed by the w.org API for translation and caching.

Props dd32, ryelle, tellyworth
See #53435

Built from https://develop.svn.wordpress.org/trunk@51206


git-svn-id: http://core.svn.wordpress.org/trunk@50815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 21:21:57 +00:00
ryelle
0a2b52dfeb Bundled Themes: Improve display of blocks in widget areas.
Fixes minor styling issues, mostly font size and spacing, in blocks used in widget areas. Changes made to Twenty Ten, Twenty Thirteen, Twenty Fourteen, Twenty Sixteen, Twenty Seventeen, and Twenty Twenty-One.

Props noisysocks, sumaiyasiddika, danieldudzic, scruffian, jffng.
Fixes #53422.


Built from https://develop.svn.wordpress.org/trunk@51205


git-svn-id: http://core.svn.wordpress.org/trunk@50814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 20:14:59 +00:00
Sergey Biryukov
68af562077 Code Modernization: Use a consistent check for parent items in WP_Walker.
This affects the `::walk()`, `::paged_walk()`, and `::get_number_of_root_elements()` methods.

PHP 8 changes the way string to number comparisons are performed: https://wiki.php.net/rfc/string_to_number_comparison

In particular, checking if an empty string is equal to zero in PHP 8 evaluates to `false`, not `true`.

For the `WP_Walker` class, this resulted in an incorrect handling of parent items in a few methods.

By explicitly checking for an `empty()` value instead, we make sure the check works as expected in PHP 8 and earlier versions.

Follow-up to [35876], [48960], [49043], [49076].

Props sunxiyuan, aristath, SergeyBiryukov.
Fixes #53474.
Built from https://develop.svn.wordpress.org/trunk@51204


git-svn-id: http://core.svn.wordpress.org/trunk@50813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 19:09:00 +00:00
desrosj
8ea2e04925 Editor: Allow custom-units to be an array.
The changes in [50959] introduced an issue where `custom_units` was always being coerced into a boolean value. This should support `array` values.

Props kraftner, youknowriad, nosolosw, jorgefilipecosta.
Fixes #53472.
Built from https://develop.svn.wordpress.org/trunk@51203


git-svn-id: http://core.svn.wordpress.org/trunk@50812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 17:16:58 +00:00
desrosj
b32d8c1bf6 Widgets: Stop loading wp-editor and the Block Directory assets on the widgets screen.
When using the text widget, a `wp.editor.initialize is not a function` notice is encountered. This happens when `wp-editor` is loaded as a dependency, which assigns `wp.oldEditor = wp.editor` and then redefines `wp.editor`.

`wp-editor` is only used for the Classic block, which is not supported in the new widgets editor. [51198-51199] updated `@wordpress/block-library` to remove `wp-editor` as a dependency, but it’s still listed as a dependency of the `wp-block-directory` script handle.

Since the Block directory is not supported within the widgets editor, the related assets can safely be blocked from enqueueing.

Props noisysocks, gziolo, Mamaduka, mkaz.
Fixes #53437. See #53397.
Built from https://develop.svn.wordpress.org/trunk@51202


git-svn-id: http://core.svn.wordpress.org/trunk@50811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 16:56:56 +00:00
ryelle
8a11188d0f Twenty Twenty-One: Add margins around content in Post Template block.
Props desrosj, joen.
See #53389, #53398.


Built from https://develop.svn.wordpress.org/trunk@51201


git-svn-id: http://core.svn.wordpress.org/trunk@50810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 16:55:58 +00:00
desrosj
5259b18f50 Widgets: Add editor styles to the widgets block editor.
This updates the widgets screen to load the editor styles in the same way as the post editor. This combined with the package updates in [51198] and [51199] ensures that the blocks added to sidebars more accurately reflect what will be displayed on the front end of the site.

Props isabel_brison, noisysocks, andraganescu, audrasjb, jorbin, caseymilne, desrosj.
Fixes #53344. See #53388.
Built from https://develop.svn.wordpress.org/trunk@51200


git-svn-id: http://core.svn.wordpress.org/trunk@50809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 13:33:58 +00:00
jorgefilipecosta
ab25191895 Block Editor: Package updates for Beta 3.
The commit updates the WordPress packages for beta 3.

Props nosolosw, noisysocks, youknowriad.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51199


git-svn-id: http://core.svn.wordpress.org/trunk@50808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 10:00:50 +00:00
jorgefilipecosta
6db7930147 Ports theme.json changes for beta 3.
- Add _wp_to_kebab_case function
- Add CSS Custom Properties within preset classes.

Props nosolosw.
See #53397.
Built from https://develop.svn.wordpress.org/trunk@51198


git-svn-id: http://core.svn.wordpress.org/trunk@50807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 09:51:00 +00:00
Peter Wilson
0d8727bec8 Themes: Improve Gutenberg check before activating an FSE theme.
Account for sites enabling Gutenberg as an mu-plugin when determining whether full-site-editing themes can be enabled. This replaces the check the plugin is active with a check whether the function `gutenberg_is_fse_theme()` is defined.

Follow up to [51193].

Props noisysocks, peterwilsoncc, SergeyBiryukov.
See #53410.


Built from https://develop.svn.wordpress.org/trunk@51197


git-svn-id: http://core.svn.wordpress.org/trunk@50806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 05:56:57 +00:00
Sergey Biryukov
e84cfe850d Tests: Use more appropriate assertions in a few tests.
Follow-up to [34804], [41376], [50959], [51124].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51196


git-svn-id: http://core.svn.wordpress.org/trunk@50805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:35:59 +00:00
antpb
b2c449b1ec Media: Improve upload page media item layout on smaller screens.
This allows smaller screens to wrap error messages and other uploader media item elements in a more readable way.

Props joedolson sabernhardt, Presskopp.
See #51754.


Built from https://develop.svn.wordpress.org/trunk@51195


git-svn-id: http://core.svn.wordpress.org/trunk@50804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:26:58 +00:00
desrosj
84ee1c9de5 Themes: Remove unexpected border around the Theme Details button.
After [51083], the Theme Details button is now displaying a border unintentionally. This removes it.

Props ryelle.
Fixes #53473.
Built from https://develop.svn.wordpress.org/trunk@51194


git-svn-id: http://core.svn.wordpress.org/trunk@50803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 04:03:57 +00:00
desrosj
94841ace05 Themes: Prevent a Full Site Editing theme from being activated when Gutenberg is not active.
When a theme that uses the Full Site Editing feature is activated and the Gutenberg plugin is not present, the site will currently show a text notice on the front end. The user is not made aware of this unless they visit the front end of their site.

This adds a check that will prevent a theme from being activated when the `full-site-editing` tag is present in the theme’s `style.css` header and the Gutenberg plugin is not active to prevent this scenario.

These checks can be removed once Full Site Editing is completely merged into Core.

Props desrosj, marybaum, chanthaboune.
See #53410.
Built from https://develop.svn.wordpress.org/trunk@51193


git-svn-id: http://core.svn.wordpress.org/trunk@50802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 02:59:56 +00:00
desrosj
52e1e2cc2f Twenty Thirteen: Improve the display of the Query Loop block.
This fixes an issue where Query Loop blocks were displayed with list bullets and extra `padding-left`.

Props AlePerez92, scruffian, ryelle.
Fixes #53438.
Built from https://develop.svn.wordpress.org/trunk@51192


git-svn-id: http://core.svn.wordpress.org/trunk@50801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 23:39:56 +00:00
joedolson
d5c9c310e7 Media: Update total attachment count when media added or removed.
Add handlers to increment the total attachments count for the media collection when an item is added or removed.

props adamsilverstein.
Fixes #53171.
Built from https://develop.svn.wordpress.org/trunk@51191


git-svn-id: http://core.svn.wordpress.org/trunk@50800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 20:46:02 +00:00
Sergey Biryukov
dc51282844 Users: Escape get_author_posts_url() link in wp_list_authors().
This is consistent with `get_the_author_posts_link()`.

Props chintan1896.
Fixes #50698.
Built from https://develop.svn.wordpress.org/trunk@51190


git-svn-id: http://core.svn.wordpress.org/trunk@50799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 06:06:57 +00:00
Sergey Biryukov
19f8ac491d Administration: Consistently escape network_admin_url() links.
Follow-up to [51177].

Props chintan1896, mukesh27.
Fixes #53459.
Built from https://develop.svn.wordpress.org/trunk@51189


git-svn-id: http://core.svn.wordpress.org/trunk@50798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 04:30:56 +00:00
Sergey Biryukov
ca5f990078 Docs: Correct @since version in the wp-includes/version.php file header.
There was no public release of WordPress 1.1.

Follow-up to [803], [43662].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51188


git-svn-id: http://core.svn.wordpress.org/trunk@50797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-21 04:29:56 +00:00
joedolson
daa1cbbbfe Media: Adapt response shape depending on type of query.
Restore inheriting the backbone fetch in the media library and adapt the AJAX response according to the action performed in the media query.

In [51145], the response shape was restored to the original shape, and a custom fetch was added to handle assigning the totalAttachments information in the collection. The custom fetch triggered a new set of bugs relating to zero-sized collections and loading individual images. 

props adamsilverstein, ryelle, peterwilsoncc, Presskopp, desrosj.
Fixes #53421, #53419.
Built from https://develop.svn.wordpress.org/trunk@51187


git-svn-id: http://core.svn.wordpress.org/trunk@50796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-20 23:27:01 +00:00
Sergey Biryukov
21bb743811 Tests: Use more appropriate assertions in clean_dirsize_cache() tests.
Follow-up to [49212], [49616], [49628], [49630].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51186


git-svn-id: http://core.svn.wordpress.org/trunk@50795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-20 00:25:59 +00:00
Sergey Biryukov
0e5a98eec5 Docs: Correct DocBlock formatting for Core_Upgrader::upgrade().
Document the `$auto_update_settings` parameter of the `after_core_auto_updates_settings` action.

Follow-up to [49254].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51185


git-svn-id: http://core.svn.wordpress.org/trunk@50794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-19 21:37:57 +00:00
Sergey Biryukov
6c01c2a864 Docs: Add a reference to WP_Site_Query::__construct() for information on accepted arguments in get_sites().
Synchronize the documentation between two places, use `WP_Site_Query::__construct()` as the canonical source.

Follow-up to [37616].

Props birgire, felipeelia, audrasjb.
Fixes #42156.
Built from https://develop.svn.wordpress.org/trunk@51184


git-svn-id: http://core.svn.wordpress.org/trunk@50793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-19 20:57:01 +00:00
Sergey Biryukov
5f30098a1d REST API: Decode single and double quote entities in widget names and descriptions.
Follow-up to [51174], [51175].

Props ocean90, ramonopoly.
Fixes #53407.
Built from https://develop.svn.wordpress.org/trunk@51183


git-svn-id: http://core.svn.wordpress.org/trunk@50792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 15:52:56 +00:00
Sergey Biryukov
e127bcde70 Themes: Make sure get_file_data() recognizes headers prefixed by <?php tag.
This allows for using headers in the format of `<?php // Template Name: Something ?>`, which previously could not be recognized correctly.

Props dd32, m_uysl, thomas-vitale, boblinthorst.
Fixes #33387.
Built from https://develop.svn.wordpress.org/trunk@51182


git-svn-id: http://core.svn.wordpress.org/trunk@50791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 14:03:58 +00:00
Sergey Biryukov
87c740b086 Tests: Correct svn:eol-style property for test data with CR line endings.
Follow-up to [703/tests], [704/tests], [46586].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51181


git-svn-id: http://core.svn.wordpress.org/trunk@50790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 13:58:58 +00:00
Sergey Biryukov
4ccc58801d Upgrade/Install: Deactivate the Gutenberg plugin if its version is 10.7 or lower.
This avoids a fatal error due to `WP_Block_Template` class redeclaration when updating to WordPress 5.8 with an older version of Gutenberg activated.

Follow-up to [35582] for the REST API plugin.

Props hellofromTonya, oglekler, azaozz, desrosj, pbiron, jorbin, youknowriad, TimothyBlynJacobs, Clorith, markparnell.
See #53432.
Built from https://develop.svn.wordpress.org/trunk@51180


git-svn-id: http://core.svn.wordpress.org/trunk@50789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-18 12:14:01 +00:00
desrosj
7369505689 Build/Test Tools: Use Git when fetching the WordPress Importer for use in tests.
This switches to using Git in the local Docker environment install script to check out a copy of the WordPress Importer plugin for use in unit tests.

Previously, SVN was used and the commands were not correctly run within the Docker container. The container does not actually have SVN installed, and the script was only working when the machine running the command had SVN present.

Props czapla, alexstine, jnylen0, francina, desrosj.
Fixes #52909.
Built from https://develop.svn.wordpress.org/trunk@51179


git-svn-id: http://core.svn.wordpress.org/trunk@50788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 17:58:57 +00:00
Sergey Biryukov
7d3b5dfb17 Coding Standards: Bring some consistency to HTML formatting in wp-admin/comment.php.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@51178


git-svn-id: http://core.svn.wordpress.org/trunk@50787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 14:49:58 +00:00
Sergey Biryukov
6a163e199a Administration: Consistently escape admin_url() links.
Props chintan1896, mukesh27.
Fixes #53426.
Built from https://develop.svn.wordpress.org/trunk@51177


git-svn-id: http://core.svn.wordpress.org/trunk@50786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 14:37:00 +00:00
Sergey Biryukov
1a5a8c23b8 Editor: Include Cover block in the list of block types registered using metadata files.
This ensures that block stylesheets are rendered properly when `should_load_separate_core_block_assets` filter is turned on.

Follow-up to [50824], [50836].

Props walbo.
Fixes #53440.
Built from https://develop.svn.wordpress.org/trunk@51176


git-svn-id: http://core.svn.wordpress.org/trunk@50785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:57:56 +00:00
Sergey Biryukov
29ba355256 Coding Standards: Fix WPCS issue in [51174].
See #53407.
Built from https://develop.svn.wordpress.org/trunk@51175


git-svn-id: http://core.svn.wordpress.org/trunk@50784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:33:58 +00:00
Sergey Biryukov
9f1145b8ae REST API: Decode HTML entities in widget names and descriptions in widget types controller.
Follow-up to [50995].

Props ramonopoly, noisysocks, spacedmonkey, justinahinon, audrasjb, SergeyBiryukov.
Fixes #53407.
Built from https://develop.svn.wordpress.org/trunk@51174


git-svn-id: http://core.svn.wordpress.org/trunk@50783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-17 11:30:00 +00:00
desrosj
fcd47d289e Build/Test Tools: Ignore sourceMaps for non WordPress Core files.
If a custom plugin or theme exists in the `build/wp-content` directory with a sourcemap, the build` script is currently returning a warning and failing.

This improves the `verify:source-maps` task in Grunt to ignore directories and files that do not belong to WordPress Core.

Props ryelle, afragen, johnbillion.
Fixes #52689.
Built from https://develop.svn.wordpress.org/trunk@51173


git-svn-id: http://core.svn.wordpress.org/trunk@50782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 22:57:59 +00:00
Sergey Biryukov
f6bff0572f Tests: Make some optional parameters required in unit tests for previous/next attachment links.
This resolves a "Deprecated: Required parameter follows optional parameter" notice on PHP 8.

Follow-up to [48794], [51122].

See #45708, #52625.
Built from https://develop.svn.wordpress.org/trunk@51172


git-svn-id: http://core.svn.wordpress.org/trunk@50781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 17:31:59 +00:00
Sergey Biryukov
07737d2d8d External Libraries: Upgrade PHPMailer to version 6.5.0.
Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.4.1...v6.5.0

Props ayeshrajans, Synchro.
Fixes #53430.
Built from https://develop.svn.wordpress.org/trunk@51169


git-svn-id: http://core.svn.wordpress.org/trunk@50778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 17:02:59 +00:00
Sergey Biryukov
b27fbee0f3 Docs: Update syntax for some multi-line comments per the documentation standards.
Follow-up to [51003], [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51168


git-svn-id: http://core.svn.wordpress.org/trunk@50777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-16 09:42:56 +00:00
Sergey Biryukov
5ffd5d6e9b Editor: Check if supports metadata key is defined before migrating typography keys.
This avoids an "Undefined index" PHP notice on blocks without a `supports` key in `block.json`.

Follow-up to [51089], [51153], [51159]. 

Props walbo.
Fixes #53416.
Built from https://develop.svn.wordpress.org/trunk@51167


git-svn-id: http://core.svn.wordpress.org/trunk@50776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 21:37:58 +00:00
Sergey Biryukov
d32aa67e80 Docs: Update syntax for multi-line comment in wp_generate_attachment_metadata() per the documentation standards.
Follow-up to [23766], [25968], [35554], [51162].

Props hellofromTonya.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51166


git-svn-id: http://core.svn.wordpress.org/trunk@50775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 19:10:58 +00:00
desrosj
282a246085 Post WordPress 5.8 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@51165


git-svn-id: http://core.svn.wordpress.org/trunk@50774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 18:05:58 +00:00
desrosj
5ff9de5830 WordPress 5.8 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@51164


git-svn-id: http://core.svn.wordpress.org/trunk@50773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 17:40:57 +00:00
Sergey Biryukov
8bb6b05d78 Quick/Bulk Edit: Ensure that $post_ids variable is initialized ahead of usage.
This brings some consistency between similar fragments of `wp-admin/edit.php` and `wp-admin/upload.php`.

Follow-up to [51111], [51161].

See #39589, #53411.
Built from https://develop.svn.wordpress.org/trunk@51163


git-svn-id: http://core.svn.wordpress.org/trunk@50772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 17:04:56 +00:00
Sergey Biryukov
4803207ba1 Media: Make sure wp_generate_attachment_metadata() always returns an array.
This matches the documentation for the filter of the same name.

Previously, the function could return `false` for an audio or video attachment that does not exist in the local filesystem.

Props Chouby, SergeyBiryukov.
Fixes #52603.
Built from https://develop.svn.wordpress.org/trunk@51162


git-svn-id: http://core.svn.wordpress.org/trunk@50771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:52:56 +00:00
davidbaumwald
870a494015 Media: Ensure $post_ids is evaluated properly when processing bulk actions.
After [51111], the `$post_ids` variable is now initialized as an empty array when processing a bulk action.  As such, the original check using `isset` on `$post_ids` will always evaluate to `true`.  This change swaps the `isset` checks for `empty` to check array length instead.

Props david.binda, hellofromTonya.
Fixes #53411.
Built from https://develop.svn.wordpress.org/trunk@51161


git-svn-id: http://core.svn.wordpress.org/trunk@50770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:51:59 +00:00
Sergey Biryukov
84d822fc46 I18N: Remove redundant default text domain parameter in some __() calls.
Follow-up to [43919], [44262], [48141], [50259].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51160


git-svn-id: http://core.svn.wordpress.org/trunk@50769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:16:57 +00:00
Sergey Biryukov
200a5058e0 Docs: Add missing documentation for wp_migrate_old_typography_shape().
Follow-up to [51089].

See #52991, #52628.
Built from https://develop.svn.wordpress.org/trunk@51159


git-svn-id: http://core.svn.wordpress.org/trunk@50768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 16:04:58 +00:00
Sergey Biryukov
0def70a94c Coding Standards: Use consistent formatting for _wp_posts_page_notice() and _wp_block_editor_posts_page_notice().
Remove redundant casting to `int` for post ID, which is always an integer.

Follow-up to [51116].

See #45537, #52627.
Built from https://develop.svn.wordpress.org/trunk@51158


git-svn-id: http://core.svn.wordpress.org/trunk@50767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:50:58 +00:00
Sergey Biryukov
4811dad603 I18N: Use consistent pattern for placeholder references in translator comments for some bundled theme strings.
Follow-up to [42827], [44562], [50234].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51157


git-svn-id: http://core.svn.wordpress.org/trunk@50766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:38:57 +00:00
youknowriad
b018c55899 Block Editor: Second batch of fixes for 5.8 beta 2
This includes:

 - Fix regression emptying post content block in template mode.
 - Legacy Widget: Don't display "No preview" when widget has image tags.

See #53397. 

Built from https://develop.svn.wordpress.org/trunk@51156


git-svn-id: http://core.svn.wordpress.org/trunk@50765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:30:24 +00:00
Sergey Biryukov
aed608b98c Coding Standards: Remove a one-time $message variable in WordPress version requirement notices for bundled themes.
This makes the formatting of these messages more consistent.

Follow-up to [23816], [51154].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51155


git-svn-id: http://core.svn.wordpress.org/trunk@50764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:24:58 +00:00
Sergey Biryukov
e05ffb46a5 Coding Standards: Remove a one-time $message variable in some _doing_it_wrong() calls.
This brings some consistency with most other calls.

Follow-up to [23378], [25605], [34745], [36219], [44108], [46111], [48156].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51154


git-svn-id: http://core.svn.wordpress.org/trunk@50763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:22:58 +00:00
Sergey Biryukov
4d3ddd056f Editor, I18N: Remove code from a translatable string in wp_migrate_old_typography_shape().
Replace a `trigger_error()` call with `_doing_it_wrong()` for consistency with how similar messages are displayed elsewhere in core.

Follow-up to [51089].

See #52991.
Built from https://develop.svn.wordpress.org/trunk@51153


git-svn-id: http://core.svn.wordpress.org/trunk@50762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 14:02:59 +00:00
Sergey Biryukov
408db6120e Docs: Document the VALID_ORIGINS constant in WP_Theme_JSON.
Follow-up to [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51152


git-svn-id: http://core.svn.wordpress.org/trunk@50761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 11:25:08 +00:00
Sergey Biryukov
6276e68c6c Docs: Document the usage of $wp_embed global in WP_oEmbed_Controller::get_proxy_item().
Follow-up to [48135].

Fixes #52628.
Built from https://develop.svn.wordpress.org/trunk@51151


git-svn-id: http://core.svn.wordpress.org/trunk@50760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:24:57 +00:00
Sergey Biryukov
aba17cd9ea Docs: Document the usage of $_wp_current_template_content global in a few block template functions.
Follow-up to [51003], [51149].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51150


git-svn-id: http://core.svn.wordpress.org/trunk@50759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 10:21:57 +00:00
youknowriad
c114304471 Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes:

**Various**

 - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536
 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896
 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589
 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581
 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088

**Template Editor**

 - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427
 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451

**Widgets Editor**

 - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569
 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534
 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573
 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585
 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572
 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501
 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625
 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580

**Global Styles (theme.json)**
 
 - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622
 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627

**Performance**

 - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.

Built from https://develop.svn.wordpress.org/trunk@51149


git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 08:52:30 +00:00
desrosj
f0ac297720 Editor: Replace a Gutenberg specific function with the Core equivalent.
This replaces a stray instance of `gutenberg_experimental_set()` with the WordPress Core version of this function, `_wp_array_set()`.

A stray `gutenberg` text domain is also removed from a `__()` call.

Props walbo, chaion07, JeffPaul.
Fixes #53369.
Built from https://develop.svn.wordpress.org/trunk@51148


git-svn-id: http://core.svn.wordpress.org/trunk@50757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:44:58 +00:00
desrosj
e0e19035dc Coding Standards: Apply some alignment fixes.
Follow up to [51145].
See #50105.
Built from https://develop.svn.wordpress.org/trunk@51147


git-svn-id: http://core.svn.wordpress.org/trunk@50756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:43:02 +00:00
desrosj
8fad82a2d6 Build/Test Tools: Replace the deprecated @babel/polyfill.
This replaces the dependency of the deprecated `@babel/polyfill` package with the `core-js` package through `@wordpress/babel-preset-default`.

Previously, the file consisted of a generalized group of polyfills, and not all of them were required. This change allows the contents of this file to be built according to the exact needs as dictated by the `@wordpress/babel-preset-default` package, which takes into account the current browser support.

Props gziolo, youknowriad. 
Fixes #52941.
Built from https://develop.svn.wordpress.org/trunk@51146


git-svn-id: http://core.svn.wordpress.org/trunk@50755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 23:18:11 +00:00
joedolson
fe1cb3ff0d Media: Restore AJAX response data shape in media library.
Restore the original shape of the AJAX response data in the media library after removing infinite scroll, and pass total number of attachments in the response headers `X-WP-Total` and `X-WP-TotalPages`. 

Improve backwards compatibility for plugins intercepting the ajax response. Headers match the structure and count calculation used in REST API responses.

Fix an issue with hiding the spinner after the load is completed and ensure that the load more view is created when changing tabs in the media library modal.

Follow up to [50829].

props adamsilverstein, spacedmonkey, joedolson.
Fixes #50105.
Built from https://develop.svn.wordpress.org/trunk@51145


git-svn-id: http://core.svn.wordpress.org/trunk@50754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:50:57 +00:00
Aaron Jorbin
5d9ca9dc68 Block Editor: Prevent duplicate queries
When passing args to `WP_Query::__construct` method (in this case, but creating a `new WP_Query`, this one internally executes the `WP_Query::get_posts` method and stores the result in the `WP_Query::posts` property. When calling the `WP_Query::get_posts` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.

This was introduced in [51003].

Props david.binda, jorbin.
Fixes #53280. See #53176.

Built from https://develop.svn.wordpress.org/trunk@51144


git-svn-id: http://core.svn.wordpress.org/trunk@50753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:39:57 +00:00
desrosj
b7489425cb Site Health: Display a list of file formats supported by the GD library.
This adds the list of file formats supported by the GD library to the Media Handling section in Site Health.

This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Follow up to [50817].
Props adamsilverstein, jorbin. 
Fixes #53022.
Built from https://develop.svn.wordpress.org/trunk@51143


git-svn-id: http://core.svn.wordpress.org/trunk@50752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 18:59:59 +00:00
Sergey Biryukov
05e98e28f3 Docs: Update documentation for some WP_Customize_Widgets methods per the documentation standards.
* Add missing `@since` tags for the `$id_base` parameter of ::sanitize_widget_instance()` and `::sanitize_widget_js_instance()`.
* Document the usage of `$wp_widget_factory` global in `::sanitize_widget_instance()`.
* Use multi-line comment syntax for a comment in `::enqueue_scripts()`.

Follow-up to [50996], [51141].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51142


git-svn-id: http://core.svn.wordpress.org/trunk@50751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 15:16:58 +00:00
Sergey Biryukov
2e0e705d4c Docs: Document the usage of $wp_widget_factory global in WP_Customize_Widgets::sanitize_widget_instance().
Follow-up to [50996].

Props jontyravi, audrasjb.
Fixes #53394.
Built from https://develop.svn.wordpress.org/trunk@51141


git-svn-id: http://core.svn.wordpress.org/trunk@50750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 11:02:57 +00:00
Sergey Biryukov
9f91305af2 Tests: Fix typo in a retrieve_widgets() test name.
Correct parameter description for `data_wp_widget_get_field_name()`.

Follow-up to [34780], [41555].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51140


git-svn-id: http://core.svn.wordpress.org/trunk@50749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-13 16:28:58 +00:00
Sergey Biryukov
39e041b877 Tests: Fix typo in a get_bookmarks() test name.
Follow-up to [44546].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@51139


git-svn-id: http://core.svn.wordpress.org/trunk@50748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-12 15:49:02 +00:00
Sergey Biryukov
41e3cb04ad Docs: Correct DocBlock formatting for some revision tests.
Follow-up to [50949], [51124].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@51138


git-svn-id: http://core.svn.wordpress.org/trunk@50747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-11 12:36:00 +00:00