'; $wrap .= ''; $wrap .= '%3$s'; $wrap .= ''; return $wrap; } /* * add customizer settings */ add_action( 'customize_register', 'business_space_customize_register' ); function business_space_customize_register( $wp_customize ) { //slider button link $wp_customize->add_setting( 'slider_button_link' , array( 'default' => "", 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control('slider_button_link' , array( 'label' => __('Slider Button Link','business-space' ), 'section' => 'slider_section', 'priority' => 10, 'type'=>'text', ) ); // banner image $wp_customize->add_setting( 'banner_image' , array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize , 'banner_image' , array( 'label' => __( 'Banner Image', 'business-space' ), 'description' => __('Upload banner image', 'business-space'), 'settings' => 'banner_image', 'section' => 'theme_header', )) ); $wp_customize->add_setting('banner_link' , array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control('banner_link' , array( 'label' => __('Banner Link', 'business-space' ), 'section' => 'theme_header', 'type'=> 'url', ) ); } /** * @package twentysixteen * @subpackage business-space * Converts a HEX value to RGB. */ function business_space_hex2rgb( $color ) { $color = trim( $color, '#' ); if ( strlen( $color ) === 3 ) { $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) ); $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) ); $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) ); } elseif ( strlen( $color ) === 6 ) { $r = hexdec( substr( $color, 0, 2 ) ); $g = hexdec( substr( $color, 2, 2 ) ); $b = hexdec( substr( $color, 4, 2 ) ); } else { return array(); } return array( 'red' => $r, 'green' => $g, 'blue' => $b, ); } //load actions require get_stylesheet_directory() .'/inc/actions.php'; //load child theme colors require get_stylesheet_directory() .'/inc/dynamic-css.php'; //load post widgets require get_stylesheet_directory() .'/inc/widget-post.php';