Skip to content

Instantly share code, notes, and snippets.

@bkaminski
Last active September 29, 2017 02:58
Show Gist options
  • Save bkaminski/ecb8148232a851de8aac3247b5f21d82 to your computer and use it in GitHub Desktop.
Save bkaminski/ecb8148232a851de8aac3247b5f21d82 to your computer and use it in GitHub Desktop.
Bootstrap Carousel WP Theme Customizer add Image URL
$wp_customize->add_setting( 'theme_slug_slide_one_link', array(
'default' => 'No Link URL Has Been Entered',
'sanitize_callback' => 'sanitize_link_one_url',
));
function sanitize_link_one_url( $input ) {
return wp_kses_post( force_balance_tags( $input ) );
}
$wp_customize->add_control( 'theme_slug_slide_one_link', array(
'label' => __( 'Slide 1 URL Here:', 'theme_slug' ),
'section' => 'home_slide_img_one',
'settings' => 'theme_slug_slide_one_link',
'type' => 'text',
));
}
// This last closed curly brace completes the section and all 4 functions we are performing here in this code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment