' . 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'); }