Commit Graph

4611 Commits

Author SHA1 Message Date
joedolson
1db31132eb Menus: Revert unintentional changes in [56449].
Accidentally committed two simultaneous patches; reverting unintended list table changes.

Unprops joedolson.
See #56594.

git-svn-id: https://develop.svn.wordpress.org/trunk@56450 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 16:12:01 +00:00
Joe Dolson
b21d72b39d Menus: Fix proximity of controls to Save and Delete menus.
Move the position of the Save and Delete buttons in menu editing so they are immediate neighbors, improving the proximity of related controls. 

Props 90lines, sabernhardt, costdev.
See #56594.

git-svn-id: https://develop.svn.wordpress.org/trunk@56449 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 15:56:34 +00:00
Pascal Birchler
2cdaf29678 Plugins: Correctly display spaces in new plugins search results.
Ensures the encoded search term in the input field is correctly decoded again.

Follow-up to [53844] and [54904].

Props adhun, nithi22, huzaifaalmesbah, deepakvijayan, zunaid321, iammehedi1.
Fixes #59143.

git-svn-id: https://develop.svn.wordpress.org/trunk@56446 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 15:25:24 +00:00
Jb Audras
222af98bbe Docs: Correct default post type in page_template_dropdown() docblock.
The default post type used by `page_template_dropdown()` is `page`, not `post`.

Props maxinacube.
Fixes #58972.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56441 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 13:39:25 +00:00
Jb Audras
7faabe4015 Docs: Clarify post_date_column_time filter description.
Props crstauf, mukesh27.
Fixes #59029.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56436 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 09:10:17 +00:00
Jb Audras
e7dd83bf97 Docs: Wrap inline @see tags in curly braces.
Props costdev, mukesh27.
Fixes #58858.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56434 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 08:59:36 +00:00
Sergey Biryukov
9b8a0d22b0 Coding Standards: Use strict comparison in wp-admin/includes/meta-boxes.php.
Follow-up to [38], [647], [2890], [3570], [11815], [11816], [31550], [52620].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56420 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-20 00:08:49 +00:00
Andrew Ozz
d1f72a6330 Revert the last use of str_starts_with() in update-core.php.
Fixes updating WordPress from 5.7 and earlier versions. When doing the update this file runs first in the old version where the polifills may not be available.

Porps: frankit.
Fixes: #59145.

git-svn-id: https://develop.svn.wordpress.org/trunk@56417 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 23:23:33 +00:00
John Blackbourn
7aee3d35fb Docs: Miscellaneous docblock corrections and improvements.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56414 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 17:27:16 +00:00
Sergey Biryukov
79b01c6d81 Coding Standards: Improve variable names in wp_save_image().
This resolves a few WPCS warnings:
{{{
Variable "$sX" is not in valid snake_case format, try "$s_x"
Variable "$sY" is not in valid snake_case format, try "$s_y"
}}}

The `$sX` and `$sY` variables are renamed to `$original_width` and `$original_height`, respectively.

Additionally, the `$fwidth` and `$fheight` variables are renamed to `$full_width` and `$full_height`, for clarity.

Follow-up to [11965], [22094], [56400].

See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56411 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-18 10:07:25 +00:00
Joe Dolson
2acd0aca78 Administration: Invalid argument passed in additional_classes.
Fix `additional_classes` argument passed as a string instead of an array. Follow up to [56409].

Props joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56410 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 21:34:21 +00:00
Joe Dolson
8ef111843b Administration: Apply admin notice functions in multisite.
Use `wp_get_admin_notice` and `wp_admin_notice` to handle multisite settings notices.

Props costdev.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56409 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 21:01:17 +00:00
Joe Dolson
c60cfe92b4 Administration: Add function to standardize admin notices.
Add functions `wp_get_admin_notice()` and `wp_admin_notice()` to create and output admin notices & tests for usage. New functions accept a message and array of optional arguments. This commit does not implement the functions. Include new filters: `wp_admin_notice_args`, `wp_admin_notice_markup` and action: `wp_admin_notice`. 

Props joedolson, costdev, sakibmd, dasnitesh780, sabernhardt.
Fixes #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56408 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 20:27:35 +00:00
Sergey Biryukov
3131800198 Site Health: Correct the check for disk space available to safely perform updates.
If the available disk space exceeds the `PHP_INT_MAX` value, i.e. a 32-bit PHP version is in use with more than 2 GB free, the type casting to `(int)` could cause an overflow, and the Site Health test would then erroneously report that there is not enough free space. 

This commit removes the unnecessary type casting and uses the result from `disk_free_space()` directly.

Includes optimizing the logic to skip further checks if the available disk space could not be determined.

Follow-up to [55720].

Props mathsgrinds, Presskopp, rajinsharwar, SergeyBiryukov.
Fixes #59116.

git-svn-id: https://develop.svn.wordpress.org/trunk@56401 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-17 11:16:08 +00:00
Sergey Biryukov
8cd9907462 Coding Standards: Use strict comparison in wp-admin/includes/image-edit.php.
Follow-up to [11911], [11965], [11984], [12155], [12163], [22094].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56400 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-16 14:03:44 +00:00
Sergey Biryukov
f6dde69ea3 Docs: Fix typo in duplicate hook references for views_{$this->screen->id}.
Follow-up to [29218], [29625].

Props nithins53, NekoJonez, mukesh27.
Fixes #59102. See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56397 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-15 10:07:30 +00:00
Sergey Biryukov
f107073f39 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-importer.php.
Follow-up to [14760], [50658].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56396 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-14 09:57:54 +00:00
David Baumwald
4ff71a6adf Upgrade/Install: Update $_old_files for 6.3.
Props SergeyBiryukov.
Fixes #58994.

git-svn-id: https://develop.svn.wordpress.org/trunk@56365 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-07 17:19:57 +00:00
Tonya Mork
9e4188b93b Code Modernization: Use "declare" in WP_List_Table magic methods deprecation message
Changes "define" to "declare" in the deprecation message in `WP_List_Table` magic methods.

Why is "declare" better?
It aligns well to:

* the topic of and published information about dynamic properties.
* the act of explicitly listing the variable as a property on the class.

The goal of this message is guide developers to change their code. Changing the term to "declare" hopefully will aid in the understanding of what is being asked of developers when this deprecation is thrown.

Follow-up [56349].

Props hellofromTonya, antonvlasenko.
Fixes #58896.

git-svn-id: https://develop.svn.wordpress.org/trunk@56356 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-03 19:50:20 +00:00
Tonya Mork
c362c2ad99 Code Modernization: Deprecate dynamic properties in WP_List_Table magic methods.
The unknown use of unknown dynamic property within the `WP_List_Table` property magic methods is now deprecated. A descriptive deprecation notice is provided to alert developers to declare the property on the child class extending `WP_List_Table`.

Changes in this commit:
* Adds a deprecation notice to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods, i.e. to alert and inform developers when attempting to get/set/isset/unset a dynamic property.
* Fixes `__get()` to explicitly returns `null` when attempting to get a dynamic property.
* Removes returning the value when setting a declared property, as (a) unnecessary and (b) `__set()` should return `void` [https://www.php.net/manual/en/language.oop5.overloading.php#object.set per the PHP handbook].
* Adds unit tests for happy and unhappy paths.

For backward compatibility, no changes are made to the internal declared properties listed in `$compat_fields` and accessed through the magic methods. 

For example:
A child class uses a property named `$data` that is not declared / defined as a property on the child class. When getting its value, e.g. `$list_table->data`, the `WP_List_Table::__get()` magic method is invoked, the following deprecation notice thrown, and `null` returned:

>The property `data` is not defined. Setting a dynamic (undefined) property is deprecated since version 6.4.0! Instead, define the property on the class.

=== Why not remove the magic methods, remove the `$compat_fields` property, and restore the properties `public`?

tl;dr Backward compatibility.

Several plugins, one of which has over 5M installs, add a property to the `$compat_fields` array. Removing the property would cause an `Undefined property` `Warning` (PHP 8) | `Notice` (PHP 7) to be thrown. Removing the associated code would change the functionality.

=== Why not limit the deprecation for PHP versions >= 8.2?

tl;dr original design intent and inform

The magic methods and `$compat_fields` property were added for one purpose: to continue providing external access to internal properties declared on `WP_List_Table`. They were not intended to be used for dynamic properties.

Deprecating that unintended usage both alerts developers a change is needed in their child class and informs them what to change.

References: 
* Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.
* A [https://www.youtube.com/live/vDZWepDQQVE?feature=share&t=10097 live open public working session] where these changes were discussed and agreed to.
* [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties.]

Related to #14579, #22234, #30891.

Follow-up to [15491], [28493], [28521], [28524], [31146].

Props antonvlasenko, jrf, markjaquith, hellofromTonya, SergeyBiryukov, desrosj, peterwilsoncc, audrasjb, costdev, oglekler, jeffpaul.
Fixes #58896.
See #56034.

git-svn-id: https://develop.svn.wordpress.org/trunk@56349 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-02 18:35:24 +00:00
Sergey Biryukov
3a3bd8ea83 Site Health: Use PHP_SAPI constant instead of the php_sapi_name() function.
This is a micro-optimization that removes an unnecessary function call.

Follow-up to [44986], [45156].

Props ayeshrajans, jrf, mukesh27, rmccue.
Fixes #58942.

git-svn-id: https://develop.svn.wordpress.org/trunk@56346 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-02 10:57:10 +00:00
Sergey Biryukov
e39967d8dd Upgrade/Install: Pass stored credentials to WP_Filesystem() where appropriate.
With the introduction of temporary backups of plugins and themes before updating, a new Site Health test was added to verify that plugin and theme temporary backup directories are writable or can be created.

When using a non-direct filesystem, the Site Health test did not include the required credentials, leading to a fatal error as the connection was not initialized properly.

This commit attemps to use the stored credentials if available, and displays a message otherwise.

Includes a similar fix in a function that performs a cleanup of the temporary backup directory.

Follow-up to [55720].

Props utsav72640, rajinsharwar, costdev, mukesh27, peterwilsoncc, audrasjb, SergeyBiryukov.
See #58940.

git-svn-id: https://develop.svn.wordpress.org/trunk@56341 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-01 16:05:23 +00:00
Kelly Choyce-Dwan
9c76395092 Administration: Update dashboard welcome panel for 6.3.
Update the background image and styles for the Welcome Panel. This iteration does not use different colors on the admin color schemes, so the CSS for that has been removed. This also adds back in a working "Edit styles" link, which was removed in 6.2 because the link was broken.

Props richtabor, markoserb.
Fixes #58545.



git-svn-id: https://develop.svn.wordpress.org/trunk@56291 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-24 23:13:31 +00:00
Joe Dolson
6028b6f9f8 Media: Fix height max value in image scaling.
Set the `max` attribute in the height input for image scaling to reference the image height, instead of the width. Follow up to [55919].

Props costdev, joedolson, joemcgill.
Fixes #50523.

git-svn-id: https://develop.svn.wordpress.org/trunk@56277 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-21 14:31:06 +00:00
Sergey Biryukov
cc2424579e I18N: Add missing translator comment in WP_Upgrader::generic_strings().
This resolves a WPCS warning:
> A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

Includes moving `wp-content` out of the translatable string in a similar message in `_wp_delete_all_temp_backups()`.

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

Props jrf.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56276 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-21 13:31:17 +00:00
Sergey Biryukov
cb42d7226f Coding Standards: Correct equals sign alignment in various files.
This resolves a few WPCS warnings:
{{{
Equals sign not aligned with surrounding statements
}}}
so that the output of `composer format` is clean.

Follow-up to [55971], [56033], [56056], [56143], [56214].

Props jrf.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56273 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-20 00:04:33 +00:00
Sergey Biryukov
6281ce432c Docs: Add a missing word in maybe_create_table() description.
Follow-up to [31246].

Props crstauf, james0r.
Fixes #58841.

git-svn-id: https://develop.svn.wordpress.org/trunk@56270 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-19 11:31:15 +00:00
Sergey Biryukov
722f73761c Administration: Add a missing closing </span> tag for column sorting indicators.
Includes wrapping a few other long markup lines for better readability.

Follow-up to [55971], [56004], [56260].

See #32170, #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56261 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 14:07:02 +00:00
Sergey Biryukov
eb52f08d4e Coding Standards: Use strict comparison for static strings in wp-admin/includes/class-wp-list-table.php.
Follow-up to [55971], [56004].

See #32170, #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56260 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 14:03:57 +00:00
Jonny Harris
d0b8f4927f Upgrade/Install: Add correct parameters to add_option in upgrade_630
Introduced in [55854], `upgrade_630` function was introduced to update `can_compress_scripts` option to autoload. However the function `add_option` was invoked incorrectly, passing 3 parameters and not 4. The third parameter, which is deprecated, triggers a  deprecated argument warning. In this change, pass 4 parameters instead of 3. 

Props gudmdharalds, spacedmonkey, costdev, mukesh27.
Fixes #58821.

git-svn-id: https://develop.svn.wordpress.org/trunk@56258 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-18 10:07:05 +00:00
Sergey Biryukov
8b5cfe0887 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], [55990], [56014], [56021], [56031], [56032], [56065], [56241].

See #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56245 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 13:16:14 +00:00
Andrew Ozz
118c36999a Menus: Fix critical errors when the page_on_front and/or page_for_posts options contain references to non-existing posts.
props: hbhalodia, wplindavantol, josklever, audrasjb.
Fixes: #58345.

git-svn-id: https://develop.svn.wordpress.org/trunk@56236 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-14 21:45:05 +00:00
Joe Dolson
f4d2a1593f Media: Set default state for image rotation button.
Adds `aria-expanded="false"` as default state for image rotation toggle in admin image editor. See #50523.

Props joedolson.
Fixes #58800.

git-svn-id: https://develop.svn.wordpress.org/trunk@56228 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-13 16:40:21 +00:00
Jb Audras
8c1b5794e4 I18n: Improve the use of dashicons-external icon for external links.
This changeset modifies how the `dashicons-external` icon is used in external links by editing its styles and adding a space between the text and the icon 
for better accessibility.

Props SergeyBiryukov, afercia, isabel_brison, mukesh27, sabernhardt, oglekler, audrasjb.
Fixes #47303.




git-svn-id: https://develop.svn.wordpress.org/trunk@56211 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 12:57:19 +00:00
Isabel Brison
eea94adc54 General: fix botched file move in r56199.
Moves `src/wp-admin/includes/theme-previews.php` to `src/wp-includes/theme-previews.php`.

Props peterwilsoncc.
See #58712.


git-svn-id: https://develop.svn.wordpress.org/trunk@56201 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:17:56 +00:00
Isabel Brison
7813524023 General: add nonce for block theme preview activation.
Adds a nonce so that activation works for block theme previews. Temporary fix until there is a REST API endpoint for activating themes.

Props scruffian, peterwilsoncc, nithins53, nithi22, jomonthomaslobo1, poena, syamraj24, vivekawsm, mrinal013.
Fixes #58712.


git-svn-id: https://develop.svn.wordpress.org/trunk@56199 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:01:05 +00:00
Andrew Ozz
8b8afa1299 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56186 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-10 20:31:35 +00:00
Jb Audras
792f77b6a6 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@56176 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-09 20:05:43 +00:00
Jb Audras
13b571eeac 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@56174 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-09 19:50:52 +00:00
John Blackbourn
a7de2a8e26 Docs: Correct the formatting of various filter documentation.
See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@56157 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-07 00:34:26 +00:00
Jb Audras
b71668fc40 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@56150 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 12:45:45 +00:00
Sergey Biryukov
06c1c4f0f7 Docs: Document the return value of wp_check_php_version() using hash notation.
Follow-up to [42832].

See #57840.

git-svn-id: https://develop.svn.wordpress.org/trunk@56144 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-06 00:14:34 +00:00
Sergey Biryukov
62b286f9b2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56124 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-02 10:33:18 +00:00
Jb Audras
e635540d1c 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@56123 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-02 08:02:45 +00:00
Sergey Biryukov
280e720059 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56117 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 11:11:13 +00:00
Sergey Biryukov
c650864b9f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56111 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 17:03:19 +00:00
Sergey Biryukov
a63be5a890 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56091 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 13:17:49 +00:00
Andrew Ozz
45363a5976 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56088 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 10:07:49 +00:00
Felix Arntz
e527271f2c Site Health: Include new WP_DEVELOPMENT_MODE in the list of constants.
Follow-up to [56042].

Props kebbet.
Fixes #58646.
See #57487.


git-svn-id: https://develop.svn.wordpress.org/trunk@56079 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 22:01:22 +00:00
Sergey Biryukov
87a0ad45a5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56072 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:26:15 +00:00