Skip to content

Instantly share code, notes, and snippets.

Created December 8, 2015 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0a1041f6fc480e5746ca to your computer and use it in GitHub Desktop.
Save anonymous/0a1041f6fc480e5746ca to your computer and use it in GitHub Desktop.
<?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