'f5f5f5', 'default-image' => '', ) ) ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'museum' ), 'social' => __( 'Social Links', 'museum' ), ) ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link' ) ); // Use HTML5 elements for these features add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) ); // Adds additional stylesheets to the TinyMCE editor if needed. add_editor_style( array( 'editor-style.css', museum_fonts_url() ) ); // Remove default gallery styles add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // museum_setup add_action( 'after_setup_theme', 'museum_setup' ); /** * Register widgetized area and update sidebar with default widgets. */ function museum_widgets_init() { register_sidebar( array( 'name' => __( 'Footer Sidebar One', 'museum' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Sidebar Two', 'museum' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'museum_widgets_init' ); /** * Enqueue scripts and styles. */ function museum_scripts() { wp_enqueue_style( 'museum-style', get_stylesheet_uri() ); wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons/genericons.css', array(), '3.4.1' ); wp_enqueue_style( 'museum-fonts', museum_fonts_url(), array(), null ); wp_enqueue_script( 'museum-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'museum-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' ); } } add_action( 'wp_enqueue_scripts', 'museum_scripts' ); /** * Returns the Google font stylesheet URL, if available. * * The use of Quattrocento Sans and Playfair Display by default is * localized. For languages that use characters not supported by either * font, the font can be disabled. * * @return string Font stylesheet or empty string if disabled. */ function museum_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by Quattrocento Sans, translate this to 'off'. Do not * translate into your own language. */ $quattrocento_sans = _x( 'on', 'Quattrocento Sans font: on or off', 'museum' ); /* Translators: If there are characters in your language that are not * supported by Playfair Display, translate this to 'off'. Do not * translate into your own language. */ $playfair_display = _x( 'on', 'Playfair Display font: on or off', 'museum' ); if ( 'off' !== $quattrocento_sans || 'off' !== $playfair_display ) { $font_families = array(); if ( 'off' !== $quattrocento_sans ) $font_families[] = 'Quattrocento+Sans:400,700'; if ( 'off' !== $playfair_display ) $font_families[] = 'Playfair+Display:400,400italic,700italic'; $query_args = array( 'family' => implode( '|', $font_families ), 'subset' => 'latin,latin-ext', ); $fonts_url = add_query_arg( $query_args, "https://fonts.googleapis.com/css" ); } return esc_url_raw( str_replace( ',', '%2C', $fonts_url ) ); } /** * Appends to the excerpt "more" text. */ function new_excerpt_more( $more ) { global $post; return $more . '' . __( 'Read Post', 'museum' ) . ' ›'; } add_filter( 'excerpt_more', 'new_excerpt_more' ); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';