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( 'width' => 1920, 'height' => 100 )); 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() { $theme_logo_size_css = ''; $cafe_cafeteria_logo_resizer = get_theme_mod('cafe_cafeteria_logo_resizer'); $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',$theme_logo_size_css ); } add_action( 'wp_enqueue_scripts', 'cafe_cafeteria_logo_resizer' ); /*-----------------------------------------------------------------------------------*/ /* Enqueue Global color style */ /*-----------------------------------------------------------------------------------*/ function cafe_cafeteria_global_color() { $theme_color_css = ''; $cafe_cafeteria_global_color = get_theme_mod('cafe_cafeteria_global_color'); $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 { background: '.esc_attr($cafe_cafeteria_global_color).'; } a:hover,a:focus,#main-menu a:hover,#main-menu ul li a:hover,#main-menu li:hover > a,#main-menu a:focus,#main-menu ul li a:focus,#main-menu li.focus > a,#main-menu li:focus > a,#main-menu ul li.current-menu-item > a,#main-menu ul li.current_page_item > a,#main-menu ul li.current-menu-parent > a,#main-menu ul li.current_page_ancestor > a,#main-menu ul li.current-menu-ancestor > a,.blog_inner_box h3.post-title a,.inner-box span,.inner-box h4 a,#story h3,.logo a:hover, .logo a:focus,.post-meta i { 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).'; } '; wp_add_inline_style( 'cafe-cafeteria-style',$theme_color_css ); wp_add_inline_style( 'cafe-cafeteria-woocommerce-css',$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, $args, $depth){ if ('pingback' == $comment->comment_type || 'trackback' == $comment->comment_type) : ?>
cart->get_cart_contents_count() ));?>
remove_control('display_header_text'); $wp_customize->remove_setting('display_header_text'); } add_action( 'customize_register', 'cafe_cafeteria_remove_sections'); //redirect Function cafe_cafeteria_notice(){ global $pagenow; if ( is_admin() && ('themes.php' == $pagenow) && isset( $_GET['activated'] ) ) { wp_safe_redirect( admin_url("themes.php?page=cafe-cafeteria-guide-page") ); } } add_action('after_setup_theme', 'cafe_cafeteria_notice'); ?>