__( 'Primary Menu', 'fiore' ),
) );
/**
* Enable support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'chat' ) );
}
endif; // fiore_setup
add_action( 'after_setup_theme', 'fiore_setup' );
/**
* Setup the WordPress core custom background feature.
*
* Use add_theme_support to register support for WordPress 3.4+
* as well as provide backward compatibility for WordPress 3.3
* using feature detection of wp_get_theme() which was introduced
* in WordPress 3.4.
*
* @todo Remove the 3.3 support when WordPress 3.6 is released.
*
* Hooks into the after_setup_theme action.
*/
function fiore_register_custom_background() {
add_theme_support( 'custom-background', apply_filters( 'fiore_custom_background_args', array(
'default-color' => 'f4eedf',
'default-image' => get_template_directory_uri() . '/images/background-2x.png',
) ) );
}
add_action( 'after_setup_theme', 'fiore_register_custom_background' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Fiore 1.0
*/
function fiore_widgets_init() {
register_sidebar( array(
'name' => __( 'Slide-Out Sidebar', 'fiore' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'fiore_widgets_init' );
/**
* Register Google Fonts
*/
function fiore_google_fonts() {
/* translators: If there are characters in your language that are not supported
by Rufina, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Rufina font: on or off', 'fiore' ) ) {
wp_register_style( 'fiore-rufina', "https://fonts.googleapis.com/css?family=Rufina:400,700&subset=latin,latin-ext" );
}
}
add_action( 'init', 'fiore_google_fonts' );
/**
* Enqueue Google Fonts for custom headers
*/
function fiore_admin_scripts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
wp_enqueue_style( 'fiore-rufina' );
}
add_action( 'admin_enqueue_scripts', 'fiore_admin_scripts' );
/**
* Enqueue scripts and styles
*/
function fiore_scripts() {
wp_enqueue_style( 'fiore-style', get_stylesheet_uri() );
wp_enqueue_style( 'fiore-rufina' );
if ( is_rtl() ) {
wp_enqueue_script( 'sidebar-toggle-rtl', get_template_directory_uri() . '/js/sidebar-toggle-rtl.js', array( 'jquery' ), '20130322', true );
} else {
wp_enqueue_script( 'sidebar-toggle', get_template_directory_uri() . '/js/sidebar-toggle.js', array( 'jquery' ), '20130322', true );
}
wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'fiore_scripts' );
/**
* Custom Header feature
*/
require( get_template_directory() . '/inc/custom-header.php' );