__( 'Primary Menu', 'adelle' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'status', 'chat', 'gallery', 'audio' ) ); /** * Enable support for custom backgrounds */ add_theme_support( 'custom-background', array( 'default-color' => 'ffffff', ) ); } endif; // adelle_setup add_action( 'after_setup_theme', 'adelle_setup' ); /** * Enqueue Google Fonts */ function adelle_fonts() { /* translators: If there are characters in your language that are not supported by Muli, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Muli font: on or off', 'adelle' ) ) wp_register_style( 'adelle-muli', "https://fonts.googleapis.com/css?family=Muli:400,400italic" ); /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'adelle' ) ) wp_register_style( 'adelle-montserrat', "https://fonts.googleapis.com/css?family=Montserrat:400,700" ); /* translators: If there are characters in your language that are not supported by Lora, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Lora font: on or off', 'adelle' ) ) wp_register_style( 'adelle-lora', "https://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic" ); } add_action( 'init', 'adelle_fonts' ); /** * Enqueue font styles in custom header admin */ function adelle_admin_fonts( $hook_suffix ) { if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'adelle-muli' ); wp_enqueue_style( 'adelle-montserrat' ); wp_enqueue_style( 'adelle-lora' ); } add_action( 'admin_enqueue_scripts', 'adelle_admin_fonts' ); /** * Register widgetized area and update sidebar with default widgets */ function adelle_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'adelle' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'adelle_widgets_init' ); /** * Enqueue scripts and styles */ function adelle_scripts() { wp_enqueue_style( 'adelle-style', get_stylesheet_uri() ); wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.3.0' ); wp_enqueue_style( 'adelle-muli' ); wp_enqueue_style( 'adelle-lora' ); wp_enqueue_style( 'adelle-montserrat' ); wp_enqueue_script( 'adelle-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'adelle-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( 'adelle-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } add_action( 'wp_enqueue_scripts', 'adelle_scripts' ); /** /* If there's a background image or color, disable the confetti background pattern */ function adelle_header_css() { if ( '' != get_background_image() ) : ?>