Make WordPress Core


Ignore:
Timestamp:
10/27/2020 01:58:37 AM (5 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Import the latest changes for 5.6 beta 2.

For a full list of changes since beta 1, see https://github.com/WordPress/twentytwentyone/compare/9e34dca...e580895.

Props poena, melchoyce, luminuu, aristath, justinahinon, jffng, ryelle, kishanjasani, rolfsiebers.
See #51526.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php

    r49247 r49320  
    147147                )
    148148            );
    149 
    150             $wp_customize->add_setting(
    151                 'respect_user_color_preference',
    152                 array(
    153                     'capability'        => 'edit_theme_options',
    154                     'default'           => true,
    155                     'sanitize_callback' => function( $value ) {
    156                         return (bool) $value;
    157                     },
    158                 )
    159             );
    160 
    161             $wp_customize->add_control(
    162                 'respect_user_color_preference',
    163                 array(
    164                     'type'            => 'checkbox',
    165                     'section'         => 'colors',
    166                     'label'           => esc_html__( 'Respect visitor\'s device dark mode settings', 'twentytwentyone' ),
    167                     'description'     => __( '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.', 'twentytwentyone' ),
    168                     'active_callback' => function( $value ) {
    169                         return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
    170                     },
    171                 )
    172             );
    173149        }
    174150
Note: See TracChangeset for help on using the changeset viewer.