[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





/wp-content/themes/twentytwentyone/classes/ -> class-twenty-twenty-one-dark-mode.php (summary)

Dark Mode Class

File Size: 412 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Twenty_Twenty_One_Dark_Mode:: (12 methods):

Class: Twenty_Twenty_One_Dark_Mode  - X-Ref

This class is in charge of Dark Mode.

__construct()   X-Ref
Instantiate the object.

editor_custom_color_variables()   X-Ref
Editor custom color variables & scripts.

return: void

enqueue_scripts()   X-Ref
Enqueue scripts and styles.

return: void

customize_controls_enqueue_scripts()   X-Ref
Enqueue scripts for the customizer.

return: void

customizer_controls( $wp_customize )   X-Ref
Register customizer options.

param: WP_Customize_Manager $wp_customize Theme Customizer object.
return: void

html_classes( $classes )   X-Ref
Calculate classes for the main <html> element.

param: string $classes The classes for <html> element.
return: string

admin_body_classes( $classes )   X-Ref
Adds a class to the <body> element in the editor to accommodate dark-mode.

param: string $classes The admin body-classes.
return: string

switch_should_render()   X-Ref
Determine if we want to print the dark-mode switch or not.

return: bool

the_switch()   X-Ref
Add night/day switch.

return: void

the_html( $attrs = array()   X-Ref
Print the dark-mode switch HTML.

Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed)

param: array $attrs The attributes to add to our <button> element.
return: void

the_script()   X-Ref
Print the dark-mode switch script.

return: void

add_privacy_policy_content()   X-Ref
Adds information to the privacy policy.

return: void

Generated : Mon Jan 18 08:20:02 2021 Cross-referenced by PHPXref