Created
December 4, 2015 15:55
-
-
Save anonymous/5ef69165487f4a9d7465 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Wir lassen den User die Text und die Linkfarbe anpassen | |
$colors = array(); | |
$colors[] = array( | |
'slug'=>'content_text_color', | |
'default' => '#333', | |
'label' => __('Content Text Color', 'Ari') | |
); | |
$colors[] = array( | |
'slug'=>'content_link_color', | |
'default' => '#88C34B', | |
'label' => __('Content Link Color', 'Ari') | |
); | |
foreach( $colors as $color ) { | |
// SETTINGS | |
$wp_customize->add_setting( | |
$color['slug'], array( | |
'default' => $color['default'], | |
'type' => 'option', | |
'capability' => | |
'edit_theme_options' | |
) | |
); | |
// CONTROLS | |
$wp_customize->add_control( | |
new WP_Customize_Color_Control( | |
$wp_customize, | |
$color['slug'], | |
array('label' => $color['label'], | |
'section' => 'colors', | |
'settings' => $color['slug']) | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment