get('Name') ); define( 'BIZCOR_THEME_VERSION', $bizcor_theme->get('Version') ); if( ! function_exists( 'bizcor_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * * @since Bizcor 0.1 * * @return void */ function bizcor_setup() { // Defining a text domain name for the theme load_theme_textdomain('bizcor'); // Supporting automatic feed links here add_theme_support('automatic-feed-links'); // Supporting WordPress "Title" tags here add_theme_support('title-tag'); // WooCommerce Plugin Support add_theme_support( 'woocommerce' ); // Supporting "Pages" and "Excerpt" here add_post_type_support('page','excerpt'); // Supporting "Featured Images" for the pages here add_theme_support('post-thumbnails'); // Supporting References Supports add_theme_support( 'wp-block-styles'); add_theme_support( 'responsive-embeds'); add_theme_support( 'register_block_style'); add_theme_support( 'register_block_pattern'); add_theme_support( 'align-wide' ); // Setup global content-width here global $content_width; if ( ! isset( $content_width ) ) { $content_width = 800; } // Registering primary navigation area here register_nav_menus( array( 'primary' => esc_html__('Primary Menu','bizcor'), ) ); // Supporting HTML5 tags on the following theme parts add_theme_support('html5',array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Enqueue editor styles for the theme add_editor_style( array('assets/css/editor-style.css', bizcor_fonts_url() ) ); // Adding a custom logo image here add_theme_support('custom-logo',array( 'height' => 73, 'width' => 210, 'flex-height' => true, 'flex-width' => true, ) ); // Adding a custom header image here $args = array( 'width' => 1600, 'flex-width' => true, 'default-image'=> get_template_directory_uri() . '/img/sub-header.jpg', 'header-text' => false, ); add_theme_support( 'custom-header', $args ); // Custom background theme supports add_theme_support( 'custom-background' ); // Supporting following plugins for adding advanced theme features add_theme_support( 'recommend-plugins', array( 'britetechs-companion' => array( 'name' => esc_html__( 'Britetechs Companion', 'bizcor' ), 'active_filename' => 'britetechs-companion/britetechs-companion.php', 'desc' => esc_html__( 'We highly recommend that you install the britetechs companion plugin to gain access to the team and testimonial sections.', 'bizcor' ), ), 'contact-form-7' => array( 'name' => esc_html__( 'Contact Form 7', 'bizcor' ), 'active_filename' => 'contact-form-7/wp-contact-form-7.php', ), ) ); // Adding selective refresh feature in the theme add_theme_support( 'customize-selective-refresh-widgets' ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'audio', ) ); // load starter Content. add_theme_support( 'starter-content', bizcor_wp_starter_pack() ); } add_action( 'after_setup_theme', 'bizcor_setup' ); endif; if ( ! function_exists( 'bizcor_fonts_url' ) ) : /** * Enqueue google fonts. * * @since Bizcor 0.1 * * @return void */ function bizcor_fonts_url() { global $bizcor_options; $fonts_url = ''; $Inter = _x( 'on', 'Inter font: on or off', 'bizcor' ); if ( 'off' !== $Inter ) { $font_families = array(); if ( 'off' !== $Inter ) { $font_families[] = 'Inter:100,200,300,400,500,600,700,800,900,italic'; } $sections = array( 'body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', ); foreach( $sections as $section ){ $font = get_theme_mod('bizcor_'.$section.'_font'); if(isset($font) && $font != '' ){ $font_families[] = $font.':100,200,300,400,500,600,700,800,900,italic'; } } $subset = 'latin'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( $subset ), ); $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css?family=' ); } return esc_url_raw( $fonts_url ); } endif; if( ! function_exists('bizcor_widgets_register') ): /** * Registering theme widgets. * * @since Bizcor 0.1 * * @return void */ function bizcor_widgets_register(){ register_sidebar( array( 'name' => esc_html__('Primary Sidebar','bizcor'), 'id' => 'sidebar-1', 'description' => 'This sidebar contents will be show on the blog archive pages.', 'before_widget' => '
', 'before_title' => '