Commit Graph

22005 Commits

Author SHA1 Message Date
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
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
Jb Audras
c734f91a69 Twenty Seventeen: Various docblock fixes.
Props sabernhardt, audrasjb.
Fixes #58695.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56121 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-01 17:02:18 +00:00
Sergey Biryukov
1d773d4174 Docs: Correct @return description for wp_count_posts().
Add a note that `wp_count_posts()` returns an empty object if the post type passed to the function does not exist.

Follow-up to [6730], [6808], [8081], [24826], [29093], [51885].

Props crstauf, Ov3rfly.
Fixes #58685.

git-svn-id: https://develop.svn.wordpress.org/trunk@56120 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-01 10:02:05 +00:00
Weston Ruter
12b9023e2a Emoji: Give name to web worker in emoji loader and terminate when finished.
See #58472.
Follow-up to [56074], [56095].
Props westonruter, joemcgill.
Fixes #58691.


git-svn-id: https://develop.svn.wordpress.org/trunk@56119 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 20:49:57 +00:00
Jb Audras
aaebe106ad Twenty Twenty-One: Improve various globals documentation, as per docblock standards.
This changeset adds globals documentation, and also a couple Docblock standards improvements.

Props upadalavipul, audrasjb.
Fixes #58684.
See #57840.




git-svn-id: https://develop.svn.wordpress.org/trunk@56118 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 12:52:05 +00:00
Sergey Biryukov
280e720059 Site Health: Correct the label for wp-content directory check.
This removes HTML tags from the label, which were not displayed as expected due to escaping. Including the directory name in the label is also redundant, as it is already mentioned in the check result description directly below.

Includes:
* Adjusting a few other labels for consistency.
* Moving `wp-content` out of the translatable string in a similar message in `WP_Upgrader::generic_strings()`.

Follow-up to [55720].

Props dlh, mukesh27, audrasjb, SergeyBiryukov.
See #58678.

git-svn-id: https://develop.svn.wordpress.org/trunk@56117 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 11:11:13 +00:00
Jb Audras
a1a31fc473 Twenty Fourteen: Fix text color issue on Button block hover.
This fixes a text color issue when hovering Button blocks located on sidebars or widgets.

Props shailu25, sabernhardt, mukesh27.
Fixes #58509.




git-svn-id: https://develop.svn.wordpress.org/trunk@56116 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 08:54:39 +00:00
John Blackbourn
be90d79cb5 General: Ignore invalid types for the '_wp_http_referer' URL query variable.
It's expected that this query variable contains a string when it's set, but it's possible for its type to be something else such as an array. Ignoring non-string values prevents cascading errors when its value is passed through functions that expect a string.

Props xknown, costdev, jrf, azaozz

Fixes #57670


git-svn-id: https://develop.svn.wordpress.org/trunk@56115 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 23:25:38 +00:00
Felix Arntz
60b3fe7997 Media: Fix inconsistent docs for existing wp_img_tag_add_loading_attr filter and remove duplicate.
Follow-up to [56037].

Props thekt12.
See #58235.


git-svn-id: https://develop.svn.wordpress.org/trunk@56112 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 17:32:35 +00:00
Sergey Biryukov
c650864b9f Filesystem API: Define password as null if not set when using SSH2 with public/private keys.
This resolves an `Undefined array key "password"` PHP warning in `WP_Filesystem_SSH2::connect()` when using public/private key authentication, in which case providing a password is optional.

Follow-up to [8865].

Props J-Dill, costdev, ehsanakhgari, dd32.
Fixes #33196.

git-svn-id: https://develop.svn.wordpress.org/trunk@56111 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 17:03:19 +00:00
Felix Arntz
e0aaa2ac9b General: Add missing parentheses to functions referenced in _deprecated_function() calls added in 6.3.
See #58235, #58301, #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56110 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 15:31:49 +00:00
Jb Audras
8c9fffb5cc Editor: Allow Query Block to show posts from multiple selected authors.
This changeset adds handler for multiple cases where author data can be passed to the Query Block:
- array: array of author ids
- string: comma separated author ids
- integer: single author id

Props adi3890, costdev, mayur8991, oglekler.
Fixes #58426.




git-svn-id: https://develop.svn.wordpress.org/trunk@56109 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 13:28:49 +00:00
Jb Audras
644d702a23 Twenty Twenty-Two: Adjust selector to apply bottom margin to top-level comments.
This adds spacing between top-level comments, which improves the layout of the comment section.

Props pitamdey, sabernhardt, mukesh27.
Fixes #58653.




git-svn-id: https://develop.svn.wordpress.org/trunk@56108 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 07:53:04 +00:00
Jb Audras
b58eebb2a5 Upgrade/Install: Only show errors if there is nothing to update.
Previously, when the `do-plugin-upgrade` or `do-theme-upgrade` actions were accessed directly on `update-core.php`, an error message stating "Select one or 
more (plugins|themes) to update" would be shown even if there was nothing to update.

This ensures that the error message only appears when there is something to update.

Props Presskopp, sabernhardt, pbiron, afragen, zunaid321, shuvoaftab, ugyensupport, costdev.
Fixes #57999.




git-svn-id: https://develop.svn.wordpress.org/trunk@56107 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 07:19:04 +00:00
Jb Audras
239484f717 Twenty Twenty: Fix Button block text color when located in footer widgets.
This changeset ensures the Button block text color is consistent when this block is used in a footer widget.

Props mayur8991, itpathsolutions, nithins53, sabernhardt, arafatjamil01, thakordarshil, pooja1210, mukesh27, shailu25, shwetabathani2312.
Fixes #57087.




git-svn-id: https://develop.svn.wordpress.org/trunk@56106 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:57:54 +00:00
Isabel Brison
41277f1f1b REST API: updates test annotations for global styles revisions
Adds `@covers` annotations to tests and fixes incorrect spacing.

Props ramonopoly, mukesh27.
See #58524.


git-svn-id: https://develop.svn.wordpress.org/trunk@56105 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:47:43 +00:00
Jb Audras
b830d5678e Themes: Fix layout issue on the Themes page background overlay.
This changeset replaces the `780px` media query `max-width` value with `782px` for better consistency and to fix a responsive layout issue.

Props zodiac1978, ironprogrammer, orestissam, audrasjb, monzuralam.
Fixes #58164.




git-svn-id: https://develop.svn.wordpress.org/trunk@56104 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:46:40 +00:00
Jb Audras
7fa7d39c07 Twenty Sixteen: Replace deprecated unbind method with off.
This fixes a `Deprecated jQuery.fn.unbind()` notice.

Props Malae, dilipbheda, sabernhardt, audrasjb.
Fixes #58225.




git-svn-id: https://develop.svn.wordpress.org/trunk@56102 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:28:56 +00:00
Isabel Brison
d966798bfc Editor: update duotone support.
Updates duotone support after stabilisation of selectors API and adds a few small code quality and UI improvements.

Props onemaggie, peterwilsoncc, ajlende, audrasjb, mikeschroder, ramonopoly.
Fixes #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56101 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:19:41 +00:00
David Baumwald
91a95fe91c Post WordPress 6.3 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56100 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 23:26:16 +00:00
David Baumwald
e1405a5b9c WordPress 6.3 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@56099 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 22:59:40 +00:00
Bernie Reiter
f39bf114c0 Editor: Update npm packages to fix gutenberg_ prefix
Update `@wordpress/*` packages to the latest patch versions in
order to replace calls to `gutenberg_apply_colors_support` with
`wp_apply_colors_support` in order to avoid a fatal error.

Props joemcgill, spacedmonkey, flixos90, ironprogrammer, sabernhardt.
Fixes #58651.

git-svn-id: https://develop.svn.wordpress.org/trunk@56098 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 22:36:22 +00:00