Commit Graph

44709 Commits

Author SHA1 Message Date
joedolson
20fdff756b Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props benitolopez, hellofromTonya, peterwilsoncc, danielbachhuber, PieWP, sabernhardt, szaqal21.
Fixes #53765.
Built from https://develop.svn.wordpress.org/trunk@52167


git-svn-id: http://core.svn.wordpress.org/trunk@51759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 21:37:03 +00:00
joedolson
6912dc20b9 Menus: Add audible notice on menu item add or remove.
Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu.

Props joedolson, costdev, hellofromTonya.
Fixes #53840.
Built from https://develop.svn.wordpress.org/trunk@52166


git-svn-id: http://core.svn.wordpress.org/trunk@51758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 20:00:59 +00:00
hellofromTonya
1f608d5d5c Upgrade/Install: Deactivate the Gutenberg plugin if its version is 11.8 or lower.
Avoid a fatal error due to `WP_Theme_JSON_Schema` and potentially other classes and/or functions redeclarations when updating to WordPress 5.9 with an incompatible version of the Gutenberg plugin.

This commit uses the same strategy from 5.8. Moves the plugin deactivation code (introduced in [51266]) to a private function for reuse in 5.8, 5.9, and future major releases.

Follow-up to [51180], [51266].

Props hellofromTonya, johnbillion, jorbin.
See #54405.
Built from https://develop.svn.wordpress.org/trunk@52165


git-svn-id: http://core.svn.wordpress.org/trunk@51757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 19:59:03 +00:00
jffng
9043992e3b Twenty Twenty-Two: Import the latest changes from GitHub.
Updates `theme.json` to use v2 shape, adds styles to search and file block as well as generic text decoration. Fixes a bug in the layout of a query block pattern.

This is a follow-up to [52081]. These changes are ongoing and development continues on GitHub. To view all of the changes included in this commit, see GitHub: 99db6063be...a11fb4932a

Props desrosj, kjellr, poena.
See #54318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 19:15:04 +00:00
Sergey Biryukov
9ac09f5a67 Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen:
* Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields:
 * `name_field_description`
 * `slug_field_description`
 * `parent_field_description`
 * `desc_field_description`
* Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of `parent_field_description`.
* Add documentation and a `@since` note for the new labels.

Follow-up to [52094].

Fixes #43060.
Built from https://develop.svn.wordpress.org/trunk@52163


git-svn-id: http://core.svn.wordpress.org/trunk@51755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 16:45:01 +00:00
desrosj
230fa090e8 External Libraries: Update the regenerator-runtime package to version 0.13.9.
Props hareesh-pillai, sourovroy, hellofromTonya.
Fixes #54027.
Built from https://develop.svn.wordpress.org/trunk@52162


git-svn-id: http://core.svn.wordpress.org/trunk@51754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 16:35:13 +00:00
noisysocks
c2d0fb2040 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Navigation: Fix click-button size, submenu directions, scrollbars.
- Group - Fix overzealous regex when restoring inner containers
- Babel Preset: Update Babel packages to 7.16 version
- theme.json: adds a setting property that enables some other ones
- Polish metabox container.
- Fix submenu justification and spacer orientation.
- Fix Gutenberg 11.8.2 in WordPress trunk
- Strip meta tags from pasted links in Chromium
- Hide visilibility and status for navigation posts
- Navigation: Refactor and simplify setup state.
- Nav block menu switcher - decode HTML entities and utilise accessible markup pattern
- Rename fse_navigation_area to wp_navigation_area
- theme.json: adds a setting property that enables some other ones
- Revert "theme.json: adds a setting property that enables some other ones"
- Skip flaky image block test
- WordPress/gutenberg@3c935c4
- React to any errors coming up in gutenberg_migrate_menu_to_navigation_post
- Return wp error from wp_insert_post
- Fix not transforming logical assignments for packages

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 12:50:17 +00:00
noisysocks
5b85c73194 Editor: Load iframed assets in Site Editor
Configure the Site Editor to load iframed block editor assets. This fixes some
styling issues in the Site Editor.

Follows [52069].
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 11:01:00 +00:00
noisysocks
892da9af91 Editor: Fix fatal call to add_query_args()
It should be add_query_arg(), not add_query_args().

Follows [52145].
See #54337.
Props sabernhardt.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 06:19:01 +00:00
noisysocks
40cd53a573 Editor: Fix how the Site Editor is linked to
- Add 'Edit site' to the top admin bar.
- Link to the Template and Template Part CPTs.
- Add deep link to the Global Styles UI.

Follows [52069].
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 03:43:59 +00:00
TimothyBlynJacobs
b2253ef74c Users: Prevent infinite loop when using capability checks during determine_current_user on multisite.
On multisite, when checking if a user has a certain capability WordPress makes an additional check to see if the user is a super admin. The `is_super_admin()` function contained a call to `wp_get_current_user()` so as the global current user object could be used if it matched the queried user id.

This would cause an infinite loop if a hook attached to the `determine_current_user` filter was itself making a permission check. For example when limiting who can use the Application Passwords feature based on their capabilities.

Since [50790] the `WP_User` instance for the current user is shared between `wp_get_current_user()` and `get_userdata()`. This means we can remove the `wp_get_current_user` call from `is_super_admin()` while still retaining the same behavior.

Props chrisvanpatten, peterwilsoncc.
Fixes #53386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 01:09:59 +00:00
noisysocks
0f18fb0bd8 Build/Test Tools: Restore the https URL for browserify-aes
Follows [52143].
See #54337.
Props TobiasBg.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 00:19:00 +00:00
noisysocks
2b4a846798 Editor: Fix incorrect access of ID field
Now that WP_Query is set to return 'ids', accessing $matching_posts[0]->ID is
incorrect.

Props spacedmonkey.
Follows [52145].
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 00:11:59 +00:00
Sergey Biryukov
17ae1d0c7f Comments: Use get_comment_author() to retrieve the comment author name in get_comment_reply_link().
This ensures that the `get_comment_author` filter is applied to the comment author name as expected.

Follow-up to [29822], [47506].

Props mjulian7, audrasjb, chaion07, hellofromTonya, SergeyBiryukov.
Fixes #53678.
Built from https://develop.svn.wordpress.org/trunk@52154


git-svn-id: http://core.svn.wordpress.org/trunk@51746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-14 18:01:04 +00:00
Weston Ruter
718adc4c9d Embeds: Fix parsing of post embeds in wp_filter_oembed_result() by appending wp-embed script instead of prepending it in get_post_embed_html().
Due to the way that the `blockquote` and `iframe` are being parsed with a regular expression in `wp_filter_oembed_result()`, if there is any content at all before the `blockquote` start tag then it will fail to be included in the first matching group. By appending the `wp-embed` script instead of prepending it in `get_post_embed_html()`, then the parsing issue is avoided.

Also use non-greedy match `wp_maybe_enqueue_oembed_host_js()`.

Amends [52132].
Fixes #44632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-13 07:28:00 +00:00
Sergey Biryukov
654f9063cc Twenty Eleven: Improve comment form styling for required fields.
Previously, with absolute positioning, the star character to signify required comment form fields could overlap the text in some languages. The star's styling was also inconsistent between the input labels and the comment notes paragraph.

This commit makes the star's styling more consistent and ensures it does not overlap with the text.

Follow-up to [52029].

Props sabernhardt, hellofromTonya.
Fixes #54408.
Built from https://develop.svn.wordpress.org/trunk@52152


git-svn-id: http://core.svn.wordpress.org/trunk@51744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-13 04:24:59 +00:00
Weston Ruter
b665eab47e Embeds: Fix inclusion of wp-embed-template script and style when SCRIPT_DEBUG is disabled.
Amends [52132].
See #44632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-13 00:58:59 +00:00
Sergey Biryukov
ad3ad59c4d Coding Standards: Rename the $gzData argument to $gz_data in WP_Http_Encoding::compatible_gzinflate().
This fixes a `Variable "$gzData" is not in valid snake_case format` WPCS warning.

Follow-up to [11684].

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


git-svn-id: http://core.svn.wordpress.org/trunk@51742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 23:51:59 +00:00
joedolson
8b53b4960d Bundled Theme: Display required text field in core themes.
Fix Twenty Nineteen and Twenty Twenty-One setting the `logged_in_as` parameter to null, which also eliminated the required field text. See #16206.

Props sabernhardt, poena.
Fixes #54392.
Built from https://develop.svn.wordpress.org/trunk@52149


git-svn-id: http://core.svn.wordpress.org/trunk@51741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 22:46:59 +00:00
desrosj
1d093f699c Build/Test Tools: Exclude plugins and non-bundled themes from PHP compatibility scans.
Fixes #54425.
Built from https://develop.svn.wordpress.org/trunk@52148


git-svn-id: http://core.svn.wordpress.org/trunk@51740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 18:40:00 +00:00
Weston Ruter
719ec3ae6d Twenty Twenty-One: Prevent printing skip link focus fix when SCRIPT_DEBUG is enabled.
An `else` statement was missing in `twenty_twenty_one_skip_link_focus_fix()`. See ba83586ff1.

Fixes #54429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 16:07:59 +00:00
hellofromTonya
41072d4e53 Build/Test Tools: Mock no results remote request in WP_REST_Block_Directory_Controller:: get_items().
* Refactors the mock logic to a helper function for reuse in multiple tests.
* Mocks the remote request in `WP_REST_Block_Directory_Controller_Test:: test_get_items_no_results()` using the mock helper.

Follow-up to [48242], [52137].

Props hellofromTonya, sergeybiryukov.
See #54420.
Built from https://develop.svn.wordpress.org/trunk@52146


git-svn-id: http://core.svn.wordpress.org/trunk@51738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 13:47:01 +00:00
noisysocks
93d4851bbf Editor: Add Navigation Area infrastructure
Copies Navigation Area infrastrucutre from lib/navigation.php in Gutenberg. This
allows a Navigation block to be associated with a particular area which persists
when switching theme.

Props antonvlasenko, mamaduka, spacedmonkey.
See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 03:55:01 +00:00
hellofromTonya
2128238311 Bootstrap/Load: Check $_SERVER['SCRIPT_NAME'] exists before passing to strpos() in wp_fix_server_vars().
If `SCRIPT_NAME'` does not exist (which can happen in cron jobs), the following happens:

* PHP 8.1+:
    * `Warning: Undefined array key "SCRIPT_NAME"`
    * `Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated` 
* PHP 8.0: `Warning: Undefined array key "SCRIPT_NAME"`
* PHP 5.6-7.4: No warning or notice

This commit checks if the key exists before passing it to `strpos()`. This resolves the warning, notice, and future error.

Follow-up to [3034], [3069], [12732].

Props audrasjb, costdev, hellofromTonya, karpstrucking, mcjambi, sergeybiryukov.
Fixes #54142.
Built from https://develop.svn.wordpress.org/trunk@52144


git-svn-id: http://core.svn.wordpress.org/trunk@51736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 01:10:01 +00:00
noisysocks
33bb9d7c6b Update 'react' and 'react-dom'
Update 'react' and 'react-dom' packages to version 17.0.1. This is the version
expected by @wordpress components.

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-12 00:05:15 +00:00
Sergey Biryukov
97f3ab0f2a Twenty Twenty-One: Correct default image alignment in the editor.
By default, the theme centers images on the front end when no alignment is selected. In the editor, however, images were aligned to the left side of the block.

This commit ensures that the alignment in the editor matches the one on the front end.

Props sabernhardt, ashfame, poena, annezazu.
Fixes #53809.
Built from https://develop.svn.wordpress.org/trunk@52142


git-svn-id: http://core.svn.wordpress.org/trunk@51734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 19:35:00 +00:00
davidbaumwald
00403bc675 Posts, Post Types: Update _edit_last meta when posts are edited in bulk.
When posts are edited in bulk, the `_edit_last` meta was not updated for each post.  This change adds a call to update the `_edit_last` meta to the current user ID for each post the is updated.

Props calebwoodbridge, peterwilsoncc, guillaumeturpin, audrasjb.
Fixes #42446.
Built from https://develop.svn.wordpress.org/trunk@52141


git-svn-id: http://core.svn.wordpress.org/trunk@51733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 19:09:00 +00:00
davidbaumwald
841e45a864 Options, Meta APIs: Correct docs for $_meta_value parameter in xxx_{$meta_type}_meta hooks.
In `add_{$meta_type}_meta`, `added_{$meta_type}_meta`, `update_{$meta_type}_meta`, `updated_{$meta_type}_meta`, `delete_{$meta_type}_meta`, and `deleted_{$meta_type}_meta` hooks, the `$_meta_value` parameter was documented as "Serialized if non-scalar".  However, `$_meta_value` is a copy of the raw meta value before `maybe_serialize` is run and is not serialized.  This change updates each of the above hooks' docblocks to remove "Serialized if non-scalar" from the `$_meta_value` parameter description.

Props pputzer, hasanuzzamanshamim.
Fixes #53102.
Built from https://develop.svn.wordpress.org/trunk@52140


git-svn-id: http://core.svn.wordpress.org/trunk@51732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 18:32:00 +00:00
joedolson
356fe8c2dd Upgrade/Install: Update screen reader text counts in adminbar.
Update the hidden screen-reader-text update count in the adminbar when updates are run on the plugin or theme screens.

Props pento, paulschreiber, adamsilverstein, afercia, SergeyBiryukov, sabernhardt.
Fixes #29022.
Built from https://develop.svn.wordpress.org/trunk@52139


git-svn-id: http://core.svn.wordpress.org/trunk@51731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 17:20:58 +00:00
hellofromTonya
2ff53354c1 Build/Test Tools: Mock remote request for unknown plugin in WP_REST_Plugins_Controller::create_item().
Instead of hitting the live API, this commit mocks the remote request when testing creating an item that's an unknown plugin.

Follow-up to [48242].

Props hellofromTonya, noisysocks, sergeybiryukov, TimothyBlynJacobs.
See #54420.
Built from https://develop.svn.wordpress.org/trunk@52138


git-svn-id: http://core.svn.wordpress.org/trunk@51730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 17:00:05 +00:00
hellofromTonya
b68878b83f Build/Test Tools: Mock remote request for WP_REST_Block_Directory_Controller::get_items().
Instead of hitting the live API, this commit mocks the remote request.

Follow-up to [48242].

Props hellofromTonya, noisysocks, sergeybiryukov, TimothyBlynJacobs.
Fixes #54420.
Built from https://develop.svn.wordpress.org/trunk@52137


git-svn-id: http://core.svn.wordpress.org/trunk@51729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 16:53:59 +00:00
hellofromTonya
2ae0e77e47 Template: Fix "undefined index: 00" when archive month query is empty in wp_title().
When `m` query_tag has a valid year, i.e. `?m=2021`, and there are posts for that year, `substr()` returns a `false` on PHP 5.6 and an empty string on PHP 7.0+. Passing either of those values to `$wp_locale->get_month()` results in a PHP notice on PHP 5.6 to PHP 7.4 and a PHP Warning on PHP 8.0+.

Why? The `$month` lookup table has zeroized keys from '01' to '12'. A empty value is passed to `zeroise()` returns `'00'` which is directly passed as a key in the month property. That key does not exist.

While `$wp_locale->get_month()` would benefit from guarding/validation, this fix ensures a falsey value is not passed as a month.

Tests are added including a test that fails with this fix not applied.

Follow-up to [801], [35294], [35624].

Props antpb, audrasjb, costdev, davidmosterd, drewapicture, herregroen, hellofromTonya, michelwppi, sergeybiryukov.
Fixes #31521.
Built from https://develop.svn.wordpress.org/trunk@52136


git-svn-id: http://core.svn.wordpress.org/trunk@51728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 16:29:00 +00:00
noisysocks
51d95be654 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Group - Fix inner container regexes using fixed div tag
- Image block: Make sure the Image block border radius is inherited if the image is linked
- Navigation: Small fixes
- FSE: Add template_type guards
- Template Part Block: Add some guards
- Fix getEntityRecords to ensure resolution on REST API failure
- Ensure menus before map operation in Nav block
- Link editing: Account for link anchor no longer being present when generating unique link instance key
- Navigation: Hide post attributes meta box
- Fix failing tests and compatibility with 5.9.
- Fix missing <MainDashboardButton> slot fill in site editor
- Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core.
- Fix site editor reset styles in WP 5.9

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 07:43:31 +00:00
noisysocks
ad15f6422f Hide Customize from admin bar when using a block theme
Don't add the Customize link to the admin bar when a block theme is activated.

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 04:47:02 +00:00
noisysocks
449f1bb07a REST API: Add /wp/v2/block-navigation-areas endpoint
Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This
provides the /wp/v2/block-navigation-areas endpoint used by the Navigation
block.

Props antonvlasenko, TimothyBlynJacobs.
Fixes #54393.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 03:52:00 +00:00
Weston Ruter
9038612705 Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows.
* Prevent loading `wp-embed` script unconditionally on every page in favor of conditionally enqueueing when a post embed is detected. The `wp-embed` script is also explicitly marked as being in the footer group. Sites which currently disable post embed scripts from being enqueued via `remove_action( 'wp_head', 'wp_oembed_add_host_js' )` will continue to do so.
* Send a `ready` message from the host page to each post embed window in case the `iframe` loads before the `wp-embed` script does. When the `ready` message is received by the post embed window, it sends the same `height` message as it sends when it loads.
* Eliminate use of `grunt-include` to inject emoji script and the post embed script. Instead obtain the script contents via `file_get_contents()` (as is done elsewhere in core) and utilize `wp_print_inline_script_tag()`/`wp_get_inline_script_tag()` to construct out the script. This simplifies the logic and allows the running of src without `SCRIPT_DEBUG` enabled.
* For the embed code that users are provided to copy for embedding outside of WP, add the `secret` on the `blockquote` and `iframe`. This ensures the `blockquote` will be hidden when the `iframe` loads. The embed code in question is accessed here via `get_post_embed_html()`.

Props westonruter, swissspidy, pento, flixos90, ocean90.
Fixes #44632, #44306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 02:49:18 +00:00
davidbaumwald
dd80fd488b Taxonomy: Document that the get_terms filter can have null for $taxonomies.
The `get_terms` filter currently documents that the filter passes an array as both the first and second parameters, which is normally true, except that the second can be `null` when not specified.  This change updates the filter's docblock to indicate that the second parameter can also be of a `null` type.

Props dd32, audrasjb, mukesh27.
Fixes #54222.
Built from https://develop.svn.wordpress.org/trunk@52131


git-svn-id: http://core.svn.wordpress.org/trunk@51723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 21:11:00 +00:00
Aaron Jorbin
268feb8c36 Build/Test: Change default GitHub branch to trunk
See: https://make.wordpress.org/core/2021/11/10/default-git-branch-for-wordpress-wordpress-develop/
See: https://make.wordpress.org/core/2020/06/18/proposal-update-all-git-repositories-to-use-main-instead-of-master/

Fixes #54399


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


git-svn-id: http://core.svn.wordpress.org/trunk@51722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 21:00:00 +00:00
desrosj
7fae079419 Tests: Update qUnit test fixtures after [52128].
See #54336.
Built from https://develop.svn.wordpress.org/trunk@52129


git-svn-id: http://core.svn.wordpress.org/trunk@51721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 20:27:59 +00:00
desrosj
d77367a962 General: Minor fixes to Global Style related code.
Follow up to [52041,52049-52052,52054,52106,52108-52110].

Props swisspidy, TobiasBg, spacedmonkey, kebbet, oandregal.
See #54336.
Built from https://develop.svn.wordpress.org/trunk@52128


git-svn-id: http://core.svn.wordpress.org/trunk@51720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 19:56:00 +00:00
John Blackbourn
62fc5121f2 Docs: Add missing documentation for the $javascript parameter of the wp_inline_script_attributes filter.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 18:41:03 +00:00
Sergey Biryukov
5781b8c80e Docs: List the expected return type first in a few functions:
* `get_previous_post()`
* `get_next_post()`
* `get_adjacent_post()`.

Follow-up to [46696], [47060], [49929], [49963], [51286].

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


git-svn-id: http://core.svn.wordpress.org/trunk@51703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 15:32:01 +00:00
desrosj
b6d67c1519 Docs: Avoid using “CPT” instead of “custom post type”.
Additionally, when referring to built in Core post types, “custom” is unnecessary.

This also adds a period to the end of the `wp_global_styles` post type description.

Follow up to [38829], [51003], [52041], [52049], [52062].

See #53399, #54335, #54336.
Built from https://develop.svn.wordpress.org/trunk@52110


git-svn-id: http://core.svn.wordpress.org/trunk@51702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 14:18:06 +00:00
desrosj
b1996cbec4 i18n: Add missing translation wrapper for the Global Styles post type description.
Follow up to [52041].

See #54336.
Built from https://develop.svn.wordpress.org/trunk@52109


git-svn-id: http://core.svn.wordpress.org/trunk@51701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 14:07:00 +00:00
desrosj
5932a68ba6 Posts, Post Types: Mark the wp_global_styles post type as _builtin.
All native or “built-in” post types should be marked as such.

Follow up to [52041].

See #54336.
Built from https://develop.svn.wordpress.org/trunk@52108


git-svn-id: http://core.svn.wordpress.org/trunk@51700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 14:01:59 +00:00
desrosj
2803958573 Twenty Twenty-Two: Import the assets directory from GitHub.
This directory was missed during the initial import.

Follow up to [52081].

Props kafleg.
See #52081.
Built from https://develop.svn.wordpress.org/trunk@52107


git-svn-id: http://core.svn.wordpress.org/trunk@51699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 13:53:59 +00:00
desrosj
a64530a976 Posts, Post Types: Remove gutenberg text domain from post type strings.
Introduced in [52041], and [52069].

See #54336, #54337.
Built from https://develop.svn.wordpress.org/trunk@52106


git-svn-id: http://core.svn.wordpress.org/trunk@51698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 13:46:00 +00:00
noisysocks
3e094c27d0 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Force remount LinkControl when moving between links within same richtext block
- Site Editor: Change ToolsMoreMenuGroup slot-fill name
- Respect fields param for global styles REST API requests.
- Try ensuring the item after post content clears floats
- Fix submenus not opening on click
- Apply i18n functions to Nav block menu drops when selecting existing Menu
- Gallery: Make sure the mobile warning notice only runs when images are added to a new block
- Prepare navigation php code for core patch
- Address deprecation issues from Buttons flex layout PR.
- Block Library: Fix incorrect attributes definitions
- Fix Navigation accessibility issues

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 06:01:30 +00:00
desrosj
80f38671d0 Build/Test Tools: Make adjustments to how Quick Draft tests confirm expected behavior.
Twenty Twenty-One contained a filter on `the_title` to change the default post title to “Untitled”.

Whenever possible, the default behavior of Core without theme modifications should be confirmed in tests. The default behavior here is for a post title to be “(no title)” when one is not entered.

This change also makes an adjustment to be more specific when retrieving the text to verify results to prevent dates and post statuses from being pulled in.

Props davidbaumwald, desrosj, peterwilsoncc, hellofromTonya.
Fixes #54409.
Built from https://develop.svn.wordpress.org/trunk@52096


git-svn-id: http://core.svn.wordpress.org/trunk@51688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 01:50:00 +00:00
hellofromTonya
d9d820660f Revisions: Introduce wp_get_post_revisions_url() to get URL for editing revisions.
There's now a way to get a link to a given post's revisions. Introducing `wp_get_post_revisions_url()` and its unit tests.

Props adamsilverstein, audrasjb, costdev, davidbaumwald, garrett-eclipse, georgestephanis, hellofromTonya, iaaxpage.
Fixes #39062.
Built from https://develop.svn.wordpress.org/trunk@52095


git-svn-id: http://core.svn.wordpress.org/trunk@51687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 01:26:59 +00:00