esc_html__( 'Primary Menu', 'boston-business' ), ) ); /* * 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', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'boston_business_custom_background_args', array( 'default-color' => '#ffffff', 'default-image' => '', ) ) ); // Set up the WordPress core custom header feature. add_theme_support( 'custom-header', apply_filters( 'boston_business_custom_header_args', array( 'default-image' => get_template_directory_uri() . '/images/header-banner.jpg', 'width' => 1400, 'height' => 320, 'flex-height' => true, 'header-text' => false, ) ) ); // Enable support for footer widgets. add_theme_support( 'footer-widgets', 4 ); // Load Supports. require_once get_template_directory() . '/inc/support.php'; global $boston_business_default_options; $boston_business_default_options = boston_business_get_default_theme_options(); } endif; add_action( 'after_setup_theme', 'boston_business_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 boston_business_content_width() { $GLOBALS['content_width'] = apply_filters( 'boston_business_content_width', 640 ); } add_action( 'after_setup_theme', 'boston_business_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function boston_business_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Primary Sidebar', 'boston-business' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here to appear in your Primary Sidebar.', 'boston-business' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'boston_business_widgets_init' ); /** * Enqueue scripts and styles. */ function boston_business_scripts() { $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; $fonts_url = boston_business_fonts_url(); if ( ! empty( $fonts_url ) ) { wp_enqueue_style( 'boston-business-google-fonts', $fonts_url, array(), null ); } wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'font-awesome', get_template_directory_uri() .'/assets/css/font-awesome' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'slick-theme', get_template_directory_uri() .'/assets/css/slick-theme' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'slick', get_template_directory_uri() .'/assets/css/slick' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'magnific-popup', get_template_directory_uri() .'/assets/css/magnific-popup' . $min . '.css', '', '2.2.1' ); wp_enqueue_style( 'boston-business-style', get_stylesheet_uri(), array(), '1.4.0' ); wp_enqueue_script( 'boston-business-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix' . $min . '.js', array(), '1.2.0', true ); wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap' . $min . '.js', array( 'jquery' ), '2.2.1', true ); wp_enqueue_script( 'slick-js', get_template_directory_uri() . '/assets/js/slick' . $min . '.js', array( 'jquery' ), '2.2.1', true ); wp_enqueue_script( 'magnific-popup-js', get_template_directory_uri() . '/assets/js/jquery.magnific-popup' . $min . '.js', array( 'jquery' ), '2.2.1', true ); wp_enqueue_script( 'packery-pkgd', get_template_directory_uri() . '/assets/js/packery.pkgd' . $min . '.js', array( 'jquery' ), '2.2.1', true ); wp_enqueue_script( 'boston-business-custom', get_template_directory_uri() . '/assets/js/custom' . $min . '.js', array( 'jquery' ), '1.2.0', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'boston_business_scripts' ); /** * Enqueue admin scripts and styles. */ function boston_business_admin_scripts( $hook ) { if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) { $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_style( 'boston-business-metabox', get_template_directory_uri() . '/assets/css/metabox' . $min . '.css', '', '1.2.0' ); wp_enqueue_script( 'boston-business-custom-admin', get_template_directory_uri() . '/assets/js/admin' . $min . '.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs' ), '1.2.0', true ); } } add_action( 'admin_enqueue_scripts', 'boston_business_admin_scripts' ); /** * Load init. */ require_once get_template_directory() . '/inc/init.php';