While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.
Follow-up to [47493], [48834], [50556], [51473].
Props shital-patel, akabarikalpesh.
See #53870.
git-svn-id: https://develop.svn.wordpress.org/trunk@51541 602fd350-edb4-49c9-b593-d223f7449a82
Add a check to `wp_add_iframed_editor_assets_html()` confirming the edit post screen is using the block-editor before including block-editor specific JavaScript. For the classic and other editors the function returns early without any output.
Props swissspidy, desrosj.
Fixes#53696.
git-svn-id: https://develop.svn.wordpress.org/trunk@51540 602fd350-edb4-49c9-b593-d223f7449a82
Prevent the bulk-select option from displaying when adding a new menu. This also prevents the option from displaying when an administrator first visits the menu page and no menus are set.
Props dlh, sabernhardt.
Fixes#53654.
git-svn-id: https://develop.svn.wordpress.org/trunk@51539 602fd350-edb4-49c9-b593-d223f7449a82
This commit fixes a regression on WordPress 5.8 that made the border radius setting on the buttons block disappear.
Props Mamaduka, daisyo, priethor, desrosj, mikeschroder.
Fixes#53702.
git-svn-id: https://develop.svn.wordpress.org/trunk@51538 602fd350-edb4-49c9-b593-d223f7449a82
This expands Slack notifications to include success, cancelled, and “fixed” GitHub Action workflow run outcomes in addition to failures.
A “fixed” outcome occurs when the previous run for a workflow failed and the current one succeeds. This matches the behavior that was native to TravisCI by setting `on_success` for notifications to `change`.
The message details and where each outcome is posted is controlled by Slack workflows.
The Slack notification logic has also been pulled into a separate workflow to prevent repeating code in every workflow.
See #52644.
git-svn-id: https://develop.svn.wordpress.org/trunk@51535 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a "Deprecated: `DateTime::__construct()`: Passing null to parameter #1 (`$datetime`) of type string is deprecated" warning on PHP 8.1.
Follow-up to [49083].
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51533 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the "Deprecated: Return type of `WP_Block_List::[METHODNAME]()` should be compatible with `ArrayAccess::[METHODNAME](): type`" warnings on PHP 8.1.
PHP native interfaces now have declared return types and methods in classes implementing these interfaces need to either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or need to silence the deprecation warning using the `#[ReturnTypeWillChange]` attribute.
Follow-up to [51517], [51529], [51530], [51531].
Props jrf.
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51532 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the "Deprecated: Return type of `WP_REST_Request::[METHODNAME]($offset)` should be compatible with `ArrayAccess::[METHODNAME](): type`" warnings on PHP 8.1.
PHP native interfaces now have declared return types and methods in classes implementing these interfaces need to either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or need to silence the deprecation warning using the `#[ReturnTypeWillChange]` attribute.
Follow-up to [51517], [51529], [51530].
Props jrf.
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51531 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the "Deprecated: Return type of `WP_Hook::[METHODNAME]()` should be compatible with `ArrayAccess::[METHODNAME](): type`" warnings on PHP 8.1.
PHP native interfaces now have declared return types and methods in classes implementing these interfaces need to either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or need to silence the deprecation warning using the `#[ReturnTypeWillChange]` attribute.
Follow-up to [51517], [51529].
Props jrf.
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51530 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the "Deprecated: Return type of `WP_Theme::[METHODNAME]($offset)` should be compatible with `ArrayAccess::[METHODNAME](): type`" warnings on PHP 8.1.
PHP native interfaces now have declared return types and methods in classes implementing these interfaces need to either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or need to silence the deprecation warning using the `#[ReturnTypeWillChange]` attribute.
Follow-up to [51517].
Props jrf.
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51529 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that when multiple plugins or themes are updated and one succeeds and another fails, the error is reported accordingly.
Previously, both updates would end up treated as a success, due to `$this->result` containing the result of the previous operation and not the current one.
Follow-up to [12097].
Props pwtyler, afragen.
Fixes#53002.
git-svn-id: https://develop.svn.wordpress.org/trunk@51528 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a "Table `wp_options` doesn't exist" database error when trying to create a nonce for password reset button.
When installing and using database-saved salts, `wp_create_nonce()` causes database errors as `wp_salt()` attempts to insert into the not-yet-created options table. Since authentication is not available during installation, we can safely skip creating a nonce.
Follow-up to [39684], [50129].
Props schlessera, swissspidy, sanketchodavadiya, hellofromTonya, SergeyBiryukov.
Fixes#53830.
git-svn-id: https://develop.svn.wordpress.org/trunk@51525 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a "Cannot access offset of type string on string" fatal error in `set_theme_mod()` on PHP 8 if the `theme_mods_$theme_slug` option has an incorrect value, e.g. an empty string instead of an array.
With this change, `set_theme_mod()` should be able to resolve the issue by saving a correct value.
Follow-up to [15736], [15739], [30672], [32629], [32632].
Props xknown.
See #51423.
git-svn-id: https://develop.svn.wordpress.org/trunk@51524 602fd350-edb4-49c9-b593-d223f7449a82
This adds three values to the debug info in the Database section:
* Max allowed packet size
* Max connections number
* Query cache size
Props zodiac1978, donmhico, mukesh27, SergeyBiryukov.
Fixes#53845.
git-svn-id: https://develop.svn.wordpress.org/trunk@51522 602fd350-edb4-49c9-b593-d223f7449a82
This can significantly reduce the time required to complete the process in a development environment.
Follow-up to [32386].
Props bobbingwide, afragen, desrosj, SergeyBiryukov.
Fixes#52765.
git-svn-id: https://develop.svn.wordpress.org/trunk@51521 602fd350-edb4-49c9-b593-d223f7449a82
This matches the documented type of the `$post_id` argument and is consistent with other instances of `wp_terms_checklist()` calls.
Per the function documentation, the default value is integer `0`, not `null`.
Follow-up to [13535].
Props tareiking, donmhico, jrf.
Fixes#43639.
git-svn-id: https://develop.svn.wordpress.org/trunk@51520 602fd350-edb4-49c9-b593-d223f7449a82
`$this` is a pseudo-variable that cannot be used as the name of a function parameter, so renaming these helps prevent errors when implementing hook callback functions.
Fixes#53457
git-svn-id: https://develop.svn.wordpress.org/trunk@51518 602fd350-edb4-49c9-b593-d223f7449a82
This adds an additional step to each GitHub Action workflow file that posts a message to #core in Slack every time a workflow run fails.
A minor test and spacing change is included in this commit in order to that messages are posted correctly and will be reverted after testing.
See #52644.
git-svn-id: https://develop.svn.wordpress.org/trunk@51511 602fd350-edb4-49c9-b593-d223f7449a82
It aligns with the changes proposed added in Gutenberg: https://github.com/WordPress/gutenberg/pull/33293.
The idea here is to split the growing webpack config into two parts: blocks and packages.
We need to add handling for JavaScript files that are going to be used with blocks on the frontend. They didn't work quite well with the current setup for entry points created for packages.
As part of the effort, it adds support for `viewScript` in `block.json` metadata file that is later translated to `$view_script` in `WP_Block_Type` class and exposed as `view_script` from the REST API endpoint for block types.
Props youknowriad, desrosj, aristath.
Fixes#53690.
git-svn-id: https://develop.svn.wordpress.org/trunk@51501 602fd350-edb4-49c9-b593-d223f7449a82
Version bump three bundled themes to avoid file not found and fatal errors introduced for child themes during the 5.8 release cycle.
* Twenty Ten: Version 3.5 (fatal error & 404)
* Twenty Eleven: Version 3.9 (404)
* Twenty Twelve: Version 3.5 (404)
These updates will be released mid 5.8.1 cycle due to the severity of the issues.
Follow up to [51482,51483].
Props dd32, peterwilsoncc.
Fixes#53777.
git-svn-id: https://develop.svn.wordpress.org/trunk@51486 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a "Division by zero" PHP warning if a plugin changes the `posts_per_page` value to zero.
Follow-up to [51145].
Props 2linctools, kapilpaul, audrasjb.
Fixes#53773.
git-svn-id: https://develop.svn.wordpress.org/trunk@51485 602fd350-edb4-49c9-b593-d223f7449a82
By using `get_template_directory_uri()` instead of `get_stylesheet_directory_uri()`, we make sure to include the images from the parent theme.
This avoids displaying missing images in block patterns when using a child theme of Twenty Ten, Twenty Eleven, or Twenty Twelve.
Follow-up to [51033], [51103], [51106].
Props audrasjb.
Fixes#53769.
git-svn-id: https://develop.svn.wordpress.org/trunk@51483 602fd350-edb4-49c9-b593-d223f7449a82
By using `get_template_directory()` instead of `get_stylesheet_directory()`, we make sure to include the `block-patterns.php` file from the parent theme.
This avoids a PHP fatal error when using a child theme of Twenty Ten.
Follow-up to [51106].
Props ryelle, sabernhardt, loranrendel.
Fixes#53752.
git-svn-id: https://develop.svn.wordpress.org/trunk@51482 602fd350-edb4-49c9-b593-d223f7449a82
This should make it clear that the variable is used as part of the HTML `<title>` tag on admin screens.
Props ravipatel, hellofromTonya, sabernhardt, audrasjb, SergeyBiryukov.
Fixes#53729.
git-svn-id: https://develop.svn.wordpress.org/trunk@51475 602fd350-edb4-49c9-b593-d223f7449a82
While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.
Follow-up to [47493], [48834], [50556], [51418].
Props radixweb, ankitmaru, TobiasBg, sabernhardt, audrasjb.
Fixes#53716.
git-svn-id: https://develop.svn.wordpress.org/trunk@51473 602fd350-edb4-49c9-b593-d223f7449a82
Related issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/33552
The loop in WP_Theme_JSON_Resolver to extract translatable paths was broken, as it contained an immediate and unconditional return. This caused the loop to immediately exit again after the first iteration, thus never actually looping.
Follow-up to [50959].
Props schlessera.
git-svn-id: https://develop.svn.wordpress.org/trunk@51472 602fd350-edb4-49c9-b593-d223f7449a82
In WordPress 5.8 we added the ability to only load styles for blocks when these blocks are rendered. However, these optimizations left out block-styles that get added using the register_block_style() function/API.
Props aristath.
Fixes#53616.
git-svn-id: https://develop.svn.wordpress.org/trunk@51471 602fd350-edb4-49c9-b593-d223f7449a82