tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); add_image_size( 'themesgenerator-featured-image', 2000, 1200, true ); add_image_size( 'themesgenerator-thumbnail-avatar', 100, 100, true ); // Set the default content width. $GLOBALS['content_width'] = 525; // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'top' => __( 'Top Menu', 'themesgenerator' ), 'social' => __( 'Social Links Menu', 'themesgenerator' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'audio', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', themesgenerator_fonts_url() ) ); // Define and register starter content to showcase the theme on new sites. $starter_content = array( 'widgets' => array( // Place three core-defined widgets in the sidebar area. 'sidebar-1' => array( 'text_business_info', 'search', 'text_about', ), // Add the core-defined business info widget to the footer 1 area. 'sidebar-2' => array( 'text_business_info', ), // Put two core-defined widgets in the footer 2 area. 'sidebar-3' => array( 'text_about', 'search', ), ), // Specify the core-defined pages to create and add custom thumbnails to some of them. 'posts' => array( 'home', 'about' => array( 'thumbnail' => '{{image-sandwich}}', ), 'contact' => array( 'thumbnail' => '{{image-espresso}}', ), 'blog' => array( 'thumbnail' => '{{image-coffee}}', ), 'homepage-section' => array( 'thumbnail' => '{{image-espresso}}', ), ), // Create the custom image attachments used as post thumbnails for pages. 'attachments' => array( 'image-espresso' => array( 'post_title' => _x( 'Espresso', 'Theme starter content', 'themesgenerator' ), 'file' => 'assets/images/espresso.jpg', // URL relative to the template directory. ), 'image-sandwich' => array( 'post_title' => _x( 'Sandwich', 'Theme starter content', 'themesgenerator' ), 'file' => 'assets/images/sandwich.jpg', ), 'image-coffee' => array( 'post_title' => _x( 'Coffee', 'Theme starter content', 'themesgenerator' ), 'file' => 'assets/images/coffee.jpg', ), ), // Default to a static front page and assign the front and posts pages. 'options' => array( 'show_on_front' => 'page', 'page_on_front' => '{{home}}', 'page_for_posts' => '{{blog}}', ), // Set the front page section theme mods to the IDs of the core-registered pages. 'theme_mods' => array( 'panel_1' => '{{homepage-section}}', 'panel_2' => '{{about}}', 'panel_3' => '{{blog}}', 'panel_4' => '{{contact}}', ), // Set up nav menus for each of the two areas registered in the theme. 'nav_menus' => array( // Assign a menu to the "top" location. 'top' => array( 'name' => __( 'Top Menu', 'themesgenerator' ), 'items' => array( 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 'page_about', 'page_blog', 'page_contact', ), ), // Assign a menu to the "social" location. 'social' => array( 'name' => __( 'Social Links Menu', 'themesgenerator' ), 'items' => array( 'link_yelp', 'link_facebook', 'link_twitter', 'link_instagram', 'link_email', ), ), ), ); /** * Filters ThemesGenerator array of starter content. * * @since ThemesGenerator 1.1 * * @param array $starter_content Array of starter content. */ $starter_content = apply_filters( 'themesgenerator_starter_content', $starter_content ); add_theme_support( 'starter-content', $starter_content ); } add_action( 'after_setup_theme', 'themesgenerator_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function themesgenerator_content_width() { $content_width = $GLOBALS['content_width']; // Get layout. $page_layout = get_theme_mod( 'page_layout' ); // Check if layout is one column. if ( 'one-column' === $page_layout ) { if ( themesgenerator_is_frontpage() ) { $content_width = 644; } elseif ( is_page() ) { $content_width = 740; } } // Check if is single post and there is no sidebar. if ( is_single() && ! is_active_sidebar( 'sidebar-1' ) ) { $content_width = 740; } /** * Filter ThemesGenerator content width of the theme. * * @since ThemesGenerator 1.0 * * @param int $content_width Content width in pixels. */ $GLOBALS['content_width'] = apply_filters( 'themesgenerator_content_width', $content_width ); } add_action( 'template_redirect', 'themesgenerator_content_width', 0 ); /** * Register custom fonts. */ function themesgenerator_fonts_url() { $fonts_url = ''; /* * Translators: If there are characters in your language that are not * supported by Libre Franklin, translate this to 'off'. Do not translate * into your own language. */ $libre_franklin = _x( 'on', 'Libre Franklin font: on or off', 'themesgenerator' ); if ( 'off' !== $libre_franklin ) { $font_families = array(); $font_families[] = 'Libre Franklin:300,300i,400,400i,600,600i,800,800i'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /** * Add preconnect for Google Fonts. * * @since ThemesGenerator 1.0 * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array $urls URLs to print for resource hints. */ function themesgenerator_resource_hints( $urls, $relation_type ) { if ( wp_style_is( 'themesgenerator-fonts', 'queue' ) && 'preconnect' === $relation_type ) { $urls[] = array( 'href' => 'https://fonts.gstatic.com', 'crossorigin', ); } return $urls; } add_filter( 'wp_resource_hints', 'themesgenerator_resource_hints', 10, 2 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function themesgenerator_widgets_init() { register_sidebar( array( 'name' => __( 'Blog Sidebar', 'themesgenerator' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'themesgenerator' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'themesgenerator' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your footer.', 'themesgenerator' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'themesgenerator' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets here to appear in your footer.', 'themesgenerator' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'themesgenerator_widgets_init' ); /** * Replaces "[...]" (appended to automatically generated excerpts) with ... and * a 'Continue reading' link. * * @since ThemesGenerator 1.0 * * @param string $link Link to single post/page. * @return string 'Continue reading' link prepended with an ellipsis. */ function themesgenerator_excerpt_more( $link ) { if ( is_admin() ) { return $link; } $link = sprintf( '', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading "%s"', 'themesgenerator' ), get_the_title( get_the_ID() ) ) ); return ' … ' . $link; } add_filter( 'excerpt_more', 'themesgenerator_excerpt_more' ); /** * Handles JavaScript detection. * * Adds a `js` class to the root `` element when JavaScript is detected. * * @since ThemesGenerator 1.0 */ function themesgenerator_javascript_detection() { echo "\n"; } add_action( 'wp_head', 'themesgenerator_javascript_detection', 0 ); /** * Add a pingback url auto-discovery header for singularly identifiable articles. */ function themesgenerator_pingback_header() { if ( is_singular() && pings_open() ) { printf( '' . "\n", get_bloginfo( 'pingback_url' ) ); } } add_action( 'wp_head', 'themesgenerator_pingback_header' ); /** * Display custom color CSS. */ function themesgenerator_colors_css_wrap() { if ( 'custom' !== get_theme_mod( 'colorscheme' ) && ! is_customize_preview() ) { return; } require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) ); $hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) ); ?> themesgenerator_get_svg( array( 'icon' => 'quote-right' ) ), ); if ( has_nav_menu( 'top' ) ) { wp_enqueue_script( 'themesgenerator-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '1.0', true ); $themesgenerator_l10n['expand'] = __( 'Expand child menu', 'themesgenerator' ); $themesgenerator_l10n['collapse'] = __( 'Collapse child menu', 'themesgenerator' ); // $themesgenerator_l10n['icon'] = themesgenerator_get_svg( array( 'icon' => 'angle-down', 'fallback' => true ) ); } wp_enqueue_script( 'themesgenerator-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true ); wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.2', true ); wp_localize_script( 'themesgenerator-skip-link-focus-fix', 'themesgeneratorScreenReaderText', $themesgenerator_l10n ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'themesgenerator_scripts' ); /** * Add custom image sizes attribute to enhance responsive image functionality * for content images. * * @since ThemesGenerator 1.0 * * @param string $sizes A source size value for use in a 'sizes' attribute. * @param array $size Image size. Accepts an array of width and height * values in pixels (in that order). * @return string A source size value for use in a content image 'sizes' attribute. */ function themesgenerator_content_image_sizes_attr( $sizes, $size ) { $width = $size[0]; if ( 740 <= $width ) { $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px'; } if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) { if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) { $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; } } return $sizes; } add_filter( 'wp_calculate_image_sizes', 'themesgenerator_content_image_sizes_attr', 10, 2 ); /** * Filter the `sizes` value in the header image markup. * * @since ThemesGenerator 1.0 * * @param string $html The HTML image tag markup being filtered. * @param object $header The custom header object returned by 'get_custom_header()'. * @param array $attr Array of the attributes for the image tag. * @return string The filtered header image HTML. */ function themesgenerator_header_image_tag( $html, $header, $attr ) { if ( isset( $attr['sizes'] ) ) { $html = str_replace( $attr['sizes'], '100vw', $html ); } return $html; } add_filter( 'get_header_image_tag', 'themesgenerator_header_image_tag', 10, 3 ); /** * Add custom image sizes attribute to enhance responsive image functionality * for post thumbnails. * * @since ThemesGenerator 1.0 * * @param array $attr Attributes for the image markup. * @param int $attachment Image attachment ID. * @param array $size Registered image size or flat array of height and width dimensions. * @return array The filtered attributes for the image markup. */ function themesgenerator_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { if ( is_archive() || is_search() || is_home() ) { $attr['sizes'] = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; } else { $attr['sizes'] = '100vw'; } return $attr; } add_filter( 'wp_get_attachment_image_attributes', 'themesgenerator_post_thumbnail_sizes_attr', 10, 3 ); /** * Use front-page.php when Front page displays is set to a static page. * * @since ThemesGenerator 1.0 * * @param string $template front-page.php. * * @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template. */ function themesgenerator_front_page_template( $template ) { return is_home() ? '' : $template; } add_filter( 'frontpage_template', 'themesgenerator_front_page_template' ); /** * Modifies tag cloud widget arguments to display all tags in the same font size * and use list format for better accessibility. * * @since ThemesGenerator 1.4 * * @param array $args Arguments for tag cloud widget. * @return array The filtered arguments for tag cloud widget. */ function themesgenerator_widget_tag_cloud_args( $args ) { $args['largest'] = 1; $args['smallest'] = 1; $args['unit'] = 'em'; $args['format'] = 'list'; return $args; } add_filter( 'widget_tag_cloud_args', 'themesgenerator_widget_tag_cloud_args' ); /** * Implement the Custom Header feature. */ //require get_parent_theme_file_path( '/inc/custom-header.php' ); /** * Custom template tags for this theme. */ require get_parent_theme_file_path( '/inc/template-tags.php' ); /** * Additional features to allow styling of the templates. */ //require get_parent_theme_file_path( '/inc/template-functions.php' ); /** * Checks to see if we're on the homepage or not. */ function themesgenerator_is_frontpage() { return ( is_front_page() && ! is_home() ); } /** * Customizer additions. */ //require get_parent_theme_file_path( '/inc/customizer.php' ); /** * SVG icons functions and filters. */ require get_parent_theme_file_path( '/inc/icon-functions.php' ); class Excerpt_Walker extends Walker_Nav_Menu { //function start_el(&$output, $item, $depth, $args) function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $classes[] = 'menu-item-' . $item->ID; $classes[] = 'item'; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); $class_names = ' class="' . esc_attr( $class_names ) . '"'; $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= $indent . ''; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; /*GET THE EXCERPT*/ /*$q = new WP_Query(array('post__in'=>$item->object_id)); if($q->have_posts()) : while($q->have_posts()) : $q->the_post(); $item_output .= ''.get_the_excerpt().''; endwhile;endif;*/ /*****************/ $item_output .= ''; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } } /*Edit in TG*/ add_action('admin_bar_menu', 'add_toolbar_items', 100); function add_toolbar_items($admin_bar){ $external_link=get_template_directory_uri()."/themes-generator-theme.txt"; $complete_link="https://themesgenerator.com/?editmode=ok&dedit=$external_link"; $admin_bar->add_menu( array( 'id' => 'edit-theme', 'title' => 'Edit Homepage', 'href' => $complete_link, 'meta' => array( 'title' => __('Edit theme in Themes Generator', 'themesgenerator'), 'target' => __('_blank', 'themesgenerator'), ), )); } /** * Ensure cart contents update when products are added to the cart via AJAX */ function my_header_add_to_cart_fragment( $fragments ) { ob_start(); $count = WC()->cart->cart_contents_count; ?> 0 ) { ?> cart->cart_contents_count; ?> 0 ) { ?>
= 1; $i-- ) : ?>
is_product() is not working as expected, so validation is disabled add_filter( 'preprocess_comment', 'tg_woo_ra_rating_require_rating' ); function tg_woo_ra_rating_require_rating( $commentdata ) { if ( ! is_admin() && is_product() &&( ! isset( $_POST['rating'] ) || 0 === intval( $_POST['rating'] ) ) ) wp_die( __( 'Error: You did not add a rating. Hit the Back button on your Web browser and resubmit your comment with a rating.' , 'themesgenerator') ); return $commentdata; } //Display the rating on a submitted comment. add_filter( 'comment_text', 'tg_woo_ra_rating_display_rating'); function tg_woo_ra_rating_display_rating( $comment_text ){ if ( $rating = get_comment_meta( get_comment_ID(), 'rating', true ) ) { $stars = '

'; for ( $i = 1; $i <= $rating; $i++ ) { $stars .= ''; } $stars .= '

'; $comment_text = $comment_text . $stars; return $comment_text; } else { return $comment_text; } } //Get the average rating of a post. function tg_woo_ra_rating_get_average_ratings( $id ) { $comments = get_approved_comments( $id ); if ( $comments ) { $i = 0; $total = 0; foreach( $comments as $comment ){ $rate = get_comment_meta( $comment->comment_ID, 'rating', true ); if( isset( $rate ) && '' !== $rate ) { $i++; $total += $rate; } } if ( 0 === $i ) { return false; } else { return round( $total / $i, 1 ); } } else { return false; } } /*****************************/ /*Disable comments URL field*/ /***************************/ function crunchify_disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','crunchify_disable_comment_url'); /**************************/ /*Woocommerce customizer */ /************************/ /*Add shop styles if WC is active*/ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { add_action( "customize_register", "themesgenchild_register_theme_customizer_woo"); } function themesgenchild_register_theme_customizer_woo( $wp_customize ) { $wp_customize->add_section( 'tg_woo__theme_colors', array( 'title' => __( 'Shop Styles', 'themesgenerator' ), 'priority' => 100, ) ); /*cart_color*/ $wp_customize->add_setting( 'cart_color', array( 'default' => '#444444',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cart_color', array( 'label' => 'Cart Color', 'section' => 'tg_woo__theme_colors', 'settings' => 'cart_color', ) ) ); /*cart_count_background*/ $wp_customize->add_setting( 'cart_count_background', array( 'default' => '#2ecc71',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cart_count_background', array( 'label' => 'Cart Count Background', 'section' => 'tg_woo__theme_colors', 'settings' => 'cart_count_background', ) ) ); /*cart_count_text*/ $wp_customize->add_setting( 'cart_count_text', array( 'default' => '#ffffff',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cart_count_text', array( 'label' => 'Cart Count Text', 'section' => 'tg_woo__theme_colors', 'settings' => 'cart_count_text', ) ) ); /*price_color*/ $wp_customize->add_setting( 'price_color', array( 'default' => '#77a464',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'price_color', array( 'label' => 'Price Color', 'section' => 'tg_woo__theme_colors', 'settings' => 'price_color', ) ) ); /*buttons_text*/ $wp_customize->add_setting( 'buttons_text', array( 'default' => '#ffffff',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'buttons_text', array( 'label' => 'Buttons Text', 'section' => 'tg_woo__theme_colors', 'settings' => 'buttons_text', ) ) ); /*buttons_background*/ $wp_customize->add_setting( 'buttons_background', array( 'default' => '#a46497',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'buttons_background', array( 'label' => 'Buttons Background', 'section' => 'tg_woo__theme_colors', 'settings' => 'buttons_background', ) ) ); /*buttons_text_hover*/ $wp_customize->add_setting( 'buttons_text_hover', array( 'default' => '#e6e6e6',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'buttons_text_hover', array( 'label' => 'Buttons Text Hover', 'section' => 'tg_woo__theme_colors', 'settings' => 'buttons_text_hover', ) ) ); /*buttons_background_hover*/ $wp_customize->add_setting( 'buttons_background_hover', array( 'default' => '#935386',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'buttons_background_hover', array( 'label' => 'Buttons Background Hover', 'section' => 'tg_woo__theme_colors', 'settings' => 'buttons_background_hover', ) ) ); function theme_slug_sanitize_checkbox( $input ){ if (isset( $input )) return $input; else return "false"; } /*show_cart_in_menu*/ $wp_customize->add_setting( 'show_cart_in_menu', array( 'default' => true, 'capability' => 'edit_theme_options',"sanitize_callback" => "theme_slug_sanitize_checkbox" ) ); $wp_customize->add_control('show_cart_in_menu', array( 'section' => 'tg_woo__theme_colors', 'label' => 'Show cart in menu', 'type' => 'checkbox' ) ); /*show_cart_count*/ $wp_customize->add_setting( 'show_cart_count', array( 'default' => true, 'capability' => 'edit_theme_options',"sanitize_callback" => "theme_slug_sanitize_checkbox" ) ); $wp_customize->add_control('show_cart_count', array( 'section' => 'tg_woo__theme_colors', 'label' => 'Show cart counter', 'type' => 'checkbox' ) ); } function tg_customizer_head_styles() { $cart_color = get_theme_mod( 'cart_color' ); if ( $cart_color != '#444444' ) : ?> add_section( 'tg_layout', array( 'title' => __( 'Site Layout', 'themesgenerator' ), 'priority' => 100, ) ); function sanitize_float( $input ) { return filter_var($input, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); } /*content_min_height*/ $wp_customize->add_setting( 'content_min_height', array( 'default' => '575', 'sanitize_callback' => 'sanitize_float', ) ); $wp_customize->add_control( 'content_min_height', array( 'label' => 'Content minimum height (px)', 'section' => 'tg_layout', 'type' => 'number', 'input_attrs' => array( 'min' => '0', 'step' => '1', 'max' => '10000', ), ) ); /*content_max_width*/ $wp_customize->add_setting( 'content_max_width', array( 'default' => '1400', 'sanitize_callback' => 'sanitize_float', ) ); $wp_customize->add_control( 'content_max_width', array( 'label' => 'Content maximum width (px)', 'section' => 'tg_layout', 'type' => 'number', 'input_attrs' => array( 'min' => '0', 'step' => '1', 'max' => '10000', ), ) ); /*footer_widgets_sect_max_width*/ $wp_customize->add_setting( 'footer_widgets_sect_max_width', array( 'default' => '1280', 'sanitize_callback' => 'sanitize_float', ) ); $wp_customize->add_control( 'footer_widgets_sect_max_width', array( 'label' => 'Footer widgets area max width (px)', 'section' => 'tg_layout', 'type' => 'number', 'input_attrs' => array( 'min' => '0', 'step' => '1', 'max' => '10000', ), ) ); /*footer_widgets_padding_leftright*/ $wp_customize->add_setting( 'footer_widgets_padding_leftright', array( 'default' => '30', 'sanitize_callback' => 'sanitize_float', ) ); $wp_customize->add_control( 'footer_widgets_padding_leftright', array( 'label' => 'Footer widgets left/right padding (px)', 'section' => 'tg_layout', 'type' => 'number', 'input_attrs' => array( 'min' => '0', 'step' => '1', 'max' => '10000', ), ) ); /*footer_widgets_padding_topbottom*/ $wp_customize->add_setting( 'footer_widgets_padding_topbottom', array( 'default' => '35', 'sanitize_callback' => 'sanitize_float', ) ); $wp_customize->add_control( 'footer_widgets_padding_topbottom', array( 'label' => 'Footer widgets top/bott padding (px)', 'section' => 'tg_layout', 'type' => 'number', 'input_attrs' => array( 'min' => '0', 'step' => '1', 'max' => '10000', ), ) ); /*show_full_width_footer_widgets*/ $wp_customize->add_setting( 'show_full_width_footer_widgets', array( 'default' => false, 'capability' => 'edit_theme_options',"sanitize_callback" => "theme_slug_sanitize_checkbox" ) ); $wp_customize->add_control('show_full_width_footer_widgets', array( 'section' => 'tg_layout', 'label' => 'Full width footer widgets', 'type' => 'checkbox' ) ); /*show_posts_sidebar*/ $wp_customize->add_setting( 'show_posts_sidebar', array( 'default' => false, 'capability' => 'edit_theme_options',"sanitize_callback" => "theme_slug_sanitize_checkbox" ) ); $wp_customize->add_control('show_posts_sidebar', array( 'section' => 'tg_layout', 'label' => 'Sidebar in blog & WooCommerce', 'type' => 'checkbox' ) ); /*menu_footer_widgets_background*/ require_once( dirname( __FILE__ ) . '/inc/alpha-color-picker.php' ); $wp_customize->add_setting( 'footer_widgets_background', array( 'default' => 'rgba(238,238,238,1)', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new Customize_Alpha_Color_Control( $wp_customize, 'footer_widgets_background', array( 'label' => 'Footer widgets area background', 'section' => 'tg_layout', 'settings' => 'footer_widgets_background', 'show_opacity' => true, // Optional. 'palette' => array( 'rgb(150, 50, 220)', // RGB, RGBa, and hex values supported 'rgba(50,50,50,0.8)', 'rgba( 255, 255, 255, 0.2 )', // Different spacing = no problem '#00CC99' // Mix of color types = no problem ) ) ) ); } function tg_sitelayout_head_styles() { $content_min_height = get_theme_mod( 'content_min_height' ); if ( $content_min_height != '575' ) : ?> 'Themes Generator', 'Howdy, %1$s' => 'Greetings, %1$s!', // Add some more strings here ); // See if the current string is in the $strings array // If so, replace it's translation if ( isset( $strings[$original] ) ) { // This accomplishes the same thing as __() // but without running it through the filter again $translations = &get_translations_for_domain( $domain ); $translated = $translations->translate( $strings[$original] ); } return $translated; } add_filter( 'gettext', 'youruniqueprefix_filter_gettext', 10, 3 ); /**************************/ /*Menu customizer */ /************************/ add_action( "customize_register", "themesgenchild_register_theme_customizer_sitemenu"); function themesgenchild_register_theme_customizer_sitemenu( $wp_customize ) { $wp_customize->add_section( 'tg_menustyles', array( 'title' => __( 'Menu Styles', 'themesgenerator' ), 'priority' => 100, ) ); /*menu_text_color*/ $wp_customize->add_setting( 'menu_text_color', array( 'default' => '',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_text_color', array( 'label' => 'Text', 'section' => 'tg_menustyles', 'settings' => 'menu_text_color', ) ) ); /*menu_text_background*/ require_once( dirname( __FILE__ ) . '/inc/alpha-color-picker.php' ); $wp_customize->add_setting( 'menu_text_background', array( 'default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new Customize_Alpha_Color_Control( $wp_customize, 'menu_text_background', array( 'label' => 'Text Background', 'section' => 'tg_menustyles', 'settings' => 'menu_text_background', 'show_opacity' => true, // Optional. 'palette' => array( 'rgb(150, 50, 220)', // RGB, RGBa, and hex values supported 'rgba(50,50,50,0.8)', 'rgba( 255, 255, 255, 0.2 )', // Different spacing = no problem '#00CC99' // Mix of color types = no problem ) ) ) ); /*menu_navbar_background*/ require_once( dirname( __FILE__ ) . '/inc/alpha-color-picker.php' ); $wp_customize->add_setting( 'menu_navbar_background', array( 'default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh',"sanitize_callback" => "esc_attr" ) ); $wp_customize->add_control( new Customize_Alpha_Color_Control( $wp_customize, 'menu_navbar_background', array( 'label' => 'Navbar Background', 'section' => 'tg_menustyles', 'settings' => 'menu_navbar_background', 'show_opacity' => true, // Optional. 'palette' => array( 'rgb(150, 50, 220)', // RGB, RGBa, and hex values supported 'rgba(50,50,50,0.8)', 'rgba( 255, 255, 255, 0.2 )', // Different spacing = no problem '#00CC99' // Mix of color types = no problem ) ) ) ); /*random_boolean*/ /* $wp_customize->add_setting( 'random_boolean', array( 'default' => false, 'capability' => 'edit_theme_options' ) ); $wp_customize->add_control('random_boolean', array( 'section' => 'tg_menustyles', 'label' => 'Sidebar in blog & WooCommerce', 'type' => 'checkbox' ) ); */ } function tg_sitemenu_head_styles() { $menu_text_color = get_theme_mod( 'menu_text_color' ); if ( $menu_text_color != 'inherit' ) : ?> add_panel( "text_blocks", array( "priority" => 69, "theme_supports" => "", "title" => __( "Text Blocks", "themesgenerator" ), "description" => __( "Set editable text for certain content.", "themesgenerator" ),)); function sanitize_text( $text ) { $allowed_html = array("br" => array(),"a" => array(),); return wp_kses( $text, $allowed_html ); } $wp_customize->add_section( "customtgtext-1" , array("title" => __("Change Text 1","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-1", array( "default" => __( "RESPONSIVE THEME FOR WORDPRESS ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-1", array( "label" => __( "Text 1", "themesgenerator" ), "section" => "customtgtext-1", "settings" => "tgtext-1", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-1", array("selector" => "#tgtext-1",)); $wp_customize->add_section( "customtgtext-2" , array("title" => __("Change Text 2","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-2", array( "default" => __( "100% RESPONSIVE, MODERN & CLEAN DESIGN", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-2", array( "label" => __( "Text 2", "themesgenerator" ), "section" => "customtgtext-2", "settings" => "tgtext-2", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-2", array("selector" => "#tgtext-2",)); $wp_customize->add_section( "customtgtext-3" , array("title" => __("Change Text 3","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-3", array( "default" => __( "Read more", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-3", array( "label" => __( "Text 3", "themesgenerator" ), "section" => "customtgtext-3", "settings" => "tgtext-3", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-3", array("selector" => "#tgtext-3",)); $wp_customize->add_section( "customtgtext-4" , array("title" => __("Change Text 4","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-4", array( "default" => __( "ABOUT US", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-4", array( "label" => __( "Text 4", "themesgenerator" ), "section" => "customtgtext-4", "settings" => "tgtext-4", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-4", array("selector" => "#tgtext-4",)); $wp_customize->add_section( "customtgtext-5" , array("title" => __("Change Text 5","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-5", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-5", array( "label" => __( "Text 5", "themesgenerator" ), "section" => "customtgtext-5", "settings" => "tgtext-5", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-5", array("selector" => "#tgtext-5",)); $wp_customize->add_section( "customtgtext-6" , array("title" => __("Change Text 6","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-6", array( "default" => __( "SOME HAPPY CLIENTS", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-6", array( "label" => __( "Text 6", "themesgenerator" ), "section" => "customtgtext-6", "settings" => "tgtext-6", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-6", array("selector" => "#tgtext-6",)); $wp_customize->add_section( "customtgtext-7" , array("title" => __("Change Text 7","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-7", array( "default" => __( "WHAT WE DO", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-7", array( "label" => __( "Text 7", "themesgenerator" ), "section" => "customtgtext-7", "settings" => "tgtext-7", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-7", array("selector" => "#tgtext-7",)); $wp_customize->add_section( "customtgtext-8" , array("title" => __("Change Text 8","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-8", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-8", array( "label" => __( "Text 8", "themesgenerator" ), "section" => "customtgtext-8", "settings" => "tgtext-8", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-8", array("selector" => "#tgtext-8",)); $wp_customize->add_section( "customtgtext-9" , array("title" => __("Change Text 9","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-9", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-9", array( "label" => __( "Text 9", "themesgenerator" ), "section" => "customtgtext-9", "settings" => "tgtext-9", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-9", array("selector" => "#tgtext-9",)); $wp_customize->add_section( "customtgtext-10" , array("title" => __("Change Text 10","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-10", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-10", array( "label" => __( "Text 10", "themesgenerator" ), "section" => "customtgtext-10", "settings" => "tgtext-10", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-10", array("selector" => "#tgtext-10",)); $wp_customize->add_section( "customtgtext-11" , array("title" => __("Change Text 11","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-11", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-11", array( "label" => __( "Text 11", "themesgenerator" ), "section" => "customtgtext-11", "settings" => "tgtext-11", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-11", array("selector" => "#tgtext-11",)); $wp_customize->add_section( "customtgtext-12" , array("title" => __("Change Text 12","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-12", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-12", array( "label" => __( "Text 12", "themesgenerator" ), "section" => "customtgtext-12", "settings" => "tgtext-12", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-12", array("selector" => "#tgtext-12",)); $wp_customize->add_section( "customtgtext-13" , array("title" => __("Change Text 13","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-13", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-13", array( "label" => __( "Text 13", "themesgenerator" ), "section" => "customtgtext-13", "settings" => "tgtext-13", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-13", array("selector" => "#tgtext-13",)); $wp_customize->add_section( "customtgtext-14" , array("title" => __("Change Text 14","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-14", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-14", array( "label" => __( "Text 14", "themesgenerator" ), "section" => "customtgtext-14", "settings" => "tgtext-14", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-14", array("selector" => "#tgtext-14",)); $wp_customize->add_section( "customtgtext-15" , array("title" => __("Change Text 15","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-15", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-15", array( "label" => __( "Text 15", "themesgenerator" ), "section" => "customtgtext-15", "settings" => "tgtext-15", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-15", array("selector" => "#tgtext-15",)); $wp_customize->add_section( "customtgtext-16" , array("title" => __("Change Text 16","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-16", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-16", array( "label" => __( "Text 16", "themesgenerator" ), "section" => "customtgtext-16", "settings" => "tgtext-16", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-16", array("selector" => "#tgtext-16",)); $wp_customize->add_section( "customtgtext-17" , array("title" => __("Change Text 17","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-17", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-17", array( "label" => __( "Text 17", "themesgenerator" ), "section" => "customtgtext-17", "settings" => "tgtext-17", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-17", array("selector" => "#tgtext-17",)); $wp_customize->add_section( "customtgtext-18" , array("title" => __("Change Text 18","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-18", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-18", array( "label" => __( "Text 18", "themesgenerator" ), "section" => "customtgtext-18", "settings" => "tgtext-18", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-18", array("selector" => "#tgtext-18",)); $wp_customize->add_section( "customtgtext-19" , array("title" => __("Change Text 19","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-19", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-19", array( "label" => __( "Text 19", "themesgenerator" ), "section" => "customtgtext-19", "settings" => "tgtext-19", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-19", array("selector" => "#tgtext-19",)); $wp_customize->add_section( "customtgtext-20" , array("title" => __("Change Text 20","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-20", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-20", array( "label" => __( "Text 20", "themesgenerator" ), "section" => "customtgtext-20", "settings" => "tgtext-20", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-20", array("selector" => "#tgtext-20",)); $wp_customize->add_section( "customtgtext-21" , array("title" => __("Change Text 21","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-21", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-21", array( "label" => __( "Text 21", "themesgenerator" ), "section" => "customtgtext-21", "settings" => "tgtext-21", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-21", array("selector" => "#tgtext-21",)); $wp_customize->add_section( "customtgtext-22" , array("title" => __("Change Text 22","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-22", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-22", array( "label" => __( "Text 22", "themesgenerator" ), "section" => "customtgtext-22", "settings" => "tgtext-22", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-22", array("selector" => "#tgtext-22",)); $wp_customize->add_section( "customtgtext-23" , array("title" => __("Change Text 23","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-23", array( "default" => __( "Our features", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-23", array( "label" => __( "Text 23", "themesgenerator" ), "section" => "customtgtext-23", "settings" => "tgtext-23", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-23", array("selector" => "#tgtext-23",)); $wp_customize->add_section( "customtgtext-24" , array("title" => __("Change Text 24","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-24", array( "default" => __( "Duis aute irure dolor ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-24", array( "label" => __( "Text 24", "themesgenerator" ), "section" => "customtgtext-24", "settings" => "tgtext-24", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-24", array("selector" => "#tgtext-24",)); $wp_customize->add_section( "customtgtext-25" , array("title" => __("Change Text 25","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-25", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-25", array( "label" => __( "Text 25", "themesgenerator" ), "section" => "customtgtext-25", "settings" => "tgtext-25", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-25", array("selector" => "#tgtext-25",)); $wp_customize->add_section( "customtgtext-26" , array("title" => __("Change Text 26","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-26", array( "default" => __( "Download our free recipes here", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-26", array( "label" => __( "Text 26", "themesgenerator" ), "section" => "customtgtext-26", "settings" => "tgtext-26", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-26", array("selector" => "#tgtext-26",)); $wp_customize->add_section( "customtgtext-27" , array("title" => __("Change Text 27","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-27", array( "default" => __( "eBook", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-27", array( "label" => __( "Text 27", "themesgenerator" ), "section" => "customtgtext-27", "settings" => "tgtext-27", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-27", array("selector" => "#tgtext-27",)); $wp_customize->add_section( "customtgtext-28" , array("title" => __("Change Text 28","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-28", array( "default" => __( "OUR STAFF", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-28", array( "label" => __( "Text 28", "themesgenerator" ), "section" => "customtgtext-28", "settings" => "tgtext-28", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-28", array("selector" => "#tgtext-28",)); $wp_customize->add_section( "customtgtext-29" , array("title" => __("Change Text 29","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-29", array( "default" => __( "Rebel Alley", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-29", array( "label" => __( "Text 29", "themesgenerator" ), "section" => "customtgtext-29", "settings" => "tgtext-29", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-29", array("selector" => "#tgtext-29",)); $wp_customize->add_section( "customtgtext-30" , array("title" => __("Change Text 30","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-30", array( "default" => __( "Chef", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-30", array( "label" => __( "Text 30", "themesgenerator" ), "section" => "customtgtext-30", "settings" => "tgtext-30", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-30", array("selector" => "#tgtext-30",)); $wp_customize->add_section( "customtgtext-31" , array("title" => __("Change Text 31","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-31", array( "default" => __( "Tobias Fünke", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-31", array( "label" => __( "Text 31", "themesgenerator" ), "section" => "customtgtext-31", "settings" => "tgtext-31", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-31", array("selector" => "#tgtext-31",)); $wp_customize->add_section( "customtgtext-32" , array("title" => __("Change Text 32","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-32", array( "default" => __( "Baker", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-32", array( "label" => __( "Text 32", "themesgenerator" ), "section" => "customtgtext-32", "settings" => "tgtext-32", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-32", array("selector" => "#tgtext-32",)); $wp_customize->add_section( "customtgtext-33" , array("title" => __("Change Text 33","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-33", array( "default" => __( "Lucille Austero", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-33", array( "label" => __( "Text 33", "themesgenerator" ), "section" => "customtgtext-33", "settings" => "tgtext-33", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-33", array("selector" => "#tgtext-33",)); $wp_customize->add_section( "customtgtext-34" , array("title" => __("Change Text 34","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-34", array( "default" => __( "Assistant Chef", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-34", array( "label" => __( "Text 34", "themesgenerator" ), "section" => "customtgtext-34", "settings" => "tgtext-34", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-34", array("selector" => "#tgtext-34",)); $wp_customize->add_section( "customtgtext-35" , array("title" => __("Change Text 35","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-35", array( "default" => __( "Buster Bluth", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-35", array( "label" => __( "Text 35", "themesgenerator" ), "section" => "customtgtext-35", "settings" => "tgtext-35", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-35", array("selector" => "#tgtext-35",)); $wp_customize->add_section( "customtgtext-36" , array("title" => __("Change Text 36","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-36", array( "default" => __( "Manager", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-36", array( "label" => __( "Text 36", "themesgenerator" ), "section" => "customtgtext-36", "settings" => "tgtext-36", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-36", array("selector" => "#tgtext-36",)); $wp_customize->add_section( "customtgtext-37" , array("title" => __("Change Text 37","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-37", array( "default" => __( "Maebe Fünke", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-37", array( "label" => __( "Text 37", "themesgenerator" ), "section" => "customtgtext-37", "settings" => "tgtext-37", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-37", array("selector" => "#tgtext-37",)); $wp_customize->add_section( "customtgtext-38" , array("title" => __("Change Text 38","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-38", array( "default" => __( "Barista", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-38", array( "label" => __( "Text 38", "themesgenerator" ), "section" => "customtgtext-38", "settings" => "tgtext-38", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-38", array("selector" => "#tgtext-38",)); $wp_customize->add_section( "customtgtext-39" , array("title" => __("Change Text 39","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-39", array( "default" => __( "Barry Zuckerkorn", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-39", array( "label" => __( "Text 39", "themesgenerator" ), "section" => "customtgtext-39", "settings" => "tgtext-39", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-39", array("selector" => "#tgtext-39",)); $wp_customize->add_section( "customtgtext-40" , array("title" => __("Change Text 40","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-40", array( "default" => __( "Mixologist", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-40", array( "label" => __( "Text 40", "themesgenerator" ), "section" => "customtgtext-40", "settings" => "tgtext-40", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-40", array("selector" => "#tgtext-40",)); $wp_customize->add_section( "customtgtext-41" , array("title" => __("Change Text 41","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-41", array( "default" => __( "DON'T BE A STRANGER", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-41", array( "label" => __( "Text 41", "themesgenerator" ), "section" => "customtgtext-41", "settings" => "tgtext-41", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-41", array("selector" => "#tgtext-41",)); $wp_customize->add_section( "customtgtext-42" , array("title" => __("Change Text 42","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-42", array( "default" => __( "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-42", array( "label" => __( "Text 42", "themesgenerator" ), "section" => "customtgtext-42", "settings" => "tgtext-42", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-42", array("selector" => "#tgtext-42",)); $wp_customize->add_section( "customtgtext-43" , array("title" => __("Change Text 43","themesgenerator"), "panel" => "text_blocks","priority" => 19) ); $wp_customize->add_setting( "tgtext-43", array( "default" => __( "© 2018 ALL RIGHTS RESERVED", "themesgenerator" ), "sanitize_callback" => "sanitize_text" ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "customtgtext-43", array( "label" => __( "Text 43", "themesgenerator" ), "section" => "customtgtext-43", "settings" => "tgtext-43", "type" => "text" ) )); $wp_customize->selective_refresh->add_partial("tgtext-43", array("selector" => "#tgtext-43",)); } add_action( "customize_register", "themegenchild_register_theme_customizer2" ); function themegenchild_register_theme_customizer2( $wp_customize ) { $wp_customize->add_panel( "featured_images", array("priority" => 70, "theme_supports" => "","title" => __( "Images", "themesgenerator" ), "description" => __( "Set images", "themesgenerator" ), ) ); $wp_customize->add_section( "customtgimg-1" , array("title" => __("Change Image 1","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-1", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/kitchen-8db.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-1", array( "label" => __( "Image 1", "themesgenerator" ), "section" => "customtgimg-1", "settings" => "tgimg-1" ) )); $wp_customize->selective_refresh->add_partial("tgimg-1", array("selector" => "#tgimg-1",)); $wp_customize->add_section( "customtgimg-2" , array("title" => __("Change Image 2","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-2", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/ng-logo-838.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-2", array( "label" => __( "Image 2", "themesgenerator" ), "section" => "customtgimg-2", "settings" => "tgimg-2" ) )); $wp_customize->selective_refresh->add_partial("tgimg-2", array("selector" => "#tgimg-2",)); $wp_customize->add_section( "customtgimg-3" , array("title" => __("Change Image 3","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-3", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/apple-logo-b56.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-3", array( "label" => __( "Image 3", "themesgenerator" ), "section" => "customtgimg-3", "settings" => "tgimg-3" ) )); $wp_customize->selective_refresh->add_partial("tgimg-3", array("selector" => "#tgimg-3",)); $wp_customize->add_section( "customtgimg-4" , array("title" => __("Change Image 4","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-4", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/netflix-logo-e1f.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-4", array( "label" => __( "Image 4", "themesgenerator" ), "section" => "customtgimg-4", "settings" => "tgimg-4" ) )); $wp_customize->selective_refresh->add_partial("tgimg-4", array("selector" => "#tgimg-4",)); $wp_customize->add_section( "customtgimg-5" , array("title" => __("Change Image 5","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-5", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/amazon-logo-454.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-5", array( "label" => __( "Image 5", "themesgenerator" ), "section" => "customtgimg-5", "settings" => "tgimg-5" ) )); $wp_customize->selective_refresh->add_partial("tgimg-5", array("selector" => "#tgimg-5",)); $wp_customize->add_section( "customtgimg-6" , array("title" => __("Change Image 6","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-6", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/tag-1cb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-6", array( "label" => __( "Image 6", "themesgenerator" ), "section" => "customtgimg-6", "settings" => "tgimg-6" ) )); $wp_customize->selective_refresh->add_partial("tgimg-6", array("selector" => "#tgimg-6",)); $wp_customize->add_section( "customtgimg-7" , array("title" => __("Change Image 7","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-7", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/battery-512.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-7", array( "label" => __( "Image 7", "themesgenerator" ), "section" => "customtgimg-7", "settings" => "tgimg-7" ) )); $wp_customize->selective_refresh->add_partial("tgimg-7", array("selector" => "#tgimg-7",)); $wp_customize->add_section( "customtgimg-8" , array("title" => __("Change Image 8","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-8", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/computer-3eb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-8", array( "label" => __( "Image 8", "themesgenerator" ), "section" => "customtgimg-8", "settings" => "tgimg-8" ) )); $wp_customize->selective_refresh->add_partial("tgimg-8", array("selector" => "#tgimg-8",)); $wp_customize->add_section( "customtgimg-9" , array("title" => __("Change Image 9","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-9", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/eye-603.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-9", array( "label" => __( "Image 9", "themesgenerator" ), "section" => "customtgimg-9", "settings" => "tgimg-9" ) )); $wp_customize->selective_refresh->add_partial("tgimg-9", array("selector" => "#tgimg-9",)); $wp_customize->add_section( "customtgimg-10" , array("title" => __("Change Image 10","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-10", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/radio-09f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-10", array( "label" => __( "Image 10", "themesgenerator" ), "section" => "customtgimg-10", "settings" => "tgimg-10" ) )); $wp_customize->selective_refresh->add_partial("tgimg-10", array("selector" => "#tgimg-10",)); $wp_customize->add_section( "customtgimg-11" , array("title" => __("Change Image 11","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-11", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/song-e9f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-11", array( "label" => __( "Image 11", "themesgenerator" ), "section" => "customtgimg-11", "settings" => "tgimg-11" ) )); $wp_customize->selective_refresh->add_partial("tgimg-11", array("selector" => "#tgimg-11",)); $wp_customize->add_section( "customtgimg-12" , array("title" => __("Change Image 12","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-12", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff1-b58.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-12", array( "label" => __( "Image 12", "themesgenerator" ), "section" => "customtgimg-12", "settings" => "tgimg-12" ) )); $wp_customize->selective_refresh->add_partial("tgimg-12", array("selector" => "#tgimg-12",)); $wp_customize->add_section( "customtgimg-13" , array("title" => __("Change Image 13","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-13", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-13", array( "label" => __( "Image 13", "themesgenerator" ), "section" => "customtgimg-13", "settings" => "tgimg-13" ) )); $wp_customize->selective_refresh->add_partial("tgimg-13", array("selector" => "#tgimg-13",)); $wp_customize->add_section( "customtgimg-14" , array("title" => __("Change Image 14","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-14", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-14", array( "label" => __( "Image 14", "themesgenerator" ), "section" => "customtgimg-14", "settings" => "tgimg-14" ) )); $wp_customize->selective_refresh->add_partial("tgimg-14", array("selector" => "#tgimg-14",)); $wp_customize->add_section( "customtgimg-15" , array("title" => __("Change Image 15","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-15", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-15", array( "label" => __( "Image 15", "themesgenerator" ), "section" => "customtgimg-15", "settings" => "tgimg-15" ) )); $wp_customize->selective_refresh->add_partial("tgimg-15", array("selector" => "#tgimg-15",)); $wp_customize->add_section( "customtgimg-16" , array("title" => __("Change Image 16","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-16", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-16", array( "label" => __( "Image 16", "themesgenerator" ), "section" => "customtgimg-16", "settings" => "tgimg-16" ) )); $wp_customize->selective_refresh->add_partial("tgimg-16", array("selector" => "#tgimg-16",)); $wp_customize->add_section( "customtgimg-17" , array("title" => __("Change Image 17","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-17", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff3-191.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-17", array( "label" => __( "Image 17", "themesgenerator" ), "section" => "customtgimg-17", "settings" => "tgimg-17" ) )); $wp_customize->selective_refresh->add_partial("tgimg-17", array("selector" => "#tgimg-17",)); $wp_customize->add_section( "customtgimg-18" , array("title" => __("Change Image 18","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-18", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-18", array( "label" => __( "Image 18", "themesgenerator" ), "section" => "customtgimg-18", "settings" => "tgimg-18" ) )); $wp_customize->selective_refresh->add_partial("tgimg-18", array("selector" => "#tgimg-18",)); $wp_customize->add_section( "customtgimg-19" , array("title" => __("Change Image 19","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-19", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-19", array( "label" => __( "Image 19", "themesgenerator" ), "section" => "customtgimg-19", "settings" => "tgimg-19" ) )); $wp_customize->selective_refresh->add_partial("tgimg-19", array("selector" => "#tgimg-19",)); $wp_customize->add_section( "customtgimg-20" , array("title" => __("Change Image 20","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-20", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-20", array( "label" => __( "Image 20", "themesgenerator" ), "section" => "customtgimg-20", "settings" => "tgimg-20" ) )); $wp_customize->selective_refresh->add_partial("tgimg-20", array("selector" => "#tgimg-20",)); $wp_customize->add_section( "customtgimg-21" , array("title" => __("Change Image 21","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-21", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-21", array( "label" => __( "Image 21", "themesgenerator" ), "section" => "customtgimg-21", "settings" => "tgimg-21" ) )); $wp_customize->selective_refresh->add_partial("tgimg-21", array("selector" => "#tgimg-21",)); $wp_customize->add_section( "customtgimg-22" , array("title" => __("Change Image 22","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-22", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff4-9c1.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-22", array( "label" => __( "Image 22", "themesgenerator" ), "section" => "customtgimg-22", "settings" => "tgimg-22" ) )); $wp_customize->selective_refresh->add_partial("tgimg-22", array("selector" => "#tgimg-22",)); $wp_customize->add_section( "customtgimg-23" , array("title" => __("Change Image 23","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-23", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-23", array( "label" => __( "Image 23", "themesgenerator" ), "section" => "customtgimg-23", "settings" => "tgimg-23" ) )); $wp_customize->selective_refresh->add_partial("tgimg-23", array("selector" => "#tgimg-23",)); $wp_customize->add_section( "customtgimg-24" , array("title" => __("Change Image 24","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-24", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-24", array( "label" => __( "Image 24", "themesgenerator" ), "section" => "customtgimg-24", "settings" => "tgimg-24" ) )); $wp_customize->selective_refresh->add_partial("tgimg-24", array("selector" => "#tgimg-24",)); $wp_customize->add_section( "customtgimg-25" , array("title" => __("Change Image 25","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-25", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-25", array( "label" => __( "Image 25", "themesgenerator" ), "section" => "customtgimg-25", "settings" => "tgimg-25" ) )); $wp_customize->selective_refresh->add_partial("tgimg-25", array("selector" => "#tgimg-25",)); $wp_customize->add_section( "customtgimg-26" , array("title" => __("Change Image 26","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-26", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-26", array( "label" => __( "Image 26", "themesgenerator" ), "section" => "customtgimg-26", "settings" => "tgimg-26" ) )); $wp_customize->selective_refresh->add_partial("tgimg-26", array("selector" => "#tgimg-26",)); $wp_customize->add_section( "customtgimg-27" , array("title" => __("Change Image 27","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-27", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff5-3c1.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-27", array( "label" => __( "Image 27", "themesgenerator" ), "section" => "customtgimg-27", "settings" => "tgimg-27" ) )); $wp_customize->selective_refresh->add_partial("tgimg-27", array("selector" => "#tgimg-27",)); $wp_customize->add_section( "customtgimg-28" , array("title" => __("Change Image 28","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-28", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-28", array( "label" => __( "Image 28", "themesgenerator" ), "section" => "customtgimg-28", "settings" => "tgimg-28" ) )); $wp_customize->selective_refresh->add_partial("tgimg-28", array("selector" => "#tgimg-28",)); $wp_customize->add_section( "customtgimg-29" , array("title" => __("Change Image 29","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-29", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-29", array( "label" => __( "Image 29", "themesgenerator" ), "section" => "customtgimg-29", "settings" => "tgimg-29" ) )); $wp_customize->selective_refresh->add_partial("tgimg-29", array("selector" => "#tgimg-29",)); $wp_customize->add_section( "customtgimg-30" , array("title" => __("Change Image 30","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-30", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-30", array( "label" => __( "Image 30", "themesgenerator" ), "section" => "customtgimg-30", "settings" => "tgimg-30" ) )); $wp_customize->selective_refresh->add_partial("tgimg-30", array("selector" => "#tgimg-30",)); $wp_customize->add_section( "customtgimg-31" , array("title" => __("Change Image 31","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-31", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-31", array( "label" => __( "Image 31", "themesgenerator" ), "section" => "customtgimg-31", "settings" => "tgimg-31" ) )); $wp_customize->selective_refresh->add_partial("tgimg-31", array("selector" => "#tgimg-31",)); $wp_customize->add_section( "customtgimg-32" , array("title" => __("Change Image 32","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-32", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff6-54f.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-32", array( "label" => __( "Image 32", "themesgenerator" ), "section" => "customtgimg-32", "settings" => "tgimg-32" ) )); $wp_customize->selective_refresh->add_partial("tgimg-32", array("selector" => "#tgimg-32",)); $wp_customize->add_section( "customtgimg-33" , array("title" => __("Change Image 33","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-33", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-33", array( "label" => __( "Image 33", "themesgenerator" ), "section" => "customtgimg-33", "settings" => "tgimg-33" ) )); $wp_customize->selective_refresh->add_partial("tgimg-33", array("selector" => "#tgimg-33",)); $wp_customize->add_section( "customtgimg-34" , array("title" => __("Change Image 34","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-34", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-34", array( "label" => __( "Image 34", "themesgenerator" ), "section" => "customtgimg-34", "settings" => "tgimg-34" ) )); $wp_customize->selective_refresh->add_partial("tgimg-34", array("selector" => "#tgimg-34",)); $wp_customize->add_section( "customtgimg-35" , array("title" => __("Change Image 35","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-35", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-35", array( "label" => __( "Image 35", "themesgenerator" ), "section" => "customtgimg-35", "settings" => "tgimg-35" ) )); $wp_customize->selective_refresh->add_partial("tgimg-35", array("selector" => "#tgimg-35",)); $wp_customize->add_section( "customtgimg-36" , array("title" => __("Change Image 36","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-36", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-36", array( "label" => __( "Image 36", "themesgenerator" ), "section" => "customtgimg-36", "settings" => "tgimg-36" ) )); $wp_customize->selective_refresh->add_partial("tgimg-36", array("selector" => "#tgimg-36",)); $wp_customize->add_section( "customtgimg-37" , array("title" => __("Change Image 37","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-37", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/staff2-b3d.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-37", array( "label" => __( "Image 37", "themesgenerator" ), "section" => "customtgimg-37", "settings" => "tgimg-37" ) )); $wp_customize->selective_refresh->add_partial("tgimg-37", array("selector" => "#tgimg-37",)); $wp_customize->add_section( "customtgimg-38" , array("title" => __("Change Image 38","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-38", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/facebook-684.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-38", array( "label" => __( "Image 38", "themesgenerator" ), "section" => "customtgimg-38", "settings" => "tgimg-38" ) )); $wp_customize->selective_refresh->add_partial("tgimg-38", array("selector" => "#tgimg-38",)); $wp_customize->add_section( "customtgimg-39" , array("title" => __("Change Image 39","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-39", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/insta-5fb.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-39", array( "label" => __( "Image 39", "themesgenerator" ), "section" => "customtgimg-39", "settings" => "tgimg-39" ) )); $wp_customize->selective_refresh->add_partial("tgimg-39", array("selector" => "#tgimg-39",)); $wp_customize->add_section( "customtgimg-40" , array("title" => __("Change Image 40","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-40", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/twitter-b7f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-40", array( "label" => __( "Image 40", "themesgenerator" ), "section" => "customtgimg-40", "settings" => "tgimg-40" ) )); $wp_customize->selective_refresh->add_partial("tgimg-40", array("selector" => "#tgimg-40",)); $wp_customize->add_section( "customtgimg-41" , array("title" => __("Change Image 41","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-41", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/linkedin-372.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-41", array( "label" => __( "Image 41", "themesgenerator" ), "section" => "customtgimg-41", "settings" => "tgimg-41" ) )); $wp_customize->selective_refresh->add_partial("tgimg-41", array("selector" => "#tgimg-41",)); $wp_customize->add_section( "customtgimg-42" , array("title" => __("Change Image 42","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-42", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/Asset2-ac6.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-42", array( "label" => __( "Image 42", "themesgenerator" ), "section" => "customtgimg-42", "settings" => "tgimg-42" ) )); $wp_customize->selective_refresh->add_partial("tgimg-42", array("selector" => "#tgimg-42",)); $wp_customize->add_section( "customtgimg-43" , array("title" => __("Change Image 43","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-43", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/Asset1-97f.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-43", array( "label" => __( "Image 43", "themesgenerator" ), "section" => "customtgimg-43", "settings" => "tgimg-43" ) )); $wp_customize->selective_refresh->add_partial("tgimg-43", array("selector" => "#tgimg-43",)); $wp_customize->add_section( "customtgimg-44" , array("title" => __("Change Image 44","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-44", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/Asset4-1ac.svg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-44", array( "label" => __( "Image 44", "themesgenerator" ), "section" => "customtgimg-44", "settings" => "tgimg-44" ) )); $wp_customize->selective_refresh->add_partial("tgimg-44", array("selector" => "#tgimg-44",)); $wp_customize->add_section( "customtgimg-45" , array("title" => __("Change Image 45","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-45", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/autumn-logo-91f.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-45", array( "label" => __( "Image 45", "themesgenerator" ), "section" => "customtgimg-45", "settings" => "tgimg-45" ) )); $wp_customize->selective_refresh->add_partial("tgimg-45", array("selector" => "#tgimg-45",)); $wp_customize->add_section( "customtgimg-46" , array("title" => __("Change Image 46","themesgenerator"), "panel" => "featured_images","priority" => 20) ); $wp_customize->add_setting( "tgimg-46", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/autumn-logo.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgimg-46", array( "label" => __( "Image 46", "themesgenerator" ), "section" => "customtgimg-46", "settings" => "tgimg-46" ) )); $wp_customize->selective_refresh->add_partial("tgimg-46", array("selector" => "#tgimg-46",)); } add_action( "customize_register", "themegenchild_register_theme_customizer3" ); function themegenchild_register_theme_customizer3( $wp_customize ) { $wp_customize->add_panel( "featured_backgrounds", array("priority" => 70, "theme_supports" => "","title" => __( "Backgrounds", "themesgenerator" ), "description" => __( "Set background image.", "themesgenerator" ), ) ); $wp_customize->add_section( "customtgback-1" , array("title" => __("Change Image 1","themesgenerator"), "panel" => "featured_backgrounds","priority" => 20) ); $wp_customize->add_setting( "tgback-1", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/barista-580.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgback-1", array( "label" => __( "Image 1", "themesgenerator" ), "section" => "customtgback-1", "settings" => "tgback-1" ) )); $wp_customize->selective_refresh->add_partial("tgback-1", array("selector" => "#tgback-1",)); $wp_customize->add_section( "customtgback-2" , array("title" => __("Change Image 2","themesgenerator"), "panel" => "featured_backgrounds","priority" => 20) ); $wp_customize->add_setting( "tgback-2", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/dishes-0a7.jpg")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgback-2", array( "label" => __( "Image 2", "themesgenerator" ), "section" => "customtgback-2", "settings" => "tgback-2" ) )); $wp_customize->selective_refresh->add_partial("tgback-2", array("selector" => "#tgback-2",)); $wp_customize->add_section( "customtgback-3" , array("title" => __("Change Image 3","themesgenerator"), "panel" => "featured_backgrounds","priority" => 20) ); $wp_customize->add_setting( "tgback-3", array( "sanitize_callback" => "esc_attr", "default" => "".get_template_directory_uri()."/images/pattern2-e01.png")); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, "customtgback-3", array( "label" => __( "Image 3", "themesgenerator" ), "section" => "customtgback-3", "settings" => "tgback-3" ) )); $wp_customize->selective_refresh->add_partial("tgback-3", array("selector" => "#tgback-3",)); }function footer_script(){ ?>