esc_html__( 'Primary', 'beautifulstore-lite' ),
) );
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support( 'custom-background', apply_filters( 'beautifulstore_lite_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
add_theme_support( 'customize-selective-refresh-widgets' );
add_theme_support( 'custom-logo', array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
) );
}
endif;
add_action( 'after_setup_theme', 'beautifulstore_lite_setup' );
function beautifulstore_lite_content_width() {
$GLOBALS['content_width'] = apply_filters( 'beautifulstore_lite_content_width', 640 );
}
add_action( 'after_setup_theme', 'beautifulstore_lite_content_width', 0 );
function beautifulstore_lite_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'beautifulstore-lite' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => esc_html__( 'Header', 'beautifulstore-lite' ),
'id' => 'header',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 1', 'beautifulstore-lite' ),
'id' => 'footer-1',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 2', 'beautifulstore-lite' ),
'id' => 'footer-2',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 3', 'beautifulstore-lite' ),
'id' => 'footer-3',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer 4', 'beautifulstore-lite' ),
'id' => 'footer-4',
'description' => esc_html__( 'Add widgets here.', 'beautifulstore-lite' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'beautifulstore_lite_widgets_init' );
function beautifulstore_lite_scripts() {
wp_enqueue_style( 'beautifulstore-lite-style', get_stylesheet_uri() );
wp_enqueue_script( 'beautifulstore-lite-navigation', get_template_directory_uri() . '/js/navigation.js', array(), 'beautifulstore-lite', true );
wp_enqueue_script( 'beautifulstore-lite-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), 'beautifulstore-lite', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'beautifulstore_lite_scripts' );
require get_template_directory() . '/inc/custom-header.php';
require get_template_directory() . '/inc/template-tags.php';
require get_template_directory() . '/inc/template-functions.php';
require get_template_directory() . '/inc/customizer.php';
if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/jetpack.php';
}
function wpt_register_js() {
wp_register_script('jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery');
wp_enqueue_script('jquery.bootstrap.min');
}
add_action( 'init', 'wpt_register_js' );
function wpt_register_css() {
wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' );
wp_enqueue_style( 'bootstrap.min' );
}
add_action( 'wp_enqueue_scripts', 'wpt_register_css' );
/* TGM Plugin activation */
/* WooCommerce CART */
add_filter('woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment');
function woocommerce_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
?>
cart->cart_contents_count, 'beautifulstore-lite'), $woocommerce->cart->cart_contents_count);?> - cart->get_cart_total(); ?>