get( 'Version' ) );
}
if ( ! defined( 'THEME_OPTIONS' ) ) {
define( 'THEME_OPTIONS', 'fox009_vermilion_theme_options' );
}
if ( ! function_exists( 'fox009_vermilion_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 fox009_vermilion_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Fox009 Vermilion, use a find and replace
* to change 'fox009-vermilion' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'fox009-vermilion', 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' );
set_post_thumbnail_size(240, 180, true);
// This theme uses wp_nav_menu() in one location.
register_nav_menus(
array(
'primary' => esc_html__( 'Primary', 'fox009-vermilion' ),
'secondary' => esc_html__( 'Secondary', 'fox009-vermilion' ),
)
);
/*
* 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',
'style',
'script',
)
);
// Set up the WordPress core custom background feature.
add_theme_support(
'custom-background',
apply_filters(
'fox009_vermilion_custom_background_args',
array(
'default-color' => 'f3f4f7',
'default-image' => '',
)
)
);
add_theme_support(
'custom-header',
apply_filters(
'fox009_vermilion_custom_header_args',
array(
'default-image' => get_parent_theme_file_uri( '/assets/images/default-header-image.jpg'),
'width' => 1400,
'height' => 900,
'flex-height' => true,
)
)
);
register_default_headers(
array(
'default-image' =>
array(
'url' => '%s/assets/images/default-header-image.jpg',
'thumbnail_url' => '%s/assets/images/default-header-image.jpg',
'description' => __( 'Default Header Image', 'fox009-vermilion'
),
),
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
}
endif;
add_action( 'after_setup_theme', 'fox009_vermilion_setup' );
function fox009_vermilion_content_width() {
$GLOBALS['content_width'] = apply_filters( 'fox009_vermilion_content_width', 640 );
}
add_action( 'after_setup_theme', 'fox009_vermilion_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function fox009_vermilion_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'fox009-vermilion' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'fox009-vermilion' ),
'before_widget' => '',
'before_title' => '',
)
);
}
add_action( 'widgets_init', 'fox009_vermilion_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function fox009_vermilion_scripts() {
wp_enqueue_style( 'dashicons' );
wp_enqueue_style( 'fox009-vermilion-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.css', array(), THEME_VERSION );
wp_enqueue_style( 'fox009-vermilion-theme-carousel', get_template_directory_uri() . '/assets/css/owl.theme.default.css', array(), THEME_VERSION );
wp_enqueue_style( 'google-webfonts', '//fonts.googleapis.com/css?family=Tangerine', array(), THEME_VERSION);
wp_enqueue_style( 'fox009-vermilion-style', get_stylesheet_uri(), array(), THEME_VERSION );
wp_enqueue_style( 'fox009-vermilion-responsive', get_template_directory_uri() . '/assets/css/responsive.css', array(), THEME_VERSION );
wp_enqueue_script( 'fox009-vermilion-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), THEME_VERSION, true );
wp_enqueue_script( 'fox009-vermilion-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.js', array('jquery'), THEME_VERSION, true );
wp_enqueue_script( 'fox009-vermilion-slider', get_template_directory_uri() . '/assets/js/slider.js', array('jquery'), THEME_VERSION, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'fox009_vermilion_scripts' );
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/breadcrumbs.php';
require get_template_directory() . '/inc/custom-css.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template-functions.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/jetpack.php';
}