[52549] updated some default presets in use by default themes to the new format. However, this change would cause elements to lose their styling when active on an older version of WordPress.
See #54782.
git-svn-id: https://develop.svn.wordpress.org/trunk@52615 602fd350-edb4-49c9-b593-d223f7449a82
This commit updates the required WordPress version of the 2022 default theme to 5.9 in advance of its release on January 25.
Props hellofromtonya, kjellr, desrosj.
See #54318.
git-svn-id: https://develop.svn.wordpress.org/trunk@52612 602fd350-edb4-49c9-b593-d223f7449a82
Themes that use the same preset slugs as WordPress uses need to be updated.
From the devnote https://make.wordpress.org/core/2022/01/08/updates-for-settings-styles-and-theme-json/
The CSS for some of the presets defined by WordPress (font sizes, colors, and gradients) was loaded twice for most themes in WordPress 5.8: in the block-library stylesheet plus in the global stylesheet. Additionally, there were slight differences in the CSS in both places.
In WordPress 5.9 those were consolidated into a single place, the global stylesheet whose name is global-styles-inline-css that is now loaded for all themes in the front-end.
For themes to override the default values they can use the theme.json and provide the same slug. Themes that do not use a theme.json can still override the default values by enqueuing some CSS that sets the corresponding CSS Custom Property. This commit does the second for the twenty twenty theme.
Props oandregal.
Fixes#54782.
git-svn-id: https://develop.svn.wordpress.org/trunk@52549 602fd350-edb4-49c9-b593-d223f7449a82
As capability queries was introduced in 5.9, this commit allows for previous versions by assigning the "who" and unsetting "capability".
Follow-up to [51943].
Props johnbillion, swissspidy.
Fixes#16841.
git-svn-id: https://develop.svn.wordpress.org/trunk@52290 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@52271 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@52238 602fd350-edb4-49c9-b593-d223f7449a82
This change brings style consistency between front-end and widget editor for list-based widgets.
Props circlecube, Rahmohn.
Fixes#53629.
git-svn-id: https://develop.svn.wordpress.org/trunk@52237 602fd350-edb4-49c9-b593-d223f7449a82
This commit syncs several changes for the default theme from its active development repository to core.
This is a follow up to [52081], [52107], and [52164]. It includes improvements to the home page template, adding a filter for block patterns, pre-loading the web font, improvements and bug fixes to block patterns, and more. For a full list of changes, visit https://github.com/WordPress/twentytwentytwo/compare/e4f69d0b7ed93f73b33c5991430618d01b0e3cac...25d74deaa57ba49b5a64a8569e6dd9ebadbfb23c.
Props jeffpaul, richtabor, netweb, luminuu, melchoyce, beafealho, clucasrowlands, desrosj, flixos90, joen, otto42, saju4wordpress, westonruter, kjellr, poena.
See #54318.
git-svn-id: https://develop.svn.wordpress.org/trunk@52222 602fd350-edb4-49c9-b593-d223f7449a82
This updates the “Tested up to” header in the `readme.txt` file for all bundled theme.
This also adds the “Tested up to” header to the `style.css` file for older default themes (Twenty Twenty and earlier). Previously, this header was only recommended, so it was not included. It is now required, per the theme handbook: https://make.wordpress.org/themes/handbook/review/required/#9-files.
Props kafleg, mukesh27, ravipatel.
Fixes#53797.
git-svn-id: https://develop.svn.wordpress.org/trunk@52221 602fd350-edb4-49c9-b593-d223f7449a82
Calling `twenty_twenty_one_get_attachment_image_attributes()` was causing an `Undefined index: width|height` notice to be thrown when the result from `wp_get_attachment_metadata()` does not set any value to `$meta`. This change adds an `isset()` check to prevent it.
Props wetah, hasanuzzamanshamim.
Fixes#54464.
git-svn-id: https://develop.svn.wordpress.org/trunk@52217 602fd350-edb4-49c9-b593-d223f7449a82
This prevents JavaScript errors when using hash in URLs without matching them to any existing anchor in the page.
Props rixeo, sabernhardt, pbearne.
Fixes#53619.
git-svn-id: https://develop.svn.wordpress.org/trunk@52213 602fd350-edb4-49c9-b593-d223f7449a82
The Dark Mode toggle can appear in both bottom corners. This removes “right” from the description to be accurate for both RTL and LTR languages.
Props musabshakeel, dilipbheda, sabernhardt.
Fixes#53892.
git-svn-id: https://develop.svn.wordpress.org/trunk@52211 602fd350-edb4-49c9-b593-d223f7449a82
Previously, all columns were forced to be aligned left, and aligned right for RTL languages.
Props robertghetau, umesh84, sabernhardt.
Fixes 54317.
git-svn-id: https://develop.svn.wordpress.org/trunk@52210 602fd350-edb4-49c9-b593-d223f7449a82
Use scroll-padding-top to offset scroll position on in-page anchors when adminbar is active. Also adjusts existing scroll padding for core themes that implement it.
Props afercia, kingkero, audrasjb, dufresnesteven, thimalw, sabernhardt, costdev.
Fixes#46371.
git-svn-id: https://develop.svn.wordpress.org/trunk@52198 602fd350-edb4-49c9-b593-d223f7449a82
Use the `rss_widget_feed_link` filter to disable the output of the icon on RSS feed widgets in Twenty Twenty-One. Improves accessibility by preventing invisible links.
Props sabernhardt, poena.
Fixes#52880.
git-svn-id: https://develop.svn.wordpress.org/trunk@52191 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@52152 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@52149 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@52142 602fd350-edb4-49c9-b593-d223f7449a82
If a privacy policy is set, the page links to the footer of the site. As done in the other bundled themes, this link is added using `the_privacy_policy_link()`.
Follow-up to [49216].
Props ryelle, desrosj, kapilpaul, sabernhardt, audrasjb, justinahinon.
Fixes#53445.
git-svn-id: https://develop.svn.wordpress.org/trunk@52082 602fd350-edb4-49c9-b593-d223f7449a82
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
git-svn-id: https://develop.svn.wordpress.org/trunk@52081 602fd350-edb4-49c9-b593-d223f7449a82
This updates several NPM dependencies to their latest (or latest allowed) versions for bundled themes that have a `package.json` file (Twenty Nineteen and newer).
These updates did not result in any changes to the built files in Twenty Nineteen or Twenty Twenty. Some unnecessary parenthesis have been removed from `calc()` function calls within Twenty Twenty-One.
This change also contains several updates to the `package-lock.json` files made by running `npm audit fix` within each of these themes.
See #53361.
git-svn-id: https://develop.svn.wordpress.org/trunk@52047 602fd350-edb4-49c9-b593-d223f7449a82
Add a filter that disables output of the icon on RSS feed widgets. Improves accessibility by providing a path to prevent duplicate or invisible links.
Props sabernhardt, Boniu91.
Fixes#52224.
git-svn-id: https://develop.svn.wordpress.org/trunk@52031 602fd350-edb4-49c9-b593-d223f7449a82
If a privacy policy is set, its page is now linked in the footer.
Follow-up to [46271].
Props audrasjb, justinahinon, kapilpaul, ryelle, sabernhardt.
Fixes#53446.
git-svn-id: https://develop.svn.wordpress.org/trunk@52023 602fd350-edb4-49c9-b593-d223f7449a82
Fixes an issue with the logo not displaying the Customizer previewer when changing the site title or description.
Follow-up to [46271].
Props acosmin, boniu91, sabernhardt.
Fixes#51337.
git-svn-id: https://develop.svn.wordpress.org/trunk@52022 602fd350-edb4-49c9-b593-d223f7449a82
With IE11 no longer supported, the primary problem with assistive technology support for native HTML5 elements no longer applies.
This commit removes the `role` attribute from the following HTML5 elements with default landmark roles, per formerly required role attributes and W3C.
Follow-up to [17669], [21261], [23452], [24832], [29892], [38833], [40851], [43842], [46271], [49216].
Props costdev, craigfrancis, joedolson, mukesh27, ryokuhi, sabernhardt.
Fixes#54079.
git-svn-id: https://develop.svn.wordpress.org/trunk@52013 602fd350-edb4-49c9-b593-d223f7449a82
This change swaps out `none` for `normal` in the `.wp-block-pullquote cite` styling of `blocks.css`.
Props malae, mukesh27, sabernhardt.
Fixes#46807.
git-svn-id: https://develop.svn.wordpress.org/trunk@52004 602fd350-edb4-49c9-b593-d223f7449a82
Role="navigation" was required for assistive technology to recognize HTML5 element's native ARIA roles while HTML5 and ARIA were being introduced. With the deprecation of IE11, the role attribute is only required when mapping elements that don't have native role.
Props costdev, mukesh27.
Fixes#54054.
git-svn-id: https://develop.svn.wordpress.org/trunk@51967 602fd350-edb4-49c9-b593-d223f7449a82
Similar to the existing `role`/`role__in`/`role__not_in` query arguments, this adds support for three new query arguments in `WP_User_Query`:
* `capability`
* `capability__in`
* `capability__not_in`
These can be used to fetch users with (or without) a specific set of capabilities, for example to get all users
with the capability to edit a certain post type.
Under the hood, this will check all existing roles on the site and perform a `LIKE` query against the `capabilities` user meta field to find:
* all users with a role that has this capability
* all users with the capability being assigned directly
Note: In WordPress, not all capabilities are stored in the database. Capabilities can also be modified using filters like `map_meta_cap`. These new query arguments do NOT work for such capabilities.
The prime use case for capability queries is to get all "authors", i.e. users with the capability to edit a certain post type.
Until now, `'who' => 'authors'` was used for this, which relies on user levels. However, user levels were deprecated a long time ago and thus never added to custom roles. This led to constant frustration due to users with custom roles missing from places like author dropdowns.
This updates any usage of `'who' => 'authors'` in core to use capability queries instead.
Subsequently, `'who' => 'authors'` queries are being **deprecated** in favor of these new query arguments.
Also adds a new `capabilities` parameter (mapping to `capability__in` in `WP_User_Query`) to the REST API users controller.
Also updates `twentyfourteen_list_authors()` in Twenty Fourteen to make use of this new functionality, adding a new `twentyfourteen_list_authors_query_args` filter to make it easier to override this behavior.
Props scribu, lgladdly, boonebgorges, spacedmonkey, peterwilsoncc, SergeyBiryukov, swissspidy.
Fixes#16841.
git-svn-id: https://develop.svn.wordpress.org/trunk@51943 602fd350-edb4-49c9-b593-d223f7449a82
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword.
Why `public`?
With no visibility previously declared, these methods are implicitly `public` and available for use. Changing them to anything else would be a backwards-compatibility break.
Props costdev, jrf.
See #54177.
git-svn-id: https://develop.svn.wordpress.org/trunk@51919 602fd350-edb4-49c9-b593-d223f7449a82
These values are added dynamically by the `Twenty_Twenty_One_SVG_Icons::get_svg()` method and are not needed in the source array.
Follow-up to [49216].
Props max-dayala, laxman-prajapati, sabernhardt, Presskopp, mukesh27.
Fixes#54208.
git-svn-id: https://develop.svn.wordpress.org/trunk@51893 602fd350-edb4-49c9-b593-d223f7449a82
When the `link_after` value is emptied to reset any description markup, make sure not to remove the closing tag within footer links.
Follow-up to [49216].
Props sabernhardt, mukesh27.
Fixes#54209.
git-svn-id: https://develop.svn.wordpress.org/trunk@51881 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a large gap between title and content when the layout is set to one column.
Props laurelfulford, sabernhardt, hirofumi2012, jainnidhi, mukesh27.
Fixes#43628.
git-svn-id: https://develop.svn.wordpress.org/trunk@51808 602fd350-edb4-49c9-b593-d223f7449a82