Skip to content

Instantly share code, notes, and snippets.

/dark-theme.php
Created Dec 8, 2015

Embed
What would you like to do?
<?php
// Sektion erstellen für das dunkle Theme
$wp_customize->add_section("darktheme", array(
"title" => __("Dunkles Theme", "customizer_dark_sections"),
"priority" => 40,
));
// Die Einstellungen definieren
$wp_customize->add_setting('darktheme_css', array(
'capability' => 'edit_theme_options',
"transport" => "refresh",
));
// Die Eingabemöglichkeit erstellen
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
"dark_theme_css",
array(
"label" => __("Das dunkle Theme aktivieren", "customizer_dark_theme_label"),
"section" => "darktheme",
"settings" => "darktheme_css",
"type" => "checkbox",
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.