The `user_url` database field only allows up to 100 characters, and if the value is longer than that, the function should return a proper error message instead of silently failing.
This complements similar checks for `user_login` and `user_nicename` fields.
Follow-up to [45], [1575], [32299], [34218], [34626].
Props mkox, sabernhardt, tszming, SergeyBiryukov.
Fixes#44107.
Built from https://develop.svn.wordpress.org/trunk@52650
git-svn-id: http://core.svn.wordpress.org/trunk@52239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that the preview ratio remains accurate for the user's screen size when the sidebar is open.
Follow-up to [19995], [20110], [20133], [20138], [28033].
Props shreyasikhar26, costdev, sumitsingh, SergeyBiryukov.
Fixes#54764.
Built from https://develop.svn.wordpress.org/trunk@52647
git-svn-id: http://core.svn.wordpress.org/trunk@52236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Before this changeset, `translation_api` and `translation_api_result` filters were incorrectly marked as taking object as their first argument. The correct type is an array as `json_decode()` is asked to return an associative array.
Props volodymyrkolesnykov.
Fixes#54959.
Built from https://develop.svn.wordpress.org/trunk@52645
git-svn-id: http://core.svn.wordpress.org/trunk@52234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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