Twenty Twenty-Two requires WordPress 5.9 but currently can't be (re)activated in the 5.9 branch because `version_compare( '5.9-RC3-52627', '5.9', '>=' )` as used by `is_wp_version_compatible()` returns `false`. To appreciate the testing of upcoming versions any `-alpha`, `-RC`, `-beta` suffixes are now stripped off from the WordPress version before checking for compatibility.
Fixes#54882.
Built from https://develop.svn.wordpress.org/trunk@52628
git-svn-id: http://core.svn.wordpress.org/trunk@52216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update packages to include these bug fixes from Gutenberg:
- Block Editor: Mark last change as persistent on save
- Site Editor: Restore ?styles=open functionality
- Site Editor: Fix resizable box scrollbars in blocks
- Add classic menus to menu switcher
See #54487.
Props talldanwp.
Built from https://develop.svn.wordpress.org/trunk@52624
git-svn-id: http://core.svn.wordpress.org/trunk@52212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
By setting 'theme_supports' on the panel, we ensure that the Widgets panel is
removed if a theme does not have support for 'widgets'.
This makes the behaviour of the Widgets and Menus panels consistent.
Follows [52621].
See #54888.
Props hellofromTonya, costdev, peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@52622
git-svn-id: http://core.svn.wordpress.org/trunk@52210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
By overriding check_capabilities(), we can ensure that the Menus panel
is removed if a theme does not have support for 'menus' nor 'widgets'.
This ensures that the Menus panel does not appear when using a block
theme, which is confusing to users.
See #54888.
Props hellofromTonya, costdev, peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@52621
git-svn-id: http://core.svn.wordpress.org/trunk@52209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes the strings easier to translate and provides more details about what exactly is deprecated: a PHP function, a file name, or a WordPress hook.
The changes apply to:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `_doing_it_wrong()`
Follow-up to [6514], [7884], [12536], [12584], [16939], [16942], [16945], [24439], [24723], [32989], [37861], [39315].
Props mukesh27, audrasjb, SergeyBiryukov.
Fixes#54658.
Built from https://develop.svn.wordpress.org/trunk@52609
git-svn-id: http://core.svn.wordpress.org/trunk@52197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change introduces two new hooks to help developers to filter retrieve password emails:
- `send_retrieve_password_email` can be used to filter whether to send the retrieve password email;
- `retrieve_password_notification_email` can be used to filter the contents of the reset password notification email sent to the user.
This changesets also adds unit tests for these new filters.
Props connapptivity, costdev, audrasjb, johnbillion.
Fixes#54690.
Built from https://develop.svn.wordpress.org/trunk@52604
git-svn-id: http://core.svn.wordpress.org/trunk@52192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent the script loader from attempting to create nonces during the installation process for Multisite configurations.
Prior to this fix, multiple "Table does not exist" errors were thrown during installation if `MULTISITE` was defined in the `wp-config.php` file but the salt constants were not defined. Without the salts defined in PHP, WP was attempting to use the database fallbacks prior to table creation.
Props schlessera, johnbillion, hellofromTonya, audrasjb, costdev.
Fixes#54800.
Built from https://develop.svn.wordpress.org/trunk@52602
git-svn-id: http://core.svn.wordpress.org/trunk@52190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update packages to include these bug fixes from Gutenberg:
* Navigation Block: update micromodal to `0.4.10` to fix menu close button on mobile
Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
See #54487.
Built from https://develop.svn.wordpress.org/trunk@52598
git-svn-id: http://core.svn.wordpress.org/trunk@52186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update packages to include these bug fixes from Gutenberg:
- Stop keypresses being caught by other elements when they happen in a CustomSelectControl
- Remove color, spacing, and layout options for Template Part block
- Try: parse shortcode blocks outside the content
- Fix aria-modal attribution with multiple navs on page
- Gallery block: Remove warning notice about mobile version required
- Fix Home template description typo
- Fix enqueueing additional styles for blocks only when rendered
- fix typo (hanle -> handle)
- SelectControl: mark the children prop as optional
- Remove warning for enqueued styles in Editor
- Add context to font style and font weight related translation strings
- Temporarily remove text decoration from Nav block
- Fix empty secondary sidebar overlapping widget editor content on mobile viewports
- Fix hiding the bottom of tablet/mobile preview in Site Editor
See #54487.
Props isabel_brison.
Built from https://develop.svn.wordpress.org/trunk@52595
git-svn-id: http://core.svn.wordpress.org/trunk@52183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remote block patterns from wp.org were to be loaded through a callback hooked into the `current_screen` filter. Within 2 callbacks, i.e. `_load_remote_featured_patterns()` and `_load_remote_block_patterns()`, a guard clause bailed out early if the `$current_screen->is_block_editor` is `false`.
However, the `current_screen` filter is unreliable to detect the block editor. Why? In the block and Site Editor screens, `$current_scren->is_block_editor` is not set until after the filter is executed. Whoopsie.
This commit no longer uses the `current_screen` filter. Instead, it explicitly loads the remote block patterns by invoking both private functions (now not callbacks) directly in the screen files for the block and site editor screens.
With this change, passing `WP_Screen` object into these functions is no longer needed. As the `_load_remote_block_patterns()` function was introduced in 5.8.0, its function parameter is now deprecated and the guard clause retained for backwards compatibility.
Follow-up to [51021], [52377].
Props poena, noisysocks, peterwilsoncc, hellofromTonya, audrasjb.
Fixes#54806.
Built from https://develop.svn.wordpress.org/trunk@52593
git-svn-id: http://core.svn.wordpress.org/trunk@52181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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], [52335], [52375], [52392], [52430], and [52555]. It includes fixes to the group, cover, and template part block padding and removes unnecessary group block wrappers from many patterns.
To view the full set of changes, visit 69d5c512c6...91f8748566.
Props kjellr, richtabor, audrasjb.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52589
git-svn-id: http://core.svn.wordpress.org/trunk@52177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In PHP 8+, `@` no longer suppresses fatal errors:
> The `@` operator will no longer silence fatal errors (`E_ERROR`, `E_CORE_ERROR`, `E_COMPILE_ERROR`, `E_USER_ERROR`, `E_RECOVERABLE_ERROR`, `E_PARSE`).
Reference: [https://www.php.net/manual/en/migration80.incompatible.php PHP 8: Backward Incompatible Changes].
`disk_free_space()` may be disabled by hosts, which will throw a fatal error on a call to undefined function.
This change prevents the fatal error, and falls back to `false` when `disk_free_space()` is unavailable.
Follow-up to [25540], [25774], [25776], [25831], [25869].
Props costdev, jrf, swb1192, SergeyBiryukov.
Fixes#54826. See #54730.
Built from https://develop.svn.wordpress.org/trunk@52585
git-svn-id: http://core.svn.wordpress.org/trunk@52175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When passing args to the `WP_Query::__construct()` method, it internally executes the `WP_Query::get_posts()` method and stores the result in the `WP_Query::posts` property.
When calling `WP_Query::get_posts()` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.
Thus, the correct usage is to read the posts already stored in the `WP_Query::posts` property.
Follow-up to [1062/tests], [1065/tests], [1066/tests], [1070/tests], [29805], [31286], [49900], [51144].
Props david.binda.
Fixes#54822.
Built from https://develop.svn.wordpress.org/trunk@52577
git-svn-id: http://core.svn.wordpress.org/trunk@52167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `wp_remote_retrieve_response_code()`
* `wp_remote_retrieve_response_message()`
If incorrect parameter value is given, these functions return an empty string, not an empty array.
Follow-up to [8516].
Props chesio, johnbillion.
Fixes#54796.
Built from https://develop.svn.wordpress.org/trunk@52572
git-svn-id: http://core.svn.wordpress.org/trunk@52162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change adds a verification of the `$position` parameter in `add_menu_page()` to ensure an integer is used. If not, the function informs developers of the wrong parameter type via a `_doing_it_wrong` message. This brings consistency with a similar check used in `add_submenu_page()`.
This change also typecasts any floating number to string to ensure that in case a float value was passed, at least it doesn't override existing menus.
Follow-up to [46570].
Props kirtan95.
Fixes#54798. See #48249.
Built from https://develop.svn.wordpress.org/trunk@52569
git-svn-id: http://core.svn.wordpress.org/trunk@52159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes a `Variable "$auth_ID" is not in valid snake_case format` WPCS warning by using the existing `$author_id` variable, and brings consistency with a similar fragment in `get_author_feed_link()`.
Follow-up to [979], [5087], [6364], [6365].
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52568
git-svn-id: http://core.svn.wordpress.org/trunk@52158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use the correct Field Guide link. Update the SVGs used on Freedoms and Privacy. Add more spacing between sections on the About page, fixed spacing between rows on Freedoms page.
Props critterverse, audrasjb, versusbassz.
See #54270.
Built from https://develop.svn.wordpress.org/trunk@52563
git-svn-id: http://core.svn.wordpress.org/trunk@52153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Tone down the brightness of the dashboard panel by using a white background behind the main text, and use the highlight color from each color scheme for the main background. This also introduces a `$scheme-name` SCSS variable to allow overrides for specific color schemes.
Props critterverse, sabernhardt, joedolson, audrasjb.
See #54489.
Built from https://develop.svn.wordpress.org/trunk@52562
git-svn-id: http://core.svn.wordpress.org/trunk@52152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `wp_enqueue_block_style` when `rtl` versions of CSS files are detected, `wp_style_add_data` is called to add the metadata to the registered sheet. However, the stylesheet `handle` argument is misspelled as `hanle`. This change corrects the argument name.
Props omaeyusuke.
Fixes#54786.
Built from https://develop.svn.wordpress.org/trunk@52558
git-svn-id: http://core.svn.wordpress.org/trunk@52148 1a063a9b-81f0-0310-95a4-ce76da25c4cd