get_setting( 'header_textcolor' )->transport = 'refresh'; $wp_customize->get_control('header_textcolor')->description = __('This feature only works when a logo is used and the site title and tagline are being displayed. You can find these options in the site identity section.', "big-bob"); $wp_customize->get_setting( 'header_image' )->transport = 'refresh'; $wp_customize->get_section( 'header_image' )->description = __("The big-bob theme is designed to maximize the size of any header image or header video while minimizing distortion regardless of the screen size or the header media's dimensions. You should feel free to utilize horizontally or vertically or squarely defined images or videos. If you choose both an image and a video, the image will load first then the video will replace it. Header media is only displayed on your homepage.", "big-bob"); $wp_customize->get_setting( 'header_video' )->transport = 'refresh'; $wp_customize->get_setting( 'custom_logo' )->transport = 'refresh'; $wp_customize->get_control( 'display_header_text' )->description = __('This has no effect on the display of the logo. This feature looks best when Center Navbar has been switched on in the Navigation section.', "big-bob"); $wp_customize->get_control( 'background_color' )->description = __('Black or a dark color works best when the theme is in the default setting. White or a light color works best when the theme is in bright mode.', "big-bob"); $wp_customize->get_control('background_color')->priority = '-3'; $wp_customize->get_section('background_image')->description = __("Please note that the background image is distinct from header images which can be set to the background. The background image is also distinct from featured images which are set to the background. You can use this section to create a background image if you want the same background image on every page or if you want to use a background image on your feed pages (like your posts page). It is recommended that you turn the Background Copy ON to maximize the mobile compatibilty of your background image. The Background Copy control and the Background Copy All Pages control must be turned OFF if you want to use the legacy background image with traditonal styling controls. The Background Copy controls have been added to create more control over background image placement and to create more mobile friendly images. The rest of the controls are available for legacy purposes and are only recommended for advanced users.", "big-bob"); $wp_customize->get_control( 'external_header_video' )->description = __("YouTube adds extra negative space to its videos, so your background color may include black in the header. You should also be aware that some browsers do not support YouTube's autoplay feature, so it is recommended that you set the Set Header Media to Background control in the Header Media Optionssection to OFF.", "big-bob"); $wp_customize->get_control( 'external_header_video' )->label = __("Use a YouTube URL", "big-bob"); $wp_customize->get_setting('background_image')->transport = 'refresh'; $wp_customize->get_control('background_image')->description = __("If you intend to set the background image so that it does not scroll with the page (default setting), then you should use the controls at the top of this section to make sure that it is mobile friendly. The controls below (other than the select image control) are only recommended for advanced users. They exist for legacy purposes." , "big-bob"); $wp_customize->add_setting('big_bob_preloader', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_preloader', array( 'label' => __('Preloader', 'big-bob'), 'section' => 'title_tagline', 'settings' => 'big_bob_preloader', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __('This turns the prelaoder on and off.', 'big-bob'), )); $wp_customize->add_setting('big_bob_big_description_only', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_big_description_only', array( 'label' => __('Big Tagline Only', 'big-bob'), 'section' => 'title_tagline', 'settings' => 'big_bob_big_description_only', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 50, 'description' => __('This is only active when there is a logo and the Display Site Title and Tagline option is checked. When this is on the title will not be displayed, and the tagline will become big, and it will be set to the left on screens that are wider and taller.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_big_description_only', array( 'render_callback' => 'big_bob_turn_on_big_description', ) ); $wp_customize->add_setting('big_bob_big_descrip_small_text', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_big_descrip_small_text', array( 'label' => __('Big Tagline Small Text', 'big-bob'), 'section' => 'title_tagline', 'settings' => 'big_bob_big_descrip_small_text', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 50, 'description' => __('If Big Tagline Only is turned on then this will make the text smaller.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_big_descrip_small_text', array( 'render_callback' => 'big_bob_turn_on_big_description', ) ); $wp_customize->add_setting('big_bob_bright_mode', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_bright_mode', array( 'label' => 'Bright Mode', 'section' => 'colors', 'settings' => 'big_bob_bright_mode', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -5, 'description' => __('This will change the different sections of the site into black text on a white background. It is recommended that you update the background color to white or a bright color if you use this mode.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_bright_mode', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_opaque_body', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_opaque_body', array( 'label' => 'Opaque Body', 'section' => 'colors', 'settings' => 'big_bob_opaque_body', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -4, 'description' => __('This will render the body, sidebar, slidepanel, and footer as opaque. And it will render the navbar as opaque when you scroll down the screen.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_extra_dark', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_opaque_top', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_opaque_top', array( 'label' => 'Opaque Navbar and Titles', 'section' => 'colors', 'settings' => 'big_bob_opaque_top', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -4, 'description' => __('This will render the navbar and title messages as opaque when they are at the top of the screen.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_extra_dark', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_extra_dark', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_extra_dark', array( 'label' => 'Extra Dark', 'section' => 'colors', 'settings' => 'big_bob_extra_dark', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -5, 'description' => __('You may find that in dark (default) mode some link colors are a little difficult to read over some background images. If you find this to be true, then you can turn this on to resolve the problem.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_extra_dark', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_background_shadow', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_background_shadow', array( 'label' => 'Shadow Halo', 'section' => 'colors', 'settings' => 'big_bob_background_shadow', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -2, 'description' => __('This creates a shadow effect around the different sections of your site and changes the style of shadow effect behind the hamburger menu site title.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_background_shadow', array( 'render_callback' => 'big_bob_add_shadow', ) ); $wp_customize->add_setting('big_bob_title_shadow', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_title_shadow', array( 'label' => 'Title Shadow', 'section' => 'colors', 'settings' => 'big_bob_title_shadow', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -2, 'description' => __('This will add or remove a shadow from behind the title if a title is displayed in the navbar. There is no shadow effect available if a logo is displayed.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_title_shadow', array( 'render_callback' => 'big_bob_add_shadow', ) ); $wp_customize->add_setting('big_bob_link_color', array( 'default' => '#66cdaa', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_link_color', array( 'label' => __('Link Color', 'big-bob'), 'section' => 'colors', 'settings' => 'big_bob_link_color', 'priority' => -1, 'description' => __('This will change the color of all the links.', 'big-bob'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_color', array( 'render_callback' => 'big_bob_customizer_css', ) ); $wp_customize->add_setting('big_bob_hover_on', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_hover_on', array( 'label' => 'Turn On Hover Color', 'section' => 'colors', 'settings' => 'big_bob_hover_on', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => -1, 'description' => __('This will turn on a hover color on screens greater than 1065px in width (screens that commonly use a cursor).', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_hover_on', array( 'render_callback' => 'big_bob_customizer_css', ) ); $wp_customize->add_setting('big_bob_link_hover_color', array( 'default' => '#66cdaa', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_link_hover_color', array( 'label' => __('Link Hover Color', 'big-bob'), 'section' => 'colors', 'settings' => 'big_bob_link_hover_color', 'priority' => -1, 'description' => __('This will change the hover color of all the links.', 'big-bob'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_hover_color', array( 'render_callback' => 'big_bob_customizer_css', ) ); $wp_customize->add_section('big_bob_header_media_options', array( 'title' => __('Header Media Options', 'big-bob'), 'priority' => 79, )); $wp_customize->add_setting('big_bob_media_to_background', array( 'default' => 'Off', 'transport' => 'postMessage', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_media_to_background', array( 'label' => __('Set Header Media to Background', 'big-bob'), 'section' => 'big_bob_header_media_options', 'settings' => 'big_bob_media_to_background', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __('Turning this on will cause the header media to stay in place and the text to scroll over the top of the media.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_media_to_background', array( 'render_callback' => 'big_bob_media_in_background', ) ); $wp_customize->add_setting('big_bob_video_on_phone', array( 'default' => 'On', 'transport' => 'postMessage', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_video_on_phone', array( 'label' => __('Show Header Video On Mobile', 'big-bob'), 'section' => 'big_bob_header_media_options', 'settings' => 'big_bob_video_on_phone', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __('Turns off the video for mobile devices with small screen sizes (a width of less than 1050 pixels). The item loaded (image or video) is based on the width when the site loads.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_video_on_phone', array( 'render_callback' => 'big_bob_video_for_phone', ) ); $wp_customize->add_setting('big_bob_big_header_image', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_big_header_image', array( 'label' => 'Big Header Image', 'section' => 'big_bob_header_media_options', 'settings' => 'big_bob_big_header_image', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __('Fills the header image across the entire screen. Some images may require you to set the header media to the background.', 'big-bob'), )); $wp_customize->add_setting('big_bob_background_copy', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_background_copy', array( 'label' => 'Background Copy (Mobile Friendly)', 'section' => 'background_image', 'settings' => 'big_bob_background_copy', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 1, 'description' => __('This sets a copy of your background image that is centered on your screen in a fixed position on your feed pages (like your posts page). This also turns off your legacy background image.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_background_copy', array( 'render_callback' => 'big_bob_remove_main_background', ) ); $wp_customize->add_setting('big_bob_big_background_copy', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_big_background_copy', array( 'label' => 'Big Background Copy', 'section' => 'background_image', 'settings' => 'big_bob_big_background_copy', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 3, 'description' => __('This transforms the background copy so that it expands across the entire screen and is centered. However, depending on the window size, some of the image may be cut off. It is distinct from the default image setting because it is mobile friendly. This control only works if the Background Copy control or the Background Copy All control (one of the two controls above) is ON.', 'big-bob'), )); $wp_customize->add_setting('big_bob_background_copy_all', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_background_copy_all', array( 'label' => 'Background Copy All Pages (Mobile Friendly)', 'section' => 'background_image', 'settings' => 'big_bob_background_copy_all', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 2, 'description' => __('This will turn on the background copy for every page. This also turns off your legacy background image.', 'big-bob'), )); $wp_customize->add_section('big_bob_navigation', array( 'title' => 'Navigation', 'priority' => 101, )); $wp_customize->add_setting('big_bob_sticky_sidebar', array( 'default' => 'On', 'transport' => 'postMessage', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_sticky_sidebar', array( 'label' => __('Sticky Sidebar', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_sticky_sidebar', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 1, 'description' => __('If a sidebar is being used then turning this on will cause the sidebar to shrink in size if it is big and become its own window with its own scrollbar, and it will stick into position when you scroll down the screen.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_sticky_sidebar', array( 'render_callback' => 'big_bob_sidebar_is_sticky', ) ); $wp_customize->add_setting('big_bob_sticky_navbar_on_phone', array( 'default' => 'Off', 'transport' => 'postMessage', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_sticky_navbar_on_phone', array( 'label' => __('Sticky Navbar On Phone', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_sticky_navbar_on_phone', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 3, 'description' => __('Turning this off will remove most of the navbar (except the menu button) when scrolling down phone screens (screens with a width less than 500px). All that will remain is the menu button.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_sticky_navbar_on_mobile', array( 'render_callback' => 'big_bob_phone_is_sticky', ) ); $wp_customize->add_setting('big_bob_sticky_navbar_on_mobile', array( 'default' => 'Off', 'transport' => 'postMessage', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_sticky_navbar_on_mobile', array( 'label' => __('Sticky Navbar On Mobile', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_sticky_navbar_on_mobile', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 2, 'description' => __('Turning this off will remove most of the navbar (except the menu button) when scrolling down mobile screens (screens with a width less than 1065px). All that will remain is the menu button.', 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_sticky_navbar_on_phone', array( 'render_callback' => 'big_bob_phone_is_sticky', ) ); $wp_customize->add_section('big_bob_body_style', array( 'title' => 'Body and Sidebar Style', 'priority' => 101, )); $wp_customize->add_setting('big_bob_strict_body_style', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_strict_body_style', array( 'label' => __('Strict Style', 'big-bob'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_strict_body_style', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __("Turning this on will create a more center aligned style within the body and sidebar of the page. Blocks are more compact on large screens and wider on small screens., and you should have improved compatibility with fonts. If you turn this on, then you may find that you don't have to meet as many style requirements when styling your page, however you may find that some of your existing style choices (like if you use a child theme) have been overridden. New style updates may be added as they are neeeded.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_strict_body_style', array( 'render_callback' => 'big_bob_turn_on_strict_style', ) ); $wp_customize->add_setting('big_bob_highlight_feature_image', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_highlight_feature_image', array( 'label' => __('Highlight Featured Images and Videos', 'big-bob'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_highlight_feature_image', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __("This will move the text down the width of the screen on single pages and posts so that feaured images and videos receive more exposure.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_highlight_feature_image', array( 'render_callback' => 'big_bob_turn_on_highlighted_featured_image', ) ); $wp_customize->add_setting('big_bob_wide_when_centered', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_wide_when_centered', array( 'label' => __('Pages Wide When Centered', 'big-bob'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_wide_when_centered', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __("This will widen the width of the body to the full width of the screen on pages (not posts) when the sidebar isn't present.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_wide_when_centered', array( 'render_callback' => 'big_bob_turn_on_wide_when_centered', ) ); $wp_customize->add_setting('big_bob_excerpt_mode', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_excerpt_mode', array( 'label' => __('Excerpt Mode', 'big-bob'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_excerpt_mode', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __("This will turrn off excerpt mode for the post and archive results pages, but it will leave it on for the search results page.", 'big-bob'), )); $wp_customize->add_setting('big_bob_blog_sidebar_only', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit_home', )); $wp_customize->add_control('big_bob_blog_sidebar_only', array( 'label' => __('Turn Off Sidebar for Static Pages', 'big-bob'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_blog_sidebar_only', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Home Only' => __('Home Only', 'big-bob'), 'Except Home' => __('Except Home', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 0, 'description' => __("Turning this on will turn off the sidebar for any page that is created as a page (as opposed to a post), but it will keep your sidebar active for all other pages of your site (posts, search results, archives, etc.). Note that if you choose Home Only or Except Home, your homepage must be defined as a static page in Homepage Settings.", 'big-bob'), )); $wp_customize->add_section('big_bob_background_video', array( 'title' => 'Background Video', 'priority' => 90, 'description' => __('You can use this section to set a background video.', 'big-bob'), )); $wp_customize->add_setting('big_bob_background_video_media', array( 'type' => 'theme_mod', 'sanitize_callback' => 'absint' )); $wp_customize->add_control(new WP_Customize_Media_Control($wp_customize, 'big_bob_background_video_media', array( 'section' => 'big_bob_background_video', 'settings' => 'big_bob_background_video_media', 'label' => __('Load a Background Video to Your Feed Pages.', 'big-bob'), 'mime_type' => 'video', 'priority' => 0, 'description' => __('The default setting will add a background video to your feed pages like your posts page or your search results page. If you want to add the background video to every page, then you can you can turn on the Background Video All button down below. If you want to add a different background video to other pages, you can add a header video or a featured video. Please visit bigbobnetwork.com/demo for instructions on creating featured videos.', 'big-bob'), ))); $wp_customize->add_setting('big_bob_background_video_all', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_background_video_all', array( 'label' => __('Background Video All', 'big-bob'), 'section' => 'big_bob_background_video', 'settings' => 'big_bob_background_video_all', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 1, 'description' => __("Turning this on will set the background video to all of your pages.", 'big-bob'), )); // Add section. $wp_customize->add_section( 'big_bob_footer' , array( 'title' => __('Social/Footer','big-bob'), 'priority' => 102, 'description' => __("Add the requested data (URL, email address, etc.). Otherwise, leave the entry forms completely blank. You can also add widgets to the footer in the Widgets section.", 'big-bob'), ) ); $wp_customize->add_setting('big_bob_show_footer', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_show_footer', array( 'label' => __('Show Footer', 'big-bob'), 'section' => 'big_bob_footer', 'settings' => 'big_bob_show_footer', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 100, 'description' => __("Turning this off will completely remove the footer and the back to top button.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_show_footer', array( 'render_callback' => 'big_bob_show_footer_on', ) ); // Add settings $wp_customize->add_setting( 'big_bob_footer_url_LinkedIn', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_Twitter', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_YouTube', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_GitHub', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_Instagram', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_WordPress', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_Facebook', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_GooglePlus', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_Yelp', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_footer_url_Pinterest', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_setting( 'big_bob_email_address', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'sanitize_email', ) ); $wp_customize->add_setting( 'big_bob_address_line_1', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_setting( 'big_bob_address_line_2', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_setting( 'big_bob_address_line_3', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_setting( 'big_bob_google_maps_address', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'esc_url_raw', ) ); // Add controls $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_LinkedIn', array( 'label' => __( 'LinkedIn URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_LinkedIn', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_Twitter', array( 'label' => __( 'Twitter URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_Twitter', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_YouTube', array( 'label' => __( 'YouTube URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_YouTube', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_GitHub', array( 'label' => __( 'GitHub URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_GitHub', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_Instagram', array( 'label' => __( 'Instagram URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_Instagram', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_WordPress', array( 'label' => __( 'WordPress URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_WordPress', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_Facebook', array( 'label' => __( 'Facebook URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_Facebook', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_GooglePlus', array( 'label' => __( 'Google Plus URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_GooglePlus', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_Yelp', array( 'label' => __( 'Yelp URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_Yelp', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_footer_url_Pinterest', array( 'label' => __( 'Pinterest URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_footer_url_Pinterest', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you add the URL, then it will create a hyperlink using the requisite icon.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_email_address', array( 'label' => __( 'Email Address', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_email_address', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you write in an email address, then it will create an email icon opening the user's default email app with the supplied address.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_address_line_1', array( 'label' => __( 'Physical Address Line 1', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_address_line_1', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you write something, then it will print exactly what you wrote to the footer.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_address_line_2', array( 'label' => __( 'Physical Address Line 2', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_address_line_2', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you write something, then it will print exactly what you wrote to the footer.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_address_line_3', array( 'label' => __( 'Physical Address Line 3', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_address_line_3', 'type' => 'text', 'description' => __("If you leave the form blank, then nothing will be shown, but if you write something, then it will print exactly what you wrote to the footer.", 'big-bob'), ) ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_google_maps_address', array( 'label' => __( 'Map URL', 'big-bob' ), 'section' => 'big_bob_footer', 'settings' => 'big_bob_google_maps_address', 'type' => 'text', 'description' => __("You can use this to add the URL of an address, and a map link icon will be added. For example, you can look up your business on Google Maps then copy and paste the address from the address bar from the page where your business is mapped.", 'big-bob'), ) ) ); // Add section. $wp_customize->add_section( 'big_bob_fonts' , array( 'title' => __('Typography','big-bob'), 'priority' => 50, 'description' => __("You can use this to update the default fonts using the fonts from the google fonts api (https://fonts.google.com/). If you want to add a new font, then you need to use the exact letter casing and spacing. You should be able to achieve this by copying and pasting the name of the font directly from the google fonts site. Because the Google font library is so large, you will find that some fonts are more compatible than others. You may find it helpful to turn on strict style in the body and sidebar section of this customizer.", 'big-bob'), ) ); // Add settings $wp_customize->add_setting( 'big_bob_fonts_title', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_title', array( 'label' => __( 'Headings', 'big-bob' ), 'section' => 'big_bob_fonts', 'settings' => 'big_bob_fonts_title', 'type' => 'text', ) ) ); $wp_customize->selective_refresh->add_partial( 'big_bob_fonts_title', array( 'render_callback' => 'big_bob_change_fonts_title', ) ); // Add settings $wp_customize->add_setting( 'big_bob_fonts_paragraph', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_paragraph', array( 'label' => __( 'Paragraph', 'big-bob' ), 'section' => 'big_bob_fonts', 'settings' => 'big_bob_fonts_paragraph', 'type' => 'text', ) ) ); $wp_customize->selective_refresh->add_partial( 'big_bob_fonts_paragraph', array( 'render_callback' => 'big_bob_change_fonts_paragraph', ) ); // Add settings $wp_customize->add_setting( 'big_bob_fonts_misc', array( 'default' => __( '', 'big-bob' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_misc', array( 'label' => __( 'Everything Else', 'big-bob' ), 'section' => 'big_bob_fonts', 'settings' => 'big_bob_fonts_misc', 'type' => 'text', ) ) ); $wp_customize->selective_refresh->add_partial( 'big_bob_fonts_misc', array( 'render_callback' => 'big_bob_change_fonts_misc', ) ); $wp_customize->add_setting('big_bob_center_nav', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_center_nav', array( 'label' => __('Center Navbar', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_center_nav', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 100, 'description' => __("This will center the contents of the navbar on wide screens and remove the tagline from the navbar if it is being shown. Note that the navbar will not recede when the wp admin bar is at the top of the screen.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_center_nav', array( 'render_callback' => 'big_bob_set_nav', ) ); $wp_customize->add_setting('big_bob_menu_size', array( 'default' => 'Small', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMenuSize', )); $wp_customize->add_control('big_bob_menu_size', array( 'label' => __('Menu Size', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_menu_size', 'type' => 'radio', 'choices' => array( 'Small' => __('Small', 'big-bob'), 'Medium' => __('Medium', 'big-bob'), 'Large' => __('Large', 'big-bob'), ), 'priority' => 100, 'description' => __("This will change the size of the menu items in your navbar.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_menu_size', array( 'render_callback' => 'big_bob_set_nav', ) ); $wp_customize->add_setting('big_bob_menu_spacing', array( 'default' => 'Small', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMenuSize', )); $wp_customize->add_control('big_bob_menu_spacing', array( 'label' => __('Menu Spacing', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_menu_spacing', 'type' => 'radio', 'choices' => array( 'Small' => __('Small', 'big-bob'), 'Medium' => __('Medium', 'big-bob'), 'Large' => __('Large', 'big-bob'), ), 'priority' => 100, 'description' => __("This will change the spacing between your menu items.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_menu_spacing', array( 'render_callback' => 'big_bob_set_nav', ) ); $wp_customize->add_setting('big_bob_center_nav_with_tagline', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_center_nav_with_tagline', array( 'label' => __('Add Tagline When Title is Centered', 'big-bob'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_center_nav_with_tagline', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-bob'), 'Off' => __('Off', 'big-bob'), ), 'priority' => 100, 'description' => __("This will add the tagline back into the navbar when the navbar title is centerd. The tagline will stil appear below the navbar if a logo is used.", 'big-bob'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_center_nav_with_tagline', array( 'render_callback' => 'big_bob_set_nav', ) ); function big_bob_checkMenuSize($input) { $valid = array( 'Small' => 'Small', 'Medium' => 'Medium', 'Large' => 'Large', ); if (array_key_exists($input, $valid)) { return $input; } else { return ''; } } function big_bob_checkMediaFit($input) { $valid = array( 'On' => 'On', 'Off' => 'Off', ); if (array_key_exists($input, $valid)) { return $input; } else { return ''; } } function big_bob_checkMediaFit_home($input) { $valid = array( 'On' => 'On', 'Home Only' => 'Home Only', 'Except Home' => 'Except Home', 'Off' => 'Off', ); if (array_key_exists($input, $valid)) { return $input; } else { return ''; } } } add_action( 'customize_register', 'big_bob_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function big_bob_customize_preview_js() { wp_enqueue_script( 'big-bob-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', 'big_bob_customize_preview_js' ); add_action('wp_head', 'big_bob_customizer_css'); function big_bob_customizer_css() { if (get_theme_mod('big_bob_hover_on', 'Off') == 'On') { ?>