Commit Graph

20624 Commits

Author SHA1 Message Date
Sergey Biryukov 4b49b0d168 Site Health: Correct the check for disk space available to safely perform updates.
The `wp-content/upgrade` directory does not exist initially after installation, so the Site Health check could not determine the available disk space until the directory was subsequently created during an update.

By testing `WP_CONTENT_DIR` instead, the check can complete successfully.

This also brings consistency with similar checks in `_unzip_file_ziparchive()` and `_unzip_file_pclzip()`.

Follow-up to [55720], [56401].

Props wbdv, khokansardar, mi5t4n, SergeyBiryukov.
Fixes #61602.
Built from https://develop.svn.wordpress.org/trunk@58913


git-svn-id: http://core.svn.wordpress.org/trunk@58309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-19 15:21:14 +00:00
Sergey Biryukov 8efc6e1807 Script Loader: Check if `error_reporting()` exists in `load-(scripts|styles).php`.
This avoids a fatal error on PHP 8 if `error_reporting()` is disabled in `php.ini`.

On systems with this function disabled, it's best to add a dummy function to the `wp-config.php` file, as there are multiple other calls in core or plugins.

However, as this call to the function is run prior to `wp-config.php` loading, it is now wrapped in a `function_exists()` check.

Follow-up to [50447].

Props gansbrest, sabernhardt, jrf, martin.krcho, SergeyBiryukov.
Fixes #61873.
Built from https://develop.svn.wordpress.org/trunk@58905


git-svn-id: http://core.svn.wordpress.org/trunk@58301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-16 14:29:15 +00:00
Mamaduka bfcd875946 Editor: Fix preloaded REST API paths
When providing an incorrect path to preload, the `rest_preload_api_request` will silently fail, and nothing will be preloaded.

* Fix typo for `wp_template_part` post type preload path for the Site Editor.
* Do not preload the `wp_block` post type for post editors. The endpoint doesn't support unbound queries, and the data is no longer needed during editor initialization.

Props kirasong, tyxla, mamaduka.
Fixes #61884.
Built from https://develop.svn.wordpress.org/trunk@58904


git-svn-id: http://core.svn.wordpress.org/trunk@58300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-16 06:23:17 +00:00
Sergey Biryukov 87ec4292ae Network Admin: Improve button alignment in Right Now dashboard widget.
Follow-up to [16237].

Props sabernhardt.
Fixes #61869.
Built from https://develop.svn.wordpress.org/trunk@58895


git-svn-id: http://core.svn.wordpress.org/trunk@58291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-14 16:05:18 +00:00
Peter Wilson c1af99e7e6 Bulk/Quick Edit: Remove duplicate HTML IDs from post list tables.
Removes duplicate IDs on the post list admin pages affecting various list items, selects and checkboxes:

* JavaScript duplication of the inline editing HTML for bulk editing renames various IDs to include the prefix `bulk-edit-`,
* IDs in the Category Checkbox Walker make use of `wp_unique_prefixed_id()` to avoid duplicates, resulting in a numeric suffix, and,
* the post parent dropdown for the bulk editor is given a custom ID `bulk_edit_post_parent`.

Props peterwilsoncc, sergeybiryukov, azaozz, joedolson, siliconforks, zodiac1978, rcreators.
Fixes #61014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-13 23:37:16 +00:00
Sergey Biryukov 0058fa9195 Coding Standards: Bring some consistency to setting up comment moderation links.
Follow-up to [7082], [7175], [9103], [10102], [11749], [12008], [12286], [32516].

Props kebbet.
See #61607.
Built from https://develop.svn.wordpress.org/trunk@58888


git-svn-id: http://core.svn.wordpress.org/trunk@58284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 21:28:13 +00:00
Peter Wilson 8fa1b1d696 Site Health: Check if directories exist before checking size.
Prevents the Site Health Debug tab from stalling when reporting directory sizes if the directory does not exist.

Props clorith, aristath, narenin, kowsar89, hellofromTonya, ironprogrammer, shailu25.
Fixes #61638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-12 04:54:15 +00:00
Sergey Biryukov a596bd6848 Docs: Switch canonical location for the `comment_row_actions` filter.
This aims to bring consistency with the other `*_row_actions` filters.

Follow-up to [6705], [8217], [9103], [15491], [26138], [27669].

See #61608.
Built from https://develop.svn.wordpress.org/trunk@58883


git-svn-id: http://core.svn.wordpress.org/trunk@58279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-11 21:10:13 +00:00
Sergey Biryukov 8a164c4d9c Administration: Replace contracted verb forms for better consistency.
Follow-up to [14951], [37221], [52979], [52978], [55977].

Props kebbet, sabernhardt.
Fixes #58639.
Built from https://develop.svn.wordpress.org/trunk@58879


git-svn-id: http://core.svn.wordpress.org/trunk@58275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-08-10 23:02:06 +00:00
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
Adam Silverstein bf41fcb7ec Networks and sites: use get_allowed_mime_types to populate multisite’s upload_filetypes.
Ensure new multisite installs are up to date with the current mime types supported in core.

Note that this will only affect newly created networks, since this is only used to populate the schema for new networks, not change the allowed mime types for existing networks

Props spacedmonkey, costdev, pavanpatil1, joemcgill, rajinsharwar, tb1909.
Fixes #53167.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 10:00:11 +00:00
hellofromTonya 4cbe355f0b Plugins: Ensure wp_get_plugin_action_button() returns a string.
[57545] introduced `wp_get_plugin_action_button()`. This function is documented to return a `string`. However, if the user does not have the appropriate capabilities, it returned `void`, which is unexpected.

Resolves the issue by moving the `return $button` to the bottom of the function to ensure it always returns a `string` type. On success, the button's HTML string is returned; else, an empty string is returned.

Unit tests are included.

Follow-up to [57545].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 18:17:13 +00:00
Sergey Biryukov 6e3516b1b6 Administration: Remove redundant type casting in `WP_List_Table::search_box()`.
Scalar values passed to `esc_attr()` are already converted internally to a string via both `wp_check_invalid_utf8()` and `_wp_specialchars()`.

Includes adding `@covers` tags for unit tests.

Follow-up to [58379].

See #58379.
Built from https://develop.svn.wordpress.org/trunk@58389


git-svn-id: http://core.svn.wordpress.org/trunk@57838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 12:38:14 +00:00
audrasjb 8faf5b618a Login and Registration: Make the `wp-login.php` form padding more consistent.
This changeset removes the extra `padding-bottom` to the login form located in `wp-login.php`.

Props deeppatel8950, meetmehta1205, audrasjb, webcommsat, dhrumilk.
Fixes #61013.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 06:41:13 +00:00
Peter Wilson fb00a36d1f Administration: Prevent an orderby array throwing a notice.
Prevent `WP_List_Table::search_box()` from throwing an array to string conversion notice when post list tables are loaded with an array of orderby parameters in the URL, eg: `/wp-admin/edit.php?post_type=page&orderby[menu_order]=ASC&orderby[title]=ASC`.

Follow up to [29027].

Props leonidasmilossis, rajinsharwar, swissspidy, NomNom99, pls78, SergeyBiryukov.
Fixes #59494.
See #17065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 02:14:16 +00:00
audrasjb 5a9b7f8c62 Quick/Bulk Edit: Remove the `iedit` class from the row selector in `common.js`.
This changeset fixes an issue where the "Bulk select" option was getting selected when only a single user, comment, media, or plugin was selected.

Follow-up to [57745].

Props haritpanchal, swissspidy, sabernhardt, faisal03, sumitbagthariya16, mohitdadhich10.
Fixes #61168.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 21:52:15 +00:00
Sergey Biryukov 139c2aaf45 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-list-table.php`.
Follow-up to [3724], [5575], [15642], [17202].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@58374


git-svn-id: http://core.svn.wordpress.org/trunk@57823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 16:47:18 +00:00
Sergey Biryukov 2aadbaa814 Docs: Correct DocBlock formatting for `activate_tinymce_for_media_description`.
Follow-up to [58372].

See #60158.
Built from https://develop.svn.wordpress.org/trunk@58373


git-svn-id: http://core.svn.wordpress.org/trunk@57822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 22:53:14 +00:00
joedolson b9cd68854f Media: Accessibility: Add filter for TinyMCE in media descriptions.
Add a filter to enable TinyMCE in the media description textarea on the attachment details screen.

The media description field may be used to provide extended descriptions of images and videos, such as a transcript or detailed graphic explanations. In these uses, it will generally require structural elements like paragraphs. Having the ability to enable TinyMCE makes it easier for users to add this content without HTML knowledge.

Props juliemoynat, sebastienserre, mukesh27, joedolson.
Fixes #60158.
Built from https://develop.svn.wordpress.org/trunk@58372


git-svn-id: http://core.svn.wordpress.org/trunk@57821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 14:32:14 +00:00
Sergey Biryukov f6e876199a Coding Standards: Use strict comparison in `wp-admin/includes/post.php`.
Follow-up to [2718], [7103], [7338], [8857], [9036], [9103], [11807], [11908], [15315], [16901], [17078], [23725], [23735], [44141], [45583].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@58360


git-svn-id: http://core.svn.wordpress.org/trunk@57809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-07 12:29:15 +00:00
Joe McGill 9200aad73c Site Health: Ensure each alloptions value is serialized.
This adds additional hardening to the Autoload options Health Check to avoid potential bugs when extenders return unserialzed values from `wp_load_alloptions()`.

Follow-up to [58332].

Props mukesh27, joemcgill, westonruter.
Fixes #61276.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 19:34:16 +00:00
Joe McGill b61bce3b08 Site Health: Add test for large autoloaded options.
This adds a new Site Health check that will alert site owners if they are autoloading a large amount of data from the options table, as it could result in poor performance. The issue will be shown if the size of autoloaded options is greater than 800 KB, which can be adjusted using the new `site_status_autoloaded_options_size_limit` filter.

Props mukesh27, joemcgill, rajinsharwar, costdev, audrasjb, krupajnanda, pooja1210, Ankit K Gupta, johnbillion, oglekler.
Fixes #61276.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 14:09:16 +00:00
Pascal Birchler 387a7a8ffd Quick/Bulk Edit: Adjust label width to accommodate longer translations.
Specifically handles `de_*` locales.

Previously: [33598] / #33212.

Props zodiac1978, oglekler.
Fixes #60851.
Built from https://develop.svn.wordpress.org/trunk@58325


git-svn-id: http://core.svn.wordpress.org/trunk@57782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 09:13:08 +00:00
audrasjb 75f3babe49 Upgrade/Install: Remove the download authenticity message from Core/Plugins/Themes updates.
This changeset deactivates the download authenticity message by disabling package signature verification, at least until software signing is fully implemented on wordpress.org. The provided message had no actionability and only led to more support.

Props jipmoors, afercia, bridgetwillard, s0what, rajinsharwar, audrasjb, johnbillion, peterwilsoncc.
Fixes #47315.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 06:30:16 +00:00
audrasjb e562f6b12d Site Health: Add a `wp_is_writable()` for fonts directory.
This changeset adds a check in Site Health to display whether the fonts directory is writable or not.

Follow-up to [58299].

Props ironprogrammer.
Fixes #60719.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:57:07 +00:00
costdev ab5693f9f0 Upgrade/Install: Make `$is_debug` consistent in `WP_Automatic_Updater`.
[58139] introduced debugging flags to ensure debugging output would only be shown when both the `WP_DEBUG` and `WP_DEBUG_LOG` constants are defined as true. However, some of the flags incorrectly use `WP_DEBUG_DISPLAY` rather than `WP_DEBUG_LOG`.

This fixes the flags to consistently use `WP_DEBUG` and `WP_DEBUG_LOG` as intended.

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

Props rogermedia, afragen, swissspidy, costdev.
Fixes #58281.
Built from https://develop.svn.wordpress.org/trunk@58309


git-svn-id: http://core.svn.wordpress.org/trunk@57766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:39:08 +00:00
costdev 1f87d6b717 Upgrade/Install: Don't toggle maintenance mode on translation updates.
The Rollback Auto-Update feature introduced additional maintenance mode toggling.

After installing WordPress in a non-English (US) language, translation updates are performed automatically. As there may be a large number of updates for Core and bundled themes, users will be presented with a maintenance notice upon visiting the newly installed website.

To avoid concerning users that the website has failed to install correctly, this excludes translation updates from triggering the additional maintenance mode toggling.

Follow-up to [58128].

Props benniledl, afragen, rajinsharwar, costdev.
Fixes #61260. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58308


git-svn-id: http://core.svn.wordpress.org/trunk@57765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:25:10 +00:00
costdev 8c6a8e0b79 Site Health: Add translator comment to explain Directories and Sizes.
This adds a translator comment to the Site Health's debug data to describe what "Directories and Sizes" refers to.

References:
- [https://make.wordpress.org/polyglots/handbook/translating/glotpress-translate-wordpress-org/types-of-messages/#strings-with-description Polyglots handbook: Strings with description]
- [https://codex.wordpress.org/I18n_for_WordPress_Developers#Descriptions I18N Codex: Descriptions]

Props oglekler, afragen, amitraj2203.
Fixes #61316.
Built from https://develop.svn.wordpress.org/trunk@58307


git-svn-id: http://core.svn.wordpress.org/trunk@57764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:07:13 +00:00
joedolson fb7ad212ca Menus: Accessibility: Improve screen reader text for edit button.
Change the edit menu item toggle to communicate more context about the item to be edited. Make edit text consistent between Customizer menu editor and admin menu editor.

The menu position is conveyed only visually, using indentation, because there are no organizational semantics in either editor. This change helps provide screen reader users with consistent contextual information about the order, position, and parent of the current item.

Props joedolson, rcreators, afercia, mohonchandra.
Fixes #60673, See #60672.
Built from https://develop.svn.wordpress.org/trunk@58306


git-svn-id: http://core.svn.wordpress.org/trunk@57763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 20:35:13 +00:00
audrasjb c6d62b17e1 Site Health: Add fonts upload location to Site Health report.
Just like Site Health lists the paths to the plugins/themes/uploads directories, this changeset adds the path to the fonts directory (and its size).

Props swissspidy, andr3ribeiro, krupajnanda, ironprogrammer, iamfarhan09, naeemhaque, imasikur22, tofajjal02, sarkarripon, prottoysarkar, zunaid321, imranhasanraaz, rajinsharwar, nazmul111, audrasjb, peterwilsoncc.
Fixes #60719.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 16:56:16 +00:00
Sergey Biryukov 6c8e2bcb90 Coding Standards: Use strict comparison in `wp-admin/includes/ajax-actions.php`.
Follow-up to [6213], [8296], [8720], [9098], [10204], [10476], [10912], [11644], [11749], [12008], [12036], [13489], [17354], [17832], [18663], [18796], [18937], [22843], [28892], [33356].

Props mujuonly, nihar007, aristath, poena, afercia, SergeyBiryukov.
See #58988, #60700.
Built from https://develop.svn.wordpress.org/trunk@58287


git-svn-id: http://core.svn.wordpress.org/trunk@57747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 22:10:11 +00:00
TimothyBlynJacobs 0d72c5dd46 Upgrade: Fix the disable_autoupdate flag logic.
In #50824 support was added for a package to include a disable_autoupdate flag to indicate that the plugin/theme should not be auto-updated even if a user had opted-in via the WP-Admin UI. However, the logic implementing the flag was inverted.

This commit repairs the logic. If a package has disable_autoupdate set, then it should not be auto-updated.

Props amisiewicz.
Fixes #52796. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@57745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 21:35:12 +00:00
audrasjb d4ce786b2e I18n: Add more context to the overall use of `none` in translatable strings.
Because `none` doesn't convey the same meaning all the time.

Props tobifjellner, audrasjb, SergeyBiryukov, shailu25.
Fixes #50087.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 21:07:13 +00:00
audrasjb d3b8237ade User: Make the `user_login` field `readonly` instead of `disabled`.
On the profile edit screen in ``wp-admin, the username was previously displayed using an input field with the `disabled` attribute. This field was skipped by screen readers, which leads to a loss of information for visually impaired users. This changeset switches it to a `readonly` attribute, which is exactly the purpose of this field.

Props roytanck, audrasjb, rajinsharwar, joedolson.
Fixes #60774.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 09:55:10 +00:00
audrasjb 082922bf9a Media: Follow the "proximity of controls" accessibility guidelines in the multi-file uploader.
This changeset updates the design of the Upload Media screen to stack progress bars below the file name. After the upload completes, Action buttons also stack below the file name.

Props afercia, rcreators.
Fixes #60141.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 08:37:09 +00:00
audrasjb a0ba76dec8 Editor: Expose the Site Editor Patterns page for classic themes.
The Site Editor Patterns page was exposed internally for the Classic theme as of WP6.5. As we aim to officially expose the new Patterns page as of WP6.6, this changeset makes the following changes available when a classic themes is activated:

- Link Appearance > Patterns submenu to the Site Editor Patterns page located at `wp-admin/site-editor.php?path=/patterns
- Remove Template Parts submenu

Props wildworks, audrasjb, ironprogrammer, azaozz, youknowriad.
Fixes #61109.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-02 08:17:17 +00:00
hellofromTonya 4b331a84ef Plugins: Revert r58081 show an admin notice on successful activation.
With a new direction in the 6.5.4 to restore the Activate button's href (see [58250]), the changesets committed for 6.5.3 (see #60992) are now dead code and will not render the admin notice on successful plugin activation.

This commit is a clean revert of r58081.

Follow-up to [58250].

Props swissspidy, azaozz, costdev, jorbin, hellofromTonya, afragen.
Fixes #61331.
See #60992, #61319.
Built from https://develop.svn.wordpress.org/trunk@58257


git-svn-id: http://core.svn.wordpress.org/trunk@57720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-30 17:09:10 +00:00
joedolson 8f7d5cf1ca Menus: Add `resize: vertical` to menu item selector panel.
Make the panels for selecting menu items to add to a panel resizable using the CSS `resize` property. This minor change makes it easier to select items to add on desktop devices, and has nominal impact on other interfaces.

Props namith.jawahar, NekoJonez, jorbin, joen, joedolson.
Fixes #60763.
Built from https://develop.svn.wordpress.org/trunk@58256


git-svn-id: http://core.svn.wordpress.org/trunk@57719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-30 16:43:17 +00:00
hellofromTonya 466f6207e6 Upgrade/Install: Restore Activate button's href native behavior.
Restores the Activate button's `href` native behavior by changing the AJAX activation handler introduced in 6.5.0. It restores the pre-6.5 behavior of clicking the "Activate" button, i.e. navigates the user to the button's `href` (i.e. to the `plugins.php` UI).

Why?

Feedback was given after shipping [57545] in 6.5.0 (but was unknown during the development and testing cycles) revealed significant impacts for plugins who's users valued the onboarding / configuration experiences.

6.5.3's [58081] and [58083] added a new user action / step to the workflow. Though helpful, it did not fully resolve the impacts.

For the minor, this commit seeks to restore only the "Activate" button's `href` pre-6.5 native behavior to resolve the regression.

The next phase of the Add Plugins workflow can then continue in a major release to gain the benefits of a full major to move it from ideation through the development phases. (See #61040). The questions of redirect, how / should configuration be in the workflow, etc. can best be explored and experimented with in a major.

Follow-up to [57545], [58081], [58083].

Props costdev, jorbin, hellofromTonya, afragen, kevinwhoffman, azaozz, adrianduffell, beaulebens, hmbashar, illuminea, ironprogrammer, jjj, lopo, louiswol94, mikachan, nerrad, mukesh27, peterwilsoncc, pooja1210, smub, swissspidy.

Fixes #61319.
See #22316, #60992.
Built from https://develop.svn.wordpress.org/trunk@58250


git-svn-id: http://core.svn.wordpress.org/trunk@57713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-30 14:45:10 +00:00
joedolson 849cb4c172 Media: Accessibility: Make alt text information URL translatable.
Allow translators to replace the W3C WAI decision tree link used to provide information about writing alt text. Improves accessibility for non-English speaking content authors.

Props tmatsuur, joedolson, oglekler, SergeyBiryukov, myhro, sabernhardt.
Fixes #60975.
Built from https://develop.svn.wordpress.org/trunk@58240


git-svn-id: http://core.svn.wordpress.org/trunk@57703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-29 22:22:14 +00:00
joedolson 3b1f9c8c28 Media: Add missing units for length and dimensions in media library.
Include explicit units for media length and dimensions in attachment modal and media details screen.

Props Presskopp, joedolson, shailu25, audrasjb.
Fixes #59009.
Built from https://develop.svn.wordpress.org/trunk@58217


git-svn-id: http://core.svn.wordpress.org/trunk@57680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 19:44:14 +00:00
joedolson f07a796aab Media: Improve scale/crop layout in image editor medium breakpoints.
Adjust the max-width of the image edit settings panel so that reflow handling at intermediary breakpoints is more consistent and less fragile.

Props deepakvijayan, huzaifaalmesbah, joedolson, khokansardar.
Fixes #58979.
Built from https://develop.svn.wordpress.org/trunk@58214


git-svn-id: http://core.svn.wordpress.org/trunk@57677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 18:03:13 +00:00
Sergey Biryukov f6973306ea Docs: Improve documentation for a few functions accepting a `WP_Post` object.
Follow-up to [15777], [23769], [24490], [25697], [37252], [49544].

See #60699.
Built from https://develop.svn.wordpress.org/trunk@58212


git-svn-id: http://core.svn.wordpress.org/trunk@57675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 16:29:16 +00:00
audrasjb 21b8312b48 Upload: Add missing escaping functions in `wp-admin/async-upload.php`.
Props nareshbheda, mukesh27.
Fixes #60978.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 14:31:13 +00:00
audrasjb 9df0603c96 HTTP API: Improve `download_url()` error message.
This changeset improves the error message returned when no URL is provided, and updates the related unit tests accordingly.

Props hinnerk, audrasjb.
Fixes #60565.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 13:55:12 +00:00
Sergey Biryukov eba0df8c7b Docs: Correct the placement of `@global` tags in various files.
Follow-up to [6589], [8598], [10798], [25490], [25594], [31192], [31194], [35718], [37437], [44169], [44948], [45247], [56763], [56773], [57370], [57503].

Props shailu25.
Fixes #61295.
Built from https://develop.svn.wordpress.org/trunk@58200


git-svn-id: http://core.svn.wordpress.org/trunk@57663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-26 20:51:13 +00:00
youknowriad e1034e15f0 Posts: Ensure get_sample_permalink returns the right permalink for auto-draft posts.
The post editor uses the permalink_template property from the posts REST API to render the post slug input or not. For auto-drafts or newly created posts, this property was not set properly. This PR solves by fixing the get_sample_permalink function used to compute this property.

Props youknowriad, mcsf, antonvlasenko, azaozz, peterwilsoncc, andrewserong, hellofromTonya, spacedmonkey.
Fixes #59283.
Built from https://develop.svn.wordpress.org/trunk@58174


git-svn-id: http://core.svn.wordpress.org/trunk@57637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 09:49:16 +00:00
Aaron Jorbin a91012a34b Plugins: Assign role of button to links that act as buttons.
Clicking on these links initiates an action, so they are more semantically a button rather than a link. Keeping them as an anchor in html allows any existing JS that is targeted to these items to continue to function. The addition of the role helps assistive technology to know that they should treat this as a button.

Props stevejonesdev, sabernhardt, vipulgupta003, rcreators, joedolson.
Fixes #61011.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-16 15:31:12 +00:00
audrasjb d4ef1a6cd5 Administration: Add `primary` class to the FTP credentials modal submit button.
This helps differentiate the two buttons available in the FTP credentials modal by setting a `primary` class to the submit button.

Props mapk, curdin, audrasjb, shailu25.
Fixes #37647.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 22:17:13 +00:00
dmsnell d30cd41ed4 Normalize UTF-8 charset slug detection.
There are several exist places in Core that attempt to detect if a blog charset
is UTF-8. Each place attempts to perform the same check, except the logic is
spread throughout and there's no single method provided to make this
determination in a consistent way. The `_canonical_charset()` method exists,
but is marked private for use.

In this patch the new `unicode` module provides `is_utf8_charset()` as a method
taking an optional charset slug and indicating if it represents UTF-8,
examining all of the allowable variants of that slug. Associated code is
updated to use this new function, including `_canonical_charset()`. If no slug
is provided, it will look up the current `get_option( 'blog_charset' )`.

Finally, the test functions governing `_canonical_charset()` have been
rewritten as a single test with a data provider instead of as separate test
functions.

Developed in https://github.com/WordPress/wordpress-develop/pull/6535
Discussed in https://core.trac.wordpress.org/ticket/61182

Fixes #61182.
Props dmsnell, jonsurrell.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 18:05:11 +00:00
joedolson 79045fa10e Administration: A11y: Replace placeholders with visible labels.
Add visible labels to inputs that are using placeholder attributes as a substitute for visible labeling.

Labels added or made visible on the customizer theme search, customizer widget search, customizer menu item search, customizer new page UI, the search plugins screens, the media search screens, and the classic editor link inserter.

Props afercia, joedolson, rcreators, sabernhardt.
See #40331.
Built from https://develop.svn.wordpress.org/trunk@58146


git-svn-id: http://core.svn.wordpress.org/trunk@57611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 16:49:09 +00:00
Sergey Biryukov f57368d7ed Users: Reuse an existing string in the confirmation for unsaved changes in user profile.
Follow-up to [58137].

Fixes #40493.
Built from https://develop.svn.wordpress.org/trunk@58145


git-svn-id: http://core.svn.wordpress.org/trunk@57610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 16:14:11 +00:00
Sergey Biryukov f29b58aa91 Docs: Make Settings API documentation link clickable in `wp-admin/options.php`.
The link is a part of the deprecation notice displayed when saving an unregistered setting.

Follow-up to [13646], [13785], [14070], [32116], [34315], [45674].

Props timse201, sabernhardt, amitraj2203, khokansardar, SergeyBiryukov.
Fixes #61199.
Built from https://develop.svn.wordpress.org/trunk@58140


git-svn-id: http://core.svn.wordpress.org/trunk@57605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 16:26:10 +00:00
John Blackbourn 87ba206026 Bootstrap/Load: Place the debugging output for automatic plugin and theme updates behind a debugging flag.
This change means this debugging output will only be shown when both the `WP_DEBUG` and `WP_DEBUG_LOG` constants are defined as true.

Props costdev, afragen, swissspidy

Fixes #58281

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


git-svn-id: http://core.svn.wordpress.org/trunk@57604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 15:24:11 +00:00
joedolson 39c3bec9f3 Users: Add JS confirmation if user profile has unsaved changes.
Add a confirmation dialog when users navigate away from the user profile screen if they have unsaved changes to prevent data loss.

Props ashokrane, karlijnbk, diedeexterkate, jwgoedert, joedolson, swissspidy, afercia.
Fixes #40493.
Built from https://develop.svn.wordpress.org/trunk@58137


git-svn-id: http://core.svn.wordpress.org/trunk@57602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-12 18:45:14 +00:00
Sergey Biryukov 13f85f2cd2 Docs: Update a HelpHub link on Edit Site screen to avoid unnecessary redirection.
Follow-up to [17045], [20713], [41065], [45674], [55412], [57854], [58131].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 14:47:06 +00:00
Sergey Biryukov 447840fc0d Docs: Use more specific URLs for a few Network Admin HelpHub links.
This better reflects the originally intended destination of these links.

Follow-up to [57854].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 14:38:13 +00:00
Pascal Birchler 960c3631e4 REST API: Ensure attachments are uploaded to the post's year/month folder.
If organizing uploads into month- and year-based folders, uploading an attachment to an existing post should store the file in `wp-content/uploads/<year>/<month>` based on the post's publish date. This is in line with the behavior in classic editor / the media modal.

Props swissspidy, adamsilverstein, timothyblynjacobs, skithund, sergeybiryukov, patricia70.
Fixes #61189.
Built from https://develop.svn.wordpress.org/trunk@58130


git-svn-id: http://core.svn.wordpress.org/trunk@57595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 18:59:11 +00:00
Sergey Biryukov 8839c33306 Posts, Post Types: Use a consistent plural form of “status” in variable names.
Follow-up to [5575], [6796], [6993], [7638], [12162], [12719], [15578], [16652], [31046], [34515], [49472].

Props Presskopp, sabernhardt, manfcarlo, SergeyBiryukov.
Fixes #58134.
Built from https://develop.svn.wordpress.org/trunk@58129


git-svn-id: http://core.svn.wordpress.org/trunk@57594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 18:09:15 +00:00
John Blackbourn 1e8d651f23 Upgrade/Install: Automatically roll back to the previous version when an automatic plugin update results in a fatal error on the front end of the site.
This builds on the temporary backup system introduced in 6.3 to allow automatic updates to benefit from fatal error protection. A loopback request is performed to the home page of the site and the plugin is rolled back to its backed up version if a fatal error is observed.

For debugging and observability during beta, this change includes several calls to `error_log()` during the upgrade and rollback stages. These calls can be removed or placed behind a flag once we're ready for RC1.

Props costdev, johnbillion, mukesh27, afragen, audrasjb, justlevine, kirasong, peterwilsoncc

Fixes #58281

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


git-svn-id: http://core.svn.wordpress.org/trunk@57593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 11:48:15 +00:00
John Blackbourn 9817081728 Bootstrap/Load: Take the port number into consideration when determining whether a subdomain installation of Multisite is allowed.
This results in the prevention of an installation running on a port on localhost (for example `localhost:8889`) being converted to a subdomain Multisite installation, whereas previously it was incorrectly allowed.

Props spacedmonkey 

See #21077

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


git-svn-id: http://core.svn.wordpress.org/trunk@57590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-09 23:09:13 +00:00
johnjamesjacoby c894dca658 Multisite: Add missing "contribute.php" file to User Dashboard.
This changeset adds a `wp-admin/user/contribute.php` file to allow the "Get Involved" link to work on User Admin.

This changeset prevents an unintended 404 that occurs when a logged-in user clicks the "Get Involved" link (located in the menu-bar) from inside of the multisite-specific User Dashboard.

Related: r56220, r56309, #23348.

Props ignatiusjeroe, audrasjb, tobiasbg.

Fixes #61122.
Built from https://develop.svn.wordpress.org/trunk@58118


git-svn-id: http://core.svn.wordpress.org/trunk@57583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-08 17:04:13 +00:00
Sergey Biryukov bcff9a2fe4 Site Health: Correct the anchor for “Learn more about page cache” link.
Follow-up to [54043], [55412], [57793].

Props comecaramelos.
Fixes #61159.
Built from https://develop.svn.wordpress.org/trunk@58113


git-svn-id: http://core.svn.wordpress.org/trunk@57578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-07 10:17:14 +00:00
Joe McGill ae2ce86cf4 Options: Update default autoload values used in core.
This updates the values used for the `$autoload` parameter in various functions to replace 'yes' and 'no' with 'on' and 'off', respectively.

Follow-up to [57920].

Props pbearne, mukesh27, joemcgill.
Fixes #61045. See #42441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-06 16:35:19 +00:00
John Blackbourn d2434ccaa9 Networks and Sites: Add a clearer warning message before deleting a site from a network.
Props johnjamesjacoby, kebbet, cafenoirdesign, Mista-Flo, johnbillion

Fixes #51358

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


git-svn-id: http://core.svn.wordpress.org/trunk@57563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-04 22:12:15 +00:00
John Blackbourn 9feb8a6925 Bootstrap/Load: Add support for custom ports in multisite site addresses.
This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088
Built from https://develop.svn.wordpress.org/trunk@58097


git-svn-id: http://core.svn.wordpress.org/trunk@57562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-04 19:25:10 +00:00
John Blackbourn 6ad45a93a1 Site Health: Improve the internationalisation of strings used in disk space health checks.
This allows the disk space values to be changed in the future without requiring a string change.

Props afragen, audrasjb, johnbillion

Fixes #61115

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


git-svn-id: http://core.svn.wordpress.org/trunk@57559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-04 17:23:16 +00:00
Sergey Biryukov 137f90ef49 Docs: Add missing documentation for various upgrade/install class methods.
Follow-up to [13602], [13686], [14879], [25806], [28495], [32655], [48661], [53952].

Props yagniksangani, audrasjb, SergeyBiryukov.
Fixes #61124.
Built from https://develop.svn.wordpress.org/trunk@58082


git-svn-id: http://core.svn.wordpress.org/trunk@57547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 17:20:10 +00:00
Aaron Jorbin 18d2736d35 Plugins: Show an admin notice on successful activation.
Plugin activation on the Plugins > Add New screen is performed using AJAX, no longer performing redirects. This means that users will not see a newly activated plugin's menu items, admin notices, or other UI elements until the user refreshes or navigates to another screen. Without adequate messaging and direction, users may be unsure of what to do next.

This shows an admin notice when a plugin is activated from its plugin card or modal, informing the user that the plugin was activated, and that some changes may not occur until they refresh the page.

Follow-up to [57545].

Props costdev, jorbin, jeherve, flixos90, joedolson, ironprogrammer, audrasjb, alanfuller, kevinwhoffman, devsahadat, afragen, adrianduffell, azaozz, jason_the_adams, JeffPaul, webdevmattcrom, DrewAPicture, justlevine, stevejonesdev, benlk, roytanck.
Fixes #60992. See #22316.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 17:05:07 +00:00
John Blackbourn 3d9945486e Docs: Various docblock improvements.
See #60699

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


git-svn-id: http://core.svn.wordpress.org/trunk@57540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 13:19:14 +00:00
John Blackbourn 9e7d08b60d Docs: Various docblock corrections.
See #60699

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


git-svn-id: http://core.svn.wordpress.org/trunk@57538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 00:01:09 +00:00
John Blackbourn 1bbbb4bd75 Docs: Correct some docblock indentation.
See #60699

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


git-svn-id: http://core.svn.wordpress.org/trunk@57536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-01 23:44:12 +00:00
Pascal Birchler d2fb0bd81e General: Remove any usage of `wp_reset_vars()`.
The way `wp_reset_vars()` sets global variables based on `$_POST` and `$_GET` values makes code hard to understand and maintain. It also makes it easy to forget to sanitize input.

This change removes the few places where `wp_reset_vars()` is used in the admin to explicitly use `$_REQUEST` and sanitize any input.

Props swissspidy, audrasjb, davideferre, killua99, weijland, voldemortensen.
Fixes #38073.
Built from https://develop.svn.wordpress.org/trunk@58069


git-svn-id: http://core.svn.wordpress.org/trunk@57534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-01 18:01:12 +00:00
Sergey Biryukov 8aa7eb7e16 Coding Standards: Remove extra conditional in `get_plugins()`.
Follow-up to [1894], [5152], [55990].

Props abhijitrakas, mukesh27.
Fixes #44853.
Built from https://develop.svn.wordpress.org/trunk@58067


git-svn-id: http://core.svn.wordpress.org/trunk@57532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 16:45:14 +00:00
Pascal Birchler b2da8bbcc9 I18N: Fix plural usage in `wp_print_admin_notice_templates()`.
Moves the translatable strings from the JS template defined in PHP to the `updates.js` script, where `_n()` can be used as recommended.

Props ideag, SergeyBiryukov, daledupreez, audrasjb, ocean90, swissspidy.
Fixes #37287.
Built from https://develop.svn.wordpress.org/trunk@58064


git-svn-id: http://core.svn.wordpress.org/trunk@57529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:55:04 +00:00
Pascal Birchler 7c11d1ebf5 I18N: Actually add all the files for [58061], not just the test fixtures.
Improve support for using only PHP translation files.

This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files.

Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`.

Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format.

See #60554.
Built from https://develop.svn.wordpress.org/trunk@58062


git-svn-id: http://core.svn.wordpress.org/trunk@57527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:39:07 +00:00
audrasjb 3294fc01ba Help/About: Reduce About screens heading sizes on smaller viewports.
[56950] reduced the heading size of About screen headings, but that did not edit the size for smaller viewports.
This changeset fixes this issue, and also updates the larger fluid font size (960px - 1200px).

Follow-up to [56950].

Props dhruvang21, sabernhardt, khokansardar.
Fixes #61030.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 06:59:09 +00:00
Sergey Biryukov 4fb8608aa5 Docs: Use correct URL for the Embeds documentation article.
Follow-up to [57793].

Props shailu25, estelaris, audrasjb.
See #60732.
Built from https://develop.svn.wordpress.org/trunk@58029


git-svn-id: http://core.svn.wordpress.org/trunk@57495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 06:25:11 +00:00
Peter Wilson f6fae87e73 Upgrade/Install: Validate source & destination values in `WP_Ugrader`.
Adds a missing string and some additional validation of paths in the upgrader class.

Follow up to [56992].

Props costdev, jipmoors, karlijnbok, swissspidy, afragen, mukesh27.
Fixes #59712.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-18 03:17:13 +00:00
joedolson cc7370b2af Help/About: Accessibility: Remove `target="_blank"` from data eraser links.
Remove `target="_blank"` from two links to developer resources on adding the personal data eraser to plugins in the Help info for the privacy screens. Also rectifies differences between the export and erase text for consistency and changes the order of paragraphs. 

Props sabernhardt, joedolson.
Fixes #60097.
Built from https://develop.svn.wordpress.org/trunk@58021


git-svn-id: http://core.svn.wordpress.org/trunk@57487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-17 20:21:15 +00:00
Sergey Biryukov dd6d4e74c1 Code Modernization: Fix implicit nullable parameter type deprecation on PHP 8.4.
In PHP 8.4, declaring function or method parameters with a default value of `null` is deprecated if the type is not nullable.

PHP applications are recommended to ''explicitly'' declare the type as nullable. All type declarations that have a default value of `null`, but without declaring `null` in the type declaration, will emit a deprecation notice:
{{{
function test( array $value = null ) {}
}}}
`Deprecated: Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead`

**Recommended Changes**

Change the implicit nullable type declaration to a nullable type declaration, available since PHP 7.1:
{{{#!diff
- function test( string $test = null ) {}
+ function test( ?string $test = null ) {}
}}}

This commit updates the affected instances in core to use a nullable type declaration.

References:
* [https://wiki.php.net/rfc/deprecate-implicitly-nullable-types PHP RFC: Deprecate implicitly nullable parameter types]
* [https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated PHP.Watch: PHP 8.4: Implicitly nullable parameter declarations deprecated]

Follow-up to [28731], [50552], [57337], [57985].

Props ayeshrajans, jrf, audrasjb, jorbin.
Fixes #60786.
Built from https://develop.svn.wordpress.org/trunk@58009


git-svn-id: http://core.svn.wordpress.org/trunk@57480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-15 20:03:09 +00:00
Pascal Birchler 00d06db33d Docs: Fix various typos and spelling mistakes.
Props swissspidy, jucaduca, sergeybiryukov.
See #60699.
Built from https://develop.svn.wordpress.org/trunk@57987


git-svn-id: http://core.svn.wordpress.org/trunk@57473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-12 17:47:13 +00:00
John Blackbourn dd224888c7 General: Increase the minimum supported version of PHP to 7.2.24.
Props justlevine, masteradhoc, samiamnot, hellofromTonya, azaozz, jrf, dd32, desrosj, jorbin

Fixes #58719

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


git-svn-id: http://core.svn.wordpress.org/trunk@57471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-11 21:11:16 +00:00
Sergey Biryukov 181e799593 Docs: Update `@since` version for `wp_zip_file_is_valid()`.
Follow-up to [57537], [57916], [57929].

Props TobiasBg.
See #60398.
Built from https://develop.svn.wordpress.org/trunk@57984


git-svn-id: http://core.svn.wordpress.org/trunk@57470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-11 14:28:14 +00:00
Peter Wilson f4fb98f366 Script Loader: Improve asset concatenation Etags.
Include the asset version of JavaScript and CSS files when generating the ETag for concatenated assets in `load-scripts.php` and `load-styles.php`. This ensures the ETag is updated as script versions change (for example editor package updates) rather than only when the WordPress version changes.

The `W\` prefix is added to the generated ETag to allow for CDNs and proxy servers modifying the script to add or improve the compression algorithm.

Props azaozz, dav4, ironprogrammer, johnbillion, kkmuffme, monzuralam, peterwilsoncc, sergeybiryukov.
Fixes #58433.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-07 23:53:19 +00:00
Aaron Jorbin a7f59e981f Media: Use flex-start for full browser support.
The value of `start` is not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change.

Follow-up to [55919].

Props davidbaumwald, sabernhardt, khokansardar, devsahadat.
Fixes #60876.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-05 21:47:15 +00:00
John Blackbourn 78d729602e Database: Remove back-compat for database servers that don't support `utf8mb4`.
Since WordPress 6.5, the minimum supported version of MySQL and MariaDB is 5.5.5. This means all supported database servers now support the `utf8mb4` character set and therefore the conditional logic for this is no longer necessary.

Props l1nuxjedi, craigfrancis, OllieJones, johnbillion

Fixes #60096

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


git-svn-id: http://core.svn.wordpress.org/trunk@57427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-04 15:13:14 +00:00
Sergey Biryukov db1e75b20a Docs: Update `@since` version for `wp_zip_file_is_valid()`.
Follow-up to [57537].

Props TobiasBg.
See #60398.
Built from https://develop.svn.wordpress.org/trunk@57916


git-svn-id: http://core.svn.wordpress.org/trunk@57417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-02 19:24:16 +00:00
Sergey Biryukov bac700319a Help/About: Remove unused CSS previously intended for the Freedoms screen.
Follow-up to [44264], [45278], [49219], [49479], [51356], [51459].

Props sjnbham, niravsherasiya7707.
Fixes #60857.
Built from https://develop.svn.wordpress.org/trunk@57911


git-svn-id: http://core.svn.wordpress.org/trunk@57412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-02 11:12:19 +00:00
davidbaumwald 3fa06d8fbd Upgrade/Install: Update the `$_old_files` array for 6.5.
Props audrasjb, huzaifaalmesbah, swissspidy.
Fixes #60648.
Built from https://develop.svn.wordpress.org/trunk@57905


git-svn-id: http://core.svn.wordpress.org/trunk@57406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-01 16:38:18 +00:00
Sergey Biryukov 6f636420db Docs: Fix a few typos in `wp-admin/includes/class-pclzip.php`.
Follow-up to  [6779], [47123], [55827].

Props nithins53, nithi22, mukesh27.
Fixes #60818.
Built from https://develop.svn.wordpress.org/trunk@57901


git-svn-id: http://core.svn.wordpress.org/trunk@57402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-31 05:52:15 +00:00
audrasjb 3e244ae879 I18n: Add context to the "Patterns" translatable string for the related admin menu item.
This changeset put back the context parameter of the "Patterns" string which was previously removed to fix a translation issue without introducing a string change during WP 6.5 string freeze period.

Follow-up to [57864].

Props kebbet, narenin, nestea29950.
Fixes #60827.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-27 22:44:16 +00:00
Pascal Birchler 8b9dfff929 Help/About: Update the About page for 6.5.
Updates the font size for `<code>` tags and updates several translatable strings.

Props sabernhardt, laurlittle, SergeyBiryukov.
See #60303.
Built from https://develop.svn.wordpress.org/trunk@57870


git-svn-id: http://core.svn.wordpress.org/trunk@57371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-23 09:22:10 +00:00
audrasjb fae0e892b7 I18n: Ensure "Patterns" menu item is translatable.
This changeset updates a translation string to ensure the "Patterns" menu item introduced in [57543] is translatable.
This quickfix simply removes the erroneous `context` parameter so no new string is introduced during WP 6.5 string freeze period. A follow-up changeset will be needed to replace the current `__()` function with `_x()` and put back the `context` parameter.

Follow-up to [57543].

Props jdy68, audrasjb, kebbet, swissspidy.
Fixes #60825.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-22 13:58:14 +00:00
Pascal Birchler d5f0448e78 Coding Standards: Rename the `$postid` parameter to `$post_id` in `has_meta().
Props mujuonly.
Fixes #60810.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@57860


git-svn-id: http://core.svn.wordpress.org/trunk@57361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-20 19:07:12 +00:00
audrasjb 1a0add316f Docs: Update various HelpHub links to avoid unnecessary redirections.
Follow-up to [57793], [57798], [57800], [57801].

Props shailu25.
See #60732, #60699.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-19 14:46:15 +00:00
Sergey Biryukov cca720266b Coding Standards: Use strict comparison in `wp-admin/options-general.php`.
Follow-up to [1632], [12507].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@57833


git-svn-id: http://core.svn.wordpress.org/trunk@57334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-14 14:27:13 +00:00
Pascal Birchler 078e6390a5 Help/About: Update the About page for WP 6.5 RC2.
Updates a translatable string to use a placeholder for the “Requires Plugins” string used in it.

Props swissspidy, sergeybiryukov, presskopp.
See #60303.
Built from https://develop.svn.wordpress.org/trunk@57817


git-svn-id: http://core.svn.wordpress.org/trunk@57318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-12 14:45:15 +00:00
audrasjb 2ef60cc432 Help/About: Update the About page for WP 6.5 RC2.
This changeset removes the "Pattern overrides" section from features.
Also updates the field guide link, this link should redirect correctly once the post is published.

Follow-up to [57715], [57767].

Props ryelle, benjamin_zekavica.
See #60303.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-12 10:37:11 +00:00
Sergey Biryukov 42cb55d4c5 Docs: Update the link to the WordPress Feeds article on Reading Settings screen.
Follow-up to [57793].

Props ignatiusjeroe, sabernhardt, shailu25.
Fixes #60736. See #60732.
Built from https://develop.svn.wordpress.org/trunk@57797


git-svn-id: http://core.svn.wordpress.org/trunk@57298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-10 16:20:14 +00:00
Sergey Biryukov b47a138372 Upload: Move an assignment in `wp-admin/upload.php` into a conditional branch.
This is a micro-optimization to reduce unnecessary memory allocation.

Follow-up to [28682].

Props mujuonly, swissspidy, mukesh27.
Fixes #60683.
Built from https://develop.svn.wordpress.org/trunk@57796


git-svn-id: http://core.svn.wordpress.org/trunk@57297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-09 18:07:15 +00:00