esc_html__( 'Primary Menu', 'bookstore-exhibition' ),
) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
add_editor_style( array( '/css/editor-style' . $min . '.css', bookstore_exhibition_fonts_url() ) );
/*
* Switch default core markup to output valid HTML5.
*/
add_theme_support( 'html5', array(
'comment-form',
'comment-list',
'gallery',
'caption',
) );
// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'bookstore_exhibition_custom_background_args', array(
'default-color' => 'f7fcfe',
) ) );
// Enable support for selective refresh of widgets in Customizer.
add_theme_support( 'customize-selective-refresh-widgets' );
// Enable support for custom logo.
add_theme_support( 'custom-logo' );
// Load default block styles.
add_theme_support( 'wp-block-styles' );
// Add support for responsive embeds.
add_theme_support( 'responsive-embeds' );
// Enable support for footer widgets.
add_theme_support( 'footer-widgets', 4 );
// Load Supports.
require_once get_template_directory() . '/inc/support.php';
// Add custom editor font sizes.
add_theme_support(
'editor-font-sizes',
array(
array(
'name' => __( 'Small', 'bookstore-exhibition' ),
'shortName' => __( 'S', 'bookstore-exhibition' ),
'size' => 13,
'slug' => 'small',
),
array(
'name' => __( 'Normal', 'bookstore-exhibition' ),
'shortName' => __( 'M', 'bookstore-exhibition' ),
'size' => 14,
'slug' => 'normal',
),
array(
'name' => __( 'Large', 'bookstore-exhibition' ),
'shortName' => __( 'L', 'bookstore-exhibition' ),
'size' => 30,
'slug' => 'large',
),
array(
'name' => __( 'Huge', 'bookstore-exhibition' ),
'shortName' => __( 'XL', 'bookstore-exhibition' ),
'size' => 36,
'slug' => 'huge',
),
)
);
// Editor color palette.
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'Black', 'bookstore-exhibition' ),
'slug' => 'black',
'color' => '#000',
),
array(
'name' => __( 'White', 'bookstore-exhibition' ),
'slug' => 'white',
'color' => '#ffffff',
),
array(
'name' => __( 'Gray', 'bookstore-exhibition' ),
'slug' => 'gray',
'color' => '#727272',
),
array(
'name' => __( 'Blue', 'bookstore-exhibition' ),
'slug' => 'blue',
'color' => '#ff8930',
),
array(
'name' => __( 'Navy Blue', 'bookstore-exhibition' ),
'slug' => 'navy-blue',
'color' => '#ff8930',
),
array(
'name' => __( 'Light Blue', 'bookstore-exhibition' ),
'slug' => 'light-blue',
'color' => '#f7fcfe',
),
array(
'name' => __( 'Orange', 'bookstore-exhibition' ),
'slug' => 'orange',
'color' => '#121212',
),
array(
'name' => __( 'Green', 'bookstore-exhibition' ),
'slug' => 'green',
'color' => '#77a464',
),
array(
'name' => __( 'Red', 'bookstore-exhibition' ),
'slug' => 'red',
'color' => '#e4572e',
),
array(
'name' => __( 'Yellow', 'bookstore-exhibition' ),
'slug' => 'yellow',
'color' => '#f4a024',
),
)
);
}
endif;
add_action( 'after_setup_theme', 'bookstore_exhibition_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function bookstore_exhibition_content_width() {
$GLOBALS['content_width'] = apply_filters( 'bookstore_exhibition_content_width', 771 );
}
add_action( 'after_setup_theme', 'bookstore_exhibition_content_width', 0 );
/**
* Register widget area.
*/
function bookstore_exhibition_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Primary Sidebar', 'bookstore-exhibition' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here to appear in your Primary Sidebar.', 'bookstore-exhibition' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => esc_html__( 'Secondary Sidebar', 'bookstore-exhibition' ),
'id' => 'sidebar-2',
'description' => esc_html__( 'Add widgets here to appear in your Secondary Sidebar.', 'bookstore-exhibition' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Secondary Sidebar 1', 'bookstore-exhibition' ),
'id' => 'sidebar-3',
'description' => esc_html__( 'Add widgets here to appear in your Secondary Sidebar 1.', 'bookstore-exhibition' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'bookstore_exhibition_widgets_init' );
/**
* Register custom fonts.
*/
function bookstore_exhibition_fonts_url() {
$font_family = array(
'DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700',
);
$fonts_url = add_query_arg( array(
'family' => implode( '&family=', $font_family ),
'display' => 'swap',
), 'https://fonts.googleapis.com/css2' );
$contents = wptt_get_webfont_url( esc_url_raw( $fonts_url ) );
return $contents;
}
/**
* Enqueue scripts and styles.
*/
function bookstore_exhibition_scripts() {
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_style( 'bookstore-exhibition-font-awesome', get_template_directory_uri() . '/third-party/font-awesome/css/font-awesome' . $min . '.css', '', '4.7.0' );
$fonts_url = bookstore_exhibition_fonts_url();
if ( ! empty( $fonts_url ) ) {
wp_enqueue_style( 'bookstore-exhibition-google-fonts', $fonts_url, array(), null );
}
wp_enqueue_style( 'dashicons' );
// Theme stylesheet.
wp_enqueue_style( 'bookstore-exhibition-style', get_stylesheet_uri(), null, date( 'Ymd-Gis', filemtime( get_template_directory() . '/style.css' ) ) );
wp_enqueue_style( 'bookstore-exhibition-style', get_stylesheet_uri() );
wp_style_add_data( 'bookstore-exhibition-style', 'rtl', 'replace' );
// Theme block stylesheet.
wp_enqueue_style( 'bookstore-exhibition-block-style', get_theme_file_uri( '/css/blocks.css' ), array( 'bookstore-exhibition-style' ), '20211006' );
wp_enqueue_style('bootstrap-style', get_template_directory_uri().'/css/bootstrap.css');
wp_enqueue_script( 'bookstore-exhibition-custom-js', get_template_directory_uri(). '/js/custom.js', array('jquery') ,'',true);
wp_enqueue_script( 'jquery-superfish', get_theme_file_uri( '/js/jquery.superfish.js' ), array( 'jquery' ), '2.1.2', true );
wp_enqueue_script('bootstrap-js', get_template_directory_uri().'/js/bootstrap.js', array('jquery'), '', true);
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'bookstore_exhibition_scripts' );
/**
* Enqueue styles for the block-based editor.
*
* @since Bookstore Exhibition
*/
function bookstore_exhibition_block_editor_styles() {
// Theme block stylesheet.
wp_enqueue_style( 'bookstore-exhibition-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20101208' );
$fonts_url = bookstore_exhibition_fonts_url();
if ( ! empty( $fonts_url ) ) {
wp_enqueue_style( 'bookstore-exhibition-google-fonts', $fonts_url, array(), null );
}
}
add_action( 'enqueue_block_editor_assets', 'bookstore_exhibition_block_editor_styles' );
define( 'IS_FREE_MIZAN_THEMES', 'bookstore-exhibition' );
/**
* Load init.
*/
require_once get_template_directory() . '/inc/init.php';
// Dashboard Admin Info
require get_template_directory() . '/inc/dashboard-admin-info.php';
/**
* Webfonts
*/
require_once get_template_directory() . '/inc/wptt-webfont-loader.php';
require_once get_template_directory() . '/inc/recommendations/tgm.php';
require_once get_template_directory() . '/inc/upsell/class-upgrade-pro.php';
require get_template_directory() . '/inc/getting-started/getting-started.php';
require get_template_directory() . '/inc/getting-started/plugin-activation.php';
define('BOOKSTORE_EXHIBITION_SUPPORT',__('https://wordpress.org/support/theme/bookstore-exhibition/','bookstore-exhibition'));
define('BOOKSTORE_EXHIBITION_REVIEW',__('https://wordpress.org/support/theme/bookstore-exhibition/reviews/','bookstore-exhibition'));
define('BOOKSTORE_EXHIBITION_BUY_NOW',__('https://www.mizanthemes.com/elementor/books-exhibition-wordpress-theme/','bookstore-exhibition'));
define('BOOKSTORE_EXHIBITION_LIVE_DEMO',__('https://mizanthemes.com/preview/bookstore-exhibition/','bookstore-exhibition'));
define('BOOKSTORE_EXHIBITION_PRO_DOC',__('https://www.mizanthemes.com/setup-guide/bookstore-exhibition-pro/','bookstore-exhibition'));