Commit Graph

20515 Commits

Author SHA1 Message Date
Sergey Biryukov ddab80be2c Docs: Remove unsupported values in `plugins_api()` DocBlocks.
The `group` field and the `hot_categories` action were never actually implemented on the WordPress.org side.

Follow-up to [34596], [meta3227].

Props lopo, milana_cap.
See #55645.
Built from https://develop.svn.wordpress.org/trunk@58873


git-svn-id: http://core.svn.wordpress.org/trunk@58269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-09 00:18:16 +00:00
Sergey Biryukov 1396f6e30c Site Health: Clarify the description for `max_file_uploads` in Site Health Info.
Follow-up to [48535].

Props iflairwebtechnologies, hbhalodia, mukesh27, SergeyBiryukov.
Fixes #61814.
Built from https://develop.svn.wordpress.org/trunk@58857


git-svn-id: http://core.svn.wordpress.org/trunk@58253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-06 13:22:11 +00:00
dmsnell dc84e3d2c2 WP_Debug_Data: Extract `wp-constants` data into separate method.
This is the part two in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.

This patch separates the second of twelve groups, the `wp-constants` info,
into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7106
Discussed in https://core.trac.wordpress.org/ticket/61648

Props: apermo, costdev, dmsnell.
See #61648.

Built from https://develop.svn.wordpress.org/trunk@58855


git-svn-id: http://core.svn.wordpress.org/trunk@58251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 21:39:11 +00:00
noisysocks 3a703f86cd Media: Automatically convert HEIC images to JPEG
Automatically create a JPEG version of uploaded HEIC images if the server has
a version of Imagick that supports HEIC. Conversion is done silently through
the existing `WP_Image_Editor` infrastructure that creates multiple sizes of
uploaded images.

This allows users to view HEIC images in WP Admin and use them in their posts
and pages regardless of whether their browser supports HEIC. Browser support
for HEIC is relatively low (only Safari) while the occurrence of HEIC images is
relatively common. The original HEIC image can be downloaded via a link on
the attachment page.

Props adamsilverstein, noisysocks, swissspidy, spacedmonkey, peterwilsoncc.
Fixes #53645.

Built from https://develop.svn.wordpress.org/trunk@58849


git-svn-id: http://core.svn.wordpress.org/trunk@58245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-05 04:13:15 +00:00
Sergey Biryukov f2569d2e2d Site Health: Display raw value for `max_file_uploads` on Site Health Info screen.
This resolves a fatal error if `strict_types` PHP setting is enabled:
{{{
Argument #1 ($num) must be of type float, string given
}}}

Since the goal of the Site Health Info screen is to display raw values where possible, the `number_format()` call here does not seem to provide any benefit.

Props krishneup, sabernhardt, audrasjb, SergeyBiryukov.
Fixes #60364.
Built from https://develop.svn.wordpress.org/trunk@58847


git-svn-id: http://core.svn.wordpress.org/trunk@58243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-04 22:03:17 +00:00
Sergey Biryukov c78101d432 Site Health: Improve the wording for PHP version check.
This aims to make the message more accurate by referring to the version of PHP currently recommended by WordPress, not the current version of PHP.

Follow-up to [44986], [46267], [47254].

Props swb1192, psykro, swissspidy, joemcgill, mukesh27, aristath.
See #61623.
Built from https://develop.svn.wordpress.org/trunk@58832


git-svn-id: http://core.svn.wordpress.org/trunk@58228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-30 12:25:16 +00:00
dmsnell faacd44911 WP_Debug_Data: Extract `wp-filesystem` data into separate method.
This is the first part in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.

This patch separates the first of twelve groups, the `wp-filesystem` info,
into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7065
Discussed in https://core.trac.wordpress.org/ticket/61648

Props: afragen, apermo, costdev, dmsnell.
See #61648.

Built from https://develop.svn.wordpress.org/trunk@58830


git-svn-id: http://core.svn.wordpress.org/trunk@58226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-29 18:22:12 +00:00
Peter Wilson 8e77c7711e Application Passwords: Open documentation link in same window.
Removes the `target` to to documentation for [https://developer.wordpress.org/apis/wp-config-php/#wp-environment-type setting the environment type] for applications passwords so the tabs open in the same window.

This follows [58137] which added a confirmation prompt for users navigating away from the profile edit screen if they have changed data without saving it.

Props sabernhardt, joedolson.
Fixes #60100.


Built from https://develop.svn.wordpress.org/trunk@58820


git-svn-id: http://core.svn.wordpress.org/trunk@58216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-27 23:06:17 +00:00
Peter Wilson dd21bf5f22 General: Introduce `wp_get_wp_version()` to get unmodified version.
Introduces `wp_get_wp_version()` to get an unmodified value of `$wp_version` from `wp-includes/version.php`. Some plugins modify the global in an attempt to improve security through obscurity. This practice can cause errors in WordPress so the ability to get an unmodified version is needed.

Replaces instances within the code base in which `version.php` was required in order to get an unmodified value. `script-loader.php` is intentionally excluded from the replacements as the function is not always available to the file.

Props debarghyabanerjee, afragen, costdev.
See #61627.


Built from https://develop.svn.wordpress.org/trunk@58813


git-svn-id: http://core.svn.wordpress.org/trunk@58209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-27 00:27:16 +00:00
Peter Wilson db0c2dacbf General: Update English Gravatar links.
Replace links to en.gravatar.com with links to gravatar.com as the english site now uses the base domain. This avoids an unnecessary redirect for english language sites.

The links remain translatable for non-english versions of WordPress.

Props narenin, knutsp.
Fixes #61424.

Built from https://develop.svn.wordpress.org/trunk@58810


git-svn-id: http://core.svn.wordpress.org/trunk@58206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-25 22:40:09 +00:00
hellofromTonya 7c1295fdb9 Customize: Sanitize autofocus URL parameter as an array.
[58069] introduced calling `sanitize_text_field()` with `$_REQUEST['autofocus']` (which is an array) and setting its default to a `string`. This fix restores the `array` data type for `autofocus`.

The fix also relocates the unsplash for `url`, `return`, and `autofocus` before sanitizing.

Follow-up to [58069], [34269], [29026], [21028].

Props jamesros161, swissspidy, dlh, audrasjb, hellofromTonya, ironprogrammer.
Fixes #61561.
Built from https://develop.svn.wordpress.org/trunk@58804


git-svn-id: http://core.svn.wordpress.org/trunk@58200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 16:23:17 +00:00
Sergey Biryukov aeb2fc3083 I18N: Correctly output the `None` translatable strings.
Includes updating the context to match the pre-existing block editor translations.

Follow-up to [58284].

Props sabernhardt, Marius84.
Fixes #61714.
Built from https://develop.svn.wordpress.org/trunk@58774


git-svn-id: http://core.svn.wordpress.org/trunk@58176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-21 18:58:16 +00:00
joedolson 46485f9db4 Editor: Limit scope of resizable menu container CSS.
The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.

Props neotrope, sabernhardt, joedolson.
Fixes #61662.
Built from https://develop.svn.wordpress.org/trunk@58747


git-svn-id: http://core.svn.wordpress.org/trunk@58149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 23:37:16 +00:00
Sergey Biryukov 51d8a8ea62 Docs: Add missing description for the `display_rows()` method in list table classes.
Follow-up to [15491], [17002], [27301].

Props nikitasolanki1812, narenin, mukesh27, dd32, SergeyBiryukov.
Fixes #61670.
Built from https://develop.svn.wordpress.org/trunk@58745


git-svn-id: http://core.svn.wordpress.org/trunk@58147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 15:43:15 +00:00
davidbaumwald 4538fa7498 Upgrade/Install: Update the `$_old_files` array for 6.6.
Props dd32, audrasjb, hellofromTonya.
Fixes #61665.
Built from https://develop.svn.wordpress.org/trunk@58744


git-svn-id: http://core.svn.wordpress.org/trunk@58146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 13:35:15 +00:00
Sergey Biryukov f091afc696 Site Health: Correctly display auto-update status for parent theme.
Follow-up to [47835], [48731].

Props apermo.
Fixes #61649. See #61648.
Built from https://develop.svn.wordpress.org/trunk@58716


git-svn-id: http://core.svn.wordpress.org/trunk@58118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-14 03:47:16 +00:00
ellatrix 5e060bc838 Section Styles: Prevent flash of variation style updates.
This is fixed by preloading the styles.

Fixes #61589.
Fixes https://github.com/WordPress/wordpress-develop/pull/6989.
See https://github.com/WordPress/gutenberg/pull/63172.

Props aaronrobertshaw, andrewserong, ramonopoly.


Built from https://develop.svn.wordpress.org/trunk@58690


git-svn-id: http://core.svn.wordpress.org/trunk@58092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-09 10:02:21 +00:00
Sergey Biryukov 11fb201256 Code Modernization: Remove obsolete comments about older PHP versions.
This commit:
* Removes various comments referencing PHP versions which are no longer supported.
* Removes various comments containing “hints” of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons, so have no value:
 * Even though a function could be turned into a closure, removing the function would be a backward compatibility break which is not acceptable, so this suggestion is not actionable.
 * Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase.

Follow-up to [1243/tests], [6543], [11816], [29861], [29864], [34928], [35369], [36698], [38694], [50786], [58678].

Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58682


git-svn-id: http://core.svn.wordpress.org/trunk@58084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 14:54:16 +00:00
Sergey Biryukov 6ff382af63 Code Modernization: Remove obsolete code targeting PHP < 7.2.24.
Follow-up to [44488], [45262], [53426], [57985].

Props ayeshrajans, jrf.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58678


git-svn-id: http://core.svn.wordpress.org/trunk@58080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 10:12:16 +00:00
desrosj 2d64abf8a7 Docs: Update AJAX in Plugins HelpHub link to avoid unnecessary redirection.
Follow-up to [17045], [20713], [41065], [45674], [55412], [57854], [58131], [58132].

Props shailu25.
See #60732, #60699.
Built from https://develop.svn.wordpress.org/trunk@58672


git-svn-id: http://core.svn.wordpress.org/trunk@58074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 11:22:13 +00:00
Peter Wilson 876374d3e9 Help/About: Update performance improvements string.
Updates the performance improvements string with the finalized percentage improvement in the editor and to improve styling and language consistency.

Props ryelle, annezazu, peterwilsoncc.
Fixes #61320.

Built from https://develop.svn.wordpress.org/trunk@58671


git-svn-id: http://core.svn.wordpress.org/trunk@58073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 04:20:19 +00:00
ryelle b048f2a054 Help/About: Add images to the About page.
The images have been uploaded to the w.org CDN and added into the About page. Additionally, the link to the release page has been fixed, and an extra translator note about the escaped percent sign has been added.

Follow-up to [58568].

Props ryelle, joen.
See #61320.


Built from https://develop.svn.wordpress.org/trunk@58618


git-svn-id: http://core.svn.wordpress.org/trunk@58051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 15:15:18 +00:00
costdev bc86b48d56 Plugins: Remove extra paragraph from plugin row dependency notice.
In `WP_Plugins_List_Table::add_dependencies_to_dependent_plugin_row()`, a `sprintf()` call previously wrapped the `%2$s` placeholder in paragraph tags.

[57769] changed the placeholder's value to use `wp_get_admin_notice()`, which returns a paragraph-wrapped notice by default. As a result, the previous paragraph tags produced an extra, empty paragraph.

This removes the paragraph tags around the `%2$s` placeholder.

Follow-up to [57545], [57714], [57769].

Props mukesh27.
Fixes #61546.
Built from https://develop.svn.wordpress.org/trunk@58616


git-svn-id: http://core.svn.wordpress.org/trunk@58049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 11:52:23 +00:00
desrosj c1d1be9745 Build/Test Tools: Revert `uglify-js` update.
This partially reverts [58563], which applied an update of the `uglify-js` `devDependency` from `3.17.4` to `3.18.0`.

The `3.18.0` update is causing some JavaScript errors in the `media-views.min.js` file, so needs to be investigated further.

Props david.binda, mukesh27, alshakero.
Fies #61519.
Built from https://develop.svn.wordpress.org/trunk@58585


git-svn-id: http://core.svn.wordpress.org/trunk@58032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-27 12:55:22 +00:00
Sergey Biryukov c15614f3cb Users: Restore spacing between the messages on Edit User screen.
Includes restoring paragraph tags for “User updated” and “← Go to Users” messages, so that the arrow is not on the same line as the previous message.

Follow-up to [56570].

Props Presskopp, narenin, swissspidy, SergeyBiryukov.
Fixes #61506.
Built from https://develop.svn.wordpress.org/trunk@58581


git-svn-id: http://core.svn.wordpress.org/trunk@58028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 15:23:14 +00:00
Aaron Jorbin 02ffbdb479 Media: unfix admin image cropping calculations.
[58456] introduced some failures to the automated test system that indicate this fix is incomplete.

See #32282.
Props hellofromtonya, audrasjb, andrewserong, kevin940726, oglekler.

Built from https://develop.svn.wordpress.org/trunk@58571


git-svn-id: http://core.svn.wordpress.org/trunk@58019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 15:32:16 +00:00
ryelle 53cb6c903b Help/About: Update the About page for 6.6.
Introducing the new content for the 6.6 About page. This release, the About page will have just the highlights for 6.6, and link off to the release page on WordPress.org for the full overview.

See #61320, https://github.com/WordPress/gutenberg/issues/62631.
Props ryelle, andrewserong, annezazu, joen, beafialho, richtabor, kristastevens, marybaum, cbringmann, DanSoschin, youknowriad.


Built from https://develop.svn.wordpress.org/trunk@58568


git-svn-id: http://core.svn.wordpress.org/trunk@58016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:59:14 +00:00
desrosj a9bc14866c Build/Test Tools: Run `grunt precommit:css`.
This rebuilds compiled CSS files after updating the `caniuse` database in [58563].

All `-webkit-clip-path` properties have been removed as the corresponding browsers dipped below 1% usage and have fallen out of the browser support policy.

Fixes #61499.
Built from https://develop.svn.wordpress.org/trunk@58567


git-svn-id: http://core.svn.wordpress.org/trunk@58015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:56:17 +00:00
audrasjb 01a0462229 Coding Standards: Fix WPCS issue found after [58564].
Unprops audrasjb.
See #61153.



Built from https://develop.svn.wordpress.org/trunk@58566


git-svn-id: http://core.svn.wordpress.org/trunk@58014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:54:14 +00:00
audrasjb d56f24e6db Help/About: Update some help text in the admin area.
This takes into account the changes from #47125 and updates the related Help Tabs content accordingly.

Follow-up to [56515].

Props johnbillion, renishsurani, faisal03, shailu25, sumitbagthariya16, Ankit-K-Gupta, oglekler, rajinsharwar, hmbashar, huzaifaalmesbah.
Fixes #61153.



Built from https://develop.svn.wordpress.org/trunk@58564


git-svn-id: http://core.svn.wordpress.org/trunk@58012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:34:19 +00:00
desrosj 99dfd1ca08 Build/Test Tools: Update npm `devDependencies` 6.6.
This updates the npm `devDependencies` for Core to their latest versions, with one exception. The latest version of `sinon` causes some test failures and requires more investigation.

Fixes #61498.
Built from https://develop.svn.wordpress.org/trunk@58563


git-svn-id: http://core.svn.wordpress.org/trunk@58011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:05:27 +00:00
audrasjb c8ea512ba4 Docs: Fix apostrophe usage in `wp-admin/includes/class-wp-list-table.php`.
Props truptikanzariya, mukesh27.
Fixes 61490.
See 60699.



Built from https://develop.svn.wordpress.org/trunk@58560


git-svn-id: http://core.svn.wordpress.org/trunk@58008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 08:59:21 +00:00
Sergey Biryukov 1925595cd8 Networks and Sites: Exit after `wp_redirect()` in `wp-admin/ms-options.php`.
This brings more consistency with the other files having the same pattern:

* `wp-admin/moderation.php`
* `wp-admin/ms-admin.php`
* `wp-admin/ms-edit.php`
* `wp-admin/ms-sites.php`
* `wp-admin/ms-themes.php`
* `wp-admin/ms-upgrade-network.php`
* `wp-admin/ms-users.php`

Follow-up to [15481], [16847].

Props jigar-bhanushali, jorbin, johnbillion, Presskopp, rajinsharwar, audrasjb, SergeyBiryukov.
Fixes #60926.
Built from https://develop.svn.wordpress.org/trunk@58460


git-svn-id: http://core.svn.wordpress.org/trunk@57909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-22 11:47:16 +00:00
joedolson 9360266c51 Media: Fix implicit conversion from float to int in image cropping.
Cast crop values to integers to prevent PHP error caused by implicit conversion from `float` to `int` values when cropping images using ImageMagick.

Props skithund, mai21, nicomollet, amanias1977, joedolson.
Fixes #59782.
Built from https://develop.svn.wordpress.org/trunk@58457


git-svn-id: http://core.svn.wordpress.org/trunk@57906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 20:37:11 +00:00
joedolson 10bccbd392 Media: Fix admin image cropping calculations.
The admin image editor crop function introduced rounding errors by using a scaled image to calculate values. Fix uses the image at 100% scale for calculations. Also avoid recalculating selection when the selection position is changed, and prevent incorrect values after scaling or restoration.

Props Jossnaz, johnillo, shailu25, rachelbaker, sudipatel007, joedolson.
Fixes #32282.
Built from https://develop.svn.wordpress.org/trunk@58456


git-svn-id: http://core.svn.wordpress.org/trunk@57905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 19:51:15 +00:00
joedolson 53a0d9e498 Administration: A11y: Add `role="alert"` on JS injected admin notices.
Add the attribute `role="alert"` on 12 instances of admin notices that are injected into the DOM using JavaScript. The `role="alert"` attribute allows screen readers to recognize the addition to the DOM and announce the errors to users.

Props afercia, cyrus11, rcreators, joedolson.
Fixes #47111.
Built from https://develop.svn.wordpress.org/trunk@58455


git-svn-id: http://core.svn.wordpress.org/trunk@57904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 18:17:14 +00:00
joedolson 026c9a8585 Administration: A11y: Use `aria-haspopup` only if item has popup behavior.
Update behavior of admin menu so that the `aria-haspopup` attribute is only applied in responsive mode, when there is a popup behavior present. Add `aria-expanded` attributes to report current popup state.

Props afercia, khokansardar, ryokuhi, joedolson.
Fixes #43095.
Built from https://develop.svn.wordpress.org/trunk@58449


git-svn-id: http://core.svn.wordpress.org/trunk@57898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 19:41:15 +00:00
Sergey Biryukov f4989bdf32 Plugins: Correct plugin card layout when incompatible plugin message is displayed.
This replaces an erroneous `printf()` call with `sprintf()` that was missed when updating this fragment to use `wp_admin_notice()`.

Follow-up to [56571].

Props wojtekn, sabernhardt, rajinsharwar.
Fixes #61465.
Built from https://develop.svn.wordpress.org/trunk@58446


git-svn-id: http://core.svn.wordpress.org/trunk@57895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 15:32:11 +00:00
costdev 6b458a50bf Upgrade/Install: Disable maintenance mode when core auto-update fails.
In [58128], additional maintenance mode calls were added to the automatic updates process. However, there is an early return if a 'core' automatic update fails.

Maintenance mode isn't disabled until later in the `WP_Automatic_Updater::update()` method. This means that maintenance mode may continue to be enabled despite the core update being treated as a skipped update.

This disables maintenance mode before the early return.

Follow-up to [58128].

Props costdev, hellofromTonya, peterwilsoncc.
Fixes #61459. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58436


git-svn-id: http://core.svn.wordpress.org/trunk@57885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:41:05 +00:00
costdev 09848f0151 Upgrade/Install: Delay automatic updates after installation.
After installation, the user is directed to the `Log In` page. This triggers the `wp_schedule_update_checks()` function which is hooked to `init` and schedules updates to run immediately if no other events exist. As a result of more robust use of maintenance mode for automatic updates added in [58128], the user may be presented with a maintenance mode screen just after installing WordPress.

To improve the user experience, this schedules core updates for 1 hour, plugin updates for 1.5 hours, and theme updates for 2 hours after installation.

Follow-up to [58128], [58139], [58308], [58309].

Props afragen, hellofromTonya, peterwilsoncc, nithi22, dd32.
Fixes #61457. See #58281, #61391.
Built from https://develop.svn.wordpress.org/trunk@58435


git-svn-id: http://core.svn.wordpress.org/trunk@57884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:39:11 +00:00
hellofromTonya aaffdcd671 Site Health: Bump the recommended MariaDB version.
MariaDB 10.4 reaches EOL (“End of Life”) on 18 June 2024. The recommended minimum is bumped to 10.5 for now, whose EOL is 24 June 2025.

Also removes the skip in tests to allow the tests to run on all branches with this change.

References:
* [https://mariadb.org/about/#maintenance-policy MySQL Support Policies]
* [https://make.wordpress.org/hosting/handbook/server-environment/#database Hosting team handbook: Server Environment: Database]

Follow-up to [55665], [52420], [53435], [54069], [54076].

Props peterwilsoncc, dd32, costdev, mukesh27, hellofromTonya.
Fixes #61458.
See #meta7679.
Built from https://develop.svn.wordpress.org/trunk@58432


git-svn-id: http://core.svn.wordpress.org/trunk@57881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 11:59:14 +00:00
hellofromTonya f8b436bb20 Code Modernization: Fix 'ping_sites' non-nullable deprecation.
When saving options from the Settings page, include the `'ping_sites'` option in the allowed "writing" options list only when the `'blog_public'` option is `'1'`.

Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `sanitize_option()` ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php?annotate=blame#L4952 which happens when here] as part of [22255]):

{{{
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../wp-includes/formatting.php
}}}

**Explanation**

[https://developer.wordpress.org/apis/options/#writing Per the documentation], the `ping_sites` option requires the `'blog_public'` option to have a value of `'1'` and must be a `string` data type. `null` is not valid for this option.

The relationship between the 2 options shows itself in the `options-writing.php` code ([https://core.trac.wordpress.org/browser/tags/6.5.4/src/wp-admin/options-writing.php#L233 shown here] and in [4326]), as the `textarea#ping_sites` only renders when `'1' === get_option( 'blog_public' )`.

**What happens if `'blog_public'` is not `'1'`?**

The `'ping_sites'` option will not be a field on the page. Upon saving:

* HTTP POST (`$_POST`) does not include `'ping_sites'`. 
* Before this commit:
   * The [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/options.php#L333 option's value was set to] `null` before being passed to `update_option()`. 
   * `update_option()` invokes `sanitize_option()`.
   * A `null` value for the `'ping_sites'` case was passed to `explode()`, which threw a deprecation notice on PHP 8.1 and above.
* With this commit, the `'ping_sites'` option is no longer included in the allow list and thus will not be passed to `update_options()` > `sanitize_option()` > `explode()`.

Follow-up to [22255], [12825], [4326], [949].

Props kitchin, SergeyBiryukov, swissspidy, devmuhib, rajinsharwar, hellofromTonya.
Fixes #59818.
Built from https://develop.svn.wordpress.org/trunk@58425


git-svn-id: http://core.svn.wordpress.org/trunk@57874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 18:03:13 +00:00
Sergey Biryukov 616c656c96 Docs: Add missing description for a few globals in the admin.
This affects:

* `$post_type`
* `$post_type_object`
* `$taxonomy`
* `$title`
* `$wp_meta_boxes`

Follow-up to [31121], [32642], [32643], [37890], [43815], [44244], [45742], [53060], [53061], [54831].

Props shub07, 1naveengiri, sabernhardt, SergeyBiryukov.
Fixes #59561.
Built from https://develop.svn.wordpress.org/trunk@58419


git-svn-id: http://core.svn.wordpress.org/trunk@57868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-15 12:34:13 +00:00
Joe McGill 3f8fb3f8c1 Options: Fix some default autoload values used in core.
This fixes some autoload values that were updated in [58105] that used the database values of `"on"` and `"off"` instead of the boolean values `true` and `false` when being passed to `add|update_option()`.

Props joemcgill, desrosj, rajinsharwar.
Fixes #61045. See #42441.

Built from https://develop.svn.wordpress.org/trunk@58416


git-svn-id: http://core.svn.wordpress.org/trunk@57865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 15:21:10 +00:00
Pascal Birchler 80c53d4b8e Quick/Bulk Edit: Further adjust label width for translations. after [58325]
Props zodiac1978.
Fixes #60851.
Built from https://develop.svn.wordpress.org/trunk@58411


git-svn-id: http://core.svn.wordpress.org/trunk@57860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 21:38:12 +00:00
hellofromTonya b5ec907fb0 Code Modernization: Use wp_trigger_error() instead of trigger_error().
Replaces `trigger_error()` with `wp_trigger_error()`.

The usage of `wp_trigger_error()` avoids generating `E_USER` family errors unless `WP_DEBUG` is on. In doing so, users should not see these messages in normal production.

Notes:
* Removes `E_USER_NOTICE` when passed as an argumnent, as it's the default error level.
* An empty string is passed for the function name when its name is already in the error message or does not add value to the error message.
* Externally maintained libraries are not included.

Follow-up to [55204], [25956], [29630], [38883], [52062], [52049], [54272], [38883], [55245], [51599], [14452], [38883], [24976].

Props prasadkarmalkar, rajinsharwar, thelovekesh, hellofromTonya, swissspidy. 
Fixes #59652.
Built from https://develop.svn.wordpress.org/trunk@58409


git-svn-id: http://core.svn.wordpress.org/trunk@57858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 20:50:14 +00:00
desrosj 2889f4d90e Coding Standards: Apply changes after running `composer format`.
This applies several formatting related changes made while running `composer format`.

Follow up to [55720], [58171], [58271], [58282], [58283], [58292], [58299], [58303], [58332].
See #51857, #60719, #60895, #61021, #61118, #61228, #61276, #61324.
Built from https://develop.svn.wordpress.org/trunk@58408


git-svn-id: http://core.svn.wordpress.org/trunk@57857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 15:06:07 +00:00
desrosj 8b91147c35 Posts/Post Types: Display the correct message when post status is filtered on save.
This prevents the display of an inaccurate message when the `wp_insert_post_data` filter is used to change the status of a post while saving. This bug was only present when using the Classic Editor.

The previous code incorrectly assumed that a filter would never change a post’s status to `draft`, resulting in a “Post published.” message instead of “Post draft updated.”.

Props freibergergarcia, sirzooro, hakre, blepoxp, scribu, kawauso.
Fixes #11207.
Built from https://develop.svn.wordpress.org/trunk@58406


git-svn-id: http://core.svn.wordpress.org/trunk@57855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 14:46:08 +00:00
joedolson 4d68eaaa45 Administration: A11y: Add visible labels in theme UI.
Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress.

Also crediting all contributors to ticket #61389, which this also closes.

Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1.
Fixes #40331, #61389.
Built from https://develop.svn.wordpress.org/trunk@58405


git-svn-id: http://core.svn.wordpress.org/trunk@57854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:57:10 +00:00
hellofromTonya d71d3ac0fe Plugins: Remove unassigned sprintf in wp_get_plugin_action_button().
Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie.

The actual used code is assigned a wee bit lower in the function within the `install` case.

Follow-up to [57545].

Props hellofromTonya, costdev, rajinsharwar.
Fixes #61420.
Built from https://develop.svn.wordpress.org/trunk@58402


git-svn-id: http://core.svn.wordpress.org/trunk@57851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:27:14 +00:00