Twenty Twenty-One: Use consistent casing in strings.
This converts strings using Title Case to sentence case, which is currently preferred for consistency (see discussions on #40244). Also included is the replacement of an escaped apostrophe with `’`, which is also preferred per the Internationalization guidelines. See #51526. Built from https://develop.svn.wordpress.org/trunk@49578 git-svn-id: http://core.svn.wordpress.org/trunk@49316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5de5b186f3
commit
6703f8efee
|
@ -140,7 +140,7 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) {
|
||||||
$wp_customize,
|
$wp_customize,
|
||||||
'background_color',
|
'background_color',
|
||||||
array(
|
array(
|
||||||
'label' => esc_html_x( 'Background Color', 'Customizer control', 'twentytwentyone' ),
|
'label' => esc_html_x( 'Background color', 'Customizer control', 'twentytwentyone' ),
|
||||||
'section' => 'colors',
|
'section' => 'colors',
|
||||||
'palette' => $colors,
|
'palette' => $colors,
|
||||||
)
|
)
|
||||||
|
|
|
@ -165,8 +165,8 @@ class Twenty_Twenty_One_Dark_Mode {
|
||||||
array(
|
array(
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'section' => 'colors',
|
'section' => 'colors',
|
||||||
'label' => esc_html__( 'Dark Mode Support', 'twentytwentyone' ),
|
'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ),
|
||||||
'description' => __( 'Respect visitor\'s device dark mode settings.<br>Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.<br><br>Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ),
|
'description' => __( 'Respect visitor’s device dark mode settings.<br>Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.<br><br>Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ),
|
||||||
'active_callback' => function( $value ) {
|
'active_callback' => function( $value ) {
|
||||||
return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
|
return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
|
||||||
},
|
},
|
||||||
|
@ -402,7 +402,7 @@ class Twenty_Twenty_One_Dark_Mode {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$content = '<p class="privacy-policy-tutorial">' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '</p>'
|
$content = '<p class="privacy-policy-tutorial">' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '</p>'
|
||||||
. '<strong class="privacy-policy-tutorial">' . __( 'Suggested Text:', 'twentytwentyone' ) . '</strong> '
|
. '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:', 'twentytwentyone' ) . '</strong> '
|
||||||
. __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.<br> LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.<br> No data is saved in the database or transferred.', 'twentytwentyone' );
|
. __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.<br> LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.<br> No data is saved in the database or transferred.', 'twentytwentyone' );
|
||||||
wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) );
|
wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,12 @@ $twenty_twenty_one_comment_count = get_comments_number();
|
||||||
?>
|
?>
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
<?php if ( '1' === $twenty_twenty_one_comment_count ) : ?>
|
<?php if ( '1' === $twenty_twenty_one_comment_count ) : ?>
|
||||||
<?php esc_html_e( '1 Comment', 'twentytwentyone' ); ?>
|
<?php esc_html_e( '1 comment', 'twentytwentyone' ); ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: comment count number. */
|
/* translators: %s: comment count number. */
|
||||||
esc_html( _nx( '%s Comment', '%s Comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
|
esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
|
||||||
esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) )
|
esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||||
|
|
||||||
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
||||||
<nav aria-label="<?php esc_attr_e( 'Secondary Menu', 'twentytwentyone' ); ?>" class="footer-navigation">
|
<nav aria-label="<?php esc_attr_e( 'Secondary menu', 'twentytwentyone' ); ?>" class="footer-navigation">
|
||||||
<ul class="footer-navigation-wrapper">
|
<ul class="footer-navigation-wrapper">
|
||||||
<?php
|
<?php
|
||||||
wp_nav_menu(
|
wp_nav_menu(
|
||||||
|
|
|
@ -73,8 +73,8 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
|
||||||
|
|
||||||
register_nav_menus(
|
register_nav_menus(
|
||||||
array(
|
array(
|
||||||
'primary' => esc_html__( 'Primary Menu', 'twentytwentyone' ),
|
'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
|
||||||
'footer' => __( 'Secondary Menu', 'twentytwentyone' ),
|
'footer' => __( 'Secondary menu', 'twentytwentyone' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
|
||||||
'slug' => 'large',
|
'slug' => 'large',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Extra Large', 'twentytwentyone' ),
|
'name' => esc_html__( 'Extra large', 'twentytwentyone' ),
|
||||||
'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ),
|
'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ),
|
||||||
'size' => 40,
|
'size' => 40,
|
||||||
'slug' => 'extra-large',
|
'slug' => 'extra-large',
|
||||||
|
@ -220,7 +220,7 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
|
||||||
'color' => $black,
|
'color' => $black,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Dark Gray', 'twentytwentyone' ),
|
'name' => esc_html__( 'Dark gray', 'twentytwentyone' ),
|
||||||
'slug' => 'dark-gray',
|
'slug' => 'dark-gray',
|
||||||
'color' => $dark_gray,
|
'color' => $dark_gray,
|
||||||
),
|
),
|
||||||
|
@ -271,42 +271,42 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
|
||||||
'editor-gradient-presets',
|
'editor-gradient-presets',
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Purple to Yellow', 'twentytwentyone' ),
|
'name' => esc_html__( 'Purple to yellow', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $yellow . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $yellow . ')',
|
||||||
'slug' => 'purple-to-yellow',
|
'slug' => 'purple-to-yellow',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Yellow to Purple', 'twentytwentyone' ),
|
'name' => esc_html__( 'Yellow to purple', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $purple . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $purple . ')',
|
||||||
'slug' => 'yellow-to-purple',
|
'slug' => 'yellow-to-purple',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Green to Yellow', 'twentytwentyone' ),
|
'name' => esc_html__( 'Green to yellow', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $green . ', ' . $yellow . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $green . ', ' . $yellow . ')',
|
||||||
'slug' => 'green-to-yellow',
|
'slug' => 'green-to-yellow',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Yellow to Green', 'twentytwentyone' ),
|
'name' => esc_html__( 'Yellow to green', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $green . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $green . ')',
|
||||||
'slug' => 'yellow-to-green',
|
'slug' => 'yellow-to-green',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Red to Yellow', 'twentytwentyone' ),
|
'name' => esc_html__( 'Red to yellow', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $yellow . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $yellow . ')',
|
||||||
'slug' => 'red-to-yellow',
|
'slug' => 'red-to-yellow',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Yellow to Red', 'twentytwentyone' ),
|
'name' => esc_html__( 'Yellow to red', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $red . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $red . ')',
|
||||||
'slug' => 'yellow-to-red',
|
'slug' => 'yellow-to-red',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Purple to Red', 'twentytwentyone' ),
|
'name' => esc_html__( 'Purple to red', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $red . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $red . ')',
|
||||||
'slug' => 'purple-to-red',
|
'slug' => 'purple-to-red',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => esc_html__( 'Red to Purple', 'twentytwentyone' ),
|
'name' => esc_html__( 'Red to purple', 'twentytwentyone' ),
|
||||||
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $purple . ')',
|
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $purple . ')',
|
||||||
'slug' => 'red-to-purple',
|
'slug' => 'red-to-purple',
|
||||||
),
|
),
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -104,7 +104,7 @@ if ( function_exists( 'register_block_style' ) ) {
|
||||||
'core/social-links',
|
'core/social-links',
|
||||||
array(
|
array(
|
||||||
'name' => 'twentytwentyone-social-icons-color',
|
'name' => 'twentytwentyone-social-icons-color',
|
||||||
'label' => esc_html__( 'Dark Gray', 'twentytwentyone' ),
|
'label' => esc_html__( 'Dark gray', 'twentytwentyone' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ function twenty_twenty_one_add_sub_menu_toggle( $output, $item, $depth, $args )
|
||||||
$output .= '<button class="sub-menu-toggle" aria-expanded="false" onClick="twentytwentyoneExpandSubMenu(this)">';
|
$output .= '<button class="sub-menu-toggle" aria-expanded="false" onClick="twentytwentyoneExpandSubMenu(this)">';
|
||||||
$output .= '<span class="icon-plus">' . twenty_twenty_one_get_icon_svg( 'ui', 'plus', 18 ) . '</span>';
|
$output .= '<span class="icon-plus">' . twenty_twenty_one_get_icon_svg( 'ui', 'plus', 18 ) . '</span>';
|
||||||
$output .= '<span class="icon-minus">' . twenty_twenty_one_get_icon_svg( 'ui', 'minus', 18 ) . '</span>';
|
$output .= '<span class="icon-minus">' . twenty_twenty_one_get_icon_svg( 'ui', 'minus', 18 ) . '</span>';
|
||||||
$output .= '<span class="screen-reader-text">' . esc_html__( 'Open Menu', 'twentytwentyone' ) . '</span>';
|
$output .= '<span class="screen-reader-text">' . esc_html__( 'Open menu', 'twentytwentyone' ) . '</span>';
|
||||||
$output .= '</button>';
|
$output .= '</button>';
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
@ -151,7 +151,7 @@ function twenty_twenty_one_get_starter_content() {
|
||||||
'nav_menus' => array(
|
'nav_menus' => array(
|
||||||
// Assign a menu to the "primary" location.
|
// Assign a menu to the "primary" location.
|
||||||
'primary' => array(
|
'primary' => array(
|
||||||
'name' => esc_html__( 'Primary Menu', 'twentytwentyone' ),
|
'name' => esc_html__( 'Primary menu', 'twentytwentyone' ),
|
||||||
'items' => array(
|
'items' => array(
|
||||||
'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
|
'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
|
||||||
'page_about',
|
'page_about',
|
||||||
|
@ -162,7 +162,7 @@ function twenty_twenty_one_get_starter_content() {
|
||||||
|
|
||||||
// Assign a menu to the "footer" location.
|
// Assign a menu to the "footer" location.
|
||||||
'footer' => array(
|
'footer' => array(
|
||||||
'name' => esc_html__( 'Secondary Menu', 'twentytwentyone' ),
|
'name' => esc_html__( 'Secondary menu', 'twentytwentyone' ),
|
||||||
'items' => array(
|
'items' => array(
|
||||||
'link_facebook',
|
'link_facebook',
|
||||||
'link_twitter',
|
'link_twitter',
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( has_nav_menu( 'primary' ) ) : ?>
|
<?php if ( has_nav_menu( 'primary' ) ) : ?>
|
||||||
<nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentytwentyone' ); ?>">
|
<nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'twentytwentyone' ); ?>">
|
||||||
<div class="menu-button-container">
|
<div class="menu-button-container">
|
||||||
<button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
|
<button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
|
||||||
<span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
|
<span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-beta3-49577';
|
$wp_version = '5.6-beta3-49578';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue