9025 Commits

Author SHA1 Message Date
desrosj
789f4459e4 Grouped backports for the 6.8 branch.
- XML-RPC: Switch to `wp_safe_remote()` when fetching a pingback URL.
- HTML API: Prevent `WP_HTML_Tag_Processor` instances being unserialized and add some extra logic for validating pattern and template file paths.
- KSES: Optimize PCRE pattern detecting numeric character references.
- Customize: Improve escaping approach used for nav menu attributes.
- Media: Ensure the attachment parent is accessible to the user before showing a link to it in the media manager.
- Interactivity API: Skip binding event handler attributes. The corresponding `data-wp-on--` attribute should be used instead.
- Administration: Ensure client-side templates are only detected when they're correctly associated with a script tag.
- Filesystem API: Don't attempt to extract invalid files from a zip when using the PclZip library.
- Comments: Don't attempt to create a note if the user cannot edit the target post.
- Media: Disable XML entity substitution in getID3.

Merges [61879-61890] to the 6.8 branch.

Props johnbillion, xknown, dmsnell, jorbin, peterwilson, adamsilverstein, desrosj, luisherranz, ocean90, westonruter, jonsurrell, aurdasjb.
Built from https://develop.svn.wordpress.org/branches/6.8@61901


git-svn-id: http://core.svn.wordpress.org/branches/6.8@61183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-03-10 16:37:37 +00:00
Aaron Jorbin
6709f8f0d2 Pings/Trackbacks: Use HTTPS for services that now support it.
This updates the default on new installations for rpc.pingomatic.com to use https while also upgrading existing sites that use rpc.pingomatic.com or rpc.twingly.com to use https for those two domains.

Reviewed by audrasjb.
Merges [60421] and [60422] to the 6.8 branch.

Props sabernhardt, peterwilsoncc, jorbin, bhubbard, matt.
Fixes #42007.

Built from https://develop.svn.wordpress.org/branches/6.8@60428


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-07-07 20:34:31 +00:00
audrasjb
ea3f5c6084 Revisions: Improve revisions layout on mobile viewports.
On small screens, the restore revision button was mostly hidden due to excessive constraints on overflow height. Fix the overflow issue and ensure that restore revision buttons are always usable.

Reviewed by audrasjb.
Merges [60259] to the 6.8 branch.
Props yogeshbhutkar, getsyash, joedolson.
Fixes #63029.


Built from https://develop.svn.wordpress.org/branches/6.8@60410


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-07-05 06:22:37 +00:00
Aaron Jorbin
403017b587 Upgrade/Install: Pass stored credentials to WP_Filesystem() in WP_Upgrader.
When using a non-direct filesystem, the call in WP_Upgrader::maintenance_mode() did not include the required credentials, leading to a fatal error as the connection was not initialized properly.

This commit attempts to use the stored credentials if available, and triggers a notice otherwise.

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

Reviewed by jorbin.
Merges [60107] to the 6.8 branch.

Props SirLouen, hideishi, dd32, tusharaddweb, takuword, SergeyBiryukov.
Fixes #62718.

Built from https://develop.svn.wordpress.org/branches/6.8@60184


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-24 23:18:31 +00:00
audrasjb
e47cd172b7 Upgrade/Install: Update the $_old_files array for 6.8.
Reviewed by joemcgill.


Built from https://develop.svn.wordpress.org/branches/6.8@60163


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-04-14 15:29:22 +00:00
Adam Silverstein
6fd9b34405 Media: prevent uploading image types the server doesn’t support.
Normalize behavior between uploading in the media library and uploading directly to the block editor.  Now, when uploading an image with a mime type the server does not support (either in the media library or the block editor), the user will see an error message “This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading”.

Alos, add a new filter `wp_prevent_unsupported_mime_type_uploads` which determines whether the server should prevent uploads for image types it doesn't support. The default value is true and the filter also receives the uploaded image mime type.

Props: joomskys, adamsilverstein, azaozz, swissspidy, joemcgill, flixos90, audrasjb. 

Fixes #61167


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


git-svn-id: http://core.svn.wordpress.org/trunk@59420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-25 14:07:53 +00:00
Sergey Biryukov
94bac1c6b3 Coding Standards: Remove a one-time variable in WP_Privacy_Requests_Table::get_request_counts().
This allows the `$wpdb::prepare()` call to be picked up correctly by PHPCS.

Follow-up to [43008], [45448].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-24 19:59:33 +00:00
Sergey Biryukov
01428753d0 Coding Standards: Remove a one-time variable in WP_MS_Sites_List_Table::prepare_items().
This allows the `$wpdb::prepare()` call to be picked up correctly by PHPCS.

Follow-up to [28712], [55656].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-23 14:48:31 +00:00
Sergey Biryukov
53b38b0516 Coding Standards: Remove extra slashes when concatenating ABSPATH with a path.
Since `ABSPATH` is defined and documented to end with a forward slash `/`, this changeset removes the first `/` from strings appended to `ABSPATH` in various files, leading to `//` in the resulting path.

Follow-up to [54872], [55720], [57545].

Props dhruvik18, SergeyBiryukov.
Fixes #63102.
Built from https://develop.svn.wordpress.org/trunk@60034


git-svn-id: http://core.svn.wordpress.org/trunk@59370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-17 22:40:26 +00:00
joedolson
9f51d473ef Administration: A11y: Prevent empty author link in list tables.
If the author display name is unknown, show an `emdash` and screen reader text `(no author)`, consistent with other cases where information is unknown. Fix an issue where an unknown author name displayed as an invisible link with no text.

Props kkmuffme, hdkothari81, shailu25, snehapatil02, sabernhardt, faisal03, rishavdutta, sumitbagthariya16, joedolson.
Fixes #62913.
Built from https://develop.svn.wordpress.org/trunk@60032


git-svn-id: http://core.svn.wordpress.org/trunk@59368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-17 18:54:27 +00:00
Sergey Biryukov
e032455914 Coding Standards: Escape thumbnail URL and attributes in wp_image_editor().
Follow-up to [11965].

Props benazeer, dhruvang21, sabernhardt.
Fixes #62951.
Built from https://develop.svn.wordpress.org/trunk@59990


git-svn-id: http://core.svn.wordpress.org/trunk@59332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-16 20:47:29 +00:00
Sergey Biryukov
87330c8aa7 Upgrade/Install: Revert [59981] pending test failure investigation.
See #62718.
Built from https://develop.svn.wordpress.org/trunk@59982


git-svn-id: http://core.svn.wordpress.org/trunk@59324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-14 14:53:29 +00:00
Sergey Biryukov
fda4905790 Upgrade/Install: Pass stored credentials to WP_Filesystem() in WP_Upgrader.
When using a non-direct filesystem, the call in `WP_Upgrader::maintenance_mode()` did not include the required credentials, leading to a fatal error as the connection was not initialized properly.

This commit attempts to use the stored credentials if available, and triggers a notice otherwise.

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

Props hideishi, dd32, SergeyBiryukov.
Fixes #62718.
Built from https://develop.svn.wordpress.org/trunk@59981


git-svn-id: http://core.svn.wordpress.org/trunk@59323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-14 12:59:32 +00:00
Sergey Biryukov
90b04c9acb Coding Standards: Use strict comparison in _fix_attachment_links().
Follow-up to [20308], [58360].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59962


git-svn-id: http://core.svn.wordpress.org/trunk@59304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-10 20:03:25 +00:00
joedolson
95e0b633ac Administration: Update out of date error message styling.
Change several error message across core to use WordPress standard styling. Ensure only prefixes are wrapped in `strong` tags rather than the whole message, use `notice notice-error` classes where appropriate, and replace a custom error with `wp_admin_notice()` in multisite.

Props afercia, rajinsharwar, robinmartijn, mukesh27, sabernhardt, oglekler, joedolson, chaion07, im3dabasia1, audrasjb, dkarfa, najmulsaju.
Fixes #50402.
Built from https://develop.svn.wordpress.org/trunk@59960


git-svn-id: http://core.svn.wordpress.org/trunk@59302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-10 18:16:27 +00:00
John Blackbourn
efa1334cd4 Upgrade/Install: Adjust the check for missing extensions during an upgrade so it remains compatible with versions of WordPress prior to 5.1.
The `WP_Error::has_errors()` method was introduced in WordPress 5.1, so this change uses its internal logic instead to remain compatible with earlier versions.

Props swissspidy, joemcgill, desrosj.

Fixes #63052
Built from https://develop.svn.wordpress.org/trunk@59956


git-svn-id: http://core.svn.wordpress.org/trunk@59298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-09 15:17:22 +00:00
joedolson
e57e4cdf1a Menus: Validate custom links and add accessible error messages.
Add URL validation in the admin navigation menu manager that matches the validation in the customizer when adding custom links. Improve accessibility of both custom link forms by adding `aria-invalid` and `aria-describedby` attributes with visible error messages and announcing the error using `wp.a11y.speak()`.

Props joedolson, nikitasolanki1812, akrocks, pathan-amaankhan, rcreators, ironprogrammer, audrasjb, ankit-k-gupta, chaion07, rinkalpagdar, snehapatil02, jainil07, parthvataliya.
Fixes #60619, #60969.
Built from https://develop.svn.wordpress.org/trunk@59948


git-svn-id: http://core.svn.wordpress.org/trunk@59290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-06 23:48:23 +00:00
audrasjb
db2a4a9cad General: Remove extra spaces added before checked() functions used in WP_Screen class.
This reverts [59889] as `__checked_selected_helper()` actually adds a leading space before the `checked` attribute.

Props kkmuffme.
Unprops audrasjb.
Fixes #63037.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-05 23:12:27 +00:00
audrasjb
56456e0a1c Bookmarks: Update link_updated when a link is created or updated.
This changeset fixes an issue where the `link_updated` field was not updated in the old Link Manager. When a link was created or updated the `link_updated` field remained `0000-00-00 00:00:00`.

Props lenasterg, audrasjb.
Fixes #56851.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-04 05:55:23 +00:00
joedolson
371495c91d Media: Allow uploading images from URLs without extensions.
Enable `download_url()` to fetch and verify file types if the URL does not contain a file extension. This allows URL downloads to handle media endpoints like istockphoto.com that use file IDs and formatting arguments to deliver images.

Props masteradhoc, mitogh, joedolson, hellofromTonya, antpb, audrasjb, navi161, dmsnell.
Fixes #54738.
Built from https://develop.svn.wordpress.org/trunk@59902


git-svn-id: http://core.svn.wordpress.org/trunk@59244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-03 00:19:23 +00:00
Peter Wilson
a10c294d3e Users: Use editable_roles filter for multisite sub-sites.
Adds a check of the `editable_roles` filter when adding users to a multisite sub-site to ensure the role is permitted to be used on the network. If the role is blocked by the filter, attempting to add the role will trigger a `wp_die()` similar to attempting to add a user with the role on a single site install.

Props eartboard, hareesh-pillai, ideag, sukhendu2002, spacedmonkey, thomaswm.
Fixes #43251.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-02 23:35:23 +00:00
joedolson
5961453fc3 Media: Simplify file name generation for image conversions.
Use the empty string argument in `$editor->save()` added in [59855] to simplify the code used to prevent image format conversions from getting a suffix appended to their file names.

Props joedolson, audrasjb, azaozz.
See #62385.
Fixes #63003.
Built from https://develop.svn.wordpress.org/trunk@59897


git-svn-id: http://core.svn.wordpress.org/trunk@59239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-02 18:55:23 +00:00
John Blackbourn
01c10003eb Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59896


git-svn-id: http://core.svn.wordpress.org/trunk@59238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-02 00:43:23 +00:00
Sergey Biryukov
5b37e6aff1 Site Health: Fix typo in the robots.txt check messages.
Follow-up to [59890].

See #56595.
Built from https://develop.svn.wordpress.org/trunk@59894


git-svn-id: http://core.svn.wordpress.org/trunk@59236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-01 00:29:24 +00:00
Aaron Jorbin
bc60a625bb Site Health: Add a robots.txt check to the server data.
Provide a bit of information about robots.txt to help people understand if the file is generated by WordPress.

Props zodiac1978, audrasjb, joostdevalk, jorbin.
Fixes #56595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@59232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-28 16:58:38 +00:00
audrasjb
6afbd33612 General: Add missing space before checked attributes in various WP_Screen functions.
Props kkmuffme, audrasjb. 
Fixes #63037.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-28 15:01:24 +00:00
audrasjb
201731789c Comments: Remove bulk action dropdown depending on user caps.
This changeset introduces the `manage_users-network_custom_column` filter that fires for each custom column in the Network Users list table. This is an override hook for `manage_users_custom_column` which was already filtering each custom column in all Users list tables.

Props lenasterg, realloc, audrasjb.
Fixes #43318.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-27 00:09:23 +00:00
audrasjb
2574278658 Comments: Remove bulk action dropdown depending on user caps.
This changeset adds a conditional to show the comments bulk actions dropdown only when the current user has `moderate_comments` capability.

Props snicco, iflairwebtechnologies, shanemuir, audrasjb.
Fixes #59440.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-26 23:50:23 +00:00
John Blackbourn
802523f5d7 Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59865


git-svn-id: http://core.svn.wordpress.org/trunk@59207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-24 13:43:23 +00:00
John Blackbourn
ecc9f15d4c Docs: Various improvements to inline documentation.
See #62281
Built from https://develop.svn.wordpress.org/trunk@59861


git-svn-id: http://core.svn.wordpress.org/trunk@59203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-23 11:11:21 +00:00
audrasjb
7f13d32bc2 Site Health: Improve fonts directory check.
This changeset enhances the filesystem checks in the Site Health debug data by addressing the following:
- Existence Check: Before checking if the fonts directory is writable, it first verifies whether the directory exists.
- Improved Messaging: If the fonts directory does not exist, the debug output now reflects this scenario as "Does not exist". If the directory exists, it shows whether it is writable or not.

Props zodiac1978, samiamnot, sainathpoojary, abcd95, ankitkumarshah, im3dabasia1.
Fixes #62633.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-21 14:52:24 +00:00
desrosj
d6db5ff0a8 Coding Standards: Properly space and indent ! defined() checks.
Props viralsampat shailu25, audrasjb.
Fixes #62750.
Built from https://develop.svn.wordpress.org/trunk@59846


git-svn-id: http://core.svn.wordpress.org/trunk@59188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 08:42:28 +00:00
Adam Silverstein
d9e9011369 Media: fix indentation for media.php.
Follow up to r59844.

Props: mukesh27.

See #62900.


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


git-svn-id: http://core.svn.wordpress.org/trunk@59187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 07:24:16 +00:00
Adam Silverstein
da8f997ab6 Media: fix full size image generation for PNG uploads.
Remove a limitation that prevented PNG uploads from generating the full sized image. Fixes a bug where using the image_editor_output_format filter would not generate full sized images as expected. The removed code was present to prevent overly large PNG image output, however this issue was resolved separately in #36477.

Props: adamsilverstein, pixlpirate, flixos90, mukesh27, azaozz.

Fixes #62900.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-20 06:46:19 +00:00
John Blackbourn
05770e25c3 Security: Switch to using bcrypt for hashing user passwords and BLAKE2b for hashing application passwords and security keys.
Passwords and security keys that were saved in prior versions of WordPress will continue to work. Each user's password will be opportunistically rehashed and resaved when they next subsequently log in using a valid password.

The following new functions have been introduced:

* `wp_password_needs_rehash()`
* `wp_fast_hash()`
* `wp_verify_fast_hash()`

The following new filters have been introduced:

* `password_needs_rehash`
* `wp_hash_password_algorithm`
* `wp_hash_password_options`

Props ayeshrajans, bgermann, dd32, deadduck169, desrosj, haozi, harrym, iandunn, jammycakes, joehoyle, johnbillion, mbijon, mojorob, mslavco, my1xt, nacin, otto42, paragoninitiativeenterprises, paulkevan, rmccue, ryanhellyer, scribu, swalkinshaw, synchro, th23, timothyblynjacobs, tomdxw, westi, xknown.

Additional thanks go to the Roots team, Soatok, Calvin Alkan, and Raphael Ahrens.

Fixes #21022, #44628
Built from https://develop.svn.wordpress.org/trunk@59828


git-svn-id: http://core.svn.wordpress.org/trunk@59170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-17 11:24:21 +00:00
audrasjb
737185823f Themes: Avoid double hashed value for background-color in custom backgrounds.
This changeset replaces the hardcoded hash symbol with running `maybe_hash_hex_color()` on the full `background-color` value provided via the custom background feature, so the hash is only added if it is needed. By doing so, if a theme developer sets a background color value that uses a hash (#), WordPress won't add an additional hash anymore when outputting the relevant CSS. Duplicate hash symbols (##) can break CSS background color declarations.

Props hovhanneshovakimyan, joyously, poena, 
Fixes #40057.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 21:06:25 +00:00
John Blackbourn
bb832dcfef Security: Explicitly require the hash PHP extension and add requirement checks during installation and upgrade.
This extension provides the `hash()` function and support for the SHA-256 algorithm, both of which are required for upcoming security related changes. This extension is almost universally enabled, however it is technically possible to disable it on PHP 7.2 and 7.3, hence the introduction of this requirement and the corresponding requirement checks prior to installing or upgrading WordPress.

Props peterwilsoncc, ayeshrajans, dd32, SergeyBiryukov, johnbillion.

Fixes #60638, #62815, #56017

See #21022
Built from https://develop.svn.wordpress.org/trunk@59803


git-svn-id: http://core.svn.wordpress.org/trunk@59145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-11 11:14:21 +00:00
John Blackbourn
0ac2a96887 Administration: Correct the capitalisation of "site administrator" for consistency with other instances within WordPress.
Follow-up to [59799].

Props ocean90

Fixes #48879
Built from https://develop.svn.wordpress.org/trunk@59800


git-svn-id: http://core.svn.wordpress.org/trunk@59142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 17:06:23 +00:00
John Blackbourn
e1c2d3f420 Administration: Remove a potentially incorrect addressee and improve the phrasing used in the confirmation email when a user attempts to change the administration email address.
Props MadtownLems, ilovecats7, rehanali, iflairwebtechnologies, thehercules

Fixes #48879
Built from https://develop.svn.wordpress.org/trunk@59799


git-svn-id: http://core.svn.wordpress.org/trunk@59141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 15:31:22 +00:00
John Blackbourn
cf4686e4b6 Cron API: Clear the recovery_mode_clean_expired_keys cron event when converting a single site installation to Multisite.
This cron event is not used when Multisite is in use.

Props debarghyabanerjee, johnbillion, narenin

Fixes #61450
Built from https://develop.svn.wordpress.org/trunk@59798


git-svn-id: http://core.svn.wordpress.org/trunk@59140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-10 15:01:23 +00:00
audrasjb
c5293a0be9 Administration: Error messages improvements in WP Admin.
This changeset improves a bunch of WP-Admin error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.

Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
See #43622.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 15:53:17 +00:00
audrasjb
1498d000ba Administration: Replace "Add New {Item}" wording with "Add {Item}" across the administration.
This changeset replaces each occurrence of "Add New {Item}" label with "Add {Item}" in WordPress administration, to make the interface more consistent and simplify the translation effort.

Props jameskoster, audrasjb, ntsekouras, afercia, peterwilsoncc, youknowriad, joedolson, sukhendu2002, jdy68, beryldlg, fxbenard.
See #61219.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-08 11:44:24 +00:00
Sergey Biryukov
f548f56548 Coding Standards: Use strict comparison in media_upload_library_form().
Includes bringing some consistency with a similar fragment in `WP_List_Table::months_dropdown()`.

Follow-up to [3724], [7062], [15491], [59755].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-06 12:24:24 +00:00
Sergey Biryukov
6e0285406d Coding Standards: Use a more meaningful variable name in WP_List_Table::months_dropdown().
As per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]:
> Don't abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to [8646], [15491].

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59755


git-svn-id: http://core.svn.wordpress.org/trunk@59097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-03 23:43:21 +00:00
John Blackbourn
b765f8b44c Security: Add the SensitiveParameter attribute to sensitive parameters.
Values passed to parameters with this attribute will be redacted if present in a stack trace when using PHP 8.2 or later. This reduces the chance that passwords and security keys get accidentally exposed in debug logs and bug reports.

Props petitphp, TobiasBg, jrf, johnbillion.

Fixes #57304
Built from https://develop.svn.wordpress.org/trunk@59754


git-svn-id: http://core.svn.wordpress.org/trunk@59096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-03 19:52:24 +00:00
Sergey Biryukov
d78ac132af Coding Standards: Use strict comparison in get_media_item().
Follow-up to [12081], [12351].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-02 11:17:24 +00:00
Sergey Biryukov
6e26ca2648 Coding Standards: Use strict comparison in some legacy media functions.
Follow-up to [7062], [8653], [12188].

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


git-svn-id: http://core.svn.wordpress.org/trunk@59092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-02-01 20:52:19 +00:00
audrasjb
34458b5bca Coding standards: Remove unused variables from privacy_policy_guide() function.
See #62279.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-29 21:54:23 +00:00
audrasjb
6376a8f6f7 Privacy: Replace Policy Name with an auto increment to avoid internationalized plugin name issues.
This changeset replaces plugin sanitized names with an auto increment integer to fix an issue with accordions displaying privacy policies for plugins with special characters in their names.

Follow-up to [50161].

Props ecgan, sabernhardt, audrasjb.
Fixes #62713.



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


git-svn-id: http://core.svn.wordpress.org/trunk@59074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-29 21:35:19 +00:00
John Blackbourn
b7a73d6a45 Security: Enable the referrer policy header on the login screen.
This sets the same referrer policy of `strict-origin-when-cross-origin` that's used in the admin area to prevent a referrer being sent to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within the URL.

The header can be disabled if necessary by removing the `wp_admin_headers` action from the `login_init` hook.

Props kkmuffme, sagarlakhani, albatross10

Fixes #62273
See #42036
Built from https://develop.svn.wordpress.org/trunk@59712


git-svn-id: http://core.svn.wordpress.org/trunk@59054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-01-27 14:41:22 +00:00