コード例 #1
0
ファイル: functions.php プロジェクト: Tamiiy/spartan-english
 function medics_setup()
 {
     global $content_width;
     if (!isset($content_width)) {
         $content_width = 745;
     }
     /*
      * Make medics theme available for translation.
      */
     load_theme_textdomain('medics', get_template_directory() . '/languages');
     // This theme styles the visual editor to resemble the theme style.
     add_editor_style(array('css/editor-style.css', medics_font_url()));
     // Add RSS feed links to <head> for posts and comments.
     add_theme_support('automatic-feed-links');
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(672, 372, true);
     add_image_size('medics-full-width', 1038, 576, true);
     // This theme uses wp_nav_menu() in two locations.
     register_nav_menus(array('primary' => __('Top primary menu', 'medics'), 'secondary' => __('Footer Secondary menu', 'medics')));
     /*
      * Switch default core markup for search form, comment form, and comments
      * to output valid HTML5.
      */
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list'));
     add_theme_support('custom-background', apply_filters('medics_custom_background_args', array('default-color' => 'f5f5f5')));
     // Add support for featured content.
     add_theme_support('featured-content', array('featured_content_filter' => 'medics_get_featured_posts', 'max_posts' => 6));
     // This theme uses its own gallery styles.
     add_filter('use_default_gallery_style', '__return_false');
 }
コード例 #2
0
/**
 * Loads our special font CSS files.
 */
function medics_custom_header_fonts()
{
    // Add Open Sans and Bitter fonts.
    wp_enqueue_style('medics-fonts', medics_font_url(), array(), null);
}