get( 'Version' ) );
}
if ( ! function_exists( 'beautystore_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function beautystore_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Spa and Salon, use a find and replace
* to change 'beautystore' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'beautystore', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary', 'beautystore' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
/*
* Enable support for Post Formats.
* See https://developer.wordpress.org/themes/functionality/post-formats/
*/
add_theme_support( 'post-formats', array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'status',
'audio',
'chat'
) );
// Backgroud Support for theme
add_theme_support( 'custom-background', apply_filters( 'beautystore_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
/* Custom Logo Support*/
add_theme_support( 'custom-logo', array(
'header-text' => array( 'site-title', 'site-description' ),
) );
add_editor_style( array( 'assets/css/editor-style.css' ) );
// Custom Image Size
}
endif;
add_action( 'after_setup_theme', 'beautystore_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 beautystore_content_width() {
$GLOBALS['content_width'] = apply_filters( 'beautystore_content_width', 780 );
}
add_action( 'after_setup_theme', 'beautystore_content_width', 0 );
/**
* Function When Full width not called
* @since Beautystore
*/
function beautystore_template_redirect_content_width() {
if ( ! ( is_active_sidebar( 'right-sidebar' ) ) ) {
$GLOBALS['content_width'] = 1180;
}
}
add_action( 'template_redirect', 'beautystore_template_redirect_content_width' );
/**
* Register Sidebar Widgets init
* @since Beautystore
*/
function beautystore_widgets_init() {
register_sidebar( array(
'name' => __( 'Right Sidebar', 'beautystore' ),
'id' => 'right-sidebar',
'description' => '',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer One', 'beautystore' ),
'id' => 'footer-one',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Two', 'beautystore' ),
'id' => 'footer-two',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Three', 'beautystore' ),
'id' => 'footer-three',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Four', 'beautystore' ),
'id' => 'footer-four',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'beautystore_widgets_init' );
if ( ! function_exists( 'beautystore_single_post_navigation' ) ) :
/**
* Get Single Post Nav Settings
*
* @since Beautystore
*/
function beautystore_single_post_navigation() {
the_post_navigation( array(
'prev_text' => ''.__( ' Previous Article','beautystore' ),
'next_text' => __( 'Next Article','beautystore' ).' '
) );
}
endif;
/**
* Get Scripts and CSS
*
* @since Beautystore
*/
function beautystore_scripts() {
$build = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '/build' : '';
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
$query_args = array(
'family' => 'Poppins:400,500,600,700|Raleway:400,900,800,700,600,300,200,100|Cedarville+Cursive|Niconne',
);
wp_enqueue_style( 'beautystore-google-fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ) );
wp_enqueue_style( 'fontawesome', get_template_directory_uri(). '/assets/css/font-awesome.css', array('beautystore-style'), beautystore_THEME_VERSION );
wp_enqueue_style( 'bootstrap', get_template_directory_uri(). '/assets/css/bootstrap.css', array('beautystore-style'), beautystore_THEME_VERSION );
wp_enqueue_style( 'beautystore-style', get_stylesheet_uri(), array(), beautystore_THEME_VERSION );
wp_enqueue_style( 'beautystore-custom', get_template_directory_uri(). '/assets/css/custom.css', array('beautystore-style'), beautystore_THEME_VERSION );
wp_enqueue_script( 'beautystore-main', get_template_directory_uri() . '/assets/js/main.js', array( 'jquery' ), '5.6.3', true );
wp_enqueue_script( 'beautystore-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '20151215', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'beautystore_scripts' );
/**
* Load Admin styles
*
* @since Beautystore
*/
if ( is_admin() ) :
function beautystore_admin_scripts() {
wp_enqueue_style( 'beautystore-admin-style',get_template_directory_uri().'/inc/css/admin.css', '1.0', 'screen' );
wp_enqueue_script( 'beautystore-admin-js', get_template_directory_uri().'/inc/js/admin.js', array( 'jquery' ), '', true );
}
add_action( 'admin_enqueue_scripts', 'beautystore_admin_scripts' );
endif;
/**
* Get User defined Custom Tags Settings
*
* @since Beautystore
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Get User Defined Functions
*
* @since Beautystore
*/
require get_template_directory() . '/inc/extra.php';
/**
* Get Suctomizer Settings
*
* @since Beautystore
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Get Recent Posts
*
* @since Beautystore
*/
require get_template_directory() . '/inc/info.php';
/**
* Load theme welcome page
*/
require get_template_directory(). '/inc/welcome/easy-mart-welcome.php';
require_once get_template_directory() . '/inc/class-tgm-plugin-activation.php';
require get_template_directory(). '/inc/hook-tgm.php';
/**
* Customizer additions.
*/
require_once( trailingslashit( get_template_directory() ) . '/inc/customizer/customizer-pro/class-customize.php' );