inspirelite_required_files(); } public static function get_theme_menu(){ return array( 'primary-menu' => esc_html__( 'Primary Menu', 'inspirelite' ), 'secondary-menu' => esc_html__( 'Secondary Menu', 'inspirelite' ), ); } public static function inspirelite_woocommerce(){ // WooCommerce Support if( class_exists('WooCommerce') ){ add_theme_support( 'woocommerce' ); } } public static function inspirelite_theme_setup(){ /* Load translation domain ---------------------------------------------*/ load_theme_textdomain( INSPIRELITE_PRIFIX , get_template_directory() . '/language' ); /* Register Menus ------------------------------------------------------*/ register_nav_menus( self:: get_theme_menu() ); self:: inspirelite_woocommerce(); // Add theme support for Automatic Feed Links add_theme_support( 'automatic-feed-links' ); // Add theme support for document Title tag add_theme_support( 'title-tag' ); // @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails add_theme_support( 'post-thumbnails' ); // Add theme support for HTML5 Semantic Markup add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); // Add theme support for Post Formats add_theme_support( 'post-formats', array( 'status', 'quote', 'gallery', 'image', 'video', 'audio', 'link', 'aside', 'chat' ) ); // Add theme support for Custom Background add_theme_support( 'custom-background', array( 'default-color' => 'ffffff', 'default-image' => '', ) ); /** * Add styles to post editor */ add_editor_style( array( 'editor-style.css', Inspirelite_Theme_Scripts:: inspirelite_google_fonts() ) ); /** * Add wide image support */ add_theme_support( 'align-wide' ); /** * Selective Refresh for Customizer */ add_theme_support( 'customize-selective-refresh-widgets' ); } /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ public function inspirelite_widget_init(){ register_sidebar( array( 'name' => esc_html__( 'Primary Widget Area', 'inspirelite' ), 'id' => 'inspirelite-widget-primary', 'description' => esc_html__( 'Add widgets here to appear in your sidebar section Primary Sidebar.', 'inspirelite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Secondary Widget Area', 'inspirelite' ), 'id' => 'inspirelite-widget-secondary', 'description' => esc_html__( 'Add widgets here to appear in your sidebar section Secondary Sidebar.', 'inspirelite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); for( $i = absint('1'); $i <= absint('4'); $i++ ){ register_sidebar( array( 'name' => sprintf( esc_html__( 'Footer Column %1$s', 'inspirelite' ), $i ), 'id' => sprintf( 'inspirelite-footer-v%1$s-widget', $i ), 'description' => sprintf( esc_html__( 'Footer Widget %1$s Column.', 'inspirelite' ), $i ), 'before_widget' => '', ) ); } } /** * Require File. */ public static function load_file( $get_file_path ) { require_once self::check_file_path( $get_file_path ); } /** * File Path Check is exists or not. */ public static function check_file_path( $get_file_path ) { if ( file_exists( get_stylesheet_directory() . $get_file_path ) ) { return get_stylesheet_directory() . $get_file_path; } elseif ( file_exists( get_template_directory() . $get_file_path ) ) { return get_template_directory() . $get_file_path; } else { return false; } } public static function inspirelite_required_files(){ /** * Require files */ self:: load_file( '/inc/template-tags.php' ); self:: load_file( '/inc/nav-menu-walker.php' ); self:: load_file( '/inc/custom-header.php' ); /** * Theme action & hooks */ self:: load_file( '/inc/theme-hook.php' ); self:: load_file( '/inc/extras.php' ); self:: load_file( '/inc/comment-template-part.php' ); self:: load_file( '/inc/page-template-part.php' ); self:: load_file( '/inc/theme-scripts.php' ); /** * Inspirelite Blog Template */ self:: load_file( '/template-parts/content-helper.php' ); /** * TGM plugin setup */ self:: load_file( '/inc/tgm-plugin/required-plugin.php' ); // Redux option self:: load_file( '/inc/redux-option.php' ); // Schema self:: load_file( '/inc/theme-schema.php' ); // page wrapper self:: load_file( '/inc/page-wrapper.php' ); self:: load_file( '/inc/theme-footer.php' ); self:: load_file( '/inc/theme-header.php' ); } public static function inspirelite_favicon_upload(){ if ( ! ( function_exists( 'has_site_icon' ) && has_site_icon() ) && class_exists( 'Redux' ) ) { $_favicon = Inspirelite_Redux:: inspirelite_option( 'custom_favicon_upload' ); if( $_favicon != '' ){ ?>