Commit Graph

20154 Commits

Author SHA1 Message Date
Andrew Ozz
c319239bc3 Filesystem API: Ensure wp_tempnam() does not produce file names longer than 255 characters as this is the limit on most filesystems.
Props: costdev, doems, mikeschroder, oglekler, mrinal013.
Fixes: #35755.
Built from https://develop.svn.wordpress.org/trunk@56186


git-svn-id: http://core.svn.wordpress.org/trunk@55698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-10 20:33:23 +00:00
audrasjb
145060e3c0 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175].

Props costdev, audrasjb.
See #58459.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-09 20:07:22 +00:00
audrasjb
c4b57cbbe3 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174].

Props costdev, audrasjb.
See #58459.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-09 19:56:23 +00:00
audrasjb
7b853d4b69 Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Props costdev, audrasjb.
See #58459.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-09 19:52:24 +00:00
audrasjb
f22f958bb5 Help/About: Add Help text for Rollback feature.
This changeset adds a new Help text for Rollback feature in the WordPress Updates screen. Also adds a link to the "Common Errors" HelpHub documentation page.

Follow-up to [51857].

Props costdev, afragen, audrasjb, kebbet, marybaum.
Fixes #58199.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-09 14:49:22 +00:00
John Blackbourn
974d2e18ec Docs: Correct the formatting of various filter documentation.
See #57840

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


git-svn-id: http://core.svn.wordpress.org/trunk@55669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-07 00:36:22 +00:00
audrasjb
e952b31145 Users: Remove password reset links when the feature is not allowed for a specific user.
This also introduces `wp_is_password_reset_allowed_for_user()` which returns `false` when password reset is not allowed for a specific user. This can be 
filtered by developers using the existing `allow_password_reset` hook.

Props ocean90, cshark, robinwpdeveloper, tahmina1du, kraftbj.
Fixes #58194.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-06 12:47:23 +00:00
Sergey Biryukov
8695849124 Docs: Document the return value of wp_check_php_version() using hash notation.
Follow-up to [42832].

See #57840.
Built from https://develop.svn.wordpress.org/trunk@56144


git-svn-id: http://core.svn.wordpress.org/trunk@55656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-06 00:16:23 +00:00
audrasjb
a295a53218 Administration: CSS selector correction for list table checkboxes.
This replaces `.check-column .label-covers-full-cell input` selector with `.check-column .label-covers-full-cell + input`.

Follow-up to [55954].

Props sabernhardt.
Fixes #21516.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-05 07:08:25 +00:00
Sergey Biryukov
3ff68df981 Upgrade/Install: Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout().
This avoids an `Undefined variable $checkout` PHP warning if all of the directories checked for access are disallowed due to the PHP `open_basedir` restrictions.

Follow-up to [55425].

Props jqz, costdev, audrasjb.
Fixes #58563.
Built from https://develop.svn.wordpress.org/trunk@56124


git-svn-id: http://core.svn.wordpress.org/trunk@55636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-02 10:35:23 +00:00
audrasjb
9e1170351e Quick/Bulk Edit: Ensure scheduled posts are published when using Bulk Edit.
This changeset ensures scheduled posts are actually published when changing their status to "Published" using bulk edit. Also adds related unit tests.

Props siobhan, Clorith, webcommsat, cadic, oglekler, audrasjb, pavanpatil1.
Fixes #31635.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-02 08:04:21 +00:00
Sergey Biryukov
7992c49b5f Site Health: Correct the label for wp-content directory check.
This removes HTML tags from the label, which were not displayed as expected due to escaping. Including the directory name in the label is also redundant, as it is already mentioned in the check result description directly below.

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

Follow-up to [55720].

Props dlh, mukesh27, audrasjb, SergeyBiryukov.
See #58678.
Built from https://develop.svn.wordpress.org/trunk@56117


git-svn-id: http://core.svn.wordpress.org/trunk@55629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-30 11:13:27 +00:00
Sergey Biryukov
86d28672fe Filesystem API: Define password as null if not set when using SSH2 with public/private keys.
This resolves an `Undefined array key "password"` PHP warning in `WP_Filesystem_SSH2::connect()` when using public/private key authentication, in which case providing a password is optional.

Follow-up to [8865].

Props J-Dill, costdev, ehsanakhgari, dd32.
Fixes #33196.
Built from https://develop.svn.wordpress.org/trunk@56111


git-svn-id: http://core.svn.wordpress.org/trunk@55623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-29 17:05:30 +00:00
audrasjb
c9421f4401 Upgrade/Install: Only show errors if there is nothing to update.
Previously, when the `do-plugin-upgrade` or `do-theme-upgrade` actions were accessed directly on `update-core.php`, an error message stating "Select one or 
more (plugins|themes) to update" would be shown even if there was nothing to update.

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

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



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


git-svn-id: http://core.svn.wordpress.org/trunk@55619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-29 07:21:22 +00:00
audrasjb
f7a1d86d17 Themes: Fix layout issue on the Themes page background overlay.
This changeset replaces the `780px` media query `max-width` value with `782px` for better consistency and to fix a responsive layout issue.

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



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


git-svn-id: http://core.svn.wordpress.org/trunk@55616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-29 06:48:24 +00:00
Joe McGill
ca421dd3c0 Build/Test Tools: Update terser-webpack-plugin.
This bumps the `terser-webpack-plugin` dependency to version `5.3.9`, which fixes an error during the minification process of the `@wordpress/block-library` package during builds.

Props clorith, azaozz, desrosj.
Fixes #58660, See #57657.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 20:08:46 +00:00
Sergey Biryukov
d33f37603e Quick/Bulk Edit: Add an action hook to bulk_edit_posts() function.
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before the function returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` calls.

Follow-up to [8973].

Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev, webcommsat, marybaum, oglekler, mukesh27, SergeyBiryukov.
Fixes #28112.
Built from https://develop.svn.wordpress.org/trunk@56091


git-svn-id: http://core.svn.wordpress.org/trunk@55603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 13:19:31 +00:00
Andrew Ozz
0a265883b9 Revert use of str_starts_with() and str_contains() in update-core.php.
Fixes updating WordPress from 5.7 and earlier versions. When updating this file runs first in the old version where the polifills may not be available.

Props: ironprogrammer, SergeyBiryukov, dd32, azaozz.
See: #58206.
Built from https://develop.svn.wordpress.org/trunk@56088


git-svn-id: http://core.svn.wordpress.org/trunk@55600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-28 10:09:29 +00:00
Felix Arntz
905cff1733 Site Health: Include new WP_DEVELOPMENT_MODE in the list of constants.
Follow-up to [56042].

Props kebbet.
Fixes #58646.
See #57487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 22:03:29 +00:00
Sergey Biryukov
26a0bf0049 Media: Only show “Copy” and “Download” actions when an attachment URL is available.
Includes unit tests to verify the logic for displaying row actions in the Media Library in certain scenarios, e.g. with and without the “Trash” or “Unattached” filter.

Follow-up to [55949].

Props costdev, kebbet, mukesh27, oglekler.
Fixes #57893.
Built from https://develop.svn.wordpress.org/trunk@56072


git-svn-id: http://core.svn.wordpress.org/trunk@55584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 16:29:28 +00:00
Mike Schroder
58fd744433 Filesystem API: Allow optional inclusion of hidden files in list_files().
Adds a new optional `$include_hidden` parameter to allow the inclusion of hidden (`.` prefixed) files.
Defaults to false for backward compatibility.

Props yani.iliev, sabernhardt, costdev, rutviksavsani, zunaid321, azaozz.
Fixes #53659.
Built from https://develop.svn.wordpress.org/trunk@56069


git-svn-id: http://core.svn.wordpress.org/trunk@55581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 16:08:27 +00:00
audrasjb
c11e87fbb8 Plugins: Introduce the plugins_list filter.
This changeset adds the `plugins_list` hook, which can be use to filter the list of plugin displayed on WP Admin Plugins screen.

Props nateallen, fischfood, mukesh27, peterwilsoncc, SergeyBiryukov, audrasjb, costdev, ecorica, zunaid321.
Fixes #57278.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 16:01:27 +00:00
isabel_brison
fbbe0f0a76 General: add block theme previews.
Adds a preview link to block themes in the themes screen, opening the previews in the site editor.

Props onemaggie, andraganescu, audrasjb, flixos90, peterwilsoncc, spacedmonkey, scruffian.
Fixes #58561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 09:36:21 +00:00
audrasjb
37ebdb8fa1 Site Health: Add server time debug data.
This changeset adds "Current time, "Current UTC time" and "Current Server time" under the "Server" section of Site Health debug infos. This provides the 
current time, the server time, and allow for comparison if there's some time-related issues.

Props sebastienserre, Clorith, audrasjb, kebbet, robinwpdeveloper, hrrarya, mukesh27, hareesh-pillai, costdev.
Fixes #56378.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 08:04:20 +00:00
isabel_brison
c326f4855c Editor: navigation post preloading.
Adds a hook for preloading navigation posts in site editor.

Props get_dave, spacedmonkey, audrasjb, ramonopoly.
Fixes #58556.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 06:38:26 +00:00
spacedmonkey
6adb9be81f Editor: Register core block styles in one place.
Register all core blocks in a new function called `register_core_block_style_handles`. This mirrors the function `wp_default_styles` where all core styles are registered in one place. This improves block registration performance, as it avoids expensive file lookups, like realpath in `register_block_style_handle`. The new function `register_core_block_style_handles` uses `glob` to get all css files in the blocks directory. This glob is cached in a transient to save lookups on subsequent requests. The function `register_block_style_handle` now checks to see if the style handle is already registered before trying to register it again. 

Props mukesh27, westonruter, flixos90, joemcgill, spacedmonkey.
Fixes #58528.
Built from https://develop.svn.wordpress.org/trunk@56044


git-svn-id: http://core.svn.wordpress.org/trunk@55556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 21:17:22 +00:00
Sergey Biryukov
ad16732d27 Code Modernization: Use str_contains() in a few more places.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [55988], [56021].

See #58206.
Built from https://develop.svn.wordpress.org/trunk@56031


git-svn-id: http://core.svn.wordpress.org/trunk@55543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 10:17:25 +00:00
isabel_brison
8a03512912 Editor: fix site editor layout bug.
Removes additional wrapper introduced in [56025], which interfered with the site editor flex layout.

Props ramonopoly, kevin940726, joedolson.
Fixes 56228.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-26 04:48:24 +00:00
joedolson
c4a22d5a34 Upgrade/Install: Update 'show details' button change.
Add a up/down arrow for visual affordance about the purpose of the button link; change button text from "Show details" to "More details".

Props krupajnanda, subrataemfluence, audrasjb, afercia, nrqsnchz, joedolson.
Fixes #44714.
Built from https://develop.svn.wordpress.org/trunk@56027


git-svn-id: http://core.svn.wordpress.org/trunk@55539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 22:57:26 +00:00
joedolson
993e1093eb Administration: Fix visual regression in media search input.
Follow up to [r56023]. Improve handling of breakpoint between 782 and 1000px for media grid view & repair styles for media modal search input.

Props kebbet, joedolson.
Fixes #57949.
Built from https://develop.svn.wordpress.org/trunk@56026


git-svn-id: http://core.svn.wordpress.org/trunk@55538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 21:13:21 +00:00
joedolson
5fc049a79c Editor: Add no-js fallback for site editor.
Add a fallback condition with heading and error notice to handle a no JavaScript state for the site editor, comparable to what already exists in the post editor. 

Props afercia, joedolson, fencermonir, zebaafiashama, alexstine, rudlinkon.
Fixes #56228.
Built from https://develop.svn.wordpress.org/trunk@56025


git-svn-id: http://core.svn.wordpress.org/trunk@55537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 19:54:22 +00:00
joedolson
8d987eef49 Upgrade/Install: Add aria-describedby for input descriptions.
Accessibly associate field description text with relevant input fields. Add `aria-describedby` and target IDs for each description field. Update privacy text note to better reflect relevancy to specific fields.

Props costdev, joedolson.
Fixes #58613.
Built from https://develop.svn.wordpress.org/trunk@56024


git-svn-id: http://core.svn.wordpress.org/trunk@55536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 18:44:23 +00:00
joedolson
abc3ea5422 Administration: Consistent positioning and size of search form.
Move the visual positioning of the posts search form into it's DOM position. Fixes an accessibility bug where the keyboard focus sequence did not match the visual order. Change the media search form in list view to match the format of other post views. Give search forms a consistent layout on mobile.

Props oglekler, sabernhardt, joedolson.
Fixes #57949.
Built from https://develop.svn.wordpress.org/trunk@56023


git-svn-id: http://core.svn.wordpress.org/trunk@55535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 17:21:28 +00:00
joedolson
69692d50cb Quick/Bulk Edit: Don't set publish date when editing drafts.
Ensure that quick edit does not define a publish date if the post status is one of 'draft', 'pending', or 'auto-draft'.

Props uxtremist, SergeyBiryukov, Denis-de-Bernardy, jane, rfischmann, mista-flo, rutviksavsani, oglekler, joedolson.
Fixes #19907.
Built from https://develop.svn.wordpress.org/trunk@56022


git-svn-id: http://core.svn.wordpress.org/trunk@55534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-25 15:20:22 +00:00
joedolson
b3eb7b301c Editor: Improve accessibility of new custom field UI.
Add labels; change Enter new/Cancel link to a button; move focus to input when creating new field; move Add Custom Field out of fields table. 

Props jane, batmoo, karmatosed, franrosa, sabernhardt, annashopina, oglekler, joedolson.
Fixes #15631.
Built from https://develop.svn.wordpress.org/trunk@56018


git-svn-id: http://core.svn.wordpress.org/trunk@55530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 14:32:20 +00:00
Sergey Biryukov
cded028e59 Code Modernization: Use str_ends_with() in a few more places.
`str_ends_with()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) ends with the given substring (needle).

WordPress core includes a polyfill for `str_ends_with()` on PHP < 8.0 as of WordPress 5.9.

Follow-up to [55990].

See #58220.
Built from https://develop.svn.wordpress.org/trunk@56014


git-svn-id: http://core.svn.wordpress.org/trunk@55526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 09:52:19 +00:00
audrasjb
6628bb32a3 Administration: Reduce translation calls after [55969].
Follow-up to [55969].

Props swissspidy, sabernhardt.
Fixes #57675.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 05:30:21 +00:00
audrasjb
58341e16ce Coding Standards: Fix undeclared variable issue.
Follow-up to [56009], [56010].

See #40966.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 04:22:25 +00:00
audrasjb
3c84117a95 Coding Standards: Fix missing semicolon after [56009].
See #40966.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 04:10:23 +00:00
audrasjb
c77c814942 Upgrade/Install: Prevent users from sending multiple bulk plugin updates.
This changeset improves `update.js` by adding `is-enqueued` class to enqueued plugin updates to prevent users from asking for several updates for the same 
plugin at the same time, which previously resulted to …an interesting experience.

Props bitnissen, swissspidy, MarcGuay, xkon, afercia, swissspidy, bookdude13, simonemanfre, vasilism, costdev, zunaid321.
Fixes #40966.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-24 04:00:30 +00:00
joedolson
549163d3e9 Upgrade/Install: Show/hide toggle on password fields.
Add a show/hide toggle for new passwords in initial user creation and database access during install and setup process using the same model as on user profiles. Add a new password toggle script. Change setup config table to two columns, matching the install table layout.

Props xmarcos, matt, markjaquith, nazgul, akbigdog, intoxination, rob1n, MichaelH, empireoflight, rmccue, markoheijnen, r0uter, amansurov, bi0xid, DrewAPicture, Narthur, wpnook, markparnell, costdev, clorith, ryokuhi, sabernhardt, bgoewert, ironprogrammer, adeltahri, joedolson, mukesh27, audrasjb, sergeybiryukov.
Fixes #3534.
Built from https://develop.svn.wordpress.org/trunk@56008


git-svn-id: http://core.svn.wordpress.org/trunk@55520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-23 23:09:29 +00:00
joedolson
d1717e60b9 Administration: Backwards compatibility for new sortable keys.
Replace use of `list` to parse array keys into variables. `list` throws errors if the keys don't exist, and many extenders will not define the new array keys. The code path already falls back effectively for empty values.

Also add translator comments to screen reader hidden text, fix a docblock, and fix an HTML error.

Follow up to [r55971].

Props kebbet, chouby, joedolson.
Fixes #32170.
Built from https://develop.svn.wordpress.org/trunk@56004


git-svn-id: http://core.svn.wordpress.org/trunk@55516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-23 17:49:28 +00:00
audrasjb
73922adc1e Upgrade/Install: Move location of $upgrade_notice for better consistency.
Since the `$auto_upgrade_notice` has been added to the `update-core.php` table listing if an `$upgrade_notice` is present by virtue of the `readme.txt` 
containing data in the `== Upgrade Notice ==` section, this text will appear in between the compatibility information and the auto update information.

This changeset provides a more consistent appearance in the interface.

Props afragen, costdev, zunaid321.
Fixes #57939.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-23 15:03:22 +00:00
Sergey Biryukov
3e3c741d08 Database: Replace str_contains() and str_ends_with() usage in wpdb methods.
This avoids fatal errors on PHP < 8.0 if the file is included directly outside of WordPress core, e.g. by HyperDB.

While WordPress core does include polyfills for these functions, they are not directly loaded in the `wpdb` class.

Follow-up to [54384], [55157], [55158], [55988], [55990].

Props dd32, ryelle, joedolson.
See #58206.
Built from https://develop.svn.wordpress.org/trunk@55994


git-svn-id: http://core.svn.wordpress.org/trunk@55506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-23 12:17:24 +00:00
Sergey Biryukov
84e9601e5a Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with().
`str_starts_with()` and `str_ends_with()` were introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) begins or ends with the given substring (needle).

WordPress core includes a polyfill for these functions on PHP < 8.0 as of WordPress 5.9.

This commit uses `str_starts_with()` and `str_ends_with()` in core files where appropriate:
* `$needle === substr( $string, 0, $length )`, where `$length` is the length of `$needle`, is replaced with `str_starts_with( $haystack, $needle )`.
* `$needle === substr( $string, $offset )`, where `$offset` is negative and the absolute value of `$offset` is the length of `$needle`, is replaced with `str_ends_with( $haystack, $needle )`.

This aims to make the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [52039], [52040], [52326], [55703], [55710], [55987], [55988].

Props Soean, spacedmonkey, Clorith, ocean90, azaozz, sabernhardt, SergeyBiryukov.
Fixes #58220.
Built from https://develop.svn.wordpress.org/trunk@55990


git-svn-id: http://core.svn.wordpress.org/trunk@55502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 14:57:24 +00:00
joedolson
372d9c07e5 Administration: Fix password layout for RTL and mobile.
Adjust hide password field to be full width on mobile and remove 5rem left padding inside input.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 14:38:19 +00:00
Sergey Biryukov
1ce5dc7444 Code Modernization: Replace usage of strpos() with str_contains().
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [52039], [52040], [52326], [55703], [55710], [55987].

Props Soean, spacedmonkey, costdev, dingo_d, azaozz, mikeschroder, flixos90, peterwilsoncc, SergeyBiryukov.
Fixes #58206.
Built from https://develop.svn.wordpress.org/trunk@55988


git-svn-id: http://core.svn.wordpress.org/trunk@55500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 14:36:26 +00:00
audrasjb
a8efd010bd Help/About: Improve Dashboard screen options behavior on small screens.
This changeset improve Dashboard screen options by stacking them vertically on small screens.

Props dhrumilk, prashantbhivsane, marybaum, dhruvishah2203, ababir, mukesh27, chiragrathod103, oglekler, tb1909, jahidcse, audrasjb.
Fixes #57977.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 07:54:23 +00:00
audrasjb
017d2df5d0 Administration: Replace contracted verb forms for better consistency.
Previously: [52979], [52978].
Props sabernhardt.
See #30796.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 05:25:29 +00:00
joedolson
2d7dafe2b8 Administration: Hide password in options/writing.
Hide the password for the "Post via e-mail" settings in writing options. Use the same password hiding mechanisms in use elsewhere in core.

Props mastrup, denis-de-bernardy, ryan, brookedot, wojtek.szkutnik, dd32, sabreuse, sergeybiryukov, costdev, peterwilsoncc, zgrkaralar, clorith, renyot, sabernhardt, boniu91, ironprogrammer, bgoewert.
Fixes #9883.
Built from https://develop.svn.wordpress.org/trunk@55974


git-svn-id: http://core.svn.wordpress.org/trunk@55486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 00:32:21 +00:00
joedolson
fd17918a8a Administration: Set accessible state for list table headers.
Implement `aria-sort` and change icon states to indicate current sort for list tables. Allow screen reader users to get context about the current sort and allow sighted users to know how the table is currently sorted.

Props afercia, rianrietveld, joedolson, alexstine, johnjamesjacoby.
Fixes #32170.
Built from https://develop.svn.wordpress.org/trunk@55971


git-svn-id: http://core.svn.wordpress.org/trunk@55483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 21:47:23 +00:00
audrasjb
6bd2392ecc Administration: Replace Tagline option placeholder with a description.
As placeholders may introduce confusion about whether the example is the input's predefined value or not, this changeset moves the "Just another WordPress 
site" historic tagline as an example quoted in the field's description.

Props Cybr, audrasjb, sabernhardt, pavanpatil1, tb1909.
Fixes #57675.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 20:50:22 +00:00
joedolson
7a4251fae4 Administration: Make checkbox column clickable.
Change the `label` for `.check-column` inside list tables to a block filling the entire cell. Improves accessibility by increasing the target area for the control.

Props mitchoyoshitaka, lessbloat, sabernhardt, ogleker, tacoverdo, joostdevalk, karmatosed.

Fixes #21516.
Built from https://develop.svn.wordpress.org/trunk@55954


git-svn-id: http://core.svn.wordpress.org/trunk@55466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-21 01:54:19 +00:00
Sergey Biryukov
b1fed29f55 Media: Display the “Copy URL” and “Download file” row actions when the “Unattached” filter is applied.
Due to partially duplicated logic for displaying row actions in the Media Library with and without the “Unattached” filter, the “Copy URL” and “Download file” row actions were unintentionally missing with the filter applied.

This commit aims to simplify the logic and bring more consistency to the code.

Includes displaying the “Download file” row action even when the “Trash” filter is applied, giving the user one more chance to download the media file before they delete it.

Follow-up to [8901], [13100], [16227], [16229], [52842], [55198], [55221].

Props kebbet, costdev, pbiron, oglekler, SergeyBiryukov.
Fixes #57890, #57893.
Built from https://develop.svn.wordpress.org/trunk@55949


git-svn-id: http://core.svn.wordpress.org/trunk@55461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-20 15:47:21 +00:00
Peter Wilson
b5da380334 Media: Redirect deprecated wp-admin/media.php file.
Redirect users visiting the `wp-admin/media.php` file to the media library, `wp-admin/upload.php`. An user facing warning is displayed when the media library is reached via a deprecated link.

Follow up to [55647].

Props jorbin, audrasjb, azaozz, NekoJonez, kebbet, costdev.
Fixes #57612.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 23:20:21 +00:00
John Blackbourn
acc6e5d685 General: Replace some instances of "blog" with "site" in documentation, translator comments, and user-facing text strings.
This is not an exhaustive change, but it gets us closer to using "site" in place of "blog" in as many places as possible.

Props NekoJonez, audrasjb, oglekler

Fixes #58117

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


git-svn-id: http://core.svn.wordpress.org/trunk@55454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 18:27:27 +00:00
Peter Wilson
3d94d17402 Filesystem API: Attempt to create directory in copy_dir().
Adds a check to the start of `copy_dir()` that the destination directory exists and attempts to create it if it does not.

An error is returned if the directory can not be created, either due to a permissions error or the parent directory not existing.

Props caraffande, costdev, zunaid321.
Fixes #41855.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 02:00:19 +00:00
joedolson
888f082871 Media: Remove duplicate div containers.
Follow-up to [55919]. Remove two hidden divs accidentally duplicated in patch refreshing.

Props azaozz.
Fixes #50523.
Built from https://develop.svn.wordpress.org/trunk@55936


git-svn-id: http://core.svn.wordpress.org/trunk@55448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 16:11:18 +00:00
Andrew Ozz
5c10f75f9e Media: Deprecate the 'edit_custom_thumbnail_sizes' filter and disable the "Apply changes to [Thumbnail|All|All except thumbnail]" UI in the image editor. Add a (boolean) filter to reenable that UI.
Props peterwilsoncc, costdev, azaozz.
See: #57685.
Built from https://develop.svn.wordpress.org/trunk@55935


git-svn-id: http://core.svn.wordpress.org/trunk@55447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 14:24:20 +00:00
joedolson
07fa311aff Upgrade/Install: Log in link should look like a link.
Change the log in link that appears after completing installation so that it does not use the button styling. Links should look like links.

Props xavortm, menakas, afercia, rianrietveld, johnbillion, drw158, joedolson.
Fixes #40470.
Built from https://develop.svn.wordpress.org/trunk@55933


git-svn-id: http://core.svn.wordpress.org/trunk@55445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-17 21:47:24 +00:00
joedolson
9b15db20d3 Media: Update admin image editor design.
Significant restructure of the admin image editor interface, but no new functionality. Reorganize editing buttons into a common region at the top of the editor. Move image rotation tools into a pop-out menu. Add 180 degree rotation option. Add scale button to control group. Move sidebar tools next to the editing canvas to improve visual proximity between action and result. Enlarge editing canvas and crop handles. Separate activating crop functions from applying crop. Add numeric inputs for crop & scale values. 

A long term goal is to move undo/redo and cancel/save into the modal title bar, but that is not feasible without significant updates to the modal framework.

Props afercia, karmatosed, nrqsnchz, antpb, chaion07, costdev, peterwilsoncc, antpb, sabernhardt, prashantbhivsane, joedolson.
Fixes #50523.
Built from https://develop.svn.wordpress.org/trunk@55919


git-svn-id: http://core.svn.wordpress.org/trunk@55431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 20:42:27 +00:00
audrasjb
9ffee539ab Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911], [55916].

Props costdev.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 14:08:18 +00:00
audrasjb
3ce7c7e435 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911].

Props costdev, audrasjb.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 12:57:20 +00:00
audrasjb
5be9311067 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Props costdev, audrasjb.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 06:34:27 +00:00
Sergey Biryukov
39c2cef0c9 Coding Standards: Use strict comparison in wp-admin/options-writing.php.
Follow-up to [4326], [19304].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-10 07:03:18 +00:00
audrasjb
116d5d03c3 Plugins: Display Auto-updates filters when the current view is "Must Use" or "Drop-in".
This changeset fixes a bug where the "Auto-updates Enabled/Disabled" filters were not showing when the current view is "Must Use" or "Drop-in".

Props NekoJonez, pbiron, costdev, audrasjb.
Fixes #54309.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-10 05:30:22 +00:00
audrasjb
b05a629f8b Upgrade/Install: Improve WP_Upgrader strings rendering on small screens.
This changeset adds a `pre` class to "Downloading update from…" user facing strings located in `Core_Upgrader`, `Language_Pack_Upgrader`, `Plugin_Upgrader` and 
`Theme_Upgrader` classes.

Follow-up to [11295].

Props sumitsingh, costdev.
Fixes #58477.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 14:18:21 +00:00
Dominik Schilling
dbf0e1bf9e Query: Allow queries by wp_dashboard_recent_posts() to be cached.
Set the `cache_results` argument to `true` for `WP_Query` to ensure the posts queries on the dashboard can also be cached.

Props benjgrolleau.
Fixes #57055.
Built from https://develop.svn.wordpress.org/trunk@55895


git-svn-id: http://core.svn.wordpress.org/trunk@55407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 10:02:24 +00:00
Aaron Jorbin
1031b96997 Multisite: Require a site title when a site is created
The UI for adding a site says that title is required, however the actual code wasn't requiring it.

Props ideag.
Fixes #54012.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 09:07:20 +00:00
audrasjb
f6ee7d285f Users: Use type="hidden" for hidden input on User edit administration panel.
This hidden field added in [24552] to fix an issue with Chrome that was ignoring `autocomplete="off"` in `<input>`, by using a hidden, non-named, non-empty 
input right before the password field. However this input was only hidden via CSS and didn't have any label, which is considered as an accessibility issue. 
This changeset replaces `class="hidden"` with `type="hidden"` to properly indicate to user agents that it is an hidden field.

Follow-up to [24552].

Props smit08, audrasjb, sabernhardt, ryokuhi, tushar284, ashikurwp, siddhantwadhwani, pavanpatil1.
Fixes #56776.
 --Cette ligne, et les suivantes 
ci-dessous, seront ignorées--

M    trunk/src/wp-admin/user-edit.php
M    trunk/src/wp-admin/user-new.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@55404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 21:25:18 +00:00
audrasjb
2d5927cb92 Administration: Improve alignment in the Activity dashboard widget.
This changeset sets column layout to posts listed in the Activity dashboard widget to prevent alignement issues on line breaks.

Props sumitsingh, dhrumilk, chiragrathod103, kebbet, audrasjb, pooja1210.
Fixes #58114.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 07:09:19 +00:00
audrasjb
8c533a8442 Docs: Various docblock improvements in Custom Header Image related functions, as per docblocks standards.
See #57840.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 21:35:20 +00:00
audrasjb
6279dc749b I18N: Provide gettext context to disambiguate various translation strings.
This changeset adds context to various strings:
- `'Background'` string when referring to Custom Background appearance screens
- `'Header'` string when referring to Custom Header appearance screens
- `'General'`, `'Header'` and `'Footer'` strings when referring to template part areas

Props gonzomir, SergeyBiryukov, mukesh27, costdev, ankitmaru.
Fixes #58424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 21:05:22 +00:00
Sergey Biryukov
5a35e1a831 Coding Standards: Use strict comparison in wp-admin/users.php.
Includes minor code layout fixes for better readability.

Follow-up to [3061], [31941], [47848], [55622], [55623].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-04 02:35:19 +00:00
Sergey Biryukov
8e22eaa87c Coding Standards: Use strict comparison in wp-admin/network/users.php.
Follow-up to [12603], [18562].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-03 16:18:21 +00:00
Sergey Biryukov
01121c3440 Coding Standards: Use strict comparison in wp-admin/network/sites.php.
Follow-up to [12603], [18562], [55676].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-02 12:40:22 +00:00
Sergey Biryukov
eaafce587e Coding Standards: Use strict comparison in wp-admin/includes/update.php.
Includes minor code layout fixes for better readability.

Follow-up to [9441], [25540].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-01 15:14:27 +00:00
Sergey Biryukov
3d1140c898 Coding Standards: Use strict comparison in wp-admin/includes/menu.php.
Includes minor code layout fixes for better readability.

Follow-up to [3536], [4093], [9578], [11092], [18034].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-31 14:53:26 +00:00
John Blackbourn
f3b93e6b3a Media: Correct the fallback value passed to the $mimes parameter of wp_check_filetype_and_ext() from _wp_handle_upload(), and update corresponding documentation.
Previously when the `mimes` element was not specified in the overrides array passed to `_wp_handle_upload()` it resulted in boolean false being passed to this parameter, which is incorrect. The fallback value should be `null`.

Props platonkristinin, pkbhatt

Fixes #58349

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


git-svn-id: http://core.svn.wordpress.org/trunk@55384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 19:46:22 +00:00
Sergey Biryukov
37e599fb3e Upgrade/Install: Avoid an extra database query in populate_network().
This moves the query for user ID of the new network's administrator closer to where the value is actually used.

Includes removing unnecessary `get_userdata()` call, as user ID is the only data needed here.

Follow-up to [12756], [35575], [43628].

Props nihar007, sakibmd, mukesh27, costdev, SergeyBiryukov.
Fixes #58423.
Built from https://develop.svn.wordpress.org/trunk@55869


git-svn-id: http://core.svn.wordpress.org/trunk@55381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 14:34:22 +00:00
Sergey Biryukov
f4b232f74c Coding Standards: Use strict comparison in wp-admin/includes/schema.php.
Follow-up to [12756], [12862], [12880], [13070], [14485], [17928], [18899], [41348], [43628].

Props faisalahammad, aristath, poena, afercia, SergeyBiryukov.
Fixes #58042, #58047. See #57839.
Built from https://develop.svn.wordpress.org/trunk@55866


git-svn-id: http://core.svn.wordpress.org/trunk@55378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-29 16:26:22 +00:00
Sergey Biryukov
4581452e2b Users: Make sure bulk actions are only executed with the Apply button, not Change.
The Change button is supposed to perform the “Change role to...” action only, but could unintentionally be used for other bulk actions if the role was not selected.

This commit removes an extra check and ensures the correct error message is displayed in that case:

 Sorry, you are not allowed to give users that role.

Follow-up to [6990], [8691], [9028], [15576], [15642], [34636], [49944].

Props haritpanchal, costdev, ankit-k-gupta, SergeyBiryukov.
Fixes #57952.
Built from https://develop.svn.wordpress.org/trunk@55864


git-svn-id: http://core.svn.wordpress.org/trunk@55376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-28 11:46:24 +00:00
antpb
d4c39df308 Media: Prevent scaling up of images in the Image Editor.
Previously, when scaling an image larger than the source size in the image edit states the image would silently fail the scaling action. This patch provides an error when someone attempts to scale an image larger than the source size while also disabling the button to initiate the action. 

Props brookedot, joedolson, markoheijnen, mikeschroder, desrosj, Mista-Flo, costdev.
Fixes #26381.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 15:17:19 +00:00
Sergey Biryukov
956be813b6 Coding Standards: Improve formatting of some SQL queries for better readability.
This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.
Built from https://develop.svn.wordpress.org/trunk@55857


git-svn-id: http://core.svn.wordpress.org/trunk@55369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 12:55:19 +00:00
spacedmonkey
d8c4000c53 Comments: Move wp_queue_comments_for_comment_meta_lazyload function to the correct file.
As of [55855] wp_queue_comments_for_comment_meta_lazyload was deprecated. But deprecate to wp-admin/deprecated.php and not wp-includes/deprecated.php.This is incorrect, as this is a public function and not an admin function. 

Props SergeyBiryukov, spacedmonkey.
See #58301.
Built from https://develop.svn.wordpress.org/trunk@55856


git-svn-id: http://core.svn.wordpress.org/trunk@55368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 10:55:19 +00:00
spacedmonkey
3c5d179fc9 Comments: Deprecate wp_queue_comments_for_comment_meta_lazyload function.
As of [55749] wp_queue_comments_for_comment_meta_lazyload is no longer used in core. This commit, deprecates this function. Update docs and tests accordingly.

Props sh4lin, spacedmonkey, costdev, peterwilsoncc.
Fixes #58301.
Built from https://develop.svn.wordpress.org/trunk@55855


git-svn-id: http://core.svn.wordpress.org/trunk@55367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 10:31:23 +00:00
spacedmonkey
2cd27b2349 Options, Meta APIs: Change the option can_compress_scripts to be autoloaded.
Ensure that the option `can_compress_scripts` is autoloaded on single sites, as this option is used in all requests. This change saves one database query per page request. 

Props RavanH, spacedmonkey, costdev, azaozz, flixos90.
Fixes #55270.
Built from https://develop.svn.wordpress.org/trunk@55854


git-svn-id: http://core.svn.wordpress.org/trunk@55366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-24 17:35:18 +00:00
Sergey Biryukov
f93e6ec4e8 Help/About: Reverse the order of conditionals for displaying the "Go to Updates" link.
`isset()` is faster than `current_user_can()`, so should be checked first.

Includes updating code layout for better readability.

Follow-up to [19442], [19524], [28477], [33466], [55848].

See #57839.
Built from https://develop.svn.wordpress.org/trunk@55853


git-svn-id: http://core.svn.wordpress.org/trunk@55365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-24 10:15:20 +00:00
audrasjb
6c9c6cd6ef Help/About: Remove unwanted space in a link located on about.php.
This fixes a small interface glitch in the `Go to Updates` link located on 
the the About screen.

Props NekoJonez, mukesh27, sumitbagthariya16, ahsannayem.
Fixes #58373.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-22 20:04:22 +00:00
Sergey Biryukov
e182459c6d Administration: Add missing escaping for CSS classes on the body tag in the admin.
Follow-up to [5892], [10823], [10868], [18882], [21014], [22000], [48060].

Propos rafiem, costdev, dd32, audrasjb, westonruter, SergeyBiryukov.
Fixes #58336.
Built from https://develop.svn.wordpress.org/trunk@55846


git-svn-id: http://core.svn.wordpress.org/trunk@55358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-22 14:16:19 +00:00
Sergey Biryukov
cdc9d4766f Docs: Fix a few more typos in DocBlocks.
Follow-up to [39493], [41726], [55823], [55824], [55827].

See #57840.
Built from https://develop.svn.wordpress.org/trunk@55843


git-svn-id: http://core.svn.wordpress.org/trunk@55355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-20 10:19:23 +00:00
Sergey Biryukov
046b9afcb7 Docs: Fix a few more typos in DocBlocks and inline comments.
Follow-up to [6779], [10565], [12023], [25224], [27533], [32806], [34777], [45262], [46594], [55823], [55824].

Props Presskopp.
See #57840.
Built from https://develop.svn.wordpress.org/trunk@55827


git-svn-id: http://core.svn.wordpress.org/trunk@55339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-19 13:27:20 +00:00
Sergey Biryukov
be4b739a49 Docs: Fix a few more typos in inline comments.
Follow-up to [9117], [11005], [12097], [18632], [26192], [55823].

Props Presskopp.
See #58334, #57840.
Built from https://develop.svn.wordpress.org/trunk@55824


git-svn-id: http://core.svn.wordpress.org/trunk@55336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-18 12:36:24 +00:00
Sergey Biryukov
5f054d2079 Docs: Fix typo in a comment in Bulk_Upgrader_Skin::header() and ::footer().
Follow-up to [13602].

Props kamplugins, costdev, mukesh27, afragen.
Fixes #58334.
Built from https://develop.svn.wordpress.org/trunk@55823


git-svn-id: http://core.svn.wordpress.org/trunk@55335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-18 11:37:27 +00:00
Weston Ruter
4c2394eed5 General: Use static on closures whenever $this is not used to avoid memory leaks.
Props westonruter, jrf, spacedmonkey.
Fixes #58323.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-17 22:46:24 +00:00
audrasjb
d9d303f812 Media: Prevent CSRF setting attachment thumbnails.
Props martinkrcho, paulkevan, peterwilsoncc, xknown, peterwilsoncc.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-16 14:27:21 +00:00
audrasjb
a0bcd7d56a Docs: Clarify @param types on get_sample_permalink_html filter.
`$new_title` and `$new_slug` can be null if `get_sample_permalink_html()` 
was called with default parameters, and they are documented as 
`string|null` in the function DocBlock.

Follow-up to [34347].

Props Enchiridion, audrasjb, SergeyBiryukov.
Fixes #58322.
See #33927. --Cette ligne, et les 
suivantes 
ci-dessous, seront ignorées--

M    trunk/src/wp-admin/includes/post.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@55270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-16 05:25:23 +00:00
Sergey Biryukov
fe928b2e9a General: Remove a few is_object() checks followed by instanceof operator.
This is a minor performance enhancement:

* If an object is passed, the call to `is_object()` will be redundant.
* If a non-object is passed, the `instanceof` operator (a variant of `is_a()`) will first [https://github.com/php/php-src/blob/f42992f/Zend/zend_builtin_functions.c#L630-L631 check if it is an object] before doing any further processing.

Therefore, no additional processing cycles should be wasted in both cases.

Follow-up to [6779], [48798], [48905], [49194], [55748].

Props Presskopp, costdev.
Fixes #58309.
Built from https://develop.svn.wordpress.org/trunk@55757


git-svn-id: http://core.svn.wordpress.org/trunk@55269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-15 10:28:23 +00:00
John Blackbourn
a714bc03ee Docs: Various corrections and improvements to inline docs and docblocks.
See #57840

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


git-svn-id: http://core.svn.wordpress.org/trunk@55265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-12 21:35:21 +00:00
audrasjb
0fd73d7a72 Coding Standards: Use esc_url() to escape link URL value in wp-admin/edit-link-form.php.
Props dilipbheda, mukesh27.
Fixes #58282.
See #57839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-11 15:05:22 +00:00