Skip to content

Instantly share code, notes, and snippets.

@caleywoods
Created January 11, 2017 03:53
Show Gist options
  • Save caleywoods/5dd6e43eb08ad4c0739eeb0e7ef59628 to your computer and use it in GitHub Desktop.
Save caleywoods/5dd6e43eb08ad4c0739eeb0e7ef59628 to your computer and use it in GitHub Desktop.
<snippet>
<content><![CDATA[
$wp_customize->add_section( 'lighthouse2.0_contact_info' , array(
'title' => __( 'Contact Info', 'lighthouse2.0' ),
'priority' => 998,
) );
$wp_customize->add_setting( 'lighthouse2.0_contact_info_phone' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'phone', array(
'label' => __( 'Contact Phone', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_contact_info',
'settings' => 'lighthouse2.0_contact_info_phone',
) ) );
$wp_customize->add_setting( 'lighthouse2.0_contact_info_email' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'email', array(
'label' => __( 'Contact Email', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_contact_info',
'settings' => 'lighthouse2.0_contact_info_email',
) ) );
$wp_customize->add_section( 'lighthouse2.0_social_media' , array(
'title' => __( 'Social Media', 'lighthouse2.0' ),
'priority' => 999,
) );
$wp_customize->add_setting( 'lighthouse2.0_social_media_facebook' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'facebook', array(
'label' => __( 'Facebook', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_social_media',
'settings' => 'lighthouse2.0_social_media_facebook',
) ) );
$wp_customize->add_setting( 'lighthouse2.0_social_media_twitter' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'twitter', array(
'label' => __( 'Twitter', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_social_media',
'settings' => 'lighthouse2.0_social_media_twitter',
) ) );
$wp_customize->add_setting( 'lighthouse2.0_social_media_instagram' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'instagram', array(
'label' => __( 'Instagram', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_social_media',
'settings' => 'lighthouse2.0_social_media_instagram',
) ) );
$wp_customize->add_setting( 'lighthouse2.0_social_media_youtube' , array(
'default' => '',
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'youtube', array(
'label' => __( 'YouTube', 'ligthouse2.0' ),
'section' => 'lighthouse2.0_social_media',
'settings' => 'lighthouse2.0_social_media_youtube',
) ) );
}
add_action( 'customize_register', 'bones_theme_customizer' );
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>wp-social</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment