Commit Graph

8690 Commits

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

Unprops joedolson.
See #56594.
Built from https://develop.svn.wordpress.org/trunk@56450


git-svn-id: http://core.svn.wordpress.org/trunk@55962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 16:14:18 +00:00
joedolson
ad66de2933 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.
Built from https://develop.svn.wordpress.org/trunk@56449


git-svn-id: http://core.svn.wordpress.org/trunk@55961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 15:59:12 +00:00
Pascal Birchler
4a763f90ac 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.
Built from https://develop.svn.wordpress.org/trunk@56446


git-svn-id: http://core.svn.wordpress.org/trunk@55958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 15:27:16 +00:00
audrasjb
86323b7f59 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.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 13:41:23 +00:00
audrasjb
0b772b84ca Docs: Clarify post_date_column_time filter description.
Props crstauf, mukesh27.
Fixes #59029.
See #58833.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 09:12:12 +00:00
audrasjb
f668df3cec Docs: Wrap inline @see tags in curly braces.
Props costdev, mukesh27.
Fixes #58858.
See #58833.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-24 09:01:16 +00:00
Sergey Biryukov
3280c340cd 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.
Built from https://develop.svn.wordpress.org/trunk@56420


git-svn-id: http://core.svn.wordpress.org/trunk@55932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-20 00:10:22 +00:00
Andrew Ozz
7715c78c85 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.
Built from https://develop.svn.wordpress.org/trunk@56417


git-svn-id: http://core.svn.wordpress.org/trunk@55929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-18 23:25:24 +00:00
John Blackbourn
4667b9323f Docs: Miscellaneous docblock corrections and improvements.
See #58833

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


git-svn-id: http://core.svn.wordpress.org/trunk@55926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-18 17:29:20 +00:00
Sergey Biryukov
3fa176f4fe 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.
Built from https://develop.svn.wordpress.org/trunk@56411


git-svn-id: http://core.svn.wordpress.org/trunk@55923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-18 10:09:23 +00:00
joedolson
3e1db7f59d 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.
Built from https://develop.svn.wordpress.org/trunk@56410


git-svn-id: http://core.svn.wordpress.org/trunk@55922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-17 21:36:21 +00:00
joedolson
82417a694f 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.
Built from https://develop.svn.wordpress.org/trunk@56409


git-svn-id: http://core.svn.wordpress.org/trunk@55921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-17 21:03:19 +00:00
joedolson
d5f3b7feab 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.
Built from https://develop.svn.wordpress.org/trunk@56408


git-svn-id: http://core.svn.wordpress.org/trunk@55920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-17 20:29:21 +00:00
Sergey Biryukov
a26771b347 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.
Built from https://develop.svn.wordpress.org/trunk@56401


git-svn-id: http://core.svn.wordpress.org/trunk@55913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-17 11:18:21 +00:00
Sergey Biryukov
caddf7e3dc 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.
Built from https://develop.svn.wordpress.org/trunk@56400


git-svn-id: http://core.svn.wordpress.org/trunk@55912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-16 14:05:20 +00:00
Sergey Biryukov
832b4660fd 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.
Built from https://develop.svn.wordpress.org/trunk@56397


git-svn-id: http://core.svn.wordpress.org/trunk@55909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-15 10:09:24 +00:00
Sergey Biryukov
356e6cac57 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.
Built from https://develop.svn.wordpress.org/trunk@56396


git-svn-id: http://core.svn.wordpress.org/trunk@55908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-14 09:59:20 +00:00
davidbaumwald
2ecfc4f9a0 Upgrade/Install: Update $_old_files for 6.3.
Props SergeyBiryukov.
Fixes #58994.
Built from https://develop.svn.wordpress.org/trunk@56365


git-svn-id: http://core.svn.wordpress.org/trunk@55877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-07 17:21:29 +00:00
hellofromTonya
65da089d96 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.
Built from https://develop.svn.wordpress.org/trunk@56356


git-svn-id: http://core.svn.wordpress.org/trunk@55868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-03 19:52:22 +00:00
hellofromTonya
50274fbc2b 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.
Built from https://develop.svn.wordpress.org/trunk@56349


git-svn-id: http://core.svn.wordpress.org/trunk@55861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 18:37:21 +00:00
Sergey Biryukov
9dc13e98d7 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.
Built from https://develop.svn.wordpress.org/trunk@56346


git-svn-id: http://core.svn.wordpress.org/trunk@55858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 10:59:25 +00:00
Sergey Biryukov
1364db92bb 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.
Built from https://develop.svn.wordpress.org/trunk@56341


git-svn-id: http://core.svn.wordpress.org/trunk@55853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 16:07:25 +00:00
ryelle
f5730be053 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 23:15:23 +00:00
joedolson
c619a3d450 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.
Built from https://develop.svn.wordpress.org/trunk@56277


git-svn-id: http://core.svn.wordpress.org/trunk@55789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-21 14:33:22 +00:00
Sergey Biryukov
55ab72cf12 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.
Built from https://develop.svn.wordpress.org/trunk@56276


git-svn-id: http://core.svn.wordpress.org/trunk@55788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-21 13:33:27 +00:00
Sergey Biryukov
3a065bfb2c 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.
Built from https://develop.svn.wordpress.org/trunk@56273


git-svn-id: http://core.svn.wordpress.org/trunk@55785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-20 00:06:21 +00:00
Sergey Biryukov
c0f28e113c Docs: Add a missing word in maybe_create_table() description.
Follow-up to [31246].

Props crstauf, james0r.
Fixes #58841.
Built from https://develop.svn.wordpress.org/trunk@56270


git-svn-id: http://core.svn.wordpress.org/trunk@55782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-19 11:33:26 +00:00
Sergey Biryukov
45cf0edf28 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.
Built from https://develop.svn.wordpress.org/trunk@56261


git-svn-id: http://core.svn.wordpress.org/trunk@55773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 14:09:21 +00:00
Sergey Biryukov
c0adc40452 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.
Built from https://develop.svn.wordpress.org/trunk@56260


git-svn-id: http://core.svn.wordpress.org/trunk@55772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 14:05:29 +00:00
spacedmonkey
e0eaffdd3c 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.
Built from https://develop.svn.wordpress.org/trunk@56258


git-svn-id: http://core.svn.wordpress.org/trunk@55770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 10:09:29 +00:00
Sergey Biryukov
59f1c9c205 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.
Built from https://develop.svn.wordpress.org/trunk@56245


git-svn-id: http://core.svn.wordpress.org/trunk@55757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-17 13:18:27 +00:00
Andrew Ozz
fe0920e0a3 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.
Built from https://develop.svn.wordpress.org/trunk@56236


git-svn-id: http://core.svn.wordpress.org/trunk@55748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-14 21:47:22 +00:00
joedolson
61c7af563a 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.
Built from https://develop.svn.wordpress.org/trunk@56228


git-svn-id: http://core.svn.wordpress.org/trunk@55740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-13 16:42:27 +00:00
audrasjb
897d9c221e 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.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 12:59:25 +00:00
isabel_brison
bf41190659 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 05:19:23 +00:00
isabel_brison
1ee477dbe4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 05:03:23 +00:00
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
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
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
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
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