• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Twenty_Twenty_One_Dark_Mode::__construct() – Instantiate the object.

You appear to be a bot. Output may be restricted

Description

Instantiate the object.

Usage

Twenty_Twenty_One_Dark_Mode::__construct();

Parameters

Returns

void

Source

File name: twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
Lines:

1 to 26 of 26
  public function __construct() {

    // Enqueue assets for the block-editor.
    add_action( 'enqueue_block_editor_assets', array( $this, 'editor_custom_color_variables' ) );

    // Add styles for dark-mode.
    add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );

    // Add scripts for customizer controls.
    add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_controls_enqueue_scripts' ) );

    // Add customizer controls.
    add_action( 'customize_register', array( $this, 'customizer_controls' ) );

    // Add HTML classes.
    add_filter( 'twentytwentyone_html_classes', array( $this, 'html_classes' ) );

    // Add classes to <body> in the dashboard.
    add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) );

    // Add the switch on the frontend & customizer.
    add_action( 'wp_footer', array( $this, 'the_switch' ) );

    // Add the privacy policy content.
    add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) );
  }
 

 View on GitHub View on Trac

Published: 9th December 2020 | Last updated: 9th December 2020

Primary Sidebar

Information

Function name: Twenty_Twenty_One_Dark_Mode::__construct
Class ref: Twenty_Twenty_One_Dark_Mode
Plugin ref: Twenty Twenty-One
Version: 1.7
Sourcefile: classes/class-twenty-twenty-one-dark-mode.php
File ref: classes/class-twenty-twenty-one-dark-mode.php
Deprecated?: No
API Letters: D,M,O,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites