Commit Graph

19976 Commits

Author SHA1 Message Date
Sergey Biryukov
cc03c195c1 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-ms-sites-list-table.php.
Includes minor code layout fixes for better readability.

Follow-up to [12603], [32630], [32755], [46441].

Props mujuonly, audrasjb, jankyz, krupalpanchal, SergeyBiryukov.
Fixes #58139.
Built from https://develop.svn.wordpress.org/trunk@55656


git-svn-id: http://core.svn.wordpress.org/trunk@55168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-18 08:37:19 +00:00
Sergey Biryukov
800b2b4261 Coding Standards: Use strict comparison where substr() is involved.
Follow-up to [3606], [10738], [33359], [55642], [55652].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-16 10:48:22 +00:00
audrasjb
ac160bcd14 Media: Deprecate wp-admin/media.php.
The `wp-admin/media.php` file was introduced in [7262], then removed from the Media workflow in [21948].
This changeset finally deprecates it as it is not used anymore.

Follow-up to [7262], [21948].

Props kebbet, costdev, SergeyBiryukov, jrf, antpb, audrasjb.
Fixes #57612.
See #6181, #21391, #57608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-11 22:26:18 +00:00
Sergey Biryukov
968156d9ee Coding Standards: Use strict comparison in wp-admin/maint/repair.php.
Follow-up to [12092], [19757].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-11 16:30:22 +00:00
Sergey Biryukov
bdfe3d5a46 Coding Standards: Use strict comparison where count() is involved.
Follow-up to [1636], [6974], [8114], [10322], [13326], [14760], [18006], [18541], [19743], [23249], [24115], [33359].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-10 12:56:21 +00:00
Sergey Biryukov
0008d8df06 Coding Standards: Replace include_once with require_once for required files.
Per [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#writing-include-require-statements WordPress PHP coding standards], it is ''strongly recommended'' to use `require[_once]` for unconditional includes. When using `include[_once]`, PHP will throw a warning when the file is not found but will continue execution, which will almost certainly lead to other errors/warnings/notices being thrown if your application depends on the file loaded, potentially leading to security leaks. For that reason, `require[_once]` is generally the better choice as it will throw a `Fatal Error` if the file cannot be found.

Follow-up to [1674], [1812], [1964], [6779], [8540], [10521], [11005], [11911], [16065], [16149], [25421], [25466], [25823], [37714], [42981], [45448], [47198], [54276], [55633].

Props kausaralm, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55641


git-svn-id: http://core.svn.wordpress.org/trunk@55153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-09 11:57:22 +00:00
audrasjb
2193d75aa1 Networks and Sites: Fix incorrect color for Theme enabling admin notices.
This changeset replaces a `notice-updated` class with `notice-success` to fix an issue where the notices were using a gray border color instead of green when enabling or disabling a theme for a network.

Follow-up to [55418].

Props ocean90, audrasjb, marineevain, SergeyBiryukov, dhrumilk, chiragrathod103.
Fixes #58096.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-08 09:31:18 +00:00
Sergey Biryukov
03c3f90824 Coding Standards: Correct sprintf() calls for messages in wp-admin/upload.php.
This ensures that `sprintf()` is not unnecessarily applied to strings without any placeholders.

Follow-up to [31941], [31619], [36328], [55178].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-06 17:39:24 +00:00
Sergey Biryukov
4f6e5a3b7f I18N: Correct translator comments placement in wp-admin/edit-comments.php.
This ensures that the translator comments are displayed for the strings they refer to, e.g. to explain placeholders in comment action messages, and are not displayed for unrelated strings, e.g. "Undo", to avoid confusion.

Includes minor code layout fixes and wrapping a few long lines for better readability.

Follow-up to [35549], [45926], [45932].

Props afercia.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55630


git-svn-id: http://core.svn.wordpress.org/trunk@55142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-06 16:44:22 +00:00
audrasjb
e63019817f Help/About: Fix the Support Forums URL in wp-admin/includes/class-wp-site-health.php.
This updates a link to Support Forums by replacing `https://wordpress.org/support/` URL with `https://wordpress.org/support/forums/`.

Follow-up to [55412], [55413], [55414], [55624], [55625], [55626].

Props sabernhardt, audrasjb.
See #58052, #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 23:01:23 +00:00
audrasjb
c320cf8980 Help/About: Use the new /documentation/ URLs in options-permalink.php.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/*` links with `/documentation/*` to avoid extra redirects.

Follow-up to [55412], [55413], [55414], [55624], [55625].

Props sabernhardt, audrasjb.
See #58052, #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 22:52:19 +00:00
audrasjb
66bb73798b Help/About: Use the new /documentation/ URLs for links about WordPress version.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/*` links with `/documentation/*` to avoid extra redirects. This addresses a missed occurrence from [55624].

Follow-up to [55412], [55413], [55414], [55624].

Props wildworks.
See #58052, #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 22:43:23 +00:00
audrasjb
9fe7d42f6a Help/About: Use the new /documentation/ URLs for links about WordPress version.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/*` links with `/documentation/*` to avoid extra redirects.

Follow-up to [55412], [55413], [55414].

Props wildworks.
See #58052, #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 22:38:22 +00:00
audrasjb
3b39b2c99c Coding Standards: Use strict comparison in wp-admin/users.php.
Follow-up to [10990], [11162], [11217], [37059], [55592], [55622].
Props faisalahammad.
Fixes #58040.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 21:12:24 +00:00
audrasjb
69bbd538d5 Coding Standards: Use strict comparison in wp-admin/users.php.
Follow-up to [10990], [11162], [11217], [37059], [55592].
Props moinrrahmed.
Fixes #58056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 21:02:26 +00:00
Sergey Biryukov
24f3ba70f5 Upgrade/Install: Include the removed Windows Live Writer manifest in $_old_files.
This ensures that the file and a few related images are also removed from existing installations on update.

Follow-up to [55620].

Props ocean90.
Fixes #41404.
Built from https://develop.svn.wordpress.org/trunk@55621


git-svn-id: http://core.svn.wordpress.org/trunk@55133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 17:37:25 +00:00
Sergey Biryukov
6af7679802 Coding Standards: Correct the closing PHP tag placement in some admin files.
Follow-up to [1596], [1818], [11009], [16183], [16582], [16592].

Props faisalahammad, audrasjb.
Fixes #58053.
Built from https://develop.svn.wordpress.org/trunk@55618


git-svn-id: http://core.svn.wordpress.org/trunk@55130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-03 12:00:27 +00:00
Sergey Biryukov
df4ed4015a Coding Standards: Escape the whole attributes in wp-admin/includes/nav-menu.php.
It is best to always escape the complete value of an attribute, not a partial value, as otherwise the escaping could be (partially) undone when the values are joined together.

While the hardcoded prefix/suffix values in this case don't necessarily create that risk, those may change to values which could be problematic, so making it a habit to escape the value in one go is best practice.

Includes:
* Moving a few `esc_url()` calls closer to the actual output and escaping the hash parts too.
* Wrapping a few long lines for better readability.

Follow-up to [14248], [23707], [42217], [55615].

Props jrf, SergeyBiryukov.
Fixes #57110.
Built from https://develop.svn.wordpress.org/trunk@55616


git-svn-id: http://core.svn.wordpress.org/trunk@55128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-01 08:37:20 +00:00
Sergey Biryukov
6ccbf0e9bc Coding Standards: Escape some variables in wp-admin/includes/nav-menu.php.
This ensures that post type or taxonomy name is consistently escaped in:
* `wp_nav_menu_item_post_type_meta_box()`
* `wp_nav_menu_item_taxonomy_meta_box()`

Follow-up to [14248], [23707].

Props zenaulislam, SergeyBiryukov.
Fixes #57110.
Built from https://develop.svn.wordpress.org/trunk@55615


git-svn-id: http://core.svn.wordpress.org/trunk@55127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-31 16:00:25 +00:00
Sergey Biryukov
f940bc822d Coding Standards: Apply various alignment corrections from composer format.
This fixes a few WPCS warnings along the lines of:
* Array double arrow not aligned correctly
* Equals sign not aligned with surrounding statements
* Usage of ELSE IF is discouraged; use ELSEIF instead

Follow-up to [55099], [55192], [55194], [55271].

Props davidbaumwald, jrf, SergeyBiryukov.
Fixes #57994.
Built from https://develop.svn.wordpress.org/trunk@55606


git-svn-id: http://core.svn.wordpress.org/trunk@55118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-29 07:13:23 +00:00
hellofromTonya
08e9393f23 Help/About: Make Field Guide link translatable.
On the About page, wraps the Field Guide's link in `__()` to provide a localized field guide, when available.

Follow-up to [55600].

Props davidbaumwald, sergeybiryukov, desrosj, javiercasares, oglekler, mukesh27, clorith, eboxnet, costdev, ocean90.
Fixes #57477.
Built from https://develop.svn.wordpress.org/trunk@55601


git-svn-id: http://core.svn.wordpress.org/trunk@55113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 15:36:18 +00:00
hellofromTonya
7237836b1a Help/About: Add Field Guide link.
In the About page, replaces the `#` placeholder with the link to the Field Guide.

Follow-up to [55573], [55449], [55499], [55545].

Props vladytimy, ocean90.
Fixes #57998.
Built from https://develop.svn.wordpress.org/trunk@55600


git-svn-id: http://core.svn.wordpress.org/trunk@55112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 15:14:19 +00:00
Dion Hulse
5ce81844a8 Coding Standards: Use the correct variable.
Follow-up to [55593].

See #57318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 05:34:21 +00:00
Sergey Biryukov
79d6ac7fd7 Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer.
Follow-up to [48390].

Props sakibmd, jrf, patelmohip, akmelias.
Fixes #57680.
Built from https://develop.svn.wordpress.org/trunk@55595


git-svn-id: http://core.svn.wordpress.org/trunk@55107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-27 15:11:20 +00:00
Sergey Biryukov
b7ef3ffdd3 Docs: Add missing @return tag for WP_Automatic_Updater::is_disabled().
Follow-up to [25421], [25823], [25859].

Props sakibmd, jrf, patelmohip, akmelias.
See #57680.
Built from https://develop.svn.wordpress.org/trunk@55594


git-svn-id: http://core.svn.wordpress.org/trunk@55106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-27 14:13:22 +00:00
Sergey Biryukov
7127052046 Coding Standards: Use strict comparison in wp-admin/includes/nav-menu.php.
Follow-up to [14248], [15008], [37748].

Props jenilk, johnbillion.
Fixes #57318.
Built from https://develop.svn.wordpress.org/trunk@55593


git-svn-id: http://core.svn.wordpress.org/trunk@55105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-26 10:06:18 +00:00
Sergey Biryukov
95a52be05d Coding Standards: Use strict comparison in wp-admin/includes/user.php.
Follow-up to [10990], [11162], [11217], [37059].

Props jenilk.
Fixes #57317.
Built from https://develop.svn.wordpress.org/trunk@55592


git-svn-id: http://core.svn.wordpress.org/trunk@55104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-25 15:25:26 +00:00
audrasjb
1b393fbb15 Login and Registration: Fix margin for language switcher button on small screens.
This fixes an alignement issue on small screens in the language switcher button displayed on the Login screen.

Follow-up to [52058], [52417].

Props sabernhardt.
Fixes #57617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-22 12:50:18 +00:00
ryelle
cee125e1f4 Administration: Update dashboard welcome panel colors, remove broken link
Remove the green background from the "dot" accent, to prevent low contrast for the dismiss button. Use menu colors for the background on alternate color schemes. Remove the "Edit styles" link as there is no longer a direct link to the global styles section of the site editor.

Follow-up to [55451].

Props sabernhardt, ryokuhi, laurlittle, richtabor.
Fixes #57759.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 15:37:21 +00:00
ryelle
1aba63dc46 Help/About: Updates to About page.
Remove link to release video, update split controls image.

Follow-up to [55449], [55499], [55545].

Props laurlittle, richtabor.
Fixes #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 15:27:19 +00:00
Sergey Biryukov
94a1aed064 Coding Standards: Remove unused variable in WP_Plugins_List_Table::single_row().
Follow-up to [47835], [48669].

Props azouamauriac.
Fixes #55132.
Built from https://develop.svn.wordpress.org/trunk@55571


git-svn-id: http://core.svn.wordpress.org/trunk@55083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 13:27:21 +00:00
joedolson
d49897485b Editor: Show scheduled text when changing to new future dates.
In the classic editor, fix the publish status change text shown when a future post's date is changed to a different future date. Show 'scheduled' statement instead of 'publish' statement.

Props tyxla, sdavis2702, joedolson.
Fixes #31040.
Built from https://develop.svn.wordpress.org/trunk@55561


git-svn-id: http://core.svn.wordpress.org/trunk@55073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-18 16:35:18 +00:00
joedolson
514460e505 Quick/Bulk Edit: Show scheduled in status for future drafts.
Change the quick edit status `select` to use the 'Scheduled' status instead of the 'Published' status or posts where the date is in the future. 

Props ipstenu, MrFlannagan, sabernhardt, oglekler.
Fixes #38834.
Built from https://develop.svn.wordpress.org/trunk@55560


git-svn-id: http://core.svn.wordpress.org/trunk@55072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-18 15:47:24 +00:00
Sergey Biryukov
07b35de70a Filesystem API: Return false for empty paths in FTP ::exists() methods.
When `ftp_nlist()` receives an empty path, it checks the current working directory and may return `true`.

This affects:
* `WP_Filesystem_FTPext::exists()`
* `WP_Filesystem_ftpsockets::exists()`

As the purpose of the API is to provide a consistent interface for various filesystem implementations, this commit updates the affected methods to returns `false` when an empty path is provided, bringing consistency with the other filesystem abstraction classes, specifically `WP_Filesystem_Direct` and `WP_Filesystem_SSH2`.

Follow-up to [6779], [11821], [25274], [31815].

Props mkox, costdev, Zdrobau, dd32, pbiron, azaozz, mukesh27, SergeyBiryukov.
Fixes #33058.
Built from https://develop.svn.wordpress.org/trunk@55556


git-svn-id: http://core.svn.wordpress.org/trunk@55068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-16 16:14:22 +00:00
Sergey Biryukov
26852dbac7 Administration: Define the $title global on the Menus screen for classic themes.
This brings more consistency with other screens and avoids a PHP warning in `get_plugin_page_hookname()`:
{{{
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
}}}

Follow-up to [13257], [13366], [55263].

Props nendeb55, costdev, SergeyBiryukov.
Fixes #57918.
Built from https://develop.svn.wordpress.org/trunk@55552


git-svn-id: http://core.svn.wordpress.org/trunk@55064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-15 09:05:22 +00:00
ryelle
42bedb5164 Help/About: Add CDN images to About page.
Props richtabor.
See #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-14 16:05:17 +00:00
Sergey Biryukov
8d7d99289d Filesystem API: Return correct error data from copy_dir() if the directory listing failed.
The `::dirlist()` method is run on the `$from` directory, so `basename( $from )` is the correct thing to pass to the `WP_Error` object.

Follow-up to [50149].

Props afragen, costdev, pravinparmar2404.
Fixes #57907.
Built from https://develop.svn.wordpress.org/trunk@55538


git-svn-id: http://core.svn.wordpress.org/trunk@55050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-11 11:34:24 +00:00
spacedmonkey
39e6d6d348 Comments: Prime post caches in WP_Comments_List_Table.
In the `WP_Comments_List_Table` class, when the function `get_comments` is called, pass the parameter `update_comment_post_cache` set to true. This primes all the related posts for the displayed comments. This improves performance, as all posts are primed at once. 

Props spacedmonkey, adarshposimyth.
Fixes #57802.
Built from https://develop.svn.wordpress.org/trunk@55513


git-svn-id: http://core.svn.wordpress.org/trunk@55045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-10 15:26:22 +00:00
Sergey Biryukov
e636fcd30c Coding Standards: Use strict comparison in wp-admin/includes/taxonomy.php.
Follow-up to [4490], [9481], [55190].

Props ankitmaru, costdev, dhrumilk.
Fixes #57859.
Built from https://develop.svn.wordpress.org/trunk@55511


git-svn-id: http://core.svn.wordpress.org/trunk@55043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-10 07:04:20 +00:00
ryelle
b16599e760 Help/About: Update copy & style for About page and subpages.
Minor copy updates. Update heading style, text size, spacing in smaller columns. Remove columns placement code to simplify CSS. This was necessary for IE11, but modern browsers can use auto-placement. Move navigation out of the banner to keep size & background placement consistent across About section.

Props marybaum, sereedmedia, annezazu, jpantani, laurlittle, richtabor, markoserb, fcoveram, joen, kebbet.
See #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-09 16:30:19 +00:00
audrasjb
c41d5e69d3 Media: Revert wp_ajax_save_attachment_updated hook.
This changeset removes the `wp_ajax_save_attachment_updated` hook by reverting [55106], [55111], and [55450], to give it more time for further discussions as there are still concerns about whether this hook is necessary.

Follow-up to [55106], [55111], [55450].

Props costdev, SergeyBiryukov, peterwilsoncc, azaozz.
See #23148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-07 13:13:22 +00:00
Sergey Biryukov
932449e9fa Help/About: Improve help text about the WordPress URL and Site URL settings.
This aims to elaborate a bit more on the difference between these two settings, as well as explain the `http://` or `https://` prefix.

Follow-up to [15000], [19472].

Props marybaum, sabernhardt, tobifjellner, justinahinon, webcommsat, hellofromtonya, audrasjb, robinwpdeveloper, costdev, SergeyBiryukov.
Fixes #50886.
Built from https://develop.svn.wordpress.org/trunk@55452


git-svn-id: http://core.svn.wordpress.org/trunk@54985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 17:03:19 +00:00
ryelle
774a23c3c0 Administration: Update the Dashboard welcome banner for 6.2.
Props richtabor, markoserb, laurlittle.
See #57759.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:42:18 +00:00
audrasjb
3fdc61552e Media: Rename the wp_ajax_save_attachment action hook to wp_ajax_save_attachment_updated.
This changeset renames the `wp_ajax_save_attachment` action to `wp_ajax_save_attachment_updated` to avoid confusion with the similarly named `wp_ajax_save-attachment` action. This also add a dockblock note to indicate that when checking if an action is being done, `doing_action( 'wp_ajax_save-attachment' )` may be used if that is more convenient.

Follow-up to [55106].

Props azaozz, sc0ttkclark, costdev.
Fixes #23148

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


git-svn-id: http://core.svn.wordpress.org/trunk@54983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:32:20 +00:00
ryelle
7a4b3a5dab Help/About: Update the About page for 6.2.
This is the start of the WordPress 6.2 about page, introducing new content and a first pass of the new style.

Props laurlittle, jpantani, richtabor, audrasjb.
See #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:30:20 +00:00
hellofromTonya
278725acba Site Editor: Add 'path' query arg to Appearance > Template Parts menu.
To display a list of block-based template parts for classic themes, this changeset adds a `path` query arg to the Appearance > Template Parts menu URL. This change is necessary due to recent changes to Site Editor's client-side routing.

Reference:
* [https://github.com/WordPress/gutenberg/pull/48343 Gutenberg PR 48343]
* [https://github.com/WordPress/gutenberg/pull/42729 Gutenberg PR 42729]

Follow-up to [55392], [54176].

Props mamaduka, audrasjb, fabiankaegy, hellofromTonya, kevin940726, mukesh27, youknowriad.
Fixes #57819.
Built from https://develop.svn.wordpress.org/trunk@55435


git-svn-id: http://core.svn.wordpress.org/trunk@54968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 15:04:23 +00:00
Sergey Biryukov
f6b1fd3205 Help/About: Restore the correct URL for Editing Files article on Edit Themes screen.
Replace the URL for Editing Themes article instead to avoid an extra redirect.

Follow-up to [55432].

See #57726.
Built from https://develop.svn.wordpress.org/trunk@55434


git-svn-id: http://core.svn.wordpress.org/trunk@54967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 13:52:20 +00:00
audrasjb
933bb3999b Help/About: Avoid extra redirections on HelpHub Links.
This changeset replaces various HelpHub links that have changed to avoid extra 301 redirections.

Follow-up to [55412], [55413], [55414], [55415], [55416], [55431].

Props sabernhardt, audrasjb.
Fixes #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 12:52:18 +00:00
Sergey Biryukov
04967a68b6 Upgrade/Install: Introduce WP_Automatic_Updater::is_allowed_dir() method.
As part of determining whether to perform automatic updates, WordPress checks if it is running within a version-controlled environment, recursively looking up the filesystem to the top of the drive, looking for a Subversion, Git, Mercurial, or Bazaar directory, erring on the side of detecting a VCS checkout somewhere.

This commit avoids a PHP warning if the `open_basedir` directive is in use and any of the directories checked in the process are not allowed:
{{{
is_dir(): open_basedir restriction in effect. File(/.git) is not within the allowed path(s)
}}}

Follow-up to [25421], [25700], [25764], [25835], [25859].

Props costdev, markjaquith, meyegui, dd32, arnolp, robin-labadie, hellofromTonya, afragen, pbiron, SergeyBiryukov.
Fixes #42619.
Built from https://develop.svn.wordpress.org/trunk@55425


git-svn-id: http://core.svn.wordpress.org/trunk@54958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-26 15:19:21 +00:00
Sergey Biryukov
89f39839ab Database: Remove the check for sitecategories table on Database Repair screen.
The table is no longer created by core as of WordPress 3.0, and support for global terms was removed in WordPress 6.1, so `$wpdb->sitecategories` is unset by default.

This commit resolves a "passing null to non-nullable" deprecation notice on PHP 8.1:
{{{
Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/class-wpdb.php on line 1804
}}}

The `tables_to_repair` filter is available for plugins to readd the table or include any additional tables to repair.

Follow-up to [14854], [14880], [54240].

Props ipajen, chiragrathod103, SergeyBiryukov.
Fixes #57762.
Built from https://develop.svn.wordpress.org/trunk@55421


git-svn-id: http://core.svn.wordpress.org/trunk@54954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-24 15:10:22 +00:00