esc_html__( 'Primary', 'azhar' ), ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // woocommerce support add_theme_support( 'woocommerce' ); // Woocommerce Gallery Support add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 39, 'width' => 210, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); /** * Custom background support. */ add_theme_support( 'custom-background', apply_filters( 'azhar_custom_background_args', array( 'default-color' => 'f3f8fe', 'default-image' => '', ) ) ); /** * Set default content width. */ if ( ! isset( $content_width ) ) { $content_width = 800; } } endif; add_action( 'after_setup_theme', 'azhar_setup' ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function azhar_widgets_init() { $sidebars = apply_filters( 'azhar_sidebars_data', array( 'sidebar-main' => esc_html__( 'Sidebar Widget Area', 'azhar' ), 'footer-sidebar-one' => esc_html__( 'Footer Sidebar One', 'azhar' ), 'footer-sidebar-two' => esc_html__( 'Footer Sidebar Two', 'azhar' ), 'footer-sidebar-three' => esc_html__( 'Footer Sidebar Three', 'azhar' ), 'footer-sidebar-four' => esc_html__( 'Footer Sidebar Four', 'azhar' ), ) ); foreach ( $sidebars as $id => $name ) : register_sidebar( array( 'id' => $id, 'name' => $name, 'description' => $name, 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); endforeach; } add_action( 'widgets_init', 'azhar_widgets_init'); /** * Enqueue scripts and styles. */ function azhar_scripts() { /** * Styles. */ wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css'); // Fontawesome. wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/css/font-awesome/css/font-awesome.min.css' ); // Theme styles. wp_enqueue_style( 'azhar-style', get_stylesheet_uri() ); wp_enqueue_style('azhar-theme-default', get_template_directory_uri() . '/assets/css/theme-default.css'); wp_enqueue_style('bootstrap-smartmenus-css', get_template_directory_uri() . '/assets/css/bootstrap-smartmenus.css'); /** * Scripts. */ wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery')); // Theme JavaScript. wp_enqueue_script('smartmenus-js', get_template_directory_uri() . '/assets/js/smartmenus/jquery.smartmenus.js'); wp_enqueue_script( 'azhar-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script('azhar-custom-js', get_template_directory_uri() . '/assets/js/custom.js', array('jquery')); wp_enqueue_script('bootstrap-smartmenus-js', get_template_directory_uri() . '/assets/js/smartmenus/bootstrap-smartmenus.js'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'azhar_scripts' ); /** * Define constants */ // Root path/URI. define( 'AZHAR_PARENT_DIR', get_template_directory() ); define( 'AZHAR_PARENT_URI', get_template_directory_uri() ); // Include path/URI. define( 'AZHAR_PARENT_INC_DIR', AZHAR_PARENT_DIR . '/inc' ); define( 'AZHAR_PARENT_INC_URI', AZHAR_PARENT_URI . '/inc' ); /** * Implement the Custom Header feature. */ require AZHAR_PARENT_INC_DIR . '/custom-header.php'; /** * Custom template tags for this theme. */ require AZHAR_PARENT_INC_DIR . '/template-tags.php'; /** * Bootstrap class navwalker. */ require AZHAR_PARENT_INC_DIR . '/class-bootstrap-navwalker.php';