Commit Graph

46368 Commits

Author SHA1 Message Date
Jonathan Desrosiers
bbb02f69ad External Libraries: Update the jQuery library to version 3.6.1.
This is a maintenance release. For more information on the changs included, see https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/.

Props tobiasbg.
See #56451.

git-svn-id: https://develop.svn.wordpress.org/trunk@54202 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 14:14:54 +00:00
Jb Audras
164df4f1f9 Coding Standards: Replace double quote with single quote in test_if_failed_update().
Follow-up to [54200].
See #55758.


git-svn-id: https://develop.svn.wordpress.org/trunk@54201 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 09:14:50 +00:00
Jb Audras
d489b16bfd Text Changes: Remove self-reference ("we") in WordPress Admin.
This changes some admin-area, user-facing text, to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word “we” should be avoided (...) unless its made very clear which group is speaking

Follow-up to [51979], [53131], [53132], [53148], [53156].

Props kebbet, costdev, SergeyBiryukov.
Fixes #55758.
See #46057.


git-svn-id: https://develop.svn.wordpress.org/trunk@54200 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 08:57:08 +00:00
Jb Audras
96848efb8e Docs: Typo correction in _load_textdomain_just_in_time() docblock.
Props kebbet.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54199 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 08:42:38 +00:00
Sergey Biryukov
216a9ef513 Tests: Move the basic get_block_templates() test to the dedicated file.
Now that the function has its own test class, the remaining test from `Tests_Block_Template_Utils` can be moved to `Tests_Blocks_GetBlockTemplates` for consistency.

Includes:
* Uncommenting some assertions previously commented out.
* Moving the `get_template_ids()` helper method to the top of the class.
* Standardizing on `wpSetUpBeforeClass()`/`wpTearDownAfterClass()` in both classes.
* Declaring the test theme name as a constant in both classes, since the value is not changed by any of the tests.
* Renaming some properties in both classes for clarity.

Follow-up to [51003], [52062], [53927], [54184], [54187].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54198 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-18 13:08:33 +00:00
Marius L. J
b2a2270ae7 Site Health: Adjust margins for the Site Health dashboard widget.
This aligns the spacing within the widget with other core widgets, and removes an unintended margin which was pushing the indicator slightly above the centered position it was intended to have.

Props sabernhardt, costdev, mukesh27.
Fixes #56369.

git-svn-id: https://develop.svn.wordpress.org/trunk@54197 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-18 01:27:13 +00:00
Marius L. J
b10d8771fb Site Health: Improve the description for Authorization header checks.
Previously the description left the user stuck with no path forward if flushing their permalinks was not enough.

This change givers a clearer description of what approving an application may involve (allowing these to connect to the users site), but also an additional step towards resolution if flushing permalinks are not enough; pointing them towards their host.

Props Presskopp, webcommsat.
Fixes #54508.

git-svn-id: https://develop.svn.wordpress.org/trunk@54196 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-17 23:49:10 +00:00
Sergey Biryukov
f153e171ed Docs: Revert the WP_Block_Parser documentation changes now.
This commit reverts [54193] and [54194].

It appears that these changes should first be made [533e0b7dad/packages/block-serialization-default-parser/parser.php upstream in the Gutenberg respository] and then backported to core, as the [https://github.com/WordPress/wordpress-develop/actions/runs/3074068296/jobs/4966609235#step:8:1 tests fail otherwise].

See #56581.

git-svn-id: https://develop.svn.wordpress.org/trunk@54195 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-17 17:29:21 +00:00
Sergey Biryukov
e0118e6e4d Docs: Correct @return type for WP_Block_Parser::parse().
This affects:
* `WP_Block_Parser::parse()`
* `WP_Block_Parser::$output`

Both the method and the property are documented as returning `WP_Block_Parser_Block[]` (an array of `WP_Block_Parser_Block` objects), but the result is in fact an array of arrays of various values, so `array[]` is the correct notation.

Follow-up to [43751] for the 5.0 branch, [44116] for trunk.

Props Chouby.
Fixes #56581.

git-svn-id: https://develop.svn.wordpress.org/trunk@54194 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-17 17:11:51 +00:00
Sergey Biryukov
a01206e2fc Docs: Correct @since tags for some block parser properties and methods.
This affects:
* `WP_Block_Parser::$empty_attrs`
* `WP_Block_Parser::next_token()`
* `WP_Block_Parser::freeform()`
* `WP_Block_Parser_Block::$innerContent`

The `@since` tags referred to early Gutenberg versions instead of WordPress core. These properties and methods were introduced in WordPress 5.0, so `5.0.0` is the correct version.

Some of the other `@since` tags are removed, as they are related to early Gutenberg development before it was merged into WordPress core, and are not relevant for core.

Follow-up to [43751], [43884], [43955] for the 5.0 branch, [44116], [44261], [44281] for trunk.

Props Chouby.
See #56581.

git-svn-id: https://develop.svn.wordpress.org/trunk@54193 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-17 16:47:17 +00:00
Joe Dolson
7c2f6dd6cb Login and Registration: Required fields in network registration.
Properly label site and user information on the network registration screen with the HTML5 required attribute and clarify the values expected for the site domain and subdirectory fields.

Props SteelWagstaff, henrywright, sabernhardt.
Fixes #54344.

git-svn-id: https://develop.svn.wordpress.org/trunk@54192 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-17 00:33:45 +00:00
Joe Dolson
a091aade62 Login and Registration: Access improvements to network signup.
Fix a variety of accessibility issues with the network registration and activation screens. Fix associations between error messages and fields, improve labels for radio buttons, add fieldset and legend to properly group fields.

Props afercia, allisonplus, sabernhardt.
Fixes #40361.

git-svn-id: https://develop.svn.wordpress.org/trunk@54191 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 23:11:41 +00:00
Jb Audras
84550fcb64 Docs: Update wp_rand docblock to clarify that it returns a non-negative number.
Props hakre, westi, jeremyfelt, neychok, sabernhardt, audrasjb.
Fixes #15089.


git-svn-id: https://develop.svn.wordpress.org/trunk@54190 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 22:37:48 +00:00
Jb Audras
edb40d0954 General: Replace Codex with HelpHub in WordPress readme.
This updates WordPress main `readme.txt` file to replace Codex link with HelpHub.

Props audrasjb, netweb, SergeyBiryukov, tobifjellner.
See #48987.


git-svn-id: https://develop.svn.wordpress.org/trunk@54189 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 22:25:54 +00:00
Jb Audras
c2ef1a020e Code Modernization: Remove -webkit-appearance CSS declarations.
This changeset removes the deprecated `-webkit-appearance` CSS property used in `customizer-controls.css`. It doesn't change anything to the interface.

Props laurent22777, desrosj, celloexpressions, costdev, rolfsiebers, audrasjb, Clorith.
Fixes #38431.


git-svn-id: https://develop.svn.wordpress.org/trunk@54188 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 22:15:55 +00:00
Sergey Biryukov
dabab3f636 Tests: Update the test for respecting the post type in get_block_templates().
* Use `assertSameSets()` to avoid a failure when array items are returned in different order ([https://github.com/WordPress/wordpress-develop/actions/runs/3067320461/jobs/4953478602#step:19:274 example]).
* Move the test to a more appropriate place now that the function has its own test class.
* Rename the test method to match the function name.

Follow-up to [52062], [53927], [54184].

See #55881.

git-svn-id: https://develop.svn.wordpress.org/trunk@54187 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 15:10:58 +00:00
Jonny Harris
53e58ebbb3 Posts, Post Types: Improve performance of the get_user_data_from_wp_global_styles method.
Improve the logic found in `get_user_data_from_wp_global_styles` method. Replace call to `wp_get_recent_posts` with the more standard, `WP_Query` for consistancy. Use transient over standard cache, to improve performance on sites without persistent object caching. Improve handling of cases where `wp_insert_post` returns a `WP_Error`.

Props spacedmonkey, adamsilverstein, mukesh27, peterwilsoncc, andregal.
Fixes #55392.

git-svn-id: https://develop.svn.wordpress.org/trunk@54186 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-16 10:55:58 +00:00
Jb Audras
d4c62394e1 Code Modernization: Reduce CSS float usage in wp-admin - Timezone settings.
This changeset is a part of a task dedicated to improve wp-admin CSS code with less floating, as float never was intended for layout. The idea is to gradually replace floating methods that take the HTML element out of the normal flow of the document with more modern and robust positioning methods.

Props kebbet.
See #55557.


git-svn-id: https://develop.svn.wordpress.org/trunk@54185 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 22:57:52 +00:00
Tonya Mork
72178ec839 Editor: Fix get_block_templates() to get templates for a post type.
When a post type is passed to `get_block_templates()` in the query, return only the templates that match that post type.

Fixes an issue where:
* when a block template provided by a theme has been edited by the user
* and that template has specific defined `postTypes`
* but after editing, the template was available for all post types.

Follow-up to [52062].

Props aljullu, bernhard-reiter, hellofromTonya.
Fixes #55881.

git-svn-id: https://develop.svn.wordpress.org/trunk@54184 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 22:26:28 +00:00
Sergey Biryukov
14e54b5d20 Editor: Finalize the theme_json_get_style_nodes hook name.
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [https://github.com/WordPress/wordpress-develop/pull/3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54183 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 20:26:13 +00:00
Tonya Mork
fc6bc030d4 Editor: Persist preferences in user meta.
Adds a new feature to persist editor UI preferences between page loads and browsers.

* Adds a new preferences persistence API.
* Saves editor preferences in user meta instead of in browser's local storage.

Why?
Due to the transient nature of browser storage, this persistence is not as sticky as it is expected to be, including: switching browsers (unique storage between browsers), or using private browsing tabs (storage cleared between sessions), or the same user across a network of sites (storage unique by domain).

This is a backport from Gutenberg.[https://github.com/WordPress/gutenberg/pull/39795 See WordPress/gutenberg PR 39795].

Props talldanwp, youknowriad, noisysocks, mamaduka, costdev, ironprogrammer, hellofromTonya.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54182 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 16:43:39 +00:00
Sergey Biryukov
2b4d385298 Docs: Clarify the $allowed_protocols default value in various KSES functions.
Add a note that the parameter is optional and defaults to the result of `wp_allowed_protocols()`.

This affects:
* `wp_kses()`
* `filter_block_content()`
* `filter_block_kses()`
* `filter_block_kses_value()`

Includes synchronizing the `$allowed_html` parameter description for consistency.

Follow-up to [649], [6630], [18826], [32603], [43016], [46896], [48478].

Props armondal, SergeyBiryukov.
Fixes #56580.

git-svn-id: https://develop.svn.wordpress.org/trunk@54181 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 13:27:38 +00:00
Jb Audras
777a18d02f Docs: Use third-person singular verbs in Template Loading functions descriptions, as per docblocks standards.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54180 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 12:47:16 +00:00
Jb Audras
4e1752407b Docs: Clarify that get_page_template() doesn't work on block themes.
When working on a block theme, `locate_block_template()` should be used instead of `get_page_template()`. This changeset updates the docblock of this function accordingly.

Props audrasjb, costdev, robinwpdeveloper.
Fixes #56394.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54179 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 12:42:35 +00:00
Sergey Biryukov
7bb7969664 Docs: Clarify documentation for the nav_menu_item_id filter.
This aims to make it clear that the filter is applied to an HTML ID attribute for the menu item's `<li>` element, and not a numeric ID.

Follow-up to [15407], [25410], [27201], [38559], [51739].

Props dilipbheda, robinwpdeveloper, mukesh27, audrasjb, SergeyBiryukov.
See #56574, #55646.

git-svn-id: https://develop.svn.wordpress.org/trunk@54178 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 12:30:54 +00:00
Jb Audras
9b6a3ecfcf Help/About: Remove .hidden class when the Help Tab panel is displayed.
It is obviously more logical and semantic to remove the `hidden` class when the panel is displayed. Plus, it prevents from weird behavior occurring when plugins also use the `hidden` class to hide stuff.

Props grabmedia, SergeyBiryukov, helen, sabernhardt, costdev, audrasjb.
Fixes #27697.


git-svn-id: https://develop.svn.wordpress.org/trunk@54177 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 12:27:02 +00:00
Tonya Mork
98cfa29f8d Themes: Introduces block-based template parts for Classic themes.
Allows Classic / Hybrid themes to use block-based template parts without using complete block-based templates.

* Exposes the Site Editor's template parts UI
* Adds Appearance > "Template Parts" menu
* Enabled within the theme via adding a theme support for `'block-template-parts'`
{{{#!php
add_theme_support( 'block-template-parts' );
}}}

This is a backport from Gutenberg.[https://github.com/WordPress/gutenberg/pull/42729 See WordPress/gutenberg PR 42729].

Follow-up to [52330], [52069], [52178].

Props mamaduka, fabiankaegy, poena, scruffian, manfcarlo, bernhard-reiter, hellofromTonya.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54176 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 12:18:30 +00:00
Jb Audras
b98a8bbbd4 Editor: Backport build_query_vars_from_query_block changes from Gutenberg repository.
This changeset backports changes from the following Gutenberg pull requests:

- [https://github.com/WordPress/gutenberg/pull/43590 gutenberg#43590] Add a filter to `build_query_vars_from_query_block`
- [https://github.com/WordPress/gutenberg/pull/40933 gutenberg#40933] Block Library - Query Loop: Add parents filter

Props ntsekouras, bernhard-reiter.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54175 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 11:39:43 +00:00
Jb Audras
d0a771175d Editor: Backport wp_theme_element_class_name() alias.
This changeset backports the `wp_theme_element_class_name()` alias for the "internal" `WP_Theme_JSON::get_element_class_name()` function.

This is a backport of [https://github.com/WordPress/gutenberg/pull/44099 gutenberg/PR44099].

Note: this changeset doesn't replace calls to `WP_Theme_JSON::get_element_class_name` in the tests, since those are specifically for the `WP_Theme_JSON` class.

Props bernhard-reiter, cbravobernal, costdev.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54174 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 10:53:18 +00:00
Jb Audras
7991edbabd Docs: Use third-person singular verbs in Media API function descriptions, as per docblocks standards.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54173 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 10:50:40 +00:00
Jb Audras
0b2f05a9f6 Docs: Add missing @since history in Gallery Shortcode function.
Props bengreeley, audrasjb, desrosj, mukesh27.
Fixes #56206.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@54172 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 08:54:44 +00:00
Jb Audras
4c10e3e590 Twenty Nineteen: Define underline thickness for links.
This changeset adds `text-decoration-thickness: 2px;` to all underlined link to ensure that underline thickness stay consistent across browsers. This fixes an issue where the underline style on links using the Hoefler Text font was too thin in Firefox.

Props allancole, sabernhardt, danfarrow, audrasjb, neychok, multidots1896, maartenj.
Fixes #45925.


git-svn-id: https://develop.svn.wordpress.org/trunk@54171 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-15 08:33:52 +00:00
Jb Audras
39617d8116 Twenty Twenty-One: Remove WooCommerce related CSS selectors.
The selectors for Twenty Twenty-One's default `max-width` have used the `.woocommerce` class since the theme's [956a3172a4 (diff-b757cb999144a1bc7e14604bc6d4bab7d87ea1a3bf5000c33937e490d75b9d92R3-R9) initial commit]. This changeset removes all WooCommerce CSS selector from the theme, as they would need to be supported forever. The change was tested with WooCommerce installed and no issues were raised. 

Props sabernhardt, audrasjb, davidbaumwald, tahmidulkarim, mukesh27.
Fixes #56366.


git-svn-id: https://develop.svn.wordpress.org/trunk@54170 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 22:31:19 +00:00
Andrew Ozz
0fdfa266af Site health:
- Add a check to `wp_check_php_version()` whether the current PHP version is lower than the next (desired) minimum version.
- Set the next desired minimum PHP version to 7.2.
- Use that check to update the warnings in the `wp_dashboard_php_nag()` widget, and on the Site Health screen.

Props Clorith, SergeyBiryukov, ironprogrammer, azaozz.
See #56199.

git-svn-id: https://develop.svn.wordpress.org/trunk@54169 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 22:17:53 +00:00
Jb Audras
fe87f8e37a Twenty Twenty-Two: Add "Accessibility Ready" tag to theme in repository
A cross-team consensus has been reached to allow Twenty Twenty-Two to be tagged as "Accessibility Ready" on the WordPress Themes repository.

Props bph, kjellr, utz119, ryokuhi, joedolson, audrasjb, mikeschroder, poena, annezazu.
Fixes #55172.


git-svn-id: https://develop.svn.wordpress.org/trunk@54168 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 21:50:12 +00:00
Jb Audras
235faff315 Twenty Twenty: Fix Social Links widget alignment.
This fixes an alignment issue with the Social Links block used in the context of a widget area.

Props grandeljay, sabernhardt.
Fixes #56474.


git-svn-id: https://develop.svn.wordpress.org/trunk@54167 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 21:33:01 +00:00
Jb Audras
26fad95654 Twenty Twenty: Ensure Latest Posts block set to 2 columns displays accordingly in the Editor.
This brings consistency between block editor and front-end rendering.

Props smit08, mukesh27, sabernhardt, multidots1896.
Fixes #56175.


git-svn-id: https://develop.svn.wordpress.org/trunk@54166 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 21:17:26 +00:00
Andrew Ozz
40861573b1 Site health: Add a menu bubble with the critical issues count to the Tools -> Site Health submenu.
Props: Clorith
See: #56199


git-svn-id: https://develop.svn.wordpress.org/trunk@54165 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 21:12:12 +00:00
Jb Audras
c2dcd6ef42 Twenty Twenty-One: Fix Heading Block alignment when nested in Cover Block.
This brings consistency between block editor and front-end rendering.

Props mrfoxtalbot, kajalgohel, harshvaishnav, audrasjb.
Fixes #56050.


git-svn-id: https://develop.svn.wordpress.org/trunk@54164 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 20:49:46 +00:00
Jb Audras
3e9fd8235f Twenty Twenty: Fix Heading Block alignment when nested in Cover Block.
This brings consistency between block editor and front-end rendering.

Props mrfoxtalbot, tahmidulkarim, NomNom99, audrasjb.
Fixes #56049.


git-svn-id: https://develop.svn.wordpress.org/trunk@54163 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 19:41:54 +00:00
Tonya Mork
72380e31ca Editor: Backport foundation for Layout block support refactor (part 1).
Backports the following changes from the Gutenberg repository:

* [WordPress/gutenberg/40875 gutenberg/40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42087 gutenberg/42087] Theme.json: Add block support feature level selectors for blocks gutenberg/42087
* [WordPress/gutenberg/43792 gutenberg/43792] Global Styles: Split root layout rules into a different function gutenberg/43792
* [WordPress/gutenberg/42544 gutenberg/42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg/42544
* [WordPress/gutenberg/42665 gutenberg/42665] Layout: Reduce specificity of fallback blockGap styles gutenberg/42665
* [WordPress/gutenberg/42085 gutenberg/42085] Core CSS support for root padding and alignfull blocks gutenberg/42085

Notes:
* It doesn't entirely port over PR 40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.
* [54159] was reverted in [54160] due to PHPUnit test failures for tests added by the commit. Later, tests passed when applied on top of `trunk`. There were various outages today of upstream `wp-env` dependencies, which likely were the root cause of the earlier failures. For historical tracking and to make sure, recommitting [54159] but instead on top of current `trunk`. See PR 3205 for more details.
* Giving additional props for those who did a deep dive investigation into the failed tests.

Follow-up to [54160], [54159].

Props andrewserong, aaronrobertshaw, isabel_brison, bernhard-reiter, hellofromTonya.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54162 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 18:42:04 +00:00
Sergey Biryukov
d6e842cd28 Feeds: Add a set of fine-grained filters to disable the different types of feed links separately.
The previously available set of filters in the `feed_links()` function to enable or disable display of various feed links was quite limited:
* `feed_links_show_posts_feed` to control the main feed
* `feed_links_show_comments_feed` to control both the global comments feed and the comment feed for singular posts.

In order to disable the other feeds (post type archive, category, tag, custom taxonomy, author archive, search results), one would have to unhook `feed_links_extra()` from `wp_head`, but that would completely remove all of those feeds, as well as the single post comments feed.

To allow for more flexibility, this commit introduces a full set of filters in the `feed_links_extra()` function to control each one of the feeds independently, including a way to enable/disable the single post comments feed when the global comments feed is disabled/enabled:

* `feed_links_extra_show_post_comments_feed`
* `feed_links_extra_show_post_type_archive_feed`
* `feed_links_extra_show_category_feed`
* `feed_links_extra_show_tag_feed`
* `feed_links_extra_show_tax_feed`
* `feed_links_extra_show_author_feed`
* `feed_links_extra_show_search_feed`

All of them default to `true`, except for `feed_links_extra_show_post_comments_feed` which defaults to the result of `feed_links_show_comments_feed` to ensure backward compatibility.

Follow-up to [33838], [33839], [53125].

Props lopo, mukesh27, audrasjb, SergeyBiryukov.
Fixes #55904.

git-svn-id: https://develop.svn.wordpress.org/trunk@54161 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 17:12:20 +00:00
hellofromTonya
759f2b3a05 Editor: Revert [54159].
Reverting changeset due to failing PHPUnit tests. Tests pass without changeset [54156], but fail with it. Reverting to explore why in the original PR after rebasing.

See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54160 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 15:50:01 +00:00
Jb Audras
34aeac1db2 Editor: Backport foundation for Layout block support refactor (part 1).
This change backports the following changes from Gutenberg repository:

- [WordPress/gutenberg#40875 gutenberg#40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42087 gutenberg#42087] Theme.json: Add block support feature level selectors for blocks gutenberg#42087
- [WordPress/gutenberg#43792 gutenberg#43792] Global Styles: Split root layout rules into a different function gutenberg#43792
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42665 gutenberg#42665] Layout: Reduce specificity of fallback blockGap styles gutenberg#42665
- [WordPress/gutenberg#42085 gutenberg#42085] Core CSS support for root padding and alignfull blocks gutenberg#42085

Note that it doesn't entirely port over PR40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.

Props andrewserong, aaronrobertshaw, isabel_brison.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54159 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 14:19:16 +00:00
Greg Ziółkowski
7c86dfee68 Code Quality: Remove unwanted spaces in the WP_Block_Type class
Follow-up [54155].
Props TobiasBg.



git-svn-id: https://develop.svn.wordpress.org/trunk@54158 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 13:51:39 +00:00
Sergey Biryukov
e4a2e73d11 Docs: Correct @return value for wp_get_http_headers().
Following the update to replace the HTTP API internals with Requests library in WordPress 4.6, the return value of `wp_remote_retrieve_headers()` has changed from a simple array to an object which implements `ArrayAccess`.

Since `wp_get_http_headers()` directly returns the result of `wp_remote_retrieve_headers()`, its return value should reflect that change.

Includes:
* Updating the return value for the deprecated `wp_get_http()` function, which also directly returns the result of `wp_remote_retrieve_headers()`.
* Minor DocBlock formatting changes for some other HTTP API functions per the documentation standards.

Follow-up to [2416], [6390], [8092], [9013], [37428], [37989], [38730].

Props mhkuu.
See #54225, #55646.

git-svn-id: https://develop.svn.wordpress.org/trunk@54157 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 13:06:53 +00:00
Jb Audras
7fcc88a087 Editor: Backport Style Engine API functions, classes and tests.
This PR migrates the Style Engine PHP functions, classes and tests into Core for 6.1. It backports the original [WordPress/gutenberg#40260 PR #40260] from Gutenberg repository.

Props ramonopoly, bernhard-reiter, costdev, azaozz, andrewserong, mukesh27, aristath.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54156 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 12:46:33 +00:00
Greg Ziółkowski
3381f05fa2 Blocks: Allow registering multiple items for all supported asset types
Follow-up #54337, [52069]. Part of https://github.com/WordPress/gutenberg/issues/41236. More details in https://github.com/WordPress/gutenberg/issues/33542.

Allow passing more than one script per block for `editorScript`, `script`, and `viewScript` fields in the `block.json` metadata file. This aligns with the previously added changes for `style` and `editorStyle` fields.

This change impacts the `WP_Block_Type` class and the REST API endpoint for block types. To ensure backward compatibiliy old names were soft deprecated in favor of new fields that work with array values and have `_handles` suffix.

Props zieladam, dlh, timothyblynjacobs, aristath, bernhard-reiter.
Fixes #56408.



git-svn-id: https://develop.svn.wordpress.org/trunk@54155 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 10:50:26 +00:00
Jb Audras
73c668d791 Twenty Twenty: Ensure headings styles are consistent between editor and front-end.
This changeset removes `.wp-block` container from headings CSS selectors to restore consistency between editor and front-end styles. It also removes `.wp-block` from headings selectors in the `'block-editor'` array of `twentytwenty_get_localized_font_family_elements()`.

Props kajalgohel, kmadhak, poena, multidots1896, tahmidulkarim, audrasjb.
Fixes #56194.


git-svn-id: https://develop.svn.wordpress.org/trunk@54154 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 10:46:51 +00:00
Jb Audras
960330890b Twenty Twenty: Ensure link color is inherited from paragraph in the editor.
This changeset improves link colors consistency between front-end and the editor.

Props sabernhardt, webcommsat, audrasjb.
Fixes #56214.


git-svn-id: https://develop.svn.wordpress.org/trunk@54153 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 10:17:05 +00:00