'; $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' => 13, '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', ) ); //breadcrumb $wp_customize->add_section( 'breadcrumb_section' , array( 'title' => __( 'Header Breadcrumb', 'business-space' ), 'priority' => 3, 'panel' => 'theme_options', ) ); $wp_customize->add_setting( 'breadcrumb_enable' , array( 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'agency_starter_sanitize_checkbox', )); $wp_customize->add_control('breadcrumb_enable' , array( 'label' => __('Enable | Disable Breadcrumb','business-space' ), 'section' => 'breadcrumb_section', 'type'=> 'checkbox', )); } /** * @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-search.php'; /** * Theme Breadcrumbs */ if( !function_exists('business_space_page_header_breadcrumbs') ): function business_space_page_header_breadcrumbs() { global $post; $homeLink = home_url(); $business_space_page_header_layout = get_theme_mod('business_space_page_header_layout', 'business_space_page_header_layout1'); if($business_space_page_header_layout == 'business_space_page_header_layout1'): $breadcrumb_class = 'center-text'; else: $breadcrumb_class = 'text-right'; endif; echo ''; } endif; /** * Theme Breadcrumbs Url */ function business_space_page_url() { $page_url = 'http'; if ( key_exists("HTTPS", $_SERVER) && ( $_SERVER["HTTPS"] == "on" ) ){ $page_url .= "s"; } $page_url .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $page_url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $page_url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $page_url; }