This changeset adds a new Help text for Rollback feature in the WordPress Updates screen. Also adds a link to the "Common Errors" HelpHub documentation page.
Follow-up to [51857].
Props costdev, afragen, audrasjb, kebbet, marybaum.
Fixes#58199.
git-svn-id: https://develop.svn.wordpress.org/trunk@56171 602fd350-edb4-49c9-b593-d223f7449a82
This replaces `add_theme_support( 'experimental-link-color' )` with `add_theme_support( 'link-color' )`, to provide the feature to Twenty Twenty-One users, but
also to avoid throwing a "doing it wrong" message when Gutenberg version 16.2 is active.
Follow-up to [58597].
Props poena.
Fixes#58702.
git-svn-id: https://develop.svn.wordpress.org/trunk@56170 602fd350-edb4-49c9-b593-d223f7449a82
The `$data` parameter in `WP_REST_Attachments_Controller::upload_from_data()` is passed and treated only as `string`, not `array`.
Props costdev.
See #57840.
git-svn-id: https://develop.svn.wordpress.org/trunk@56168 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [56037], as that changeset accidentally did not consider the changes made in [55825]: Images that are programmatically injected into post content (e.g. through a block, or shortcode, or any hook calling a function like `wp_get_attachment_image()`) must be treated as part of the whole post content blob since otherwise the heuristics for applying `fetchpriority="high"` and `loading="lazy"` are skewed by parsing certain images before others rather than sequentially parsing the entire post content. [55825] addressed that for lazy-loading, but when [56037] introduced `fetchpriority` support, the related refactor missed making the same consideration for that attribute.
Props flixos90, spacedmonkey, thekt12, mukesh27.
Fixes#58235.
See #58089.
git-svn-id: https://develop.svn.wordpress.org/trunk@56164 602fd350-edb4-49c9-b593-d223f7449a82
Correctly return the existing autosave when an unchanged autosave is saved, instead of returning an error.
Fix regressions after r55154 where an error and not the original autosave was returned when saving with unchanged data (for example, clicking the preview button repeatedly). Returning the autosave (ID) is the expected behavior for the endpoint.
Follow up to [55154]
Props Mamaduka, jeroenrotty, mrfoxtalbot.
Fixes#58739.
git-svn-id: https://develop.svn.wordpress.org/trunk@56163 602fd350-edb4-49c9-b593-d223f7449a82
The `wp-before-template` and `wp-template` metric intend to separate WordPress core's own bootstrap process from any logic that is part of the eventual template loaded. The appropriate hook for that is the `template_include` filter as that occurs right before the template file is included.
Props mukesh27, joemcgill.
Fixes#58674.
git-svn-id: https://develop.svn.wordpress.org/trunk@56162 602fd350-edb4-49c9-b593-d223f7449a82
Fix deprecation warning for dynamic property in object cache drop-in used in core unit tests.
Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.
Props spacedmonkey, johnbillion.
Fixes#58736.
See #56034.
git-svn-id: https://develop.svn.wordpress.org/trunk@56161 602fd350-edb4-49c9-b593-d223f7449a82
Renames sync_status to wp_pattern_sync_status and moves it to top level field of wp_block post type.
Props glendaviesnz, aaronrobertshaw, mukesh27, peterwilsoncc.
Fixes 58677.
git-svn-id: https://develop.svn.wordpress.org/trunk@56160 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a bug where the `margin-left: auto` property was being overwritten to `margin-left: 0` causing an inconsistency in the alignment of these blocks.
Follow-up to [56034], [56039], [56040].
Props sabernhardt.
Fixes#58396.
git-svn-id: https://develop.svn.wordpress.org/trunk@56155 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds support for loading optimization attributes such as `loading="lazy"` and `fetchpriority="high"` to the image widget. A new context `widget_media_image` is introduced for that purpose.
Props spacedmonkey, thekt12, mukesh27, westonruter.
Fixes#58704.
See #58235.
git-svn-id: https://develop.svn.wordpress.org/trunk@56154 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds a check for the existence of `db.php` at the default path `ABSPATH . 'wp-content/db.php'`, even if `WP_CONTENT_DIR` is defined and `db.php`
is placed in `WP_CONTENT_DIR`.
Follow-up to [49161].
Props mikeyzm, SergeyBiryukov, hztyfoon,
Fixes#58201.
git-svn-id: https://develop.svn.wordpress.org/trunk@56152 602fd350-edb4-49c9-b593-d223f7449a82
This also introduces `wp_is_password_reset_allowed_for_user()` which returns `false` when password reset is not allowed for a specific user. This can be
filtered by developers using the existing `allow_password_reset` hook.
Props ocean90, cshark, robinwpdeveloper, tahmina1du, kraftbj.
Fixes#58194.
git-svn-id: https://develop.svn.wordpress.org/trunk@56150 602fd350-edb4-49c9-b593-d223f7449a82
This reintroduces HTML5 Shiv script that was removed in [55980], to ensure backward compatibility for websites that opted-in to IE support. Also reintroduces
HTML5 credits.
Follow-up to [55980].
Props sabernhardt.
See #56699.
git-svn-id: https://develop.svn.wordpress.org/trunk@56149 602fd350-edb4-49c9-b593-d223f7449a82
This reintroduces HTML5 Shiv script that was removed in [55982], to ensure backward compatibility for websites that opted-in to IE support.
Follow-up to [55982].
Props sabernhardt.
See #56699.
git-svn-id: https://develop.svn.wordpress.org/trunk@56148 602fd350-edb4-49c9-b593-d223f7449a82
This reintroduces HTML5 Shiv script that was removed in [55981], to ensure backward compatibility for websites that opted-in to IE support.
Follow-up to [55981]
Props audrasjb, sabernhardt.
See #56699.
git-svn-id: https://develop.svn.wordpress.org/trunk@56147 602fd350-edb4-49c9-b593-d223f7449a82
Fixes multiline comment indentation in `wp-includes/block-supports/settings.php`. Also fixes typo in the comment.
Props mukesh27.
See #58586.
git-svn-id: https://develop.svn.wordpress.org/trunk@56146 602fd350-edb4-49c9-b593-d223f7449a82
Adds more meaningful titles to templates in the browse mode template list.
Props ntsekouras, audrasjb.
Fixes#58713.
git-svn-id: https://develop.svn.wordpress.org/trunk@56145 602fd350-edb4-49c9-b593-d223f7449a82
Following [55318], [55847], and [56142], certain images in the header of the page have received support for potentially receiving `fetchpriority="high"` and having the `loading="lazy"` attribute omitted. However, these images being present did not affect the "content media count" which counts the images towards a certain threshold so that the first ones are not lazy-loaded.
This changeset also increases that count for such header images if they are larger than a certain threshold. The threshold is used to avoid e.g. a header with lots of small images such as icon graphics to skew the lazy-loading behavior.
Props thekt12, spacedmonkey, flixos90.
Fixes#58635.
git-svn-id: https://develop.svn.wordpress.org/trunk@56143 602fd350-edb4-49c9-b593-d223f7449a82
This changeset is a follow up to [56037] and ensures that the `get_header_image_tag()` function receives the benefits of `wp_get_loading_optimization_attributes()` as well. Prior to `fetchpriority` support, this was not needed since the header image should never be lazy-loaded, but the image certainly is a `fetchpriority` candidate, so therefore it is crucial to have it supported.
Props felipeelia, spacedmonkey, mukesh27, westonruter, flixos90.
Fixes#58680.
git-svn-id: https://develop.svn.wordpress.org/trunk@56142 602fd350-edb4-49c9-b593-d223f7449a82
This also removes the random compat library which is no longer necessary, and adjusts unit tests and CI workflows that no longer need to take PHP 5.6 into account.
Thank you for your service, PHP 5. Onwards!
Props SergeyBiryukov, mukesh27, dingo_d, audrasjb, jrf, costdev, azaozz, JavierCasares, hellofromTonya, samiamnot, spacedmonkey, masteradhoc, knutsp, garyjones, chanthaboune
Fixes#57345
git-svn-id: https://develop.svn.wordpress.org/trunk@56141 602fd350-edb4-49c9-b593-d223f7449a82
Casting the values to a string causes `Array to string conversion` PHP warnings, so using loose comparison restores the previous behavior for code relying on type juggling when using the `wp_list_filter()` function, e.g. comparing a numeric string to an integer.
The unit test case added for this scenario in the previous commit remains.
Follow-up to [55908], [56137].
See #57839.
git-svn-id: https://develop.svn.wordpress.org/trunk@56138 602fd350-edb4-49c9-b593-d223f7449a82
This aims to preserve backward compatibility for code relying on type juggling when using the `wp_list_filter()` function, e.g. comparing a numeric string to an integer.
Follow-up to [55908].
Props azaozz, jeremyfelt, david.binda.
See #57839.
git-svn-id: https://develop.svn.wordpress.org/trunk@56137 602fd350-edb4-49c9-b593-d223f7449a82
Previously, this function did not normalize paths before using `glob()` or registering styles. This led to a mixture of forward-slashes and back-slashes in
Windows environments.
This change uses `wp_normalize_path()` to ensure Windows compatibility.
Props wildworks, costdev, kafleg, mukesh27.
Fixes#58711.
git-svn-id: https://develop.svn.wordpress.org/trunk@56136 602fd350-edb4-49c9-b593-d223f7449a82
When saving the settings via the admin UI, the default value for any options not passed in the current `$_POST` request is set to `null` in `wp-admin/options.php`. Some options, e.g. `blog_public`, then rely on `null` being passed to `update_option()` to determine whether the value was changed or not.
This commit resolves a PHP 8.1 deprecation notice when saving the `gmt_offset` option without any changes:
{{{
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
}}}
Includes a similar fix for the `blog_charset` option.
Follow-up to [4112], [4329], [5541], [21849].
Props adi3890, dhrupo, hrdelwar, hasanmisbah, oglekler, mukesh27, SergeyBiryukov.
Fixes#57728.
git-svn-id: https://develop.svn.wordpress.org/trunk@56132 602fd350-edb4-49c9-b593-d223f7449a82
This changeset moves font styling from link element to site title (or post title) block in Marigold and Whisper style variations, which allows to change Site
Title block font size.
Props ryelle, shuvoaftab, sabernhardt, alvitazwar052, shailu25, poena, audrasjb.
Fixes#57971.
git-svn-id: https://develop.svn.wordpress.org/trunk@56131 602fd350-edb4-49c9-b593-d223f7449a82
This resolves `Undefined array key` PHP warnings when trying to access any of these values in `WP_Http_Curl::request()` or `WP_Http_Streams::request()`:
* `$parsed_args['decompress']`
* `$parsed_args['stream']`
* `$parsed_args['filename']`
Follow-up to [10410], [11236], [13274], [17555], [37428], [42766], [44346].
Props sjoerdlinders, hellofromTonya, jrf, oglekler, Clorith, SergeyBiryukov.
Fixes#52622.
git-svn-id: https://develop.svn.wordpress.org/trunk@56128 602fd350-edb4-49c9-b593-d223f7449a82
Adds the `block_core_navigation_submenu_build_css_colors` function to `wp-includes/deprecated.php`. Follow-up to #58623.
Props ramonopoly, peterwilsoncc.
See #58623.
git-svn-id: https://develop.svn.wordpress.org/trunk@56126 602fd350-edb4-49c9-b593-d223f7449a82
Enqueues the stylesheet from the commands package which holds the CSS for the Command Palette feature.
Props wildworks.
Fixes#58667.
git-svn-id: https://develop.svn.wordpress.org/trunk@56125 602fd350-edb4-49c9-b593-d223f7449a82
This avoids an `Undefined variable $checkout` PHP warning if all of the directories checked for access are disallowed due to the PHP `open_basedir` restrictions.
Follow-up to [55425].
Props jqz, costdev, audrasjb.
Fixes#58563.
git-svn-id: https://develop.svn.wordpress.org/trunk@56124 602fd350-edb4-49c9-b593-d223f7449a82
This changeset ensures scheduled posts are actually published when changing their status to "Published" using bulk edit. Also adds related unit tests.
Props siobhan, Clorith, webcommsat, cadic, oglekler, audrasjb, pavanpatil1.
Fixes#31635.
git-svn-id: https://develop.svn.wordpress.org/trunk@56123 602fd350-edb4-49c9-b593-d223f7449a82
The description of returned values in array was incorrect for `image_get_intermediate_size()`:
- `$file` returns the filename of image, no path information
- `$path` returns path relative to the uploads directory, not absolute
Props crstauf, sccr410.
Fixes#58686.
See #57840.
git-svn-id: https://develop.svn.wordpress.org/trunk@56122 602fd350-edb4-49c9-b593-d223f7449a82