Last active
July 8, 2017 03:19
-
-
Save holisticnetworking/000bbb338ed695b4ee19 to your computer and use it in GitHub Desktop.
Iterating over several related theme mods to create both their settings and their controls.
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
// Icon Fonts: | |
foreach( ReactiveCustomizer::$icon_fonts as $slug=>$name ) : | |
$wp_customize->add_setting( 'hn_icon_fonts_' . $slug , array( | |
'default' => '0' | |
) ); | |
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'icon_fonts_' . $slug, array( | |
'label' => __( $name, 'hn-reactive' ), | |
'section' => 'icon_fonts', | |
'settings' => 'hn_icon_fonts_' . $slug, | |
'type' => 'checkbox' | |
) ) ); | |
endforeach; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment