Created
September 30, 2015 03:53
-
-
Save designbuildtest/48362ae08b602bce1747 to your computer and use it in GitHub Desktop.
Miscellaneous settings
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 | |
/** | |
* Miscellaneous | |
* | |
*/ | |
$advanced_count = 10; | |
$advanced_array = array( | |
__( 'Google Analytics Tracking Code' ) => 'dbt_google_analytics_code', | |
//__( 'Facebook Comments App ID' ) => 'dbt_facebook_comments_app_id', | |
//__( 'Disqus Shortname' ) => 'dbt_disqus_shortname', | |
//__( 'Timely' ) => 'dbt_timely', | |
); | |
foreach ( $advanced_array as $key => $value ) { | |
$wp_customize->add_setting( $value, array( | |
'type' => 'option', | |
'sanitize_callback' => 'sanitize_text_field', | |
) ); | |
$wp_customize->add_control( $value, array( | |
'section' => 'dbt_settings', | |
'label' => $key, | |
'priority' => $advanced_count++, | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment