48076 Commits

Author SHA1 Message Date
Jb Audras
890f982250 Help/About: Add Help text for Rollback feature.
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
2023-07-09 14:47:22 +00:00
Jb Audras
8f2c73e971 Twenty Twenty-One: Replace the experimental link color theme support.
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
2023-07-09 14:29:16 +00:00
Sergey Biryukov
a6895dff86 Coding Standards: Use strict comparison in wp-includes/class-wp-user-query.php.
Follow-up to [31669], [47808].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56169 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-09 09:57:16 +00:00
Jb Audras
e62dfe87ce Docs: Docblock correction in WP_REST_Attachments_Controller::upload_from_data().
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
2023-07-08 21:57:17 +00:00
Jb Audras
07d58c1356 Docs: Update link to MovableType docs (on Internet Archive).
Follow-up to [56165].

Props SergeyBiryukov.
Fixes #58760.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56167 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-08 13:19:31 +00:00
Sergey Biryukov
e91908aeb6 Coding Standards: Use strict comparison in wp-includes/class-wp-tax-query.php.
Follow-up to [16413], [16849].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56166 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-08 10:46:20 +00:00
Jb Audras
a357b7adc8 Docs: Update link to MovableType documentation.
Props mujuonly.
Fixes #58760.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56165 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-08 07:41:09 +00:00
Felix Arntz
96c64cd42d Media: Avoid programmatically created images within post content from incorrectly receiving fetchpriority="high".
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
2023-07-07 18:06:49 +00:00
Adam Silverstein
9781ffbca5 Revisions: return existing autosave after saving with unchanged data.
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
2023-07-07 17:51:11 +00:00
Felix Arntz
a3b80f551f Build/Test: Fix incorrect hook being used to separate Server-Timing metrics in performance tests.
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
2023-07-07 17:39:09 +00:00
Jonny Harris
2fbf610b25 Build/Test: Fix dynamic property deprecation warning in object cache drop-in.
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
2023-07-07 11:30:15 +00:00
Isabel Brison
7035b615c4 Editor: rename sync_status and move it to top level.
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
2023-07-07 07:27:53 +00:00
Isabel Brison
f47b9a2075 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the Command Palette task (#58643).

See #58745.


git-svn-id: https://develop.svn.wordpress.org/trunk@56159 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-07 07:18:46 +00:00
Sergey Biryukov
d113821dbb Coding Standards: Use strict comparison in wp-includes/class-wp-simplepie-file.php.
Follow-up to [10687].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56158 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-07 06:40:11 +00:00
John Blackbourn
a7de2a8e26 Docs: Correct the formatting of various filter documentation.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@56157 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-07 00:34:26 +00:00
John Blackbourn
82302c4ffb REST API: Correct some filter docblocks.
See #57752


git-svn-id: https://develop.svn.wordpress.org/trunk@56156 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 23:21:34 +00:00
Jb Audras
9ad2859721 Twenty Twenty: Fix left margin in Latest Posts & Latest Comments blocks.
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
2023-07-06 22:00:53 +00:00
Felix Arntz
21490c6ba4 Media: Ensure that the image widget supports loading optimization attributes.
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
2023-07-06 16:31:02 +00:00
Jb Audras
e9d0712b49 Docs: Use third-person singular verbs in various function descriptions of load.php, as per docblocks standards.
See #57840.



git-svn-id: https://develop.svn.wordpress.org/trunk@56153 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 14:15:00 +00:00
Jb Audras
d2993600fe Boostrap/Load: Incorrect condition in wp_check_php_mysql_versions().
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
2023-07-06 13:52:56 +00:00
Jb Audras
c49225f9be Coding Standards: Add missing newline at the end of wp-admin/user.php.
Follow-up to [56150].

See #58194.




git-svn-id: https://develop.svn.wordpress.org/trunk@56151 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 12:52:59 +00:00
Jb Audras
b71668fc40 Users: Remove password reset links when the feature is not allowed for a specific user.
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
2023-07-06 12:45:45 +00:00
Jb Audras
bc526d31e6 Twenty Seventeen: Reintroduce HTML5 Shiv.
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
2023-07-06 08:32:03 +00:00
Jb Audras
55ff58cf22 Twenty Thirteen: Reintroduce HTML5 Shiv.
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
2023-07-06 08:27:07 +00:00
Jb Audras
682ea41abb Twenty Fifteen: Reintroduce HTML5 Shiv.
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
2023-07-06 08:16:38 +00:00
Isabel Brison
21c74f1870 Editor: fix comment indentation.
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
2023-07-06 04:39:03 +00:00
Isabel Brison
9d141e5a5e Editor: update template titles in browse mode.
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
2023-07-06 03:02:57 +00:00
Sergey Biryukov
06c1c4f0f7 Docs: Document the return value of wp_check_php_version() using hash notation.
Follow-up to [42832].

See #57840.

git-svn-id: https://develop.svn.wordpress.org/trunk@56144 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 00:14:34 +00:00
Felix Arntz
ebd03692e6 Media: Ensure that large images before the main query loop are counted towards lazy-loading threshold.
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
2023-07-05 21:36:23 +00:00
Felix Arntz
aee525ee6f Media: Ensure custom header image tag supports loading optimization attributes.
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
2023-07-05 19:28:02 +00:00
John Blackbourn
f7dbb2462b General: Increase the minimum supported version of PHP to 7.0.0.
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
2023-07-05 17:39:55 +00:00
David Baumwald
28fa6d1a34 Default Filters: Correct hook type for wp_print_scripts and customize_controls_print_styles.
Props Cybr, bhi3315.
Fixes #58665.

git-svn-id: https://develop.svn.wordpress.org/trunk@56140 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-05 16:19:39 +00:00
Jb Audras
6e1f9dfbcd Editor: Fix font paths in iframed editor.
By making font asset files URLs absolute instead of relative, this ensures each font asset file does properly relate to the actual location of the files.

See https://github.com/WordPress/gutenberg/pull/50875.

Props ironprogrammer, antonvlasenko, ndiego, shuvo247, robinwpdeveloper.
Fixes #58672.




git-svn-id: https://develop.svn.wordpress.org/trunk@56139 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-05 12:32:52 +00:00
Sergey Biryukov
80494d2e8a General: Revert strict comparison in WP_List_Util for now.
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
2023-07-05 11:13:26 +00:00
Sergey Biryukov
c11f70878f General: Compare values as strings in WP_List_Util::filter() and ::sort_callback().
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
2023-07-05 10:44:20 +00:00
Jb Audras
c3e17e4ccb Editor: Normalize paths in register_core_block_style_handles().
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
2023-07-05 07:14:20 +00:00
Jb Audras
f83f5100ed Administration: CSS selector correction for list table checkboxes.
This replaces `.check-column .label-covers-full-cell input` selector with `.check-column .label-covers-full-cell + input`.

Follow-up to [55954].

Props sabernhardt.
Fixes #21516.




git-svn-id: https://develop.svn.wordpress.org/trunk@56135 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-05 07:06:10 +00:00
John Blackbourn
77c59ac4f1 Administration: Adjust the "No private directive present in cache control when user not logged in" test so the assertions won't fail if the headers don't contain a cache-control key at all.
Props joemcgill

Fixes #21938


git-svn-id: https://develop.svn.wordpress.org/trunk@56134 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-04 23:30:36 +00:00
Andrew Ozz
56af1e4b94 HTML API: Fix a fatal error when processing malformed document with unclosed attribute.
Props: dlh, costdev, dmsnell.
Fixes: #58637.

git-svn-id: https://develop.svn.wordpress.org/trunk@56133 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-04 20:43:43 +00:00
Sergey Biryukov
e834fed6eb Options, Meta APIs: Check if the gmt_offset value is numeric in sanitize_option().
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
2023-07-04 13:40:55 +00:00
Jb Audras
6ba1ca6ede Twenty Twenty-Three: Allow changing Site Title font size in Marigold and Whisper styles.
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
2023-07-04 13:38:56 +00:00
David Baumwald
1815f4c76c Post WordPress 6.3 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56130 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-03 17:05:33 +00:00
David Baumwald
0b4b351eac WordPress 6.3 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@56129 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-03 16:39:53 +00:00
Sergey Biryukov
94aaa2d9bc HTTP API: Declare a few default parameters in WP_Http_Curl and WP_Http_Streams.
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
2023-07-03 14:01:25 +00:00
Isabel Brison
d1f9292a14 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the site vs content editing task (#58641)

Fixes #58701.


git-svn-id: https://develop.svn.wordpress.org/trunk@56127 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-03 09:11:14 +00:00
Isabel Brison
ab9d5e3218 Editor: adds deprecation for deleted block_core_navigation_submenu_build_css_colors function.
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
2023-07-03 06:55:58 +00:00
Isabel Brison
6aaf01313a Editor: Enqueue commands package styles.
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
2023-07-03 06:48:46 +00:00
Sergey Biryukov
62b286f9b2 Upgrade/Install: Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout().
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
2023-07-02 10:33:18 +00:00
Jb Audras
e635540d1c Quick/Bulk Edit: Ensure scheduled posts are published when using Bulk Edit.
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
2023-07-02 08:02:45 +00:00
Jb Audras
7f0eb0780f Docs: Fix image_get_intermediate_size() docblock.
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
2023-07-01 23:08:43 +00:00