Commit Graph

146 Commits

Author SHA1 Message Date
audrasjb
190350ecea Twenty Twenty-One: Refine primary-navigation.js behavior for anchor links.
This changeset fixes a bug where clicking on an anchor link in the content changes the state of the button that opens and closes the responsive menu. It adds a conditional to check if the clicked anchor link is inside the primary navigation menu (`#site-navigation`), in order to prevent content anchor links from changing the state of the button.

Known limitations: The state of the button is not reset when the browser is resized. If a menu anchor link is first clicked while on desktop width, and the browser width is reduced, the menu button will show the text "Close" even though the menu is not opened.

Props andreaboe, sabernhardt, poena, afercia, chaion07, cu121, mukesh27.
Fixes #53331.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-24 12:59:10 +00:00
audrasjb
ee8958557a Twenty Twenty-One: Fix obsolete navigation block styles for better Global Styles support.
This changeset removes some CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.

Props Joen, desrosj, poena, audrasjb, hellofromtonya, SergeyBiryukov.
Fixes #53220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-19 17:41:16 +00:00
audrasjb
a97156c76d Twenty Twenty-One: Disable spellcheck for post password field.
This changeset adds `spellcheck="false"` attribute to various password fields.

Follow-up to [55094].

Props dziudek, audrasjb, gainesm, fosuahmed.
See #56763.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-19 09:12:12 +00:00
audrasjb
db9b22b051 Twenty Twenty-One: Revert [55088].
[55088] introduced some issues with the "Test Default Themes & Create ZIPs" workflow on GitHub Actions. This changeset reverts it to leave time to figure out what failed and why.

See #53220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-18 14:52:18 +00:00
audrasjb
b93aa43140 Twenty Twenty-One: Fix obsolete navigation block styles for better Global Styles support.
This changeset removes CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.

Props Joen, desrosj, poena.
Fixes #53220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-18 13:33:12 +00:00
audrasjb
19e75805b0 Bundled Themes: Add Mastodon domains for menu item icons.
This changeset adds the top 10 Mastodon domains by popularity to Twenty Twenty and Twenty Twenty-One Social icon feature.

Note: other Mastodon domains can be added to the array of domain mapping using `twentytwenty_social_icons_map` and `twenty_twenty_one_social_icons_map` filters.

Props triumvirate, sabernhardt, audrasjb, peterwilsoncc, rryyaanndd, ianbelanger.
Fixes #57293, #49099.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-13 13:19:13 +00:00
Sergey Biryukov
c145a2f96d Happy New Year! 🎄
Update copyright year to 2023 in `license.txt` and bundled themes.

Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427].
Built from https://develop.svn.wordpress.org/trunk@55024


git-svn-id: http://core.svn.wordpress.org/trunk@54557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-01-01 00:06:18 +00:00
Sergey Biryukov
5d08331c21 Twenty Twenty-One: Add a comment for the closing h2 tag in author info template.
This brings consistency with the `.comments-title` heading in the `comments.php` template.

Follow-up to [49216], [50234].

Props haritpanchal, sabernhardt, mukesh27.
Fixes #56476.
Built from https://develop.svn.wordpress.org/trunk@54886


git-svn-id: http://core.svn.wordpress.org/trunk@54438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-27 10:34:13 +00:00
desrosj
cba2405440 Twenty Twenty-One: Properly bump to version 1.7.
The theme version was missed in the relevant stylesheets in [54492].

This updates the last locations to allow 1.7 to be officially released.

See #56450.
Built from https://develop.svn.wordpress.org/trunk@54745


git-svn-id: http://core.svn.wordpress.org/trunk@54297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-02 03:12:13 +00:00
desrosj
9bde65e7ba Bundled Themes: Bump version numbers for 6.1.
In coordination with the release of 6.1, a new version of each bundled theme will also be released. This bumps the version of each theme to the following:

- Twenty Ten: 3.7
- Twenty Eleven: 4.2
- Twenty Twelve: 3.8
- Twenty Thirteen: 3.7
- Twenty Fourteen: 3.5
- Twenty Fifteen: 3.3
- Twenty Sixteen: 2.8
- Twenty Seventeen: 3.1
- Twenty Nineteen: 2.4
- Twenty Twenty: 2.1
- Twenty Twenty-One: 1.7
- Twenty Twenty-Two: 1.3

Additionally, this audits all `$version` parameters for `wp_(enqueue|register)_(script|style)` calls, ensuring accurate last edited or theme version values for proper caching and cache busting.

Props robinwpdeveloper, desrosj, mukesh27.
Fixes #56450.
Built from https://develop.svn.wordpress.org/trunk@54492


git-svn-id: http://core.svn.wordpress.org/trunk@54051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-11 17:05:13 +00:00
desrosj
c07a7f38dd Build/Test Tools: Update NPM dependencies in default themes.
This updates NPM dependencies for all default themes that have them.

See #56641.
Built from https://develop.svn.wordpress.org/trunk@54294


git-svn-id: http://core.svn.wordpress.org/trunk@53853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-23 18:31:09 +00:00
audrasjb
4ebc3861ea Twenty Twenty-One: Add a missing HTML comment for Customizer notice control.
This brings consistency with other bundled themes, like Twenty Nineteen.

Props haritpanchal.
Fixes #55725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-19 22:07:11 +00:00
audrasjb
1efbea5145 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 22:33:10 +00:00
audrasjb
ae532c8ef2 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-14 20:51:16 +00:00
Sergey Biryukov
25e697c948 Twenty Twenty-One: Remove spacer block styles.
The theme includes styles for the spacer block for the front which appears to be unnecessary:
* It adds `display: block` even though that is the default.
* It removes top and bottom margin, even though this is not needed in the post content because of collapsing margins between blocks.
* It uses a custom CSS property to force a specific height on mobile. This affects the patterns in the theme negatively.

It also causes styling problems:
* When the spacer block has a height set to `0` in the navigation block, as the theme forces this to be larger on smaller screens.
* When the block is horizontal. Horizontal was not an option when this style was added.

Consequences of removal:
* Removing the use of the custom CSS property will cause a style change for websites that have adjusted the spacing property.

Follow-up to [49216], [49574].

Props poena, mukesh27.
Fixes #56222.
Built from https://develop.svn.wordpress.org/trunk@54103


git-svn-id: http://core.svn.wordpress.org/trunk@53662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-08 15:48:08 +00:00
desrosj
e539bb94dc Bundled Themes: Remove closing PHP tag at the end of files.
To help avoid issues with trailing whitespace, omitting the closing PHP tag at the end of a file is preferred.

Props netweb, dd32, yahil, milindmore22, vishalkakadiya, NomNom99, manishsongirkar36, sabernhardt, audrasjb, desrosj.
See #40039.
Built from https://develop.svn.wordpress.org/trunk@53880


git-svn-id: http://core.svn.wordpress.org/trunk@53439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-11 14:46:09 +00:00
desrosj
4d35a8e4b4 Twenty Twenty-One: Update NPM dependencies.
This updates the NPM dependencies for the Twenty Twenty-One theme to the latest versions.

Modifications to the built files are included in this commit, which are a result of updating the `sass` dependency to the latest version.

Previously, trailing loud comments (`/* ... */`) were pushed to the next line,. Now the comment location is preserved, resulting in the built CSS files more closely resembling the theme’s SCSS files.

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53761


git-svn-id: http://core.svn.wordpress.org/trunk@53320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-22 16:42:08 +00:00
desrosj
3e1fd05600 Twenty Twenty-One: Rebuild the IE specific stylesheet.
This was missed in [53517].

See #55989.
Built from https://develop.svn.wordpress.org/trunk@53739


git-svn-id: http://core.svn.wordpress.org/trunk@53298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 19:20:11 +00:00
audrasjb
e1dfa87a88 Twenty Twenty-One: Add block type suggestions to block patterns.
When using a given block, patterns which use that block can be suggested. This changeset adds `blockType` suggestion for several Twenty Twenty-One bundled patterns.

Props ryelle, poena, audrasjb.
Fixes #53647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 08:56:14 +00:00
audrasjb
4947604b66 Twenty Twenty-One: Ensure custom text color is reflected in the Editor for Quote block.
This changes removes an hardcoded CSS color value for the Quote block in Twenty Twenty-One's editor stylesheet. This ensures custom text color is fully reflected in the Editor for Quote block.

Props jyolsna, evildon, kajalgohel, audrasjb.
Fixes #55989.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-16 23:43:09 +00:00
Peter Wilson
55a5dbcf27 Bundled themes: Bump versions for WordPress 6.0 release.
Bump bundled theme version numbers in preparation for the WordPress 6.0 release. Each theme's _tested up to_ file header has been increased to indicate WordPress 6.0 support.

The new version numbers are:

* Twenty Ten: 3.7
* Twenty Eleven: 4.1
* Twenty Twelve: 3.7
* Twenty Thirteen*: 3.7
* Twenty Fourteen: 3.4
* Twenty Fifteen*: 3.2
* Twenty Sixteen*: 2.7
* Twenty Seventeen*: 3.0
* Twenty Nineteen: 2.3
* Twenty Twenty: 2.0
* Twenty Twenty-One: 1.6

An asterisk indicates the theme includes assets requiring a manual version bump, this is set to the reverse date format of the release day: `20220524`.

Follow up to [53286] in which the Twenty Twenty-Two theme version was bumped to 1.2.

Props peterwilsoncc, desrosj, costdev, mehedi890.
Fixes #55754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 01:49:16 +00:00
audrasjb
e3def96108 Twenty Twenty-One: Add a missing HTML comment to indicate the end of .post-thumbnail section.
Props haritpanchal.
Fixes #55724.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-15 22:34:08 +00:00
audrasjb
3a48bc354d Twenty Twenty-One: i18n fix for privacy policy section title.
This change makes the Twenty Twenty-One privacy policy section title translatable.

Props nlpro.
Fixes #55709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-11 08:46:17 +00:00
desrosj
3ec9f00b1f Bundled Themes: Update NPM dependencies for default themes.
This updates all NPM dependencies for all default themes with a `package.json` file (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) to their latest versions following the defined version constraints. `npm audit fix` has also been run for each theme.

These updates only resulted in minor changes within built files for Twenty Twenty-One.

See #54727.
Built from https://develop.svn.wordpress.org/trunk@53295


git-svn-id: http://core.svn.wordpress.org/trunk@52884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-27 14:25:07 +00:00
Sergey Biryukov
9134afa220 Code Modernization: Rename parameters that use reserved keywords in wp-includes/class.wp-styles.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$echo` parameter to `$display` in `WP_Styles` class methods.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53284


git-svn-id: http://core.svn.wordpress.org/trunk@52873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 14:59:08 +00:00
davidbaumwald
df148d90fc Twenty Twenty-One: Make translator comments referencing the post title consistent.
Follow-up to [53221].

Props SergeyBiryukov.
Fixes #55564.
Built from https://develop.svn.wordpress.org/trunk@53263


git-svn-id: http://core.svn.wordpress.org/trunk@52852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-25 23:11:10 +00:00
Sergey Biryukov
89f24e9c61 Code Modernization: Rename parameters that use reserved keywords in bundled themes.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit:
* Renames the `$class` parameter to `$css_class` in:
 * `twentysixteen_excerpt()`
 * `twentynineteen_post_classes()`
* Renames the `$echo` parameter to `$display` in:
 * `twentythirteen_entry_date()`
 * `twentytwenty_generate_css()`
 * `twentytwenty_site_logo()`
 * `twentytwenty_site_description()`
 * `twenty_twenty_one_generate_css()`

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53236


git-svn-id: http://core.svn.wordpress.org/trunk@52825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 14:24:12 +00:00
davidbaumwald
5892153992 Twenty Twenty-One: Correct translator comment in twenty_twenty_one_continue_reading_text.
This commit updates the translator comment in `twenty_twenty_one_continue_reading_text` to indicate that the text is visually hidden.  This change also corrects the comment above the `the_content_more_link` filter to reference the content, not the excerpt.

Props sabernhardt, costdev.
Fixes #55564.
Built from https://develop.svn.wordpress.org/trunk@53221


git-svn-id: http://core.svn.wordpress.org/trunk@52810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-19 15:23:11 +00:00
audrasjb
5c07bc0b59 Twenty Twenty One: Prevent loading translation file twice.
This changes wraps the registration of patterns and pattern categories in a function hooked to `init`, to avoid loading the Twenty Twenty One translation file twice.

Props zodiac1978, sabernhardt, audrasjb.
Fixes #53589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-10 22:29:03 +00:00
audrasjb
30a77d5fa4 i18n: Define List item separator as a WP_Locale property.
The list item separator is a locale property, and it doesn't make much sense to translate it separately in multiple projects. This changeset implements the following modifications:

- Define list item separator as a new WP_Locale property
- Add `wp_get_list_item_separator()` as a wrapper for `WP_Locale::get_list_item_separator`
- Replace `$wp_locale->get_list_item_separator()` calls with `wp_get_list_item_separator()`
- Added a compatibility layer for bundled themes

Props SergeyBiryukov, swissspidy, rsiddharth, johnbillion, audrasjb.
Fixes #39733.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-13 20:03:01 +00:00
Peter Wilson
fa364267d4 Twenty Twenty-One: Reverse logic for prefers-reduced-motion media query.
Reverse the logic of the `prefers-reduced-motion` to enable transitions based on `no-preference` rather than disable them based on the `reduce` preference. This removes the need to disable transitions with the `! important` tag and unintended interactions with plugins as a result.

Props gregoiresailland, sabernhardt, ryokuhi.
Fixes #54174.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 05:21:03 +00:00
audrasjb
f4a871189a Twenty Twenty-One: Allow editor styles to control block margins.
This change removes some overrides that prevented site editor updates in 5.9 from controlling vertical margins via `var(--global--spacing-vertical)`.

Props stacimc, Boniu91, aristath, ironprogrammer, nidhidhandhukiya.
Fixes #54250.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-14 21:55:08 +00:00
desrosj
d332f43f60 Bundled Themes: Bump the versions for bundled themes for release.
This bumps the versions of the default bundled themes in preparation for release with WordPress 5.9.

The new versions are:
- Twenty Ten: 3.6
- Twenty Eleven: 4.0
- Twenty Twelve: 3.6
- Twenty Thirteen: 3.5
- Twenty Fourteen: 3.3
- Twenty Fifteen: 3.1
- Twenty Sixteen: 2.6
- Twenty Seventeen: 2.9
- Twenty Nineteen: 2.2
- Twenty Twenty: 1.9
- Twenty Twenty-One: 1.5

Props audrasjb.
Fixes #54783.
Built from https://develop.svn.wordpress.org/trunk@52618


git-svn-id: http://core.svn.wordpress.org/trunk@52206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-22 14:07:05 +00:00
Sergey Biryukov
5abfff6c70 Happy New Year! 🎄
Update copyright year to 2022 in `license.txt` and bundled themes.
Built from https://develop.svn.wordpress.org/trunk@52427


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

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

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


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

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


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


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

Props circlecube, Rahmohn.
Fixes #53629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 23:25:02 +00:00
desrosj
07bf9f55e2 Bundled Themes: Update the “Tested up to” header to 5.9.
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.
Built from https://develop.svn.wordpress.org/trunk@52221


git-svn-id: http://core.svn.wordpress.org/trunk@51813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 19:34:00 +00:00
audrasjb
dc1136b94e Twenty Twenty-One: Prevent notice thrown in twenty_twenty_one_get_attachment_image_attributes().
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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 17:56:00 +00:00
audrasjb
096e903010 Twenty Twenty-One: Check if anchor exists before triggering in-page navigation.
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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 13:03:01 +00:00
desrosj
03a901192a Twenty Twenty-One: Correct description of Dark Mode in the Customizer.
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.
Built from https://develop.svn.wordpress.org/trunk@52211


git-svn-id: http://core.svn.wordpress.org/trunk@51803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 20:43:00 +00:00
audrasjb
a9da3e2474 Twenty Twenty-One: Remove RSS feed widget icon link.
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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 21:48:05 +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
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
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
hellofromTonya
2c874cfabc Twenty Twenty-One: Add privacy policy link to footer.
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.
Built from https://develop.svn.wordpress.org/trunk@52082


git-svn-id: http://core.svn.wordpress.org/trunk@51674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:26:01 +00:00
desrosj
80b78b077d Build/Test Tools: Update/Audit NPM dependencies for bundled themes.
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.
Built from https://develop.svn.wordpress.org/trunk@52047


git-svn-id: http://core.svn.wordpress.org/trunk@51639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 16:26:01 +00:00
hellofromTonya
fcf096f4b9 Bundled Themes: Remove the "role" attribute on HTML elements with a default landmark role.
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.
Built from https://develop.svn.wordpress.org/trunk@52013


git-svn-id: http://core.svn.wordpress.org/trunk@51604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-04 18:18:01 +00:00
joedolson
a3a61c5a3e General: Remove role="navigation" from nav elements.
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.
Built from https://develop.svn.wordpress.org/trunk@51967


git-svn-id: http://core.svn.wordpress.org/trunk@51556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-01 21:47:13 +00:00
Sergey Biryukov
b3d3473ba0 Twenty Twenty-One: Remove duplicate width and height values from social icons.
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.
Built from https://develop.svn.wordpress.org/trunk@51893


git-svn-id: http://core.svn.wordpress.org/trunk@51486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-10-06 15:39:05 +00:00