get_panel( 'widgets' ); $bb_widgets_section->title = __( 'Sidebar and Footer Blocks', 'big-patterns' ); $wp_customize->get_setting( 'header_textcolor' )->transport = 'refresh'; $wp_customize->get_control('header_textcolor')->description = __('This controls the color of the title (not the logo).', "big-patterns"); $wp_customize->get_control('header_textcolor')->priority = -1; $wp_customize->get_control('header_textcolor')->label = __('Title Color', 'big-patterns'); $wp_customize->get_section( 'header_image' )->title = __('Homepage Header Media', 'big-patterns'); $wp_customize->get_section( 'header_image' )->priority = '150'; $wp_customize->get_setting( 'header_image' )->transport = 'refresh'; $wp_customize->get_section( 'header_image' )->description = __("The big-patterns 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-patterns"); $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 only affects the logo if it is displayed below the navbar. Turning this off usually looks best when Center Navbar has been switched on.', "big-patterns"); $wp_customize->get_control('display_header_text')->section = 'big_bob_navigation'; $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-patterns"); $wp_customize->get_control('background_color')->priority = '-3'; $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-patterns"); $wp_customize->get_control( 'external_header_video' )->label = __("Use a YouTube URL", "big-patterns"); $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 for Featured and Header Media', 'big-patterns'), 'section' => 'title_tagline', 'settings' => 'big_bob_preloader', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('This turns the prelaoder on and off when featured and header media needs to be loaded.', 'big-patterns'), )); $wp_customize->add_setting('big_bob_title_below_nav', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit_Big_Small', )); $wp_customize->add_control('big_bob_title_below_nav', array( 'label' => __('Title Below Nav', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_title_below_nav', 'type' => 'radio', 'choices' => array( 'Big' => __('Big', 'big-patterns'), 'Small' => __('Small', 'big-patterns'), 'Logo Below Nav' => __('Logo Below Nav', 'big-patterns'), 'Big Tagline Only' => __('Big Tagline Only', 'big-patterns'), 'Small Tagline Only' => __('Small Tagline Only', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 50, 'description' => __('This removes the title and tagline from the navbar, and sets the title and tagline below the navbar on the homepage. You may want to turn on Center Navbar in the Navigation section.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_title_below_nav', array( 'render_callback' => 'big_bob_turn_on_big_description, big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_foreground_color_NF', array( 'default' => '#eeee22', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_foreground_color_NF', array( 'label' => __('Navbar and Footer Foreground Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_foreground_color_NF', 'priority' => -5, 'description' => __('This will change the color behind the text in the navbar and footer.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_foreground_color_NF', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_link_color_NF', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_link_color_NF', array( 'label' => __('Navbar and Footer Link Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_link_color_NF', 'priority' => -5, 'description' => __('This will change the color behind the text in the navbar and footer.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_color_NF', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_link_hover_color_NF', array( 'default' => '#ffffff', '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_NF', array( 'label' => __('Navbar and Footer Link Hover Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_link_hover_color_NF', 'priority' => -5, 'description' => __('This will change the color behind the text in the navbar and footer.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_hover_color_NF', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_text_color_NF', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_text_color_NF', array( 'label' => __('Navbar and Footer Text and Border Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_text_color_NF', 'priority' => -5, 'description' => __('This will change the color behind the text in the navbar and footer.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_text_color_NF', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_foreground_color', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_foreground_color', array( 'label' => __('Body and Sidebar Foreground Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_foreground_color', 'priority' => -5, 'description' => __('This will change the color behind the text in the body and sidebar.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_foreground_color', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_background_color', array( 'default' => '#000000', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_background_color', array( 'label' => __('Background Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_background_color', 'priority' => -5, 'description' => __('This will change the color behind everything.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_background_color', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting('big_bob_text_color', array( 'default' => '#ffffff', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color_no_hash', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'big_bob_text_color', array( 'label' => __('Body Text and Border Color', 'big-patterns'), 'section' => 'colors', 'settings' => 'big_bob_text_color', 'priority' => -5, 'description' => __('This will change the color of the text (not links) and the borders surrounding the lower sections of the site.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_text_color', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting( 'big_bob_range_home_nav_ti', array( 'default' => '10', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_home_nav_ti', array( 'type' => 'range', 'section' => 'colors', 'label' => __( 'Home Navbar and Footer Opacity', 'big-patterns' ), 'description' => '', 'priority' => 0, 'input_attrs' => array( 'min' => 0, 'max' => 10, 'step' => 1, ), 'description' => __('This is the opacity for foreground color at the top of the page for your homepage.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_home_nav_ti', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting( 'big_bob_range_nav_ti', array( 'default' => '10', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_nav_ti', array( 'type' => 'range', 'priority' => 10, 'section' => 'colors', 'label' => __( 'Navbar and Footer Opacity', 'big-patterns' ), 'description' => '', 'priority' => 0, 'input_attrs' => array( 'min' => 0, 'max' => 10, 'step' => 1, ), 'description' => __('This is the opacity for foreground color at the top of the page for the rest of your pages.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_nav_ti', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting( 'big_bob_range_sn', array( 'default' => '10', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_sn', array( 'type' => 'range', 'section' => 'colors', 'label' => __( 'Scrolled Navbar Opacity', 'big-patterns' ), 'description' => '', 'priority' => 0, 'input_attrs' => array( 'min' => 0, 'max' => 10, 'step' => 1, ), 'description' => __('This is the opacity for the navbar after it has scrolled down the screen.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_sn', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting( 'big_bob_range_sb', array( 'default' => '10', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_sb', array( 'type' => 'range', 'section' => 'colors', 'label' => __( 'Body Opacity', 'big-patterns' ), 'description' => '', 'priority' => 0, 'input_attrs' => array( 'min' => 0, 'max' => 10, 'step' => 1, ), 'description' => __('This is the opacity for foreground color for the body, sidebar, and footer.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_sb', array( 'render_callback' => 'big_bob_add_bright', ) ); $wp_customize->add_setting( 'big_bob_range_tile_large_screen', array( 'default' => '170', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_tile_large_screen', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( 'Space from Top for Tiled Page Body on Large Screens', 'big-patterns' ), 'priority' => -3, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __('This sets the distance between the body of a tiled page (post style) and the top of the page on large screens.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_tile_large_screen', array( 'render_callback' => 'big_bob_measure_tile_from_top', ) ); $wp_customize->add_setting( 'big_bob_range_tile_tablet', array( 'default' => '130', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_tile_tablet', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( 'Space from Top for Tiled Page Body on Tablets', 'big-patterns' ), 'priority' => -3, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __('This sets the distance between the body of a tiled page (post style) the top of the page on tablet sized screens.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_tile_tablet', array( 'render_callback' => 'big_bob_measure_tile_from_top', ) ); $wp_customize->add_setting( 'big_bob_range_tile_phone', array( 'default' => '150', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_tile_phone', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( 'Space from Top for Tiled Page Body on Phones', 'big-patterns' ), 'priority' => -3, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __('This sets the distance between the body of a tiled page (post style) and the top of the page on phone sized screens.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_tile_phone', array( 'render_callback' => 'big_bob_measure_tile_from_top', ) ); $wp_customize->add_setting( 'big_bob_range_wide_large_screen', array( 'default' => '190', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_wide_large_screen', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( "Space from Top for Big Page Body on Large Screens", 'big-patterns' ), 'priority' => -1, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __("The Big Page control must be on. This only affects Big Pages. This sets the distance between the body of a big page and the top of the page on large screens.", 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_wide_large_screen', array( 'render_callback' => 'big_bob_turn_on_wide_when_centered', ) ); $wp_customize->add_setting( 'big_bob_range_wide_tablet', array( 'default' => '160', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_wide_tablet', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( 'Space from Top for Big Page Body on Tablets', 'big-patterns' ), 'priority' => -1, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __('The Big Page control must be on. This only affects Big Pages. This sets the distance between the body of a big page and the top of the page on tablet sized screens.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_wide_tablet', array( 'render_callback' => 'big_bob_turn_on_wide_when_centered', ) ); $wp_customize->add_setting( 'big_bob_range_wide_phone', array( 'default' => '180', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'bb_wpse_intval', ) ); $wp_customize->add_control( 'big_bob_range_wide_phone', array( 'type' => 'range', 'section' => 'big_bob_body_style', 'label' => __( 'Space from Top for Big Page Body on Phones', 'big-patterns' ), 'priority' => -1, 'input_attrs' => array( 'min' => 0, 'max' => 300, 'step' => 10, ), 'description' => __('The Big Page control must be on. This only affects Big Pages. This sets the distance between the body of a big page and the top of the page on phone sized screens.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_range_wide_phone', array( 'render_callback' => 'big_bob_turn_on_wide_when_centered', ) ); function bb_wpse_intval( $value ) { return (int) $value; } $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-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, '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-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_background_shadow', array( 'render_callback' => 'big_bob_add_shadow', ) ); $wp_customize->add_setting('big_bob_borders', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_borders', array( 'label' => 'Borders', 'section' => 'colors', 'settings' => 'big_bob_borders', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('This will add borders that are the same color as the text. The borders will be added around the body, sidebar, and footer.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_borders', array( 'render_callback' => 'big_bob_add_bright, big_bob_set_nav', ) ); $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-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, '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-patterns'), )); $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' => '#eeee22', '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-patterns'), 'section' => 'colors', 'settings' => 'big_bob_link_color', 'priority' => -1, 'description' => __('This will change the color of all the links.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_color', array( 'render_callback' => 'big_bob_customizer_css', ) ); $wp_customize->add_setting('big_bob_link_hover_color', array( 'default' => '#1e73be', '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-patterns'), 'section' => 'colors', 'settings' => 'big_bob_link_hover_color', 'priority' => -1, 'description' => __('This will change the hover color of all the links.', 'big-patterns'), ))); $wp_customize->selective_refresh->add_partial( 'big_bob_link_hover_color', array( 'render_callback' => 'big_bob_customizer_css', ) ); $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-patterns'), 'section' => 'header_image', 'settings' => 'big_bob_media_to_background', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), '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-patterns'), )); $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-patterns'), 'section' => 'header_image', 'settings' => 'big_bob_video_on_phone', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), '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-patterns'), )); $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' => 'header_image', 'settings' => 'big_bob_big_header_image', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('Fills the header image across the entire screen.', 'big-patterns'), )); $wp_customize->add_setting('big_bob_big_background_copy', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_big_background_copy', array( 'label' => 'Big Background Image', 'section' => 'big_bob_background_video', 'settings' => 'big_bob_big_background_copy', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('This transforms the background image 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.', 'big-patterns'), )); $wp_customize->add_setting('big_bob_background_header_space', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_background_header_space', array( 'label' => 'Homepage Header Space', 'section' => 'big_bob_background_video', 'settings' => 'big_bob_background_header_space', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('This pushes the body down the height of the screen on the hompepage when the Title Below Nav contorl in the Navigation section is switched off.', 'big-patterns'), )); $wp_customize->add_setting('big_bob_image_over_video', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_image_over_video', array( 'label' => 'Image Over Video', 'section' => 'big_bob_background_video', 'settings' => 'big_bob_image_over_video', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __('This places the bacground image over the background video.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_image_over_video', array( 'render_callback' => 'big_bob_is_image_over_video', ) ); $wp_customize->add_section('big_bob_navigation', array( 'title' => __('Navigation', 'big-patterns'), 'priority' => 30, )); $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-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_sticky_sidebar', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 110, 'description' => __('If a sidebar is being used, and a reduced sidebar is shorter than the body, 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. This feature is not available on all browsers.', 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_sticky_sidebar', array( 'render_callback' => 'big_bob_sidebar_is_sticky', ) ); $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 Title On Mobile', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_sticky_navbar_on_mobile', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 110, '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). If you do not have a title in the navbar, then only the menu button is dsiplayed regarless of the status of this control.', 'big-patterns'), )); $wp_customize->add_section('big_bob_body_style', array( 'title' => __('Layout', 'big-patterns'), 'priority' => 30, )); $wp_customize->add_setting('big_bob_highlight_feature_image', array( 'default' => 'Featured Images Only', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFeatured', )); $wp_customize->add_control('big_bob_highlight_feature_image', array( 'label' => __('Header Space for Featured Media', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_highlight_feature_image', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Featured Images Only' => __('Featured Images Only', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 10, 'description' => __("This will move the text down the width of the screen on single pages and posts so that feaured and background images and videos receive more exposure. If you find this control confusing, then it is best to leave it in the Featured Images Only position.", 'big-patterns'), )); $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_page_titles', array( 'default' => 'Featured Images Only', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFeatured', )); $wp_customize->add_control('big_bob_page_titles', array( 'label' => __('Page Titles', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_page_titles', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Featured Images Only' => __('Featured Images Only', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 10, 'description' => __("This controls whether page titles are displayed on pages (not posts). The Featured Images Only option is designed to show a title only when the featured image takes up the entire page. This can be controlled witn the header space control. If you find this control confusing, then it is best to leave it in the Featured Images Only position.", 'big-patterns'), )); $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' => __('Big Pages', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_wide_when_centered', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => -2, 'description' => __("This will widen the width of the body to the full width of the screen and bring the page closer to the top if there is no header or featured media on pages (not posts) when the sidebar isn't present. Note that bringing the page close to the top can be offset by the Page Titles control and the Header Space for Featured Media. If you get confused, then it is best to reset both controls to Featured Images Only.", 'big-patterns'), )); $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' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_excerpt_mode', array( 'label' => __('Excerpt Mode', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_excerpt_mode', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), '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-patterns'), )); $wp_customize->add_setting('big_bob_fearued_post_page', array( 'default' => 'Off', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_fearued_post_page', array( 'label' => __('Post Page Featured Image', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_fearued_post_page', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 0, 'description' => __("This will show your featured images on your posts and archive pages.", 'big-patterns'), )); $wp_customize->add_setting('big_bob_rounded_corners', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_rounded_corners', array( 'label' => __('Rounded Corners', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_rounded_corners', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => -1, 'description' => __("This will create rounded corners for groups, images, and some other blocks.", 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_rounded_corners', array( 'render_callback' => 'big_bob_round_out_corners', ) ); $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' => __('No Sidebar for Static Pages', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_blog_sidebar_only', 'type' => 'radio', 'choices' => array( 'Home Only' => __('Home Only', 'big-patterns'), 'Except Home' => __('Except Home', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => -1, 'description' => __("You have two kinds of sidebars. One pair can be used in pages. Thee other pair can be used in posts. You can use this radio button to control which pages your page sidebars appear on. Note that if you choose Home Only or Except Home, your homepage must be defined as a static page in Homepage Settings.", 'big-patterns'), )); $wp_customize->add_section('big_bob_background_video', array( 'title' => __('Background Media', 'big-patterns'), 'priority' => 90, 'description' => __('You can use this section to set mobile friendly background images and videos into different areas of your site, inlcluding area not covered by header media and featured media.', 'big-patterns'), )); $wp_customize->add_setting('big_bob_background_image_media', array( 'type' => 'theme_mod', 'sanitize_callback' => 'absint' )); $wp_customize->add_control(new WP_Customize_Media_Control($wp_customize, 'big_bob_background_image_media', array( 'section' => 'big_bob_background_video', 'settings' => 'big_bob_background_image_media', 'label' => __('Load a Background Image.', 'big-patterns'), 'mime_type' => 'image', 'priority' => -1, 'description' => __('The background image has been designed to be mobile friendly. It will serve as your default background image. It will be replaced on your homepage if you use header media or on pages that have added a featured image or on pages set as Big Pages in the Layout section.', 'big-patterns'), ))); $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.', 'big-patterns'), 'mime_type' => 'video', 'priority' => 0, 'description' => __('The background video has been designed to be mobile friendly. It will serve as your default background video. It will be replaced on your homepage if you use header media or on pages that have added a featured image or on pages set as Big Pages in the Layout section.', 'big-patterns'), ))); $wp_customize->add_setting('big_bob_show_footer', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit_Att', )); $wp_customize->add_control('big_bob_show_footer', array( 'label' => __('Show Footer', 'big-patterns'), 'section' => 'big_bob_body_style', 'settings' => 'big_bob_show_footer', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Remove Attribution Only' => __('Remove Attribution Only', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 100, 'description' => __("Turning this off will completely remove the footer and the back to top button.", 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_show_footer', array( 'render_callback' => 'big_bob_show_footer_on', ) ); // Add section. $wp_customize->add_section( 'big_bob_fonts' , array( 'title' => __('Typography','big-patterns'), '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. If you delete all of the font names then your fonts will be set to default and will be hosted locally.", 'big-patterns'), ) ); // Add settings $wp_customize->add_setting( 'big_bob_fonts_main_title', array( 'default' => __( 'Syncopate', 'big-patterns' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_main_title', array( 'label' => __( 'Title', 'big-patterns' ), 'section' => 'big_bob_fonts', 'settings' => 'big_bob_fonts_main_title', 'type' => 'text', 'description' => __("If this is left blank, then headings will used as the title font.", 'big-patterns'), ) ) ); $wp_customize->selective_refresh->add_partial( 'big_bob_fonts_main_title', array( 'render_callback' => 'big_bob_change_fonts_main_title', ) ); // Add settings $wp_customize->add_setting( 'big_bob_fonts_title', array( 'default' => __( 'IBM Plex Mono', 'big-patterns' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_title', array( 'label' => __( 'Headings', 'big-patterns' ), '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' => __( 'IBM Plex Mono', 'big-patterns' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_paragraph', array( 'label' => __( 'Paragraph', 'big-patterns' ), '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' => __( 'Syncopate', 'big-patterns' ), 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'big_bob_fonts_misc', array( 'label' => __( 'Menus and Miscellaneous', 'big-patterns' ), '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' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_center_nav', array( 'label' => __('Center Navbar', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_center_nav', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 90, 'description' => __("This will center the contents of the navbar on wide screens and remove the tagline from the navbar if it is being shown.", 'big-patterns'), )); $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' => 'Medium', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMenuSize', )); $wp_customize->add_control('big_bob_menu_size', array( 'label' => __('Menu Size', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_menu_size', 'type' => 'radio', 'choices' => array( 'Small' => __('Small', 'big-patterns'), 'Medium' => __('Medium', 'big-patterns'), 'Large' => __('Large', 'big-patterns'), ), 'priority' => 100, 'description' => __("This will change the size of the menu items in your navbar.", 'big-patterns'), )); $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' => 'Large', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMenuSize', )); $wp_customize->add_control('big_bob_menu_spacing', array( 'label' => __('Menu Spacing', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_menu_spacing', 'type' => 'radio', 'choices' => array( 'Small' => __('Small', 'big-patterns'), 'Medium' => __('Medium', 'big-patterns'), 'Large' => __('Large', 'big-patterns'), ), 'priority' => 100, 'description' => __("This will change the spacing between your menu items.", 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_menu_spacing', array( 'render_callback' => 'big_bob_set_nav', ) ); $wp_customize->add_setting('big_bob_underline_menu', array( 'default' => 'On', 'transport' => 'refresh', 'sanitize_callback' => 'big_bob_checkMediaFit', )); $wp_customize->add_control('big_bob_underline_menu', array( 'label' => __('Underline Current Page', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_underline_menu', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 90, 'description' => __("This will underline the current page in the main navigation menu. It may be helpful to turn this off if you are creating a one page website.", 'big-patterns'), )); $wp_customize->selective_refresh->add_partial( 'big_bob_underline_menu', array( 'render_callback' => 'big_bob_set_underline', ) ); $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 in Navbar', 'big-patterns'), 'section' => 'big_bob_navigation', 'settings' => 'big_bob_center_nav_with_tagline', 'type' => 'radio', 'choices' => array( 'On' => __('On', 'big-patterns'), 'Off' => __('Off', 'big-patterns'), ), 'priority' => 90, 'description' => __("This will set the tagline in the under the title if the title is set into the navbar.", 'big-patterns'), )); $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_Att($input) { $valid = array( 'On' => 'On', 'Remove Attribution Only' => 'Remove Attribution Only', 'Off' => 'Off', ); if (array_key_exists($input, $valid)) { return $input; } else { return ''; } } function big_bob_checkMediaFeatured($input) { $valid = array( 'On' => 'On', 'Featured Images Only' => 'Featured Images Only', 'Off' => 'Off', ); 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_Big_Small($input) { $valid = array( 'Big' => 'Big', 'Small' => 'Small', 'Logo Below Nav' => 'Logo Below Nav', 'Big Tagline Only' => 'Big Tagline Only', 'Small Tagline Only' => 'Small Tagline Only', 'Off' => 'Off', ); if (array_key_exists($input, $valid)) { return $input; } else { return ''; } } function big_bob_checkMediaFit_home($input) { $valid = array( '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() { $bb_link = get_theme_mod('big_bob_link_color', '#eeee22'); $bb_link = str_replace("#", "", $bb_link); $bb_link_hover = get_theme_mod('big_bob_link_hover_color', '#1e73be'); $bb_link_hover = str_replace("#", "", $bb_link_hover); ?>