45026 Commits

Author SHA1 Message Date
Sergey Biryukov
f7929047a3 Coding Standards: Use strict comparison in wp-admin/options-reading.php.
Follow-up to [16816].

See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@52428 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-02 16:45:34 +00:00
Sergey Biryukov
19ce57fc10 Happy New Year! 🎄
Update copyright year to 2022 in `license.txt` and bundled themes.

git-svn-id: https://develop.svn.wordpress.org/trunk@52427 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-01 00:13:18 +00:00
Jb Audras
6e5510417e Users: Use the "Posts" post type general name to contextualize the string used in Users posts count column label.
Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, this change aims to contextualize the use of the "Posts" string in the "Users" admin screen. This change reuses the string used for the "Posts" post type registration, to avoid introducing any new string to translate.

Props audrasjb, jdy68, SergeyBiryukov.
Fixes #54712.


git-svn-id: https://develop.svn.wordpress.org/trunk@52426 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-31 15:28:25 +00:00
Sergey Biryukov
a1abc11ce6 Build/Test Tools: Update PHPCompatibilityWP to version 2.1.3.
The latest release takes the new polyfills added in WordPress 5.9 into account.

This commit also removes redundant inline ignore comments for WP-polyfilled functionality. The PHPCompatibilityWP ruleset explicitly excludes those polyfills, so they don't need to be annotated as ignored.

Release notes:
https://github.com/PHPCompatibility/PHPCompatibilityWP/releases/tag/2.1.3

For a full list of changes in this update, see the PHPCompatibilityWP GitHub:
https://github.com/PHPCompatibility/PHPCompatibilityWP/compare/2.1.2...2.1.3

Follow-up to [46290], [51543].

Props jrf.
Fixes #54711.

git-svn-id: https://develop.svn.wordpress.org/trunk@52425 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-31 13:53:19 +00:00
Sergey Biryukov
c1b78cc2dd Tests: Add a unit test for the recommended MariaDB version in readme.html.
Per the [https://mariadb.org/about/#maintenance-policy MariaDB maintenance policy], MariaDB releases are supported for 5 years from the first stable (GA) release.

The test ensures that the recommended MariaDB version in `readme.html` is not older than 5 years.

Follow-up to [31291], [35759], [52319], [52358], [52418], [meta11407], [52420], [52421].

Fixes #41490.

git-svn-id: https://develop.svn.wordpress.org/trunk@52424 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-30 16:27:48 +00:00
John Blackbourn
0c36c370de Docs: Further corrections and improvements to the inline documentation for wpdb.
See #53399, #54610


git-svn-id: https://develop.svn.wordpress.org/trunk@52423 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-29 23:12:28 +00:00
John Blackbourn
ce3d66c7c9 Docs: Miscellaneous inline documentation improvements.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52422 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-29 17:26:26 +00:00
Sergey Biryukov
5450faf3ec Tests: Correct the check for the recommended MySQL version in readme.html.
This updates the regular expression in the test to retrieve the date of the first, instead of the last, GA release for the recommended MySQL branch, in order to properly track the EOL date.

Additionally, as the currently recommended MySQL 5.7 branch moved from active support to extended support on 2020-10-21, and WordPress core is not fully compatible with MySQL 8.0 at this time, this commit increases the “supported” period from 5 to 8 years to include extended support.

Follow-up to [31291], [35759], [meta11407], [52420].

See #41490.

git-svn-id: https://develop.svn.wordpress.org/trunk@52421 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-29 16:34:12 +00:00
Sergey Biryukov
bea9caa26f General: Bump the recommended MySQL and MariaDB versions in readme.html.
* MySQL 5.6 has reached EOL (“End of Life”) in February 2021. The recommended minimum is bumped to 5.7 for now.
* MariaDB 10.1 has reached EOL in October 2020. The recommended minimum is bumped to 10.2 for now.

Follow-up to [31291], [35759], [52319], [52358], [meta11407].

Props JavierCasares, SergeyBiryukov.
See #41490, #meta5999.

git-svn-id: https://develop.svn.wordpress.org/trunk@52420 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-28 17:36:27 +00:00
Sergey Biryukov
15769c4edc Plugins: Escape the WordPress.org plugin page URL in the Plugin Installation modal.
Follow-up to [8540], [38953].

Props chintan1896, Presskopp, dimadin, henry.wright, aezazshekh, SergeyBiryukov.
Fixes #54362.

git-svn-id: https://develop.svn.wordpress.org/trunk@52419 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-27 16:04:57 +00:00
Sergey Biryukov
5b9406e3a7 Tests: Separate the tests for recommended PHP and MySQL versions in readme.html
This aims to simplify the individual tests and reduce duplication using a helper function.

Follow-up to [52260], [52319], [52358].

See #41490.

git-svn-id: https://develop.svn.wordpress.org/trunk@52418 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-26 23:40:50 +00:00
Jb Audras
3df7a80c88 Login and Registration: Use secondary button style for the Language switcher.
This change avoids having two primary buttons in the login screen.

Props rainbowgeek, audrasjb.
Fixes #54692.


git-svn-id: https://develop.svn.wordpress.org/trunk@52417 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-25 11:35:09 +00:00
Jb Audras
fb18ff6a50 Docs: Typo correction in validate_file() comments.
See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@52416 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-25 11:15:32 +00:00
Sergey Biryukov
181ea0fe87 Administration: Make sure the $customize_url variable is always defined in the admin menu.
This avoids an `Undefined variable` PHP warning when displaying other admin menu items.

Follow-up to [52069], [52134], [52158], [52178], [52414].

Props afragen.
Fixes #54682.

git-svn-id: https://develop.svn.wordpress.org/trunk@52415 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-25 03:30:27 +00:00
Sergey Biryukov
9298fba4b2 Toolbar: Show the Customize link on front end when using a block theme if any plugins use the Customizer.
In WordPress 5.9, when a block theme is being used, the `Appearance → Customize` admin menu item is not present unless a plugin uses the Customizer.

The Customize admin bar node should be shown on the front end if any plugins are using the Customizer, even if the current theme is a block theme.

This commit mirrors a similar check in the admin menu to determine if the Customize link should be displayed.

Follow-up to [52069], [52134], [52158], [52178].

Props pbiron, audrasjb, sabernhardt, costdev.
Fixes #54683.

git-svn-id: https://develop.svn.wordpress.org/trunk@52414 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-25 03:15:16 +00:00
Sergey Biryukov
8492387809 External Libraries: Update the SimplePie library to version 1.5.8.
This minor update corrects the `SIMPLEPIE_VERSION` constant and updates the changelog after the previous release.

Release notes: https://github.com/simplepie/simplepie/releases/tag/1.5.8

For a full list of changes in this update, see the SimplePie GitHub:
https://github.com/simplepie/simplepie/compare/1.5.7...1.5.8

Follow-up to [47733], [49176], [52393].

Props faisal03, jrf, audrasjb, SergeyBiryukov.
Fixes #54659.

git-svn-id: https://develop.svn.wordpress.org/trunk@52413 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-24 18:04:10 +00:00
Sergey Biryukov
81f4ca8727 Build/Test Tools: Allow the PHPCS plugin in Composer configuration.
The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is used to register external PHPCS standards with PHPCS.

As of Composer 2.2, Composer plugins need to be explicitly allowed to run. This commit adds the necessary configuration for that to prevent Composer asking every single time `composer install` or `composer update` is run.

Reference: [https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution Composer 2.2: More secure plugin execution].

Props jrf, johnbillion.
Fixes #54686.

git-svn-id: https://develop.svn.wordpress.org/trunk@52412 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-23 20:10:29 +00:00
Sergey Biryukov
0ece92545e Build/Test Tools: Restore the https URL for browserify-aes.
Follow-up to [52000], [52156], [52402].

See #54487.

git-svn-id: https://develop.svn.wordpress.org/trunk@52411 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-23 17:01:58 +00:00
Jb Audras
f020b00c96 Docs: Typo correction in wp_get_layout_style() introduced in 5.9.
Follow-up to [52069].

See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@52410 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-22 23:18:46 +00:00
Sergey Biryukov
7f222a7159 Editor: Add missing default template areas to the post/page editor settings.
This ensures that default template area settings are displayed when editing a template in the post/page editor, which previously got lost during backporting for 5.9.

Follow-up to [52232].

Props Mamaduka, costdev, gziolo.
Fixes #54679.

git-svn-id: https://develop.svn.wordpress.org/trunk@52409 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-22 12:58:42 +00:00
Sergey Biryukov
e45483fe8a Post WordPress 5.9 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52408 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 21:13:13 +00:00
Sergey Biryukov
63a2a71068 WordPress 5.9 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@52407 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 20:31:45 +00:00
Tonya Mork
6cba70d5e4 Administration: Add "File" to Theme/Plugin Editor menu names and relocate "Plugin File Editor" to Tools for block themes.
[52232] relocated the Theme Editor menu item from Appearance to Tools for block themes. This commit relocates the Plugin  Editor menu item from Plugins to Tools for block themes for a consistent workflow.

Both the Theme Editor and Plugin Editor menu items are renamed to "Theme File Editor" and "Plugin File Editor" respectively. Why? To better identify their purpose, i.e. to directly edit the code in the theme or plugin files. The rename is not limited to only block themes. 

Follow-up to [52232].

Props poena, annezazu, audrasjb, clorith, courane01, costdev, dryanpress, desrosj, hellofromTonya, ipstenu, jameskoster, joen, johnbillion, joyously, manfcarlo, marybaum, pbiron, SergeyBiryukov, walbo, youknowriad.
Fixes #54382.

git-svn-id: https://develop.svn.wordpress.org/trunk@52406 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 20:04:54 +00:00
Jb Audras
839a0bcf06 Coding Standards: Remove unwanted whitespaces after [52404].
Follow-up to [52404].

See #54675.


git-svn-id: https://develop.svn.wordpress.org/trunk@52405 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 18:58:57 +00:00
Jb Audras
b8f7405450 Login and registration: Add a filter to allow to disable the Login screen language dropdown.
This change introduces the `display_login_language_dropdown` filter which allows to disable the Login screen language dropdown. 

Follow-up to [52058].

Props rickcurran, audrasjb, ocean90, hellofromtonya, costdev, johnbillion.
Fixes #54675.


git-svn-id: https://develop.svn.wordpress.org/trunk@52404 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 18:50:36 +00:00
Sergey Biryukov
998eb6a98d Docs: Improve the @since 5.9.0 note for WP_Theme_JSON::PRESETS_METADATA.
Follow-up to [52320], [52401].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@52403 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 10:18:28 +00:00
Isabel Brison
16aca51d8b Update @wordpress packages for Beta 4
Update packages with these bug fixes from Gutenberg:

Navigation: Remove hardcoded typography units
Handle parsed request
Navigation: Refactor modal padding to be simpler and more flexible
Show notice on save in site editor
Add aria-pressed true/false to Toggle navigation button based on state
Components FontSizePicker: Use incremental sequence of numbers
Custom keys from theme.json: fix kebabCase conversion
Template Part: Fix 'isMissing' condition check
Multi-Entity Saving: Decode HTML entities in item titles
Font sizes: update default values
Query Loop: Add useBlockPreview, fix Query Loop wide alignment
Only add dialog role to navigation when modal is open
Fix navigation appender
Show a UI warning when user does not have permission to update/edit a Navigation block
Block editor: Fix Enter handling for nested blocks
Update: Use subtitle styles for the palette names
Allow publishing a post while not saving changes to non-post entities
Update: Block top level useSetting paths
Fix Site Logo block alignment issues
Editor: when Toggle navigation receives state false, focus
ToolsPanel: Allow items to register when panelId is null
Block Support Panels - Make block support tools panels compatible
Gallery: Fix block registration hook priority
Navigation: Fix page list issues in overlay
Ensure the overlay menu works when inserting navigation block pattern
Restrict Navigation permissions and show UI warning if cannot create
Add block gap support for group blocks
Try cascading nav styles through classnames
Fix: Impossible to edit theme and default colors
Fix: Color editor discards colors with default name
Site Editor: Fix template author avatar check
Template Editing Mode: Fix options dropdown
Avoid undo issues when reset parent blocks for controlled blocks
Add comment-form and comment-list to html5 theme support and fix comment layout

Props hellofromtonya.
See #54487.


git-svn-id: https://develop.svn.wordpress.org/trunk@52402 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 07:00:16 +00:00
Tonya Mork
57129a6078 Editor: Add support for nameless font sizes in WP_Theme_JSON.
With nameless font sizes support, themes use the defaults by not declaring the `"name"` setting for their `fontSizes` in `theme.json`.

Backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37410.

Follow-up to [50973], [52049], [52275], [52320].

Props ntsekouras, costdev, hellofromTonya.
Fixes #54640. See #54487.

git-svn-id: https://develop.svn.wordpress.org/trunk@52401 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 06:00:34 +00:00
Tonya Mork
0435e03998 Editor: Add 'edit_theme_options' capabilities to wp_navigation post type.
Adds `'edit_theme_options'` capabilities top restrict Navigation permission.

Partial backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37454.

Follow-up to [52069], [52145].

Props spacedmonkey, get_dave, hellofromTonya.
See #54487.

git-svn-id: https://develop.svn.wordpress.org/trunk@52400 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 04:24:23 +00:00
Tonya Mork
e1f5600c15 REST API: Support . in theme directory names in WP_REST_Global_Styles_Controller, WP_REST_Templates_Controller, and WP_REST_Themes_Controller.
Regex changes from [52376] are reverted to restore the original regex patterns. Why? [52376] used an include characters pattern, which was too limiting. It did not account for localized characters, such as `é`, or other valid directory name characters.

The original theme directory regex pattern, i.e. `[^.\/]+(?:\/[^.\/]+)?` excluded the period `.` character. Removing the `.` character resolves the reported issue by allowing matching for `themes/theme-dirname-1.0/` or `themes/<subdirname>/theme-dirname-1.0/`.

As the pattern used an exclude approach, all characters are valid for matching except for `/`. However, not all characters are cross-platform valid for directory names. For example, the characters `/:<>*?"|` are not valid on Windows OS. The pattern now excludes those characters.

The theme's directory (or subdirectory) name pattern matching is now used in `WP_REST_Global_Styles_Controller`, `WP_REST_Templates_Controller`, and `WP_REST_Themes_Controller`.

Follow-up to [51003], [52051], [52275], [52376].

Props costdev, hellofromTonya, spacedmonkey, TimothyBlynJacobs, bijayyadav, kafleg.
Fixes #54596.

git-svn-id: https://develop.svn.wordpress.org/trunk@52399 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 04:12:06 +00:00
Tonya Mork
b161cfc1ff Application Passwords: Show HTTPS required message without filtering when not enabled or not in local environment.
When `add_filter( 'wp_is_application_passwords_available', '__return_false' )` exists, HTTPS requirement message is shown even if HTTPS is enabled on the site. This happens because `wp_is_application_passwords_available_for_user()` first invokes `wp_is_application_passwords_available()` which is filterable. The situation could happen if the `'wp_is_application_passwords_available_for_user'` filter returns `false`.

To fix this, the check for HTTPS (or if in a 'local' environment) is moved to a new function called `wp_is_application_passwords_supported()`. Then the return from this function is used as an OR condition for the Application Passwords section and for displaying the HTTPS required message.

Tests are included for both `wp_is_application_passwords_supported()` and `wp_is_application_passwords_available()`.

Follow-up to [51980], [51988].

Props davidbinda, SergeyBiryukov, ocean90, felipeelia, costdev, hellofromTonya.
Fixes #53658.

git-svn-id: https://develop.svn.wordpress.org/trunk@52398 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 02:43:18 +00:00
Tonya Mork
84467812c8 Editor: Explicitly declare $post_types and $area properties in WP_Block_Template class.
The `$post_types` and `$area` properties are assigned in the `_build_block_template_result_from_file()` and `_build_block_template_result_from_post()` functions. However, neither property was explicitly declared in the `WP_Block_Template` class.

This commit explicitly declares both properties in the class. Why? (1) To make the code more readable and maintainable; (2) to avoid a `Deprecated: Creation of dynamic property WP_Block_Template::$post_types is deprecated` deprecation when PHP 8.2 is released.

Ref:
* PHP 8.2 Deprecate dynamic properties https://wiki.php.net/rfc/deprecate_dynamic_properties

Follow-up to [52062].

Props jrf.
Fixes #54670.

git-svn-id: https://develop.svn.wordpress.org/trunk@52397 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 00:26:44 +00:00
Tonya Mork
3ce5c4c5a8 General: Fix 'rel' argument in Tests_Functions_wpListBookmarks test datasets.
`wp_list_bookmarks()` arguments include `'link_rel'`, but not `'rel'`. This commit fixes this argument in the test datasets. It also adds an expected `'rel=""'` result check, i.e. instead of only checking for `'noopener'`.

Follow-up to [52395].

Props davidbinda.
Fixes #53839.

git-svn-id: https://develop.svn.wordpress.org/trunk@52396 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-21 00:10:26 +00:00
Tonya Mork
b3b302df31 Script Loader: Skip getting 'can_compress_scripts' option in script_concat_settings() during install.
When installing a multisite, there is a potential access to a non-existent database table that needs to be skipped to avoid warnings/errors. This fix checks is WordPress is not installing before getting the `'can_compress_scripts'` option.

Props schlessera.
Fixes #54634.

git-svn-id: https://develop.svn.wordpress.org/trunk@52395 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-20 23:51:35 +00:00
Jb Audras
99c62ef9b4 Docs: Typo correction in wp_dropdown_languages() DocBlock.
Follow-up to [52058].

See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@52394 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-20 22:24:56 +00:00
Sergey Biryukov
61dbb11d70 External Libraries: Update the SimplePie library to version 1.5.7.
This version shows significant improvements in the compatibility of SimplePie with PHP 8.0, 8.1, and even contains an initial PHP 8.2 fix. The release also contains a number of other bug fixes.

Release notes: https://github.com/simplepie/simplepie/releases/tag/1.5.7

For a full list of changes in this update, see the SimplePie GitHub:
https://github.com/simplepie/simplepie/compare/1.5.6...1.5.7

Follow-up to [47733], [49176].

Props jrf, SergeyBiryukov.
Fixes #54659.

git-svn-id: https://develop.svn.wordpress.org/trunk@52393 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-20 19:31:37 +00:00
Jeff Ong
e169c4923b Twenty Twenty-Two: Sync updates from GitHub for Beta 4.
This commit syncs changes for the default theme from its active development repository to core. 

This is a follow up to [52081], [52107], [52164], [52222], [52283], [52335], and [52375]. It updates the theme's font size presets and fixes an issue with query padding.

To view the full set of changes, visit 623a4d7982...d6cb56cce4.

Props schlessera, williampatton, hellofromtonya, kjellr.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52392 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-20 16:48:54 +00:00
Sergey Biryukov
ef404e2599 Tests: Use shared fixtures in block theme tests.
This removes duplicate test data and aims to avoid future confusion about which themes to use in which tests.

Follow-up to [52049], [52246], [52247], [52279].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52391 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-19 16:23:38 +00:00
John Blackbourn
7c0f7cbbda Build/Test Tools: Remove the assertion in filter_rest_url_for_leading_slash().
This assertion can mask the fact that some other tests don't perform an assertion.

Fixes #54661


git-svn-id: https://develop.svn.wordpress.org/trunk@52390 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-19 14:27:22 +00:00
John Blackbourn
029bea45b0 Build/Test Tools: Reduce the use of unnecessary randomness in tests.
This increases the overall reliability of the tests.

Props johnillo

Fixes #37371


git-svn-id: https://develop.svn.wordpress.org/trunk@52389 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-19 13:42:37 +00:00
Sergey Biryukov
77757441a4 Tests: Fix typo in a data provider name.
Follow-up to [52261], [52387].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52388 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-18 21:44:57 +00:00
Sergey Biryukov
a3fd024eba Tests: Fix typo in a test method name.
Follow-up to [52261].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52387 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-18 21:16:37 +00:00
SergeyBiryukov
b932a57806 Tests: Move the tests for theme features that block themes should support by default to a more appropriate place.
As these tests are intended for the `_add_default_theme_supports()` function rather than `WP_Theme` class methods, the `tests/theme.php` file is a more logical place for them than `tests/theme/wpTheme.php`.

Follow-up to [52369], [52383].

See #54597.

git-svn-id: https://develop.svn.wordpress.org/trunk@52386 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-18 21:08:02 +00:00
Jb Audras
6ab94802c2 Site Health: Typo correction in Site Health help tab.
Follow-up to [52053].

Props pedromendonca.
Fixes #54656.


git-svn-id: https://develop.svn.wordpress.org/trunk@52385 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-18 21:00:26 +00:00
antpb
0759d89e67 Media: Fix selections in Media Library Featured Image modal on open.
In [50829] infinite scrolling was removed from the Media Library and modal which introduced unintended behavior for featured images where only the selected image shows when opening the library. This change reverts only the logic that caused this and applies a proper fix when opening the library.

Props benitolopez, hellofromTonya, joedolson, peterwilsoncc, circlecube, danielbachhuber, PieWP, sabernhardt, szaqal21, dariak, sergeybiryukov.
Fixes #53765.


git-svn-id: https://develop.svn.wordpress.org/trunk@52384 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-17 20:15:01 +00:00
Sergey Biryukov
954e9c153f Tests: Add unit tests for theme features that block themes should support by default.
By default, block themes should have a few theme supports enabled:
* `post-thumbnails`
* `responsive-embeds`
* `editor-styles`
* `html5` for `comment-form`, `comment-list`, `style`, `script`
* `automatic-feed-links`

They should also load core block assets only when the blocks are rendered. This commit adds the associated tests.

Follow-up to [52369].

Props costdev.
See #54597.

git-svn-id: https://develop.svn.wordpress.org/trunk@52383 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-16 14:45:32 +00:00
Sergey Biryukov
5cb75a136d Tests: Mock the HTTP request response in download_url() tests.
This aims to speed up the tests and minimize unrelated failures by avoiding an unnecessary external HTTP request, while still performing the intended functionality checks.

Update similar helpers in some other tests to use more consistent terminology.

Follow-up to [37907], [46175], [51626].

See #54420, #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52382 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-15 19:59:32 +00:00
Sergey Biryukov
2cd907dd63 Tests: Add an assertion to test the WP_REST_Server::add_site_logo_to_index() method.
Additionally:
* Move the test for `WP_REST_Server::add_active_theme_link_to_index()` to a more logical place.
* Replace `assertEquals()` with `assertSame()` in site icon test to also check the type of the value.
* Use a more consistent pattern for the tests.

Follow-up to [51241], [52080].

Props ignatggeorgiev, desrosj, SergeyBiryukov.
Fixes #53516. See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52381 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-15 18:06:15 +00:00
Isabel Brison
424afb85af Fix deprecated usage of passing null to explode()
As of PHP 8.1, explode() does not permit null as its second argument. This results in warnings being spat out on every page because of a usage of this in wp-includes/block-supports/layout.php.

See #53635.
Props noisysocks.


git-svn-id: https://develop.svn.wordpress.org/trunk@52380 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-15 04:06:53 +00:00
Sergey Biryukov
9792783bdd Post WordPress 5.9 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@52379 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-14 21:23:02 +00:00