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
* 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
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
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
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
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
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
[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
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
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
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
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
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
`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
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
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
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
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
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
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
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
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
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
This commit backports the remote "Featured" category request and loads it into the Featured Patterns in the block inserter.
Props ryelle.
Fixes#54623.
git-svn-id: https://develop.svn.wordpress.org/trunk@52377 602fd350-edb4-49c9-b593-d223f7449a82
Themes whose `wp-content/themes/<dirname>` include valid non-alphanumeric (cross-platform) characters work for non-block themes, but did not previously resolve for block themes. For example, a block theme in `wp-content/themes/twentytwentytwo-0.4.0/` directory resulted a 404 "No route was found matching the URL and request method" response when attempting to customize it in the Site Editor.
This commit adds support for the following characters in a theme's root directory: `_`, `.`, `@`, `[`, `]`, `(`, and `)`. Subdirectory themes and `-` are already supported.
Follow-up to [51003], [52051], [52275].
Props mkaz, costdev, hellofromTonya, jffng, justinahinon, peterwilsoncc, spacedmonkey, TimothyBlynJacobs.
Fixes#54596.
git-svn-id: https://develop.svn.wordpress.org/trunk@52376 602fd350-edb4-49c9-b593-d223f7449a82
This commit syncs minor changes for the default theme from its active development repository to core.
This is a follow up to [52081], [52107], [52164], [52222], [52283], and [52335]. The two main changes introduce global padding to site content while still allowing content to be full-width, and re-organize block patterns into Core's existing categories.
To view the full set of changes, visit da994d1fe5...88a8f2e3b4.
Props onemaggie, joen, youknowriad, scruffian, sabernhardt, kjellr.
See #54318.
git-svn-id: https://develop.svn.wordpress.org/trunk@52375 602fd350-edb4-49c9-b593-d223f7449a82
Fix the `get_theme_item` method in the `WP_REST_Global_Styles_Controller` class to respect the fields param context filtering and to return links.
Props spacedmonkey, hellofromtonya, peterwilsoncc, costdev.
Fixes#54595.
git-svn-id: https://develop.svn.wordpress.org/trunk@52374 602fd350-edb4-49c9-b593-d223f7449a82
WordPress Core is not really custom and does not reference "custom post type" in its function naming. This commit renames 2 public static methods:
* `WP_Theme_JSON_Resolver::get_user_custom_post_type_id()` renamed to `WP_Theme_JSON_Resolver::get_user_global_styles_post_id()`.
* `WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type()` renamed to `WP_Theme_JSON_Resolver:: get_user_data_from_wp_global_styles()`.
Follow-up to [52049], [52051], [52069], [52232], [52275], [52364].
Props antonvlasenko, bernhard-reiter, costdev, desrosj, hellofromTonya, noisysocks, oandregal, SergeyBiryukov.
Fixes#54517.
git-svn-id: https://develop.svn.wordpress.org/trunk@52372 602fd350-edb4-49c9-b593-d223f7449a82