Last active
September 29, 2017 02:58
-
-
Save bkaminski/ecb8148232a851de8aac3247b5f21d82 to your computer and use it in GitHub Desktop.
Bootstrap Carousel WP Theme Customizer add Image URL
This file contains hidden or 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
$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