In [54066], a new filter was added to alter the taxonomies for which class names are generated for a given post type. At the time, the filter name was prefixed with `wp_`.
For consistency with filters of a similar type, this change updates the filter name to `post_class_taxonomies`.
Follow-up to [54066].
Props SergeyBiryukov.
See #37114.
Built from https://develop.svn.wordpress.org/trunk@54208
git-svn-id: http://core.svn.wordpress.org/trunk@53767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `options` table is not explicitly reset after each test or test class, so if an option is changed during a test, it should be reset to the default value ''after'' the test.
This commit does so for those tests which did not have such resetting in place yet, while one or more tests in the class ''do'' change the value of the `timezone_string` option.
Note: The test suite executes a `ROLLBACK` query after each test, which should reset the `options` table in theory, however that appears to not always be enough, as some timezone-related tests can fail in a complete test suite run, while not failing when run in isolation. This commit aims to improve stability of the tests.
Follow-up to [45857] / #45821.
Props jrf, costdev.
See #56468.
Built from https://develop.svn.wordpress.org/trunk@54207
git-svn-id: http://core.svn.wordpress.org/trunk@53766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the login page, the "Register" link for new users has been filterable for some time. This change adds the ability to filter the "Lost your password?" link as well.
Props wparslan, audrasjb, rafiahmedd, SergeyBiryukov, antonvlasenko, hellofromTonya.
Fixes#55388.
Built from https://develop.svn.wordpress.org/trunk@54206
git-svn-id: http://core.svn.wordpress.org/trunk@53765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The descriptions provided whenever a REST API check failed lacked details that would help in troubleshooting any issues, most notably the actual REST API endpoint that was being tested.
Adding this vital piece of detail, along with a revamp of the error messages shown, where previously there was a risk that the markup of your website was included as an error message, improves the overall user experience, and gives more accurate details that can be looked when looking up how to fix or improve the behavior of the REST API.
Props dingo_d, shetheliving.
Fixes#54617.
Built from https://develop.svn.wordpress.org/trunk@54205
git-svn-id: http://core.svn.wordpress.org/trunk@53764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes function name typo by changing from uppercase `get_current_user_ID()` to lowercase `get_current_user_id()`.
>Note: Function names are case-insensitive for the ASCII characters A to Z, though it is usually good form to call functions as they appear in their declaration.
[https://www.php.net/manual/en/functions.user-defined.php As per the PHP manual], PHP functions are case-insensitive, meaning the code runs. However, this fix is necessary for consistency, maintainability, and future-proofing.
Follow-up to [54182].
Unprop hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54204
git-svn-id: http://core.svn.wordpress.org/trunk@53763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54200
git-svn-id: http://core.svn.wordpress.org/trunk@53759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54198
git-svn-id: http://core.svn.wordpress.org/trunk@53757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54197
git-svn-id: http://core.svn.wordpress.org/trunk@53756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54196
git-svn-id: http://core.svn.wordpress.org/trunk@53755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54194
git-svn-id: http://core.svn.wordpress.org/trunk@53753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54193
git-svn-id: http://core.svn.wordpress.org/trunk@53752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54192
git-svn-id: http://core.svn.wordpress.org/trunk@53751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54191
git-svn-id: http://core.svn.wordpress.org/trunk@53750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54188
git-svn-id: http://core.svn.wordpress.org/trunk@53747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54186
git-svn-id: http://core.svn.wordpress.org/trunk@53745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54185
git-svn-id: http://core.svn.wordpress.org/trunk@53744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54184
git-svn-id: http://core.svn.wordpress.org/trunk@53743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54182
git-svn-id: http://core.svn.wordpress.org/trunk@53741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54181
git-svn-id: http://core.svn.wordpress.org/trunk@53740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54178
git-svn-id: http://core.svn.wordpress.org/trunk@53737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54177
git-svn-id: http://core.svn.wordpress.org/trunk@53736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54176
git-svn-id: http://core.svn.wordpress.org/trunk@53735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54174
git-svn-id: http://core.svn.wordpress.org/trunk@53733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54171
git-svn-id: http://core.svn.wordpress.org/trunk@53730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- 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.
Built from https://develop.svn.wordpress.org/trunk@54169
git-svn-id: http://core.svn.wordpress.org/trunk@53728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54168
git-svn-id: http://core.svn.wordpress.org/trunk@53727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54162
git-svn-id: http://core.svn.wordpress.org/trunk@53721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54161
git-svn-id: http://core.svn.wordpress.org/trunk@53720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@54159
git-svn-id: http://core.svn.wordpress.org/trunk@53718 1a063a9b-81f0-0310-95a4-ce76da25c4cd