' . wp_kses_post($title) . ''; } if (!empty($description)) { echo '

' . wp_kses_post($description) . '

'; } } function newstore_get_social_block() { $new_tab = get_theme_mod('themefarmer_social_new_tab', true); $socials = get_theme_mod('themefarmer_socials'); ?>
'; $fields['email'] = '
'; $fields['url'] = '
'; return $fields; } add_filter('comment_form_fields', 'newstore_comment_form_fields'); function newstore_comment_form_defaults($defaults) { if (class_exists('WooCommerce') && is_product()) { return $defaults; } $defaults['submit_field'] = '
%1$s %2$s
'; $defaults['comment_field'] = '
'; $defaults['title_reply_to'] = esc_html__('Post Your Reply Here To %s', 'newstore'); $defaults['class_submit'] = 'btn btn-theme'; $defaults['label_submit'] = esc_html__('SUBMIT COMMENT', 'newstore'); $defaults['class_form'] = esc_attr($defaults['class_form']) . ' row'; $defaults['title_reply'] = esc_html__('Leave A Comment', 'newstore'); $defaults['role_form'] = 'form'; return $defaults; } add_filter('comment_form_defaults', 'newstore_comment_form_defaults'); function newstore_comment($comment, $args, $depth) { // get theme data. global $comment_data; // translations. $leave_reply = $comment_data['translation_reply_to_coment'] ? $comment_data['translation_reply_to_coment'] : __('Reply', 'newstore');?>

' ' . $leave_reply, 'depth' => $depth, 'max_depth' => $args['max_depth'])))?> comment_approved == '0'): ?>
 
'Elementor Page Builder', 'slug' => 'elementor', 'required' => false, ), array( 'name' => 'ThemeFarmer Companion', 'slug' => 'themefarmer-companion', 'required' => false, ), array( 'name' => 'WooCommerce Tools', 'slug' => 'woo-tools', 'required' => false, ), array( 'name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false, ), array( 'name' => 'One Click Demo Import', 'slug' => 'one-click-demo-import', 'required' => false, ), array( 'name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false, ), ); /* * Array of configuration settings. Amend each line as needed. * * TGMPA will start providing localized text strings soon. If you already have translations of our standard * strings available, please help us make TGMPA even better by giving us access to these translations or by * sending in a pull-request with .po file(s) with the translations. * * Only uncomment the strings in the config array if you want to customize the strings. */ $config = array( 'id' => 'newstore', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa($plugins, $config); } add_action('tgmpa_register', 'newstore_register_required_plugins'); function newstore_nav_description( $item_output, $item, $depth, $args ) { if ( !empty( $item->description ) ) { $item_output = str_replace( $args->link_after . '', '' . $item->description . '' . $args->link_after . '', $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'newstore_nav_description', 50, 4 ); function newstore_add_custom_styles(){ $blog_content_width = get_theme_mod( 'newstore_blog_content_width', 70); $blog_content_width = absint( $blog_content_width ); $custom_css =""; if(!empty($blog_content_width) && $blog_content_width != 70){ $sidebar_width = 100 - $blog_content_width; $custom_css = " main#main.site-main:not(.wc-site-main){ -ms-flex: 0 0 {$blog_content_width}%; flex: 0 0 {$blog_content_width}%; max-width: {$blog_content_width}%; } aside#secondary.sidebar-widget-area.widget-area:not(.woocommerce-widget-area){ -ms-flex: 0 0 {$sidebar_width}%; flex: 0 0 {$sidebar_width}%; max-width: {$sidebar_width}%; } "; } $custom_css = apply_filters( 'newstore_inline_css', $custom_css); wp_add_inline_style( 'newstore-style', $custom_css); } add_action('wp_enqueue_scripts', 'newstore_add_custom_styles', 31); function newstore_blog_layout() { if (is_page_template()) { return; } if (is_page()) { $layout = get_theme_mod('newstore_blog_single_page_layout', 'right'); } elseif (is_single()) { $layout = get_theme_mod('newstore_blog_single_post_layout', 'right'); } else { $layout = get_theme_mod('newstore_blog_post_index_layout', 'right'); } return $layout_class = ($layout == 'full')?'full-width':(($layout == 'left')?'order-last':'order-first'); } function newstore_blog_widget_layout() { if (is_page_template()) { return; } if (is_page()) { $layout = get_theme_mod('newstore_blog_single_page_layout', 'right'); } elseif (is_single()) { $layout = get_theme_mod('newstore_blog_single_post_layout', 'right'); } else { $layout = get_theme_mod('newstore_blog_post_index_layout', 'right'); } return $layout_class = ($layout == 'full')?'full-width':(($layout == 'left')?'order-first':'order-last'); } function newstore_inline_css_more($custom_css){ $container_width = absint( get_theme_mod( 'newstore_site_content_width', 1340 ) ); $container_width_md = $container_width -200; if(1340 != $container_width){ $custom_css.=" @media (min-width:1200px){ .container{ max-width:{$container_width_md}px !important; } } @media (min-width:1400px){ .container{ max-width:{$container_width}px !important; } }"; } $theme_primary_color = esc_attr( get_theme_mod( 'newstore_theme_primary_color', false ) ); $theme_link_color = esc_attr( get_theme_mod( 'newstore_theme_link_color', false ) ); $theme_link_hover_color = esc_attr( get_theme_mod( 'newstore_theme_link_hover_color', false ) ); $theme_post_title_color = esc_attr( get_theme_mod( 'newstore_theme_post_title_color', false ) ); $theme_post_title_hover_color = esc_attr( get_theme_mod( 'newstore_theme_post_title_hover_color', false ) ); $theme_post_meta_color = esc_attr( get_theme_mod( 'newstore_theme_post_meta_color', false ) ); $theme_post_meta_hover_color = esc_attr( get_theme_mod( 'newstore_theme_post_meta_hover_color', false ) ); if(!empty($theme_primary_color)){ $custom_css.=" a, a:hover, a:focus { color: $theme_primary_color; } a:hover { color: $theme_primary_color; } .btn-theme-border { border: 1px solid $theme_primary_color; } .widget ul li:hover a, .widget ul li:hover:before { color: $theme_primary_color; } .calendar_wrap caption { background-color: $theme_primary_color; } .calendar_wrap tfoot td:hover, .calendar_wrap tfoot td:hover a, .calendar_wrap tbody td:hover { color: $theme_primary_color; } .calendar_wrap td a:hover { color: $theme_primary_color; } .cart-link-contents span.count, .wishlist-link-contents span.count { background-color: $theme_primary_color; } .entry-title.post-title a:hover { color: $theme_primary_color; } .post-meta-item:hover i, .post-meta-item:hover a { color: $theme_primary_color; } .woocommerce-page div.product div.summary a.button.add_to_wishlist { background-color: $theme_primary_color; } .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button { background-color: $theme_primary_color; } .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background-color: $theme_primary_color; } .woocommerce #respond input#submit.disabled:hover, .woocommerce #respond input#submit:disabled:hover, .woocommerce #respond input#submit:disabled[disabled]:hover, .woocommerce a.button.disabled:hover, .woocommerce a.button:disabled:hover, .woocommerce a.button:disabled[disabled]:hover, .woocommerce button.button.disabled:hover, .woocommerce button.button:disabled:hover, .woocommerce button.button:disabled[disabled]:hover, .woocommerce input.button.disabled:hover, .woocommerce input.button:disabled:hover, .woocommerce input.button:disabled[disabled]:hover { background-color: $theme_primary_color; } #scroll-top { background-color: {$theme_primary_color}9c; border: 1px solid $theme_primary_color; } .product-van-heading { background-color: $theme_primary_color; } .btn-main-slide { background-color: $theme_primary_color; } .woocommerce ul.products li.product .onsale, .woocommerce span.onsale{background-color: $theme_primary_color;} "; } if(!empty($theme_link_color)){ $custom_css.=" a{ color: $theme_link_color; } "; } if(!empty($theme_link_hover_color)){ $custom_css.=" a:hover, a:focus { color: $theme_link_hover_color; } "; } if(!empty($theme_post_title_color)){ $custom_css.=" .entry-title.post-title a { color: $theme_post_title_color !important; } "; } if(!empty($theme_post_title_hover_color)){ $custom_css.=" .entry-title.post-title a:hover { color: $theme_post_title_hover_color !important; } "; } if(!empty($theme_post_meta_color)){ $custom_css.=" .post-meta-item i, .post-meta-item a { color: $theme_post_meta_color !important; } "; } if(!empty($theme_post_meta_hover_color)){ $custom_css.=" .post-meta-item:hover i, .post-meta-item:hover a { color: $theme_post_meta_hover_color !important; } "; } return $custom_css; } add_filter( 'newstore_inline_css', 'newstore_inline_css_more');