Changeset 56559 for trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
- Timestamp:
- 09/12/2023 03:21:02 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
r56547 r56559 154 154 'section' => 'colors', 155 155 'priority' => 100, 156 'active_callback' => static function () {156 'active_callback' => static function () { 157 157 return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); 158 158 }, … … 166 166 'capability' => 'edit_theme_options', 167 167 'default' => false, 168 'sanitize_callback' => static function ( $value ) {168 'sanitize_callback' => static function ( $value ) { 169 169 return (bool) $value; 170 170 }, … … 189 189 'priority' => 110, 190 190 'description' => $description, 191 'active_callback' => static function ( $value ) {191 'active_callback' => static function ( $value ) { 192 192 return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); 193 193 }, … … 201 201 'selector' => '#dark-mode-toggler', 202 202 'container_inclusive' => true, 203 'render_callback' => function () {203 'render_callback' => function () { 204 204 $attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' ); 205 205 $this->the_html( $attrs );
Note: See TracChangeset
for help on using the changeset viewer.