Commit Graph

20587 Commits

Author SHA1 Message Date
Peter Wilson 2ebd04a8ad Tests/Build Tools: Update SCSS files to use new color functions.
Replaces deprecated color functions with their updated equivalents, see [https://sass-lang.com/documentation/breaking-changes/color-functions/ the deprecation documentation].

This results in four changes in the built files, `hsl` colors with a negative lightness value are replaced with the keyword `black`. These changes are harmless as they have no effect on the rendered colors.

Props aslamdoctor, veryard.
Fixes #62142.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-06 23:37:15 +00:00
Andrew Ozz d13435cc58 Docs: Fix note about not using new functions in `update-core.php` and `class-core-upgrader.php`.
Props costdev.
See #62165.
Built from https://develop.svn.wordpress.org/trunk@59182


git-svn-id: http://core.svn.wordpress.org/trunk@58577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 23:25:12 +00:00
Andrew Ozz 847bac4a16 General: Do not use the new `wp_get_wp_version()` in `update-core.php` and `class-core-upgrader.php`.
All functions that are used there must be present in both the previous version being upgraded from, and the later version that's being installed (e.g. when rolling back Core) as these files are used in both.

Props djennez, SergeyBiryukov, jorbin, peterwilsoncc, azaozz.
Fixes #62165.
See 61627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 22:51:16 +00:00
dmsnell c729cbf501 WP_Debug_Data: Extract `wp-themes` data into separate methods.
This is the last 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 findal set of twelve groups, the `wp-active-theme`, `wp-parent-theme`, and `wp-themes-inactive` info, into a separate methods focused on those 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/7507
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
Fixes #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 19:23:15 +00:00
dmsnell f2282f68c0 WP_Debug_Data: Extract `wp-paths-sizes` data into separate methods.
This is the tenth 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 eleventh of twelve groups, the `wp-paths-sizes` 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/7445
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 16:28:14 +00:00
dmsnell 761869935d WP_Debug_Data: Extract `wp-core` data into separate methods.
This is the ninth 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 tenth of twelve groups, the `wp-core` 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/7357
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-05 15:59:17 +00:00
dmsnell 510017d313 WP_Debug_Data: Extract `wp-plugins` data into separate methods.
This is the eighth 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 eighth and ninth of twelve groups, the `wp-plugins-active` and `wp-plugins-inactive` info, into separate methods focused on that data.

Unlike the other patches in this series, the plugins data comes from a single source and is separated out into separate debug sections, so the active and inactive methods call a new shared method which provides raw data for both. Optimizations and refactors may occur in follow-up tickets.

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/7458
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 22:12:17 +00:00
desrosj 3b57824722 Coding Standards: Committing changes after `composer format`.
This commits some minor changes made when running `composer format`.

Follow up to [58975], [59011], [59115].
See #61103, #62014, #61648.
Built from https://develop.svn.wordpress.org/trunk@59166


git-svn-id: http://core.svn.wordpress.org/trunk@58561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 13:19:17 +00:00
dmsnell 4f3db72338 WP_Debug_Data: Normalize visibility of new methods.
In ongoing work to modularize the `WP_Debug_Data` class, several methods were added with `public` visibility. This patch sets the new methods to `private` as a measure to ensure optionality as the changes progress, since it's easier to move from private to public than the other way around.

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

Follow-up to [58830], [58855], [58964], [59002], [59011], [59060], [59100].

Props apermo, jonsurrell.
Fixes #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-04 00:11:19 +00:00
joedolson 3de3fb8c83 Administration: Switch core post type labels to `add_new_item`.
In [56515], the default value of `Add New` was changed to "Add New Post / Add New Page". This caused problems with post types where `add_new` was not declared.

Change core usage to reference the `add_new_item` value and revert the default value of `add_new` back to "Add New / Add New". This retains the accessibility advantages without creating counter intuitive usage of the `add_new` key.

With this change, post types registered with no `add_new` key will be unimpacted in core, and post types registered with no `add_new_item` key will use the default "Add New Post", which is not a change from the current state.

Props smerriman, afercia, rcreators, joedolson, eclev91, johnbillion.
Fixes #60045.
Built from https://develop.svn.wordpress.org/trunk@59161


git-svn-id: http://core.svn.wordpress.org/trunk@58556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 22:46:15 +00:00
joedolson 9fd5f24d73 Administration: A11y: Clarify settings in discussion options.
Fix several settings groups in the discussion options that were written in a compound/sentence structure format. These formats are difficult to parse for screen reader users and have significant layout problems in mobile viewports.

Change settings to use independent labeling.

Props Cheffheid, anthakkar08, DrewAPicture, afercia, jwgoedert, sannevndrmeulen, sudipatel007, tirth03, joedolson.
See #31354.
Built from https://develop.svn.wordpress.org/trunk@59160


git-svn-id: http://core.svn.wordpress.org/trunk@58555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 21:28:18 +00:00
Peter Wilson 92d9e70f84 General: Expand use of `wp_get_wp_version()`.
Expands the use of `wp_get_wp_version()` to get an unmodified value of the current WordPress version in various locations in which it would be unhelpful if a plugin has modified the global `$wp_version`.

This includes:

* Theme and plugin compatibility tests
* During the upgrade process of WP Core
* Debug and site health data reports of the current version
* Version number display in the dashboard
* Block theme export and caching utilities
* The `WPDB` class

Props peterwilsoncc, hellofromtonya.
See #61627.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-03 00:25:15 +00:00
Sergey Biryukov 46b25e1302 Site Health: Adjust display of the `DB_COLLATE` and `WP_ENVIRONMENT_TYPE` constants.
Includes: 
* Simplifying the logic and bringing some consistency to how the values are checked and displayed.
* Correcting the debug value for `DB_COLLATE`. This should be the actual contents of the constant, and empty if it is indeed empty, as the debug data that's copied and shared should represent the raw value, and does not need to be in a user-readable format.

Follow-up to [45782], [52021], [54239], [59147].

Props Clorith, SergeyBiryukov.
See #58265.
Built from https://develop.svn.wordpress.org/trunk@59155


git-svn-id: http://core.svn.wordpress.org/trunk@58550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 17:59:17 +00:00
Peter Wilson ad49ea6424 Bundled Themes: Follow up import of Twenty Twenty-Five.
Add additional references to the new default theme required in various locations of the code base, build steps and unit tests.

Follow up to [59146].

Props afragen, dd32, desrosj, davidbaumwald, jorbin, courane01, kirasong.
See #62103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 03:27:15 +00:00
Aaron Jorbin 9171d921f4 Site Health: Note when DB_COLLATE is defined but empty.
Right now, for example if DB_COLLATE is defined as '', the value will not be shown in the WordPress Constants list, there's just an empty space. This adds a message so it's clearer when the constant is empty.

Props Presskopp, brobken, Clorith.
Fixes #58265.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-10-01 01:12:17 +00:00
joedolson df3ba33621 Login and Registration: Add descriptive `h1` on login screens.
Add an `h1` heading with the existing `login_header()` text string on each view of the login screen. Mark the existing `h1`, used to wrap the WordPress logo, with `role="presentation"`, to remove it from the headings hierarchy.

Props roytanck, joedolson, ryokuhi, sabernhardt, pamprn, nagpai, mukesh27.
Fixes #51786.
Built from https://develop.svn.wordpress.org/trunk@59138


git-svn-id: http://core.svn.wordpress.org/trunk@58534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 19:12:14 +00:00
desrosj 755ed721c2 Build/Test Tools: Update/Audit NPM dependencies.
This updates several `devDependencies` to their latest versions:
- `autoprefixer` (`10.4.20`)
- `cssnano` (`7.0.6`)
- `grunt-contrib-qunit` (`10.1.1`)
- `grunt-webpack` (`7.0.0`)
- `postcss` (`8.4.47`)
- `qunit` (`2.22.0`)
- `sass` (`1.79.4`)
- `uuid` (`10.0.0`)
- `wait-on` (18.0.1`)

Also included are two minor updates to bundled dependencies:
- `json2php` (`0.0.9`)
- `wicg-inert` (`3.1.3`).

After applying these updates, `npm audit fix` and `grunt precommit:css` were run.

See #62137.
Built from https://develop.svn.wordpress.org/trunk@59135


git-svn-id: http://core.svn.wordpress.org/trunk@58531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:36:17 +00:00
joedolson 0a4679908b Quick/Bulk Edit: Add notice if no items selected.
Add an error notice if a user attempts to apply bulk edits with no items selected. Applies to post lists, comments, taxonomies, and plugins screens.

Props garrett-eclipse, nrqsnchz, sumitsingh, nihar007, royho, sabernhardt, oglekler, quadthemes, ankit-k-gupta, fnpen, ukdrahul, joedolson.
Fixes #45006, #58479.
Built from https://develop.svn.wordpress.org/trunk@59134


git-svn-id: http://core.svn.wordpress.org/trunk@58530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 18:24:13 +00:00
Peter Wilson 8c3dd2eb88 General: Remove `noopener` from links opening in a new tab.
Removes the automatic addition of `rel="noopener noreferrer"` from links targeting a new tab or window, `target='_blank'`. Since this was introduced, supported browsers have changed their security policies and no longer allow the opened link to have JavaScript access to the previous tab.

Deprecates:

* `wp_targeted_link_rel()`
* `wp_targeted_link_rel_callback()`
* `wp_init_targeted_link_rel_filters()`: converted to a noop function
* `wp_remove_targeted_link_rel_filters()`: converted to a noop function

The deprecated functions are retained in `formatting.php` as in `SHORTINIT` mode the file is included while `deprecated.php` is not.

This also removes the `noopener` from links hard coded within the WordPress dashboard linking to documentation and other resources.

Props audrasjb, azaozz, dhruval04, dorzki, neo2k23, presskopp, sabernhardt, swissspidy, tobiasbg.
Fixes #53843.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-30 05:19:16 +00:00
Sergey Biryukov 8838465b5e Date/Time: Use numeric input for `touch_time()` fields.
This aims to make it easier to enter digits in datetime text fields on mobile devices, instead of opening the full keyboard.

Follow-up to [43], [1506], [2998], [3648], [6078], [6989], [7285], [7338], [20168], [20217], [28730], [32945], [49283].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-29 22:49:16 +00:00
dmsnell c41e36b3c4 WP_Debug_Data: Formatting update to code in `wp-dropins` method.
Resolves an indentation issue introduced while extracting the `wp-dropins` data into a separate method from the main `debug_data()` method.

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

Follow-up to [59100].

Props mukesh27.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-27 16:37:18 +00:00
dmsnell c73731e74e WP_Debug_Data: Extract `wp-dropins` data into separate method.
This is the seventh 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 seventh of twelve groups, the `wp-dropins` 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/7418
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-27 05:58:18 +00:00
Sergey Biryukov 8f95d7bc14 Administration: Escape the WordPress.org URL in `wp-admin/admin-footer.php`.
Follow-up to [5892], [5955], [10976], [17879], [21366], [27469], [45927].

Props ramswarup, narenin, swissspidy.
Fixes #62118.
Built from https://develop.svn.wordpress.org/trunk@59096


git-svn-id: http://core.svn.wordpress.org/trunk@58492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-26 15:41:14 +00:00
audrasjb 5e4a97f589 Help/About: Add plugin dependencies help tab on Plugins screen.
This changeset adds a help tab added about plugin dependencies on the Plugins screen.

Follow-up to [57545].

Fixes #60466.
See #22316.
Props desrosj, swissspidy, adarshposimyth, audrasjb, NekoJonez, DorZki, Boniu91, Ankit-K-Gupta, sigurdwatt.
Built from https://develop.svn.wordpress.org/trunk@59094


git-svn-id: http://core.svn.wordpress.org/trunk@58490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-26 13:50:16 +00:00
Andrew Ozz a8af90bcd1 Administration: Fix increasing of the frequency of Heartbeat API requests.
Props peterwilsoncc, azaozz.
Fixes #61960.
Built from https://develop.svn.wordpress.org/trunk@59092


git-svn-id: http://core.svn.wordpress.org/trunk@58488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-25 20:51:14 +00:00
Sergey Biryukov 82c0168bbd Editor: Respect `show_avatars` option in block editor and Customizer.
This adds checks for the `show_avatars` option before setting the avatar for post lock modals in the block editor and the Customizer.

Follow-up to [41839], [53070].

Props ffffelix.
Fixes #62081.
Built from https://develop.svn.wordpress.org/trunk@59078


git-svn-id: http://core.svn.wordpress.org/trunk@58474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-22 22:50:18 +00:00
noisysocks f6df3fba16 Editor: Update packages for 6.7 Beta 1.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Fixes #61906.
Props peterwilsoncc, gziolo, kevin940726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-20 01:55:35 +00:00
Peter Wilson 2cc6bb80ef Date/Time, PHP Compat: Prevent type errors using GMT offset option.
Prevents a potential type errors when making use of the `gmt_offset` option by casting the value to a float prior to performing calculations with the value.

This mainly accounts for incorrect storage of values, such as an empty string or city name.

Follow up to [58923].

Props chaion07, hellofromtonya, kirasong, mhshohel, mukesh27, nicolefurlan, nihar007, nurielmeni, oglekler, peterwilsoncc, prionkor, rajinsharwar, rarst, rleeson, sabernhardt, SergeyBiryukov, swissspidy, toastercookie, verygoode.
Fixes #56358, #58986, #60629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-18 22:37:15 +00:00
dmsnell e7040022b8 WP_Debug_Data: Extract `wp-media` data into separate method.
This is the sixth 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 sixth of twelve groups, the `wp-media` 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/7356
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-18 19:12:06 +00:00
Jeremy Felt 3c85d540d4 Application Passwords: Add copy button when adding new password.
Props circlecube, dhruvang21, ironprogrammer, desrosj.
Fixes #62019.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-18 00:14:13 +00:00
joedolson 549f626d96 Accessibility: Add border around menus and submenus in high contrast mode.
Add outlines and borders to mark the boundaries between the admin navigation menu and content and around adminbar submenus that are visible when Windows High Contrast Mode is enabled. This clarifies the page structure and makes high contrast mode easier to use.

Props wildworks, hbhalodia, sabernhardt, joedolson, rcreators.
Fixes #61616.
Built from https://develop.svn.wordpress.org/trunk@59041


git-svn-id: http://core.svn.wordpress.org/trunk@58437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-17 23:28:15 +00:00
Aaron Jorbin 723d01e3e1 Bootstrap/Load: Ensure uses of set_time_limit are documented why.
`set_time_limit` can cause unexpected behavior so it general should be avoided. There are instances though where they should be used so those instances should be properly documented.

Props Rcrayno, ryan, kurtpayne, jorbin.
Fixes #21521. See #19487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-17 22:41:13 +00:00
Sergey Biryukov 3cd067ee34 General: Add missing `initial-scale` value in viewport meta tags.
The viewport meta should include `initial-scale=1.0` to ensure that high DPI/mobile display works as expected.

References:
* [https://css-tricks.com/probably-use-initial-scale1/ CSS-Tricks: Probably Use initial-scale=1]
* [https://www.sitepoint.com/community/t/is-it-necessary-to-include-initial-scale-1-0-in-the-meta-viewport-tag/455119 SitePoint Forums: Is it necessary to include initial-scale=1.0 in the meta viewport tag?]

Follow-up to [59026].

Props dhruvang21, sabernhardt, kkmuffme, mukesh27, narenin, swissspidy, SergeyBiryukov.
Fixes #61988.
Built from https://develop.svn.wordpress.org/trunk@59027


git-svn-id: http://core.svn.wordpress.org/trunk@58423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-17 00:03:54 +00:00
Sergey Biryukov c0350f64a0 Themes: Improve the alignment of feature filters and inputs on Add Themes screen.
Follow-up to [35527], [38640], [40797].

Props Benjamin_Zekavica, sabernhardt, sumitsingh, gauravtiwari, krupajnanda, audrasjb, SergeyBiryukov.
Fixes #53314.
Built from https://develop.svn.wordpress.org/trunk@59022


git-svn-id: http://core.svn.wordpress.org/trunk@58418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-15 13:49:15 +00:00
Peter Wilson 5d3a6274b4 Administration: Increase frequency of heartbeat API requests.
Increases the frequency of heartbeat API requests from once every 15 seconds to once every 10 seconds.

The purpose of this change is to reduce the length of time before a post becomes unlocked as a user navigates around the WordPress Dashboard and ceases editing a post.

`wp.heartbeat.interval()` has been modified to allow theme and plugin authors to set the heartbeat interval to any value between one second and one hour rather than limiting them to a fixed set of values.

Props azaozz, annezazu, jorbin, kirasong.
Fixes #61960.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-11 23:09:16 +00:00
dmsnell ee69ec404e WP_Debug_Data: Extract `wp-mu-plugins` data into separate method.
This is the part five 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 fifth of twelve groups, the `wp-mu-plugins` 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/7305
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, dmsnell.
See #61648.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-11 14:47:20 +00:00
John Blackbourn 87fd392188 Docs: Various docblock improvements and corrections.
See #61608

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


git-svn-id: http://core.svn.wordpress.org/trunk@58405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-11 12:08:19 +00:00
dmsnell 3293d9ba89 WP_Debug_Data: Extract `wp-server` data into separate method.
This is the part four 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 fourth of twelve groups, the `wp-server` 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/7283
Discussed in https://core.trac.wordpress.org/ticket/61648

Props apermo, costdev, dmsnell, kebbet, mukesh27.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-10 00:04:19 +00:00
Sergey Biryukov 7f0a5f518b Docs: Correct parameter reference for `manage_posts_columns` and related filters.
Follow-up to [27255], [42871].

Props truptikanzariya.
Fixes #62015.
Built from https://develop.svn.wordpress.org/trunk@59000


git-svn-id: http://core.svn.wordpress.org/trunk@58396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-09 14:37:17 +00:00
Sergey Biryukov 911d37b465 Users: Remove obsolete conditional in `wp-admin/user-new.php`.
Since `$username` is set to `$user_details->user_login`, it will never be `null` in this specific line.

Follow-up to [https://mu.trac.wordpress.org/changeset/641 mu:641], [https://mu.trac.wordpress.org/changeset/1529 mu:1529], [12722], [16294].

Props akshat2802, mukesh27, aristath, SergeyBiryukov.
Fixes #62012.
Built from https://develop.svn.wordpress.org/trunk@58999


git-svn-id: http://core.svn.wordpress.org/trunk@58395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-09 10:17:15 +00:00
Sergey Biryukov 35b7340af9 Administration: Remove old IE9 code from `wp-admin/js/svg-painter.js`.
About half of the file's code was a back-compat polyfill of base64 functions for IE9.

Since WordPress no longer supports IE9 as of version 4.8, and all modern browsers come with these functions, the polyfills can be removed.

Follow-up to [26072], [26131], [26601], [47771].

Props TobiasBg, sabernhardt.
Fixes #61995.
Built from https://develop.svn.wordpress.org/trunk@58997


git-svn-id: http://core.svn.wordpress.org/trunk@58393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-07 22:44:17 +00:00
dmsnell 76c06eb274 Debug Data: Encode section ordering in debug info.
During a refactor to modularize the debug data class, it came up that the ordering of the sections inside of the returned debug info is relevant to existing UIs, as they iterate the array, which happens in insertion order.

This patch presets each section at the start to ensure that the ordering remains consistent even as code within the method is rearranged. As the mini-project progresses, this assignment will be the final place all the sections are referenced.

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

Props apermo, dmsnell, sergeybiryukov.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-06 19:50:19 +00:00
Sergey Biryukov c311a9de36 Docs: Correct the order of `@since` and `@var` annotations.
Follow-up to [4673], [8656], [13041], [13827], [13895], [31134], [34490], [34566].

Props riddhipatel, shailu25.
Fixes #61999.
Built from https://develop.svn.wordpress.org/trunk@58995


git-svn-id: http://core.svn.wordpress.org/trunk@58391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-06 14:36:19 +00:00
Sergey Biryukov 68ed51f937 Coding Standards: Use strict comparison in `wp-admin/includes/upgrade.php`.
Follow-up to [725], [1575], [1975], [2037], [2966], [3670], [4738], [11958], [12776], [14080], [14485], [32378].

Props faisalahammad, mujuonly, aristath, poena, afercia, SergeyBiryukov.
Fixes #58041, #61607.
Built from https://develop.svn.wordpress.org/trunk@58994


git-svn-id: http://core.svn.wordpress.org/trunk@58390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-05 14:59:14 +00:00
Mamaduka 1e6b860630 Editor: Update preloaded paths for the site editor
Add the `OPTIONS /wp/v2/pages` route to the list. The request is made via the `useBlockEditorSettings` hook at the top of the editor React tree. Preloading should improve the editor's loading time.

Avoid hardcoding paths for the 'attachment' post type; use the `rest_get_route_for_post_type_items` helper method instead.

Props mamaduka, noisysocks.
See #61884.
Built from https://develop.svn.wordpress.org/trunk@58984


git-svn-id: http://core.svn.wordpress.org/trunk@58380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-04 04:17:14 +00:00
Sergey Biryukov d65e65cd6c Posts, Post Types: Check if the post type exists in `_admin_notice_post_locked()`.
This adds a guard to verify the result of `get_post_type_object()` before retrieving the `all_items` label, as the function returns `null` if the post type does not exist.

Follow-up to [24527].

Props pcarvalho, akshat280, mukesh27, SergeyBiryukov.
Fixes #60947.
Built from https://develop.svn.wordpress.org/trunk@58983


git-svn-id: http://core.svn.wordpress.org/trunk@58379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-03 22:43:14 +00:00
ryelle 8d1fb4e25a Help/About: Fix text wrapping on non-English locales.
In [57715], headings on the About pages were given `text-wrap: balance`. This rule causes unexpected breaks in non-latin langauges, e.g., Japanese, Korean. This fix sets the text-wrap to `pretty` for browsers that support it, and uses `balance` for English-only.

Props akshat2802, wildworks, ryelle, sabernhardt, hellofromTonya.
Fixes #60892.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-03 18:51:12 +00:00
Felix Arntz 4e167c593d Options, Meta APIs: Explicitly pass `$autoload` parameter to when potentially adding new options.
It is recommended that for every option it is explicitly set whether to autoload it or not. This changeset updates relevant `update_option()` and `add_option()` calls.

Note that the `$autoload` parameter is only needed for `update_option()` if the option is potentially not present yet, i.e. the call will pass through to `add_option()`. Since WordPress core adds the majority of its options to the database during installation, only `update_option()` calls for dynamically added options need to be modified, which is what this changeset does.

As part of revisiting the autoload values for dynamically added WordPress core options, this changeset modifies some options to no longer be autoloaded, since they are only accessed in a few specific places that are not relevant for a regular request. These options are:
* `recently_activated`
* `_wp_suggested_policy_text_has_changed`
* `{upgradeLock}.lock`
* `dashboard_widget_options`
* `ftp_credentials`
* `adminhash`
* `nav_menu_options`
* `wp_force_deactivated_plugins`
* `delete_blog_hash`
* `allowedthemes`
* `{sessionId}_paused_extensions`
* `recovery_keys`
* `https_detection_errors`
* `fresh_site`

An upgrade routine is present as well that sets those options to no longer autoload for existing sites.

Props pbearne, flixos90, mukesh27, swissspidy, SergeyBiryukov, joemcgill, adamsilverstein.
Fixes #61103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-03 18:19:14 +00:00
dmsnell d0877b108a WP_Debug_Data: Extract `wp-database` data into separate method.
This is the part three 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 third of twelve groups, the `wp-database` 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/7143
Discussed in https://core.trac.wordpress.org/ticket/61648

Props dmsnell, kebbet, apermo.
See #61648.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-02 20:44:16 +00:00
Peter Wilson 4fc2975cb5 Options, Meta APIs: Prevent mail options triggering a deprecation warning.
Prevents a deprecation warning saving options when the post by email feature is turned off in code using the `enable_post_by_email_configuration` filter.

Props ironprogrammer, manbo, narenin, sebastienserre, siliconforks.
Fixes #61144.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-02 00:13:16 +00:00