esc_html__( 'Main menu', 'elemento-business' ), )); add_theme_support( 'responsive-embeds' ); add_theme_support( 'woocommerce' ); add_theme_support( 'align-wide' ); add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); add_theme_support( 'wp-block-styles' ); add_theme_support('post-thumbnails'); add_theme_support( 'custom-background', array( 'default-color' => 'f3f3f3' )); add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 70, ) ); add_theme_support( 'custom-header', array( 'default-image' => get_parent_theme_file_uri( '/assets/images/default-image.png' ), 'header-text' => false, 'width' => 1920, 'flex-width' => true, 'height' => 550, 'flex-height' => true )); register_default_headers( array( 'default-image' => array( 'url' => '%s/assets/images/default-image.png', 'thumbnail_url' => '%s/assets/images/default-image.png', 'description' => __( 'Default Header Image', 'elemento-business' ), ), ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_editor_style( array( '/assets/css/editor-style.css' ) ); global $pagenow; // Theme Activation Redirects To Get Started Page if (is_admin() && ('themes.php' == $pagenow) && isset($_GET['activated']) && wp_get_theme()->get('TextDomain') === 'elemento-business') { wp_redirect(admin_url('themes.php?page=elemento_business_about')); } } add_action( 'after_setup_theme', 'elemento_business_after_setup_theme', 999 ); } require get_template_directory() .'/includes/tgm/tgm.php'; require get_template_directory() . '/includes/customizer.php'; load_template( trailingslashit( get_template_directory() ) . '/includes/go-pro/class-upgrade-pro.php' ); /* Get post comments */ if (!function_exists('elemento_business_comment')) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function elemento_business_comment($comment, $args, $depth){ if ('pingback' == $comment->comment_type || 'trackback' == $comment->comment_type) : ?>
  • >
    ', ''); ?>
  • >
    %s', get_comment_author_link() ); ?>
    ', '' ); ?>
    comment_approved) : ?>

    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '
    ', 'after' => '
    ' ) ) ); ?>
    esc_html__('Sidebar','elemento-business'), 'id' => 'elemento-business-sidebar', 'description' => esc_html__('This sidebar will be shown next to the content.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Page Sidebar','elemento-business'), 'id' => 'sidebar-2', 'description' => esc_html__('This sidebar will be shown on pages.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Sidebar three','elemento-business'), 'id' => 'sidebar-3', 'description' => esc_html__('This sidebar will be shown on blog pages.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar 1','elemento-business'), 'id' => 'footer1-sidebar', 'description' => esc_html__('It appears in the footer 1.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar 2','elemento-business'), 'id' => 'footer2-sidebar', 'description' => esc_html__('It appears in the footer 2.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar 3','elemento-business'), 'id' => 'footer3-sidebar', 'description' => esc_html__('It appears in the footer 3.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar 4','elemento-business'), 'id' => 'footer4-sidebar', 'description' => esc_html__('It appears in the footer 4.', 'elemento-business'), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' )); } add_action( 'widgets_init', 'elemento_business_widgets_init' ); } function elemento_business_the_breadcrumb() { if (!is_home()) { echo ''; bloginfo('name'); echo " >> "; if (is_category() || is_single()) { the_category(' , '); if (is_single()) { echo " >> "; the_title(); } } elseif (is_page()) { echo the_title(); } } } /** * logo resizer */ function elemento_business_logo_resizer() { $elemento_business_theme_logo_size_css = ''; $elemento_business_logo_resizer = get_theme_mod('elemento_business_logo_resizer'); $elemento_business_theme_logo_size_css = ' .custom-logo{ height: '.esc_attr($elemento_business_logo_resizer).'px !important; width: '.esc_attr($elemento_business_logo_resizer).'px !important; } '; wp_add_inline_style( 'elemento-business-style',$elemento_business_theme_logo_size_css ); } add_action( 'wp_enqueue_scripts', 'elemento_business_logo_resizer' ); /** * Change number or products per row to 3 */ add_filter('loop_shop_columns', 'elemento_business_loop_columns', 999); if (!function_exists('elemento_business_loop_columns')) { function elemento_business_loop_columns() { return get_theme_mod( 'elemento_business_products_per_row', '3' ); } } //Change number of products that are displayed per page (shop page) add_filter( 'loop_shop_per_page', 'elemento_business_products_per_page' ); function elemento_business_products_per_page( $cols ) { return get_theme_mod( 'elemento_business_products_per_page',9); } function elemento_business_sanitize_phone_number( $phone ) { return preg_replace( '/[^\d+]/', '', $phone ); } function elemento_business_customize_css() { ?>