esc_html__( 'Main menu', 'cafe-cafeteria' ), )); add_theme_support( 'align-wide' ); add_theme_support( 'woocommerce' ); add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_theme_support( "responsive-embeds" ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'custom-background', array( 'default-color' => 'ffffff' )); add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 70, ) ); add_theme_support( 'custom-header', array( 'header-text' => false, 'width' => 1920, 'height' => 100, 'flex-width' => true, 'flex-height' => true, )); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_editor_style( array( '/css/editor-style.css' ) ); } add_action( 'after_setup_theme', 'cafe_cafeteria_after_setup_theme', 999 ); } require get_template_directory() .'/core/includes/main.php'; require get_template_directory() .'/core/includes/tgm.php'; require get_template_directory() . '/core/includes/customizer.php'; load_template( trailingslashit( get_template_directory() ) . '/core/includes/class-upgrade-pro.php' ); /**------------------------------------------------------------------------------------------ * Enqueue theme logo style. */ function cafe_cafeteria_logo_resizer() { $cafe_cafeteria_theme_logo_size_css = ''; $cafe_cafeteria_logo_resizer = get_theme_mod('cafe_cafeteria_logo_resizer'); $cafe_cafeteria_theme_logo_size_css = ' .custom-logo{ height: '.esc_attr($cafe_cafeteria_logo_resizer).'px !important; width: '.esc_attr($cafe_cafeteria_logo_resizer).'px !important; } '; wp_add_inline_style( 'cafe-cafeteria-style',$cafe_cafeteria_theme_logo_size_css ); } add_action( 'wp_enqueue_scripts', 'cafe_cafeteria_logo_resizer' ); /*-----------------------------------------------------------------------------------*/ /* Enqueue Global color style */ /*-----------------------------------------------------------------------------------*/ function cafe_cafeteria_global_color() { $cafe_cafeteria_theme_color_css = ''; $cafe_cafeteria_global_color = get_theme_mod('cafe_cafeteria_global_color'); $cafe_cafeteria_global_color_2 = get_theme_mod('cafe_cafeteria_global_color_2'); $cafe_cafeteria_copyright_bg = get_theme_mod('cafe_cafeteria_copyright_bg'); $cafe_cafeteria_theme_color_css = ' #main-menu ul.children li a:hover,#main-menu ul.sub-menu li a:hover,p.slider_btn a:hover,.pagination .nav-links a:hover,.pagination .nav-links a:focus,.pagination .nav-links span.current,.cafe-cafeteria-pagination span.current,.cafe-cafeteria-pagination span.current:hover,.cafe-cafeteria-pagination span.current:focus,.cafe-cafeteria-pagination a span:hover,.cafe-cafeteria-pagination a span:focus,.comment-respond input#submi,.comment-reply a,.sidebar-area .tagcloud a:hover,.searchform input[type=submit],.searchform input[type=submit]:hover ,.searchform input[type=submit]:focus,.comment-respond input#submit,.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce a.added_to_cart,nav.woocommerce-MyAccount-navigation ul li,.wp-block-search .wp-block-search__button:hover,.menu-toggle,.scroll-up a,p.slider_btn a:hover,.woocommerce ul.products li.product .onsale, .woocommerce span.onsale,.sidebar-area h4{ background: '.esc_attr($cafe_cafeteria_global_color).'; } scroll-up a:hover,.blog_inner_box h3.post-title a, #main-menu ul li.current-menu-item > a, #main-menu ul li.current_page_item > a,#main-menu a:hover, #main-menu ul li a:hover,.inner-box span { color: '.esc_attr($cafe_cafeteria_global_color).'; } .content_inner_box hr,.call-us i,.slider .owl-carousel button.owl-dot.active,#courses hr,#checkout-payment #checkout-order-action button,.learnpress-page .lp-button,.learnpress-page #lp-button,p.slider_btn a { border-color: '.esc_attr($cafe_cafeteria_global_color).'; } a.cart-customlocation p.cart-item-box,.tab-product span.onsale,.box-content a.button:hover,.box .box-content,.scroll-up a:hover,nav.woocommerce-MyAccount-navigation ul li:hover,.woocommerce ul.products li.product .onsale, .woocommerce span.onsale,.comment-respond input#submit:hover, .comment-reply a:hover,a.shop-btn,.woocommerce .cart .button:hover,.woocommerce a.button.alt:hover,a.shop-btn:hover,.woocommerce button.button.alt:hover,.woocommerce a.added_to_cart:hover,.comment-respond input#submit:hover,.woocommerce #respond input#submit:.woocommerce #respond input#submit:hover,.woocommerce #respond input#submit:hover,.woocommerce button.button.alt:hover,.woocommerce a.button:hover,.woocommerce a.added_to_cart:hover { background-color: '.esc_attr($cafe_cafeteria_global_color_2).'; } .woocommerce a.button:hover,.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce a.added_to_cart:hover,.comment-respond input#submit:hover,.scroll-up a:hover,nav.woocommerce-MyAccount-navigation ul li:hover { background-color: '.esc_attr($cafe_cafeteria_global_color_2).'!important; } a:hover,.inner-box h4 a,.logo a:hover,.post-meta i,.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price{ color: '.esc_attr($cafe_cafeteria_global_color_2).'; } h3.text-center.mb-4 { color: '.esc_attr($cafe_cafeteria_global_color_2).'!important; } .slider .owl-carousel button.owl-dot.active { border-color: '.esc_attr($cafe_cafeteria_global_color_2).'; } @media screen and (min-width: 320px) and (max-width: 767px) .page-template-frontpage #site-navigation { background: '.esc_attr($cafe_cafeteria_global_color_2).' !important; } .copyright { background: '.esc_attr($cafe_cafeteria_copyright_bg).'; } '; wp_add_inline_style( 'cafe-cafeteria-style',$cafe_cafeteria_theme_color_css ); wp_add_inline_style( 'cafe-cafeteria-woocommerce-css',$cafe_cafeteria_theme_color_css ); } add_action( 'wp_enqueue_scripts', 'cafe_cafeteria_global_color' ); /*-----------------------------------------------------------------------------------*/ /* Get post comments */ /*-----------------------------------------------------------------------------------*/ if (!function_exists('cafe_cafeteria_comment')) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function cafe_cafeteria_comment($comment, $cafe_cafeteria_args, $depth){ if ('pingback' == $comment->comment_type || 'trackback' == $comment->comment_type) : ?>
  • >
    ', ''); ?>
  • >
    %s', get_comment_author_link() ); ?>
    ', '' ); ?>
    comment_approved) : ?>

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

    ', 'after_title' => '

    ' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar','cafe-cafeteria'), 'id' => 'cafe-cafeteria-footer-sidebar', 'description' => esc_html__('This sidebar will be shown next at the bottom of your content.', 'cafe-cafeteria'), 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ' )); } add_action( 'widgets_init', 'cafe_cafeteria_widgets_init' ); } function cafe_cafeteria_get_categories_select() { $teh_cats = get_categories(); $results; $count = count($teh_cats); for ($i=0; $i < $count; $i++) { if (isset($teh_cats[$i])) $results[$teh_cats[$i]->slug] = $teh_cats[$i]->name; else $count++; } return $results; } /** * Show cart contents / total Ajax */ add_filter( 'woocommerce_add_to_cart_fragments', 'cafe_cafeteria_woocommerce_header_add_to_cart_fragment' ); function cafe_cafeteria_woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?>

    cart->get_cart_contents_count() ));?>