Commit Graph

44826 Commits

Author SHA1 Message Date
Sergey Biryukov 5e35ad4b4a Upgrade/Install: Check that WordPress is installed before scheduling cleanup of the `temp-backup` directory.
Trying to schedule cron jobs before WordPress is installed results in DB errors, which is suboptimal.

This addresses a  `Table 'wp_options' doesn't exist` error when running the installation with `WP_DEBUG` enabled.

Follow-up to [51815], [51898], [51899], [51902], [52192].

Props dlh, pbiron.
See #51857.
Built from https://develop.svn.wordpress.org/trunk@52284


git-svn-id: http://core.svn.wordpress.org/trunk@51876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:12:01 +00:00
jffng 2caa789ee0 Twenty Twenty-Two: Sync updates from GitHub.
This commit syncs minor changes for the default theme from its active development repository to core. 

This is a follow up to [52081], [52107], [52164], and [52222]. It includes changes to template part markup, theme.json appearance flags, navigation block markup, and text domains. For a full set of changes, visit 742df6cb2b...1a121e0224.

Props poena, kjellr, onemaggie, hellofromtonya.
See #54318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 16:19:00 +00:00
audrasjb b22dfaf657 Tests: Update `WP_REST_Global_Styles_Controller_Test` "Custom Styles" string after [52280].
Follow-up to [52280].

See #54518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 15:55:59 +00:00
hellofromTonya 14f6cf230b REST API: Replace hardcoded `wp/v2/` preloaded paths with `rest_get_route_for_taxonomy_items()` and `rest_get_route_for_post_type_items()` in `wp-admin/site-editor.php`.
[51962] and [51964] introduced two new functions: `rest_get_route_for_post_type_items()` and `rest_get_route_for_taxonomy_items()`. These functions replaced hardcoded references in all parts of core that reference taxonomy and post type rest controller endpoints. However, several instances were missed in the `wp-admin/site-editor.php` file.

This commit replaces those remaining hardcoded instances.

Follow-up to [51962], [51964], [52232].

Props spacedmonkey.
Fixes #54536.
Built from https://develop.svn.wordpress.org/trunk@52281


git-svn-id: http://core.svn.wordpress.org/trunk@51873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 15:54:03 +00:00
audrasjb 4212bcfe36 Editor: Do not translate the title of "Custom Styles" specific posts.
This change removes the internationalization of the "Custom Styles" specific posts as the post title being hardcoded is consistent with `wp_template_part` and `wp_template` post types, and is not publicly visible, except in the database. Moreover, using consistent "Custom Styles" post title may make is easier to retrieve the related posts in the database.

Props antonvlasenko, audrasjb, desrosj, hellofromTonya.
Fixes #54518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 15:35:01 +00:00
hellofromTonya ce3aed3186 Administration: For block themes, link to Site Editor interface instead of Customizer in Dashboard's welcome panel and Themes interface.
For block themes (like Twenty Twenty-Two), Customizer menu item is removed and replaced with the Site Editor menu item. However, other links exist in the Dashboard's welcome panel "Customize Your Site" button and the "Customize" button in each theme listed in the Appearance > Themes interface.

This commit changes each of those remaining links to link to the Site Editor interface instead of the Customizer.

To help identify block vs non-block themes, two method methods are introduced in `WP_Theme`:

* `WP_Theme:: is_block_based()` which identifies if the theme is a block theme or not.
* `WP_Theme::get_file_path()` which is similar to `get_theme_file_path()` but uses the directories within the theme object.

Both of these new methods include test coverage including the addition of a parent and child block theme in test data.

Follow-up to [18749], [35483], [42013], [42169].

Props antonvlasenko, jameskoster, hellofromTonya, matveb, noisysocks, poena, sergeybiryukov.
Fixes #54460.
Built from https://develop.svn.wordpress.org/trunk@52279


git-svn-id: http://core.svn.wordpress.org/trunk@51871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 14:27:03 +00:00
Sergey Biryukov 9c9c576d88 I18N: Remove redundant `default` text domain parameter in some `__()` calls.
Follow-up to [51160], [52069].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52278


git-svn-id: http://core.svn.wordpress.org/trunk@51870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 08:33:05 +00:00
noisysocks dc3ffcbde3 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Include cascading properties in Navigation deprecation
- Reorganize e2e tests folders and file
- Border panel: Update to display multiple palette origins
- Add CSS fix for 33580
- Add: Uneditable duotone palette on the palette gradient panel
- Site Editor: Allow editing custom template title
- Writing Flow: Double escape unselects all blocks
- Fix icon scaling.
- [Block Library - Query Pagination Next/Previous]: Remove text and link color support
- Add: Border indication to global styles colors.
- Color Picker: Improve border, padding, and box shadow styles.
- theme.json: sort keys alphabetically
- Remove navigationArea context.

See #54487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 05:48:28 +00:00
Peter Wilson 43290b2e04 REST API: Fire `wp_after_insert_post` later in new post object endpoints.
In the new menu items, global items and template controllers manually call the function `wp_after_insert_post()` to manually fire the action of the same name after all potential data is updated.

This accounts for the use case in which a theme or plugin developer has modified the endpoints use of either taxonomy or meta data.

The new parameter `$fire_after_hooks` is added to `wp_update_nav_menu_item()` to control whether the `wp_after_insert_post` action is fired when it in turn calls `wp_insert_post()`.

Props spacedmonkey, peterwilsoncc, zieladam.
Fixes #54536.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 01:10:08 +00:00
noisysocks e4b553a201 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Update Pattern block category and add documentation
- Fix non existent menu handling in nav block
- Make Reusable blocks available in the Site Editor
- Add caching to WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type()
- theme.json: add appearanceTools flag to opt-in into appearance UI controls
- Update the block theme folders to templates and parts
- Remove reference to gutenberg_, swap with wp_
- Use table layout in templates list screen
- Update featured image placeholder graphic.
- [Inserter]: Adjust order of theme blocks and reorder inserter items
- Implement suitable fallback for Nav block on front end of site when no menu selected
- Toggle Group Control: add tooltip
- Use first non-empty Nav post as primary fallback for Nav block
- Change .nvmrc and documentation for Node.js version (LTS to 14.18.1)
- Update: Migrate global styles user database data on the rest endpoint
- Update global styles public API
- Update: Rename user preset origin to custom
- Try always generating navigation post title
- Show all templates and template parts on the site editor list screens
- Highlight "Site" in the navigation panel
- Fix template part slug generation when creating through the block placeholder
- [Block Library - Post Title]: Fix render error when setting Page to homepage
- Add 'Clear customizations' button to template list page
- Gallery v1: Allow clicks within replace media placeholder state
- Site Editor: Set the <title> on the list page to be same as the CPT name
- Gallery: Fix stuck image size options loader
- Cover: Fix undo trap
- Add success and error snackbars to the templates list page
- Fix: theme colors cannot override defaults
- Fix: Color palette is not being stored
- Add elements support to the typography panel in global styles
- Make links plural in global styles
- Add: Gradient palette editor
- Update some small style regressions in the template list
- Add: Transparency support on global styles colors
- Fix: apply by slug on all origins
- Render empty Nav block if no fallback block can be utilised
- Allow filtering of Nav block fallback
- Fix Nav block fallback DB query to match on full block grammar start tag
- Remove unstable max pages attribute from Nav block
- DateTimePicker: set PM hours correctly
- Update delete template button
- Site Editor: Template list add rename action
- Fix Nav block editing wrong entity on creation of new Menu
- [REST] Restore the missing double slash in the ID received by /templates
- Add icons to navigation sidebar items
- Update function names for the public global styles API functions
- Templates Controller: Add missing 'is_custom' prop
- Rename gutenberg_ to wp_ for some functions that land in WordPress 5.9
- [Block Library - Template Part]:Remove support for conversion to Reusable block
- Global Styles: Call "palettes" and not "color palettes" on panel label
- Add button text when no colors found
- Update: Global Styes: Count all color palette origins on the palette counter
- Rename navigationMenuId to ref
- Offset the parent iframe when computing Popover position 
- Fix: Failing PHPUnit test
- Show theme, plugin or author in Added By column with appropriate icon or avatar
- Add origin and author to template rest api

See #54487.
Props talldanwp, mamaduka, oandregal.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 00:24:27 +00:00
Peter Wilson 8294b090fb Build/Test Tools: Revert ignore prop change in [52272].
See #54506.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 23:45:03 +00:00
noisysocks 57aee3ba4d Restore block PHP to canonical version in @wordpress/block-library
r52272 erroneously modified `src/wp-includes/blocks/navigation.php`. This file
is copied from `@wordpress/block-library` and so must be updated via npm. This
commit restores the file by running `grunt build --dev`.

Follows [52272].
See #54506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 23:31:05 +00:00
spacedmonkey ebf7eb50dc Editor: Remove Navigation Areas
Navigation area were merged as part of full site editing and the new navigation block. This functionality is experimental and not currently used in WordPress core, so should be removed.

Props noisysocks, spacedmonkey, get_dave, zieladam.
Fixes #54506.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 22:06:01 +00:00
audrasjb 31a76e520b Twenty Twenty: Restore Editor post title styles after Gutenberg 11.4.0 updates.
This change restores the Editor post title alignement and font styles in Twenty Twenty after Gutenberg 11.4.0 updates on the editor markup.

Props shireling, mai21, hilayt24, desrosj, sabernhardt.
Fixes #54056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 22:03:59 +00:00
hellofromTonya 9cc22d060f Media: Replace `tests/phpunit/data/images/sugar-mountain.jpg` test image.
The test image included in [52269] was invalid at 0 bytes. This commit adds the correct test image.

Follow-up [52269].

See #54385.
Built from https://develop.svn.wordpress.org/trunk@52270


git-svn-id: http://core.svn.wordpress.org/trunk@51862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 20:18:00 +00:00
hellofromTonya 677e6e5b13 Media: Fix `TypeError` and improve `wp_exif_frac2dec()` to only return `int` or `float`.
For certain images, `wp_exif_frac2dec()` unexpectedly returned a string instead of `int` or `float`. This can occur when an image is missing meta and calls the function with `'0/0'`. For those images, a fatal error was thrown on PHP 8.0+:

{{{
TypeError: round(): Argument #1 ($num) must be of type int|float, string given
}}}

Upon deeper review, inconsistent and unexpected results were returned from different types of input values passed to the function.

Changes are:

* Maintains backwards-compatibility for valid input values.
* Fixes handling of invalid input values by bailing out to return the documented type of `int|float` by returning `0`.
* Improves the fractional conditional check.
* Improves the calculated fraction handling to ensure (a) the numerator and denominator are both numeric and (b) the denominator is not equal to zero.
* Safeguards the behavior via tests for all possible ways code could flow through the function.
* Safeguards the backwards-compatibility of the `wp_read_image_metadata()` by adding some defensive coding around the calls to the `wp_exif_frac2dec()` function.

These changes fix the fatal error and make the function more secure, stable, and predictable while maintaining backwards-compatibility for valid input values.

Follow-up to [6313], [9119], [22319], [28367], [45611], [47287].

Props adamsilverstein, jrf, peterwilsoncc, praem90, stevegs, tobiasbg.
Fixes #54385.
Built from https://develop.svn.wordpress.org/trunk@52269


git-svn-id: http://core.svn.wordpress.org/trunk@51861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 19:36:05 +00:00
spacedmonkey 2f6cf4ba81 REST API: Ensure that the rest_after_insert_ action is executed in the templates controller.
Fire the that dynamic action `rest_after_insert_{$this->post_type}` in templates controller, as this action is fired in other post based REST API controllers. 

Props spacedmonkey, peterwilsoncc, zieladam.
Fixes #54520.
Built from https://develop.svn.wordpress.org/trunk@52268


git-svn-id: http://core.svn.wordpress.org/trunk@51860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 11:43:01 +00:00
audrasjb 0ca6469410 Feeds: Remove reference to `wp-atom.php` in Atom feeds `xml:base` attribute.
This change removes the optional `xml:base` attribute for Atom based feeds as `wp-atom.php` file was removed in [18540] (WordPress 3.3).

Follow-up to [18540].

Props tw2113, audrasjb, mukesh27.
Fixes #47955.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 09:52:00 +00:00
Sergey Biryukov 79884a72d4 Tests: Replace `assertEquals()` with `assertSame()` in block template tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()`, `assertSameSets()`, or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.

Follow-up to [51003], [51079], [52062], [52265].

See #53364, #53363, #54335.
Built from https://develop.svn.wordpress.org/trunk@52266


git-svn-id: http://core.svn.wordpress.org/trunk@51858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 08:47:05 +00:00
Sergey Biryukov 595b629f08 Tests: Rename classes in block template tests per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [51003], as a continuation of the previous changes in ​[47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52265


git-svn-id: http://core.svn.wordpress.org/trunk@51857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 03:23:03 +00:00
Sergey Biryukov ee2423c236 Tests: Rename classes in `phpunit/tests/block-supports/` per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [52069], as a continuation of the previous changes in ​[47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52264


git-svn-id: http://core.svn.wordpress.org/trunk@51856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 03:12:02 +00:00
audrasjb c9527eea2e Media: Ensure media preview is fully viewable in the "Add Media" modal.
This change ensures the media preview is not cut off in the "Add Media" modal box, when using the "Insert from URL" feature.

Props siliconforks, sabernhardt, mukesh27, ankit-k-gupta.
Fixes #53636.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 23:11:02 +00:00
audrasjb dc853cb0e9 Script Loader: Enqueue block stylesheet only when the corresponding block is used.
Before this change, block stylesheets were enqueued although the corresponding blocks were not used in the current post, even if the `should_load_separate_core_block_assets` filter was set to `true`.

Props shimotomoki, devutpol, audrasjb.
Fixes #54457.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 21:12:06 +00:00
audrasjb 74d251884f Editor: Ensure block style name does not contain spaces before creating the class.
This change adds a check to ensure there is no spaces in block style variation names before generating the class. Returns `false` and a `_doing_it_wrong()` message if a space is detected.

Props amustaque97, costdev, hellofromtonya, pbiron, SergeyBiryukov, afragen.
Fixes #54296.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 13:53:00 +00:00
Sergey Biryukov 7290503480 Tests: Temporarily disable the check that the current recommended PHP version is actively supported.
As PHP 7.4 moved from active support to security support until 28 Nov 2022, and no discussions or decisions have been made yet on bumping the recommended version to PHP 8.0, this commit disables the failing assertion for now.

This should be revisited once WordPress achieves PHP 8.0 compatibility and the recommended PHP version in `readme.html` can be bumped, or another decision is made about this.

Follow-up to [26166], [33937], [33944], [33946], [35172], [39582], [39583], [40241], [46682], [46996], [46998].

Props costdev, audrasjb.
Fixes #54528.
Built from https://develop.svn.wordpress.org/trunk@52260


git-svn-id: http://core.svn.wordpress.org/trunk@51852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 10:35:59 +00:00
Sergey Biryukov 5107bba1af Tests: Use a simpler approach to test the output in some tests.
Instead of ignoring the output and catching it later with `getActualOutput()`, we can use `expectOutputRegex()` directly, which evaluates the output after the rest of the test code has run, if no unexpected errors were encountered.

Follow-up to [52173], [52253].

Props jrf.
See #53635, #53363.
Built from https://develop.svn.wordpress.org/trunk@52259


git-svn-id: http://core.svn.wordpress.org/trunk@51851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-27 16:18:00 +00:00
audrasjb 1f9eee5410 Taxonomy: Check $term object before using it in `get_term_feed_link()`.
This change performs the type safety check on `$term` before it is used to retrieve the taxonomy in `get_term_feed_link()`. It also updates the related DocBlock after [52255].

Follow up to [52255].

Props dlh.
Fixes #50225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-27 15:23:59 +00:00
Sergey Biryukov 7cbc31f7c0 Docs: Remove inaccurate part of the `screen_settings` filter description.
The filter is called for all admin screens, not just the Widgets screen.

Follow-up to [27256].

Props Starbuck.
Fixes #54524.
Built from https://develop.svn.wordpress.org/trunk@52257


git-svn-id: http://core.svn.wordpress.org/trunk@51849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-27 02:07:00 +00:00
audrasjb da49813106 Media: Allow setting custom image alt text in custom header image.
This change applies the alternative text assigned to the custom header image, if available. Otherwise, it leaves it empty. It fixes an issue where the alternative text was always the site title, which is not relevant in most use cases.

Props webmandesign, mukesh27, afercia, anevins, mikeschroder, nrqsnchz, audrasjb, sabernhardt, joedolson, Boniu91.
Fixes #46124.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 22:56:02 +00:00
audrasjb edd2ca2b6b Taxonomy: Use `WP_Term` object to retrieve the taxonomy in `get_term_feed_link()`.
This change fixes a backward compatibility issue introduced in [52180] where `get_term_feed_link()` did not honor the `$taxonomy` parameter anymore. Rather than using the default `category` taxonomy when passing a term ID in `get_term_feed_link()`, use the `WP_Term` object to get the taxonomy.

Follow-up to [52180].

Props hugod.
Fixes #50225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 11:43:03 +00:00
Sergey Biryukov 70f43f261b External Libraries: Update getID3 to version 1.9.21.
The latest version includes preliminary PHP 8.1 support, as well as a variety of bug fixes.

Release notes: https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.21

A full list of changes in this update can be found on GitHub:
https://github.com/JamesHeinrich/getID3/compare/v1.9.20...v1.9.21

This commit also includes:
* Setting the `$options_audiovideo_quicktime_ReturnAtomData` property (now `false` by default) to `true` in `wp_read_video_metadata()` and `wp_read_audio_metadata()` in order to get the `created_timestamp` value.
* PHPCS adjustments previously made for a passing PHP Compatibility scan.

Follow-up to [47601], [47737], [47902], [48278], [49621], [50714].

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


git-svn-id: http://core.svn.wordpress.org/trunk@51846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 03:06:03 +00:00
Sergey Biryukov 904c4a8b5c Tests: Remove unexpected output in `wp_dashboard_recent_drafts()` tests on PHP 8.1.
This follows the approach used in other tests to let PHPUnit manage the output catching and effectively ignore the output until retrieving it later via `getActualOutput()`.

Follow-up to [45505], [51968], [52173].

See #53635, #53363.
Built from https://develop.svn.wordpress.org/trunk@52253


git-svn-id: http://core.svn.wordpress.org/trunk@51845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 01:29:04 +00:00
Sergey Biryukov 1cca88b19b External Libraries: Upgrade PHPMailer to version 6.5.3.
The latest release includes official PHP 8.1 support, as well as some small bug fixes, including one for PHP 5.6 cross-version support.

Release notes:
* https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.2
* https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.3

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

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

Props jrf, Synchro.
Fixes #54514.
Built from https://develop.svn.wordpress.org/trunk@52252


git-svn-id: http://core.svn.wordpress.org/trunk@51844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 00:43:01 +00:00
Sergey Biryukov fe2a2ef0e4 Docs: Improve consistency of some DocBlocks in `wp-admin/includes/post.php`.
Follow-up to [52249].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52251


git-svn-id: http://core.svn.wordpress.org/trunk@51843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 00:28:03 +00:00
audrasjb 0c54c14a37 Twenty Twenty One: Remove Image block placeholder alignment override in editor styles.
This changes excludes the Image block placeholder from the default image centering in Twenty Twenty-One editor styles.

Props multidots1896, sabernhardt, Boniu91, justinahinon.
Fixes #54254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 22:31:04 +00:00
audrasjb b0743f17e1 Docs: Miscellaneous DocBlock corrections in `wp-admin/includes/post.php`.
See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 20:39:00 +00:00
John Blackbourn 7494eb1e5c Build/Test Tools: Correct the order and naming of expected and actual values in various tests.
This corrects the order of the parameters when used in assertions so if/when they fail the failure message is correct.

See #53363

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


git-svn-id: http://core.svn.wordpress.org/trunk@51840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 19:41:04 +00:00
youknowriad 5d73860e5c Themes: Update the base folders for templates and template parts in block themes.
Block Themes should now use the following folders:

 - templates instead of block-templates
 - parts instead of block-template-parts

Existing themes and folders will continue to work without impact.

Props bernhard-reiter.
Fixes #54493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 10:59:04 +00:00
youknowriad 322b60f600 Themes: Add block template resolution algorithm unit tests.
Backports the unit tests for block templates
and hybrid themes template resolution from the Gutenberg plugin.

Props bernhard-reiter, jorgefilipecosta.
Fixes #54478. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@51838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 09:22:00 +00:00
audrasjb f69b6a04fb Media: Replace some array keys with their numeric equivalent.
This change replaces `['0']` with `[0]` which brings better consistency, readability and performance.

Props chintan1896, adamsilverstein, costdev.
Fixes #53540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 08:35:09 +00:00
Sergey Biryukov 95f823d933 External Libraries: Update the Requests library to version 2.0.0.
This is a major release and contains breaking changes.

Most important changes to be aware of for this release:
* All code is now namespaced. Though there is a full backward compatibility layer available and the old class names are still supported, using them will generate a deprecation notice (which can be silenced by plugins if they'd need to support multiple WP versions). See the [https://requests.ryanmccue.info/docs/upgrading.html upgrade guide] for more details.
* A lot of classes have been marked `final`. This should generally not affect userland code as care has been taken to not apply the `final` keyword to classes which are known to be extended in userland code.
* Extensive input validation has been added to Requests. When Requests is used as documented though, this will be unnoticable.
* A new `WpOrg\Requests\Requests::has_capabilities()` method has been introduced which can be used to address #37708.
* A new `WpOrg\Requests\Response::decode_body()` method has been introduced which may be usable to simplify some of the WP native wrapper code.
* Remaining PHP 8.0 compatibility fixed (support for named parameters).
* PHP 8.1 compatibility.

Release notes: https://github.com/WordPress/Requests/releases/tag/v2.0.0

For a full list of changes in this update, see the Requests GitHub:
https://github.com/WordPress/Requests/compare/v1.8.1...v2.0.0

Follow-up to [50842], [51078].

Props jrf, schlessera, datagutten, wojsmol, dd32, dustinrue, soulseekah, costdev, szepeviktor.
Fixes #54504.
Built from https://develop.svn.wordpress.org/trunk@52244


git-svn-id: http://core.svn.wordpress.org/trunk@51836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 01:12:02 +00:00
noisysocks 67e0125bc2 Themes: Move the skip link to outside the canvas in block themes
Fix Twenty Twenty-one having an erroneous margin above the Header template part
by moving the skip link outside of the wp-site-blocks canvas.

This is a backport of https://github.com/WordPress/gutenberg/pull/34986.

Props youknowriad.
Fixes #54491.




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


git-svn-id: http://core.svn.wordpress.org/trunk@51835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 01:07:01 +00:00
Sergey Biryukov dfdbbb4e62 Docs: Miscellaneous DocBlock corrections.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@52242


git-svn-id: http://core.svn.wordpress.org/trunk@51834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 23:59:59 +00:00
desrosj 91c7a9ba2a Build/Test Tools: Configure Dependabot scanning for GitHub Actions.
This eliminates the need to manually check all GitHub Actions used within workflow files for updates.

Fixes #54503.
Built from https://develop.svn.wordpress.org/trunk@52241


git-svn-id: http://core.svn.wordpress.org/trunk@51833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 14:51:00 +00:00
desrosj 63a5bda86a Build/Test Tools: Specify NodeJS version `14.x` in the `.nvmrc` file.
As of 2021-10-26, the LTS version of NodeJS is now `16.x`.

This pins the `14.x` version in the `.nvmrc` file to ensure contributors are able to contribute without issue until compatibility with version `16.x` can be confirmed in both `trunk` and the Gutenberg repository on GitHub.

Fixes #54502.
Built from https://develop.svn.wordpress.org/trunk@52240


git-svn-id: http://core.svn.wordpress.org/trunk@51832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 14:07:01 +00:00
audrasjb c66d278da5 Docs: Document the globals used in some Privacy API methods.
See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 11:41:03 +00:00
Peter Wilson d8bbb335cb Twenty Twenty-One: Combine duplicate CSS rules.
Use the postcss-merge-rules package when building TT1 stylesheets to reduce duplicate code in production CSS.

Props SergeyBiryukov, ryelle, Shaharyar10, shital-patel, mukesh27, poena.
Fixes #53605.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 03:35:03 +00:00
audrasjb a930237618 Twenty Twenty-One: Style adjustments for list-based widgets in the widget editor.
This change brings style consistency between front-end and widget editor for list-based widgets.

Props circlecube, Rahmohn.
Fixes #53629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 23:25:02 +00:00
John Blackbourn 92f0b0cb48 Docs: Various docblock corrections and improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 21:37:01 +00:00
hellofromTonya d472b34c89 Build/Test Tools: Fix warnings from `stdClass::__invoke()` callback mocks in REST API tests.
When running core tests on PHPUnit 8.x and 9.x, four non-blocking warnings were displayed for the REST API tests:

{{{
There were 4 warnings:

1) Tests_REST_Request::test_route_level_validate_callback
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

2) Tests_REST_Request::test_route_level_validate_callback_no_parameter_callbacks
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

3) Tests_REST_Request::test_route_level_validate_callback_is_not_executed_if_parameter_validation_fails
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

4) Tests_REST_Server::test_callbacks_are_not_executed_if_request_validation_fails
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.
}}}

These warnings are due to the PHP native `stdClass` not having a `__invoke()` method declared.

This commit adds a `Mock_Invokable` reusable class and replaces the `stdClass` with this new class.

Follow-up to [48945], [48947].

Props sourovroy, jrf.
Fixes #53844.
Built from https://develop.svn.wordpress.org/trunk@52235


git-svn-id: http://core.svn.wordpress.org/trunk@51827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 18:57:00 +00:00