'28bea1', 'default-image' => '', ) ) ); /* * 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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 1280 ); add_image_size( 'portfolio-landscape', 480, 360, true ); add_image_size( 'portfolio-portrait', 480, 640, true ); add_image_size( 'portfolio-square', 480, 480, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'espied' ), 'social' => __( 'Social Links Menu', 'espied' ), ) ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', 'gallery', ) ); // Remove default gallery style from pre 3.9. add_filter( 'use_default_gallery_style', '__return_false' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'editor-style.css', 'fonts/genericons.css', sidespied_noto_font_url() ) ); } add_action( 'after_setup_theme', 'espied_setup' ); /** * Register Noto Google fonts for Espied. * * @return string */ function sidespied_noto_font_url() { $noto_font_url = ''; /* translators: If there are characters in your language that are not supported by Noto, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto font: on or off', 'sidespied' ) ) { $noto_font_url = add_query_arg( 'family', urlencode( 'Noto Sans:400,700,400italic,700italic' ), "https://fonts.googleapis.com/css" ); } return $noto_font_url; } remove_action( 'wp_enqueue_scripts', 'espied_scripts' ); /** * Enqueue scripts and styles. */ function sidespied_scripts() { wp_enqueue_style( 'sidespied-noto', sidespied_noto_font_url(), array(), null ); wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.3' ); wp_enqueue_style( 'sidespied-parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'sidespied-style', get_stylesheet_uri() ); wp_dequeue_style( 'espied-style' ); wp_enqueue_script( 'espied-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' ); } wp_enqueue_script( 'espied-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140304', true ); } add_action( 'wp_enqueue_scripts', 'sidespied_scripts', 99 );