tag in the document head, and expect WordPress to * provide it for us. * * @since Misty Lake 1.2.1 */ add_theme_support( 'title-tag' ); /** * Enable support for Post Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'mistylake-thumbnail', '619', '9999' ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'mistylake' ), ) ); /** * Add support for custom backgrounds */ add_theme_support( 'custom-background' ); /** * Add support for required post formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); } endif; // mistylake_setup add_action( 'after_setup_theme', 'mistylake_setup' ); /** * Enqueue Google Fonts */ function mistylake_fonts() { /* translators: If there are characters in your language that are not supported by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'mistylake' ) ) { $opensans_subsets = 'latin,latin-ext'; /* translators: To add an additional Open Sans character subset specific to your language, translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ $opensans_subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'mistylake' ); if ( 'cyrillic' == $opensans_subset ) $opensans_subsets .= ',cyrillic,cyrillic-ext'; elseif ( 'greek' == $opensans_subset ) $opensans_subsets .= ',greek,greek-ext'; elseif ( 'vietnamese' == $opensans_subset ) $opensans_subsets .= ',vietnamese'; $opensans_query_args = array( 'family' => 'Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic', 'subset' => $opensans_subsets, ); wp_register_style( 'mistylake-open-sans', add_query_arg( $opensans_query_args, "https://fonts.googleapis.com/css" ), array(), null ); } /* translators: If there are characters in your language that are not supported by Droid Serif, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Droid Serif font: on or off', 'mistylake' ) ) wp_register_style( 'mistylake-droid-serif', "https://fonts.googleapis.com/css?family=Droid+Serif:400,400italic,400bold&subset=latin" ); } add_action( 'init', 'mistylake_fonts' ); /** * Enqueue font styles in custom header admin */ function mistylake_admin_fonts() { wp_enqueue_style( 'mistylake-open-sans' ); wp_enqueue_style( 'mistylake-droid-serif' ); } add_action( 'admin_print_styles-appearance_page_custom-header', 'mistylake_admin_fonts' ); /** * Register widgetized area and update sidebar with default widgets * * @since Misty Lake 1.0 */ function mistylake_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'mistylake' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '