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.
Built from https://develop.svn.wordpress.org/trunk@56170
git-svn-id: http://core.svn.wordpress.org/trunk@55682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56164
git-svn-id: http://core.svn.wordpress.org/trunk@55676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56163
git-svn-id: http://core.svn.wordpress.org/trunk@55675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56162
git-svn-id: http://core.svn.wordpress.org/trunk@55674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56161
git-svn-id: http://core.svn.wordpress.org/trunk@55673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56155
git-svn-id: http://core.svn.wordpress.org/trunk@55667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56154
git-svn-id: http://core.svn.wordpress.org/trunk@55666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56152
git-svn-id: http://core.svn.wordpress.org/trunk@55664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56150
git-svn-id: http://core.svn.wordpress.org/trunk@55662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56149
git-svn-id: http://core.svn.wordpress.org/trunk@55661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56143
git-svn-id: http://core.svn.wordpress.org/trunk@55655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56142
git-svn-id: http://core.svn.wordpress.org/trunk@55654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Built from https://develop.svn.wordpress.org/trunk@56141
git-svn-id: http://core.svn.wordpress.org/trunk@55653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56138
git-svn-id: http://core.svn.wordpress.org/trunk@55650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56137
git-svn-id: http://core.svn.wordpress.org/trunk@55649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56136
git-svn-id: http://core.svn.wordpress.org/trunk@55648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56132
git-svn-id: http://core.svn.wordpress.org/trunk@55644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56131
git-svn-id: http://core.svn.wordpress.org/trunk@55643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56128
git-svn-id: http://core.svn.wordpress.org/trunk@55640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56124
git-svn-id: http://core.svn.wordpress.org/trunk@55636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56123
git-svn-id: http://core.svn.wordpress.org/trunk@55635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@56122
git-svn-id: http://core.svn.wordpress.org/trunk@55634 1a063a9b-81f0-0310-95a4-ce76da25c4cd