44442 Commits

Author SHA1 Message Date
Sergey Biryukov
8dee6dcc55 Filesystem API: Make sure to only call fread() on non-empty files in PclZip::privAddFile().
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero.

This commit also amends the previous solution for similar issues elsewhere in the file to ensure consistent type for string values, instead of changing the type from `string` to `bool` when trying to read from an empty file.

Follow-up to [50355].

Props DavidAnderson, jrf, SergeyBiryukov.
Fixes #54036.

git-svn-id: https://develop.svn.wordpress.org/trunk@51686 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-29 01:32:46 +00:00
John Blackbourn
29531de768 Build/Test Tools: Install the Composer package dependencies within the Docker environment as part of the local development environment installation and testing processes.
This makes the use of Composer on the host machine optional when using the Docker environment, which means there is no change to the process for installing, updating, and running the tests since [51559].

Props hellofromTonya, azaozz, netweb, desrosj, jrf, johnbillion

Fixes #53945


git-svn-id: https://develop.svn.wordpress.org/trunk@51685 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-28 21:16:22 +00:00
John Blackbourn
b29e32c28f Administration: Remove a misleading pointer cursor from list items in the admin menu.
This prevents unclickable areas within the menu from appearing clickable.

Props circlecube, kurudrive, ryelle, opurockey

Fixes #51551


git-svn-id: https://develop.svn.wordpress.org/trunk@51684 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-28 13:44:52 +00:00
Sergey Biryukov
a632c8592b Coding Standards: Fix WPCS issue in [51682].
This fixes a "Misleading line break before `'||'`; readers may interpret this as an expression boundary" error.

See #54030.

git-svn-id: https://develop.svn.wordpress.org/trunk@51683 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-28 01:33:06 +00:00
Sergey Biryukov
780be4296a Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on a block editor instance.
This ensures that the current panel is not collapsed when hitting `Esc` with the focus on the widget block editor.

Follow-up to [37347], [39120].

Props gwwar, dlh.
Fixes #54030.

git-svn-id: https://develop.svn.wordpress.org/trunk@51682 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-28 01:24:13 +00:00
Jonathan Desrosiers
52fe9ffbd5 Build/Test Tools: Preserve text within backticks in Slack notifications.
Props SergeyBiryukov, johnbillion, earnjam.
See #52644.

git-svn-id: https://develop.svn.wordpress.org/trunk@51679 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-27 17:34:29 +00:00
Sergey Biryukov
ef41195ee3 Plugins: Display a message on Plugins list table if a plugin requires a higher version of PHP or WordPress.
Installation and activation of incompatible plugins was previously disallowed in [43436] and [44978], but if such a plugin was installed manually, there was nothing on the Plugins screen that would show its compatibility status.

Showing an appropriate notice with a documentation link makes the UI more consistent and improves user experience.

Follow-up to [43436], [44937], [44939], [44978], [45043], [45165], [45546], [47573], [47816], [47819], [48172], [48636], [48637], [48638], [48640], [48652], [48653], [48654], [48660].

Props TacoVerdo, SergeyBiryukov.
Fixes #53990.

git-svn-id: https://develop.svn.wordpress.org/trunk@51678 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-27 15:42:36 +00:00
Mike Schroder
2438aca5fc Customizer: Respect prefers-reduced-motion media query in Customizer animations.
Disables Customizer animations when media query `prefers-reduced-motion: reduce` returns true.

Continues the effort to reduce motion within the WordPress admin panel when users have enabled this feature in their operating system or browser.

It has the additional effect of making the Block Editor's end-to-end tests run faster, as explored initially with a different approach in #53562.

See https://github.com/WordPress/gutenberg/issues/32024 for the related Gutenberg issue.

See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion for ways to enable this feature on various platforms.

Props kevin940726, isabel_brison, zieladam, youknowriad, desrosj, mamaduka, mikeschroder.
Previously [51389], [50028], [47813].
Fixes #53542.

git-svn-id: https://develop.svn.wordpress.org/trunk@51677 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-27 09:35:17 +00:00
John Blackbourn
524c2a6fd3 REST API: Correct the description for the last_updated property in the block-directory endpoint.
This field shows the date in ISO 8601 format.

Fixes #53595


git-svn-id: https://develop.svn.wordpress.org/trunk@51676 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 19:33:22 +00:00
John Blackbourn
f838c86573 Security: Correct the inline docs for the wp_kses_allowed_html filter.
Props peterwilsoncc

Fixes #53597


git-svn-id: https://develop.svn.wordpress.org/trunk@51675 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 19:27:59 +00:00
Jonathan Desrosiers
44180691e6 Editor: Ensure block attribute serialization in PHP matches the JavaScript equivalent.
The `serializeAttributes()` function in JavaScript uses `JSON.stringify`, which does not encode slashes and unicode characters by default. This resulted in the PHP serialization through `json_encode()` producing different results.

This also switches from `json_encode()` to `wp_json_encode()` to prevent failures when any non UTF-8 characters are included.

Props kevinfodness, SergeyBiryukov, timothyblynjacobs.
Fixes #53936.

git-svn-id: https://develop.svn.wordpress.org/trunk@51674 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 19:09:16 +00:00
Jonathan Desrosiers
62e8d8f115 Build/Test Tools: Use list format when defining environment variables in Docker compose file.
This is the correct formatting detailed in the Docker `compose` documentation examples and helps to avoid ambiguities in the yaml parser when values that may cause warnings.

Props pbrearne, ocean90, johnbillion, desrosj.
Fixes #53820.

git-svn-id: https://develop.svn.wordpress.org/trunk@51673 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 18:40:15 +00:00
Kelly Choyce-Dwan
ebe147cb13 Toolbar: Provide a CSS custom property for the admin bar height.
This new custom property, `--wp-admin--admin-bar--height`, reflects the admin bar's height and adjusts responsively on smaller screens. It can be used to offset content to avoid overlapping the admin bar, without needing to copy the media query.

This also removes a workaround only needed for Internet Explorer 6 and below.

Props nico23, sabernhardt.
Fixes #52623.



git-svn-id: https://develop.svn.wordpress.org/trunk@51672 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 18:23:49 +00:00
Jonathan Desrosiers
80b24ab3f3 Build/Test Tools: Remove shell: bash from code coverage workflow.
bash is the default shell for all non-Windows GitHub Action runners, so this is not necessary.

Follow up to [51670].
See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51671 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 18:21:49 +00:00
Jonathan Desrosiers
5d6e9971b3 Build/Test Tools: Remove shell: bash from PHPUnit test workflow.
bash is the default shell for all non-Windows GitHub Action runners, so this is not necessary.

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51670 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 18:20:34 +00:00
Tonya Mork
6201d437e8 Tests: Improve bootstrap error message for when ABSPATH folder does not exist.
The PHPUnit tests are/should generally be run on the `src` directory, so changes just made can be tested. While testing via the `build` directory is also still supported, this is not the default.

This was last changed in [50441], but that commit did not remove/update the error message thrown by the test bootstrap file.

This last change also did not take into account that that change meant that people had to update their own `wp`tests-config.php` file to match the change made in Core and would otherwise still get the outdated error message.

This commit changes the messaging in the test bootstrap file to be more in line with the current reality, while still accounting for the fact that tests can be run from both `src` as well as `build`.

Follow-up to [49569], [50441], [51581].
Props jrf, hellofromTonya.

git-svn-id: https://develop.svn.wordpress.org/trunk@51669 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 17:55:02 +00:00
SergeyBiryukov
d616b931e0 Coding Standards: Add missing visibility keywords for wp_filter_object_list() and wp_list_pluck() tests.
Follow-up to [51663-51667].

Props pbearne.
See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51668 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 16:50:02 +00:00
Sergey Biryukov
72de4966b8 Tests: Move wp_list_sort() tests to their own file.
This matches the name of the function being tested.

Follow-up to [38928], [51663-51666].

See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51667 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 16:29:37 +00:00
Sergey Biryukov
cd1f879ced Tests: Move wp_list_filter() tests to their own file.
This matches the name of the function being tested.

Follow-up to [38928], [51663-51665].

See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51666 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 16:20:57 +00:00
Sergey Biryukov
b683b830ab Tests: Rename the test file and class for wp_filter_object_list() tests.
This matches the name of the function being tested.

Follow-up to [410/tests], [51663], [51664].

See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51665 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 16:08:48 +00:00
Sergey Biryukov
a90e7eb5ff Tests: Remove duplicate wp_list_pluck() tests.
The tests were partially duplicated in two separate files, and are now located in their own file.

Follow-up to [431/tests], [28900], [38928], [42527], [51663].

See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51664 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 16:02:13 +00:00
Sergey Biryukov
927bc80b92 Tests: Move wp_list_pluck() tests to their own file.
The tests were partially duplicated in two separate files.

Follow-up to [431/tests], [28900], [38928], [42527].

See #53363, #53987.

git-svn-id: https://develop.svn.wordpress.org/trunk@51663 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 15:54:29 +00:00
Tonya Mork
29c57941ff Coding Standards: Fix indentation and remove ignore annotation in wp_privacy_send_personal_data_export_email().
Follow-up to [51129], [51410].

Props jrf, hellofromTonya.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51662 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 14:04:55 +00:00
Tonya Mork
a653725b56 Coding Standards: Make ignore annotation more specific in WP_Site_Health_Auto_Updates::test_vcs_abspath().
Follow-up to [44986].

Props jrf, hellofromTonya.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51661 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 13:58:32 +00:00
Tonya Mork
ab0e915f40 Coding Standards: Remove redundant ignore annotation in populate_options().
Follow-up to [43627], [43628].

Props jrf, hellofromTonya.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51660 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 13:49:30 +00:00
Tonya Mork
e5e2b86a6a Coding Standards: Update the config for WordPress.PHP.FileName in PHPCS ruleset.
The WPCS sniff already takes the test classes in the `tests/phpunit/includes` directory into account.

Only the test cases outside of that directory, i.e. in the `tests/phpunit/tests` directory need to be listed here.

Includes alphabetizing the list.

Follow-up to [42346], [45607].

Props jrf, hellofromTonya, SergeyBiryukov.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51659 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 13:35:16 +00:00
Tonya Mork
4e682f0910 Coding Standards: Update the config for WordPress.PHP.NoSilencedErrors in PHPCS ruleset.
Follow-up to [45611].

Props jrf, hellofromTonya.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51658 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 13:19:17 +00:00
Tonya Mork
e83a341cc0 Coding Standards: Use static closures when not using $this.
When a closure does not use `$this`, it can be made `static` for improved performance.

Static closures are supported in PHP since PHP 5.4. ​

Props jrf, hellofromTonya, swissspidy, SergeyBiryukov.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51657 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 12:57:08 +00:00
Sergey Biryukov
d87fa561ab Docs: Add missing @since tag for the $check_signatures parameter of WP_Upgrader::run().
This matches the `WP_Upgrader::download_package()` documentation more closely.

Follow-up to [44954], [45262].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@51655 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-25 14:38:12 +00:00
Sergey Biryukov
efc83a98d9 Docs: Clarify a comment in WP_Upgrader::run().
This matches the `WP_Upgrader::download_package()` documentation more closely.

Follow-up to [11005], [30758], [33685].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@51654 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-24 23:08:11 +00:00
Andrew Ozz
67f8702477 Media: Fix wp_unique_filename() to check for name collisions with all alternate file names when an image may be converted after uploading. This includes possible collinions with pre-existing images whose sub-sizes/thumbnails are regenerated.
Props ianmjones, azaozz.
Fixes #53668.

git-svn-id: https://develop.svn.wordpress.org/trunk@51653 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-24 20:50:21 +00:00
Sergey Biryukov
d4abd5ca4a Code Modernization: Pass correct default value to http_build_query() in WP_Sitemaps_Provider::get_sitemap_url().
The `WP_Sitemaps_Provider::get_sitemap_url()` method calls the PHP native `http_build_query()` function, the second parameter of which is the ''optional'' `$numeric_prefix` parameter which expects a `string`.

A parameter being optional, however, does not automatically make it nullable.

As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice.

In this case, this function call yielded a `http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated` notice.

Changing the `null` to an empty string fixes this without a backward compatibility break.

This change is already covered by tests as 14 of the existing tests failed on these function calls when running the tests on PHP 8.1.

References:
* [https://www.php.net/manual/en/function.http-build-query.php PHP Manual: http_build_query()]
* [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC: Deprecate passing null to non-nullable arguments of internal functions]

Follow-up to [48470].

Props jrf.
See #53635.

git-svn-id: https://develop.svn.wordpress.org/trunk@51652 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-23 11:42:58 +00:00
Sergey Biryukov
402e2e636b Tests: Rename classes in phpunit/tests/feed/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51651 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-22 10:07:17 +00:00
Sergey Biryukov
43a8715ded Tests: Rename classes in phpunit/tests/error-protection/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51650 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-21 15:32:53 +00:00
Andrew Ozz
a2c0ccd117 Editor: Replace the remaining references to wp.editor with wp.oldEditor.
Props zieladam.
Fixes #53762.

git-svn-id: https://develop.svn.wordpress.org/trunk@51649 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-21 00:18:25 +00:00
Andrew Ozz
fe3d953437 REST API: Remove trailing slashes when preloading requests and add unit tests for it.
Props antonvlasenko.
Fixes #51636.

git-svn-id: https://develop.svn.wordpress.org/trunk@51648 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-20 23:43:21 +00:00
Jonathan Desrosiers
40506e7e64 Build/Test Tools: Include the commit short summary in Slack messages.
This gives more context to GitHub Action related Slack messages without the need to click the workflow URL, or unfurl the links (which shows lots of unnecessary information, such as the repository description and image).

Props earnjam.
See #52644.

git-svn-id: https://develop.svn.wordpress.org/trunk@51647 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-20 18:58:18 +00:00
Sergey Biryukov
ee81f71ac6 Tests: Rename classes in phpunit/tests/editor/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51646 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-20 16:11:04 +00:00
Kelly Choyce-Dwan
220a6cc805 Privacy: Add space below page selector.
Sometimes the submit button wraps to a new line, either because the button label translation is long, or there are long page names. When it wraps, there should be space between the select dropdown and the button.

Props audrasjb, mukesh27, guillaumeturpin.
Fixes #53782.



git-svn-id: https://develop.svn.wordpress.org/trunk@51645 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 20:57:24 +00:00
Kelly Choyce-Dwan
4583801bc6 Toolbar: Limit the icon transition style to color only.
When transition is `all`, it also applies to the icon size, which can cause a bug in Safari where icons get stuck in the wrong size when resizing the browser window. The only expected animation is on the color property, so the transition can be limited to just `color`.

Props johnjamesjacoby, sabernhardt, SergeyBiryukov, audrasjb.
Fixes #43423.



git-svn-id: https://develop.svn.wordpress.org/trunk@51644 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 17:23:23 +00:00
Sergey Biryukov
0778740cb4 Tests: Move loading the WP_Community_Events class to set_up_before_class().
This ensures that the class is loaded once before the first test of the test case class is run, and `require_once()` is not unnecessarily called for each test method individually.

Follow-up to [40607], [51628].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51641 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 13:59:36 +00:00
Sergey Biryukov
e20beacb6e Tests: Rename classes in phpunit/tests/admin/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51639 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 13:08:43 +00:00
Sergey Biryukov
05f28947e7 Media: Check the return type of _get_cron_array() in WP_Media_List_Table::prepare_items().
The following warnings could, in very select circumstances, be shown:
{{{
// PHP 8.0 and higher:
Warning: foreach() argument must be of type array|object, bool given

// PHP 5.6 – 7.4
Warning: Invalid argument supplied for foreach()
}}}

In `WP_Media_List_Table::prepare_items()`, the cron info array is retrieved via a call to `_get_cron_array()`, but as the documentation (correctly) states, the return type of that function is `array|false`, where `false` is returned for a virgin site, with no cron jobs scheduled yet.

However, no type check is done on the return value, and the method just blindly continues by using it in a `foreach`.

Fixed by adding validation for the returned value from `_get_cron_array()` and only running the `foreach` when the returned value is an array.

Reference: [https://developer.wordpress.org/reference/functions/_get_cron_array/ WordPress Developer Resources: _get_cron_array()]

Follow-up to [48417].

Props jrf, hellofromTonya, mukesh27.
Fixes #53949.

git-svn-id: https://develop.svn.wordpress.org/trunk@51638 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 12:43:03 +00:00
Peter Wilson
0222625c37 Customize: Hide native control on background position field.
Hide the browser's native radio button on the custom background position selector in the Customizer and the legacy background screen. This fixes an issue causing both to display.

Props mukesh27, ravipatel, sabernhardt, walbo.
Fixes #53803.


git-svn-id: https://develop.svn.wordpress.org/trunk@51637 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-19 02:06:06 +00:00
Sergey Biryukov
66cb5e3689 Code Modernization: Silence the deprecation warning for auto_detect_line_endings.
Since PHP 8.1, the `auto_detect_line_endings` setting is deprecated:

> The `auto_detect_line_endings` ini setting modifies the behavior of `file()` and `fgets()` to support an isolated `\r` (as opposed to `\n` or `\r\n`) as a newline character. These newlines were used by “Classic” Mac OS, a system which has been discontinued in 2001, nearly two decades ago. Interoperability with such systems is no longer relevant.

Reference: [https://wiki.php.net/rfc/deprecations_php_8_1#auto_detect_line_endings_ini_setting PHP RFC: Deprecations for PHP 8.1: auto_detect_line_endings ini setting]

> The `auto_detect_line_endings` ini setting has been deprecated. If necessary, handle `\r` line breaks manually instead.

Reference: [1cf4fb739f/UPGRADING (L456-L457) PHP 8.1 Upgrade Notes].

This commit fixes the warning when running tests for the `PO` class:
{{{
Deprecated: auto_detect_line_endings is deprecated in /var/www/src/wp-includes/pomo/po.php on line 16
}}}

While deprecated, the actual `auto_detect_line_endings` functionality has not been removed from PHP (yet) and will still work until PHP 9.0.

For now, we're silencing the deprecation notice as there may still be translation files around which haven't been updated in a long time and which still use the old MacOS standalone `\r` as a line ending.

This should be revisited when PHP 9.0 is in alpha/beta.

Follow-up to [51633].

Props jrf.
See #53635.

git-svn-id: https://develop.svn.wordpress.org/trunk@51636 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 21:57:21 +00:00
Sergey Biryukov
7d88c013f4 External Libraries: Restore the phpcs:ignore statements in PHPMailer.
These are necessary for a passing PHP Compatibility scan.

Follow-up to [48045], [51634].

See #53953.

git-svn-id: https://develop.svn.wordpress.org/trunk@51635 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 14:07:17 +00:00
Sergey Biryukov
9aa1589807 External Libraries: Upgrade PHPMailer to version 6.5.1.
The latest release includes preliminary PHP 8.1 support, as well as some small bug fixes.

Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.1

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.5.0...v6.5.1

Follow-up to [50628], [50799], [51169].

Props jrf.
Fixes #53953.

git-svn-id: https://develop.svn.wordpress.org/trunk@51634 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 13:52:16 +00:00
SergeyBiryukov
27a2a804a3 Code Modernization: Only set auto_detect_line_endings in PHP < 8.1.
Since PHP 8.1, the `auto_detect_line_endings` setting is deprecated:

> The `auto_detect_line_endings` ini setting modifies the behavior of `file()` and `fgets()` to support an isolated `\r` (as opposed to `\n` or `\r\n`) as a newline character. These newlines were used by “Classic” Mac OS, a system which has been discontinued in 2001, nearly two decades ago. Interoperability with such systems is no longer relevant.

Reference: [https://wiki.php.net/rfc/deprecations_php_8_1#auto_detect_line_endings_ini_setting PHP RFC: Deprecations for PHP 8.1: auto_detect_line_endings ini setting]

> The `auto_detect_line_endings` ini setting has been deprecated. If necessary, handle `\r` line breaks manually instead.

Reference: [1cf4fb739f/UPGRADING (L456-L457) PHP 8.1 Upgrade Notes].

This commit fixes the warning when running tests for the `PO` class:
{{{
Deprecated: auto_detect_line_endings is deprecated in /var/www/src/wp-includes/pomo/po.php on line 16
}}}

Follow-up to [10584], [51628].

See #53635.

git-svn-id: https://develop.svn.wordpress.org/trunk@51633 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 13:22:02 +00:00
Peter Wilson
cd616cf406 Media: Increase number of media items displayed per page.
Increase the number of media items displayed per page from 40 to 80 to improve the experience for users navigating the library on sites with a large quantity of media in the library.

Props AlGala, antpb, hellofromTonya, joedolson, SergeyBiryukov, wb1234.
Fixes #53827.



git-svn-id: https://develop.svn.wordpress.org/trunk@51632 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 05:59:28 +00:00
Peter Wilson
acfe40f335 Media: Fix layout of media library modal on narrow screens.
Reduces the right margin of the media library modal on small and medium width screens to remove excess white-space. On very narrow screens this was preventing the media icons from displaying.

Props andraganescu, desrosj, joedolson, moch11, mukesh27, sabernhardt, SergeyBiryukov, zieladam.
Fixes #53679.


git-svn-id: https://develop.svn.wordpress.org/trunk@51631 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-18 05:37:01 +00:00