function _action_theme_setup() { /* * Make Theme available for translation. */ load_theme_textdomain('unyson', get_template_directory() . '/languages'); // This theme styles the visual editor to resemble the theme style. add_editor_style(array('css/editor-style.css', fw_theme_font_url())); // Add RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); // Enable support for Post Thumbnails, and declare two sizes. add_theme_support('post-thumbnails'); set_post_thumbnail_size(811, 372, true); add_image_size('fw-theme-full-width', 1038, 576, true); /* * 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', 'gallery', 'caption')); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array('aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery')); // Add support for featured content. add_theme_support('featured-content', array('featured_content_filter' => 'fw_theme_get_featured_posts', 'max_posts' => 6)); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false'); }
<?php if (!defined('ABSPATH')) { die('Direct access forbidden.'); } /** * Include static files: javascript and css */ if (is_admin()) { return; } /** * Enqueue scripts and styles for the front end. */ // Add Lato font, used in the main stylesheet. wp_enqueue_style('fw-theme-lato', fw_theme_font_url(), array(), '1.0'); // Add Genericons font, used in the main stylesheet. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '1.0'); // Load our main stylesheet. wp_enqueue_style('fw-theme-style', get_stylesheet_uri(), array('genericons'), '1.0'); // Load the Internet Explorer specific stylesheet. wp_enqueue_style('fw-theme-ie', get_template_directory_uri() . '/css/ie.css', array('fw-theme-style', 'genericons'), '1.0'); wp_style_add_data('fw-theme-ie', 'conditional', 'lt IE 9'); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } if (is_singular() && wp_attachment_is_image()) { wp_enqueue_script('fw-theme-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '1.0'); } if (is_active_sidebar('sidebar-1')) { wp_enqueue_script('jquery-masonry');
<?php if (!defined('FW')) { die('Forbidden'); } /** * Include static files: javascript and css */ if (is_admin()) { return; } /** * Enqueue scripts and styles for the front end. */ // Add Lato font, used in the main stylesheet. wp_enqueue_style('fw-theme-lato', fw_theme_font_url(), array(), fw()->theme->manifest->get_version()); // Add Genericons font, used in the main stylesheet. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), fw()->theme->manifest->get_version()); // Load our main stylesheet. wp_enqueue_style('fw-theme-style', get_stylesheet_uri(), array('genericons'), fw()->theme->manifest->get_version()); // Load the Internet Explorer specific stylesheet. wp_enqueue_style('fw-theme-ie', get_template_directory_uri() . '/css/ie.css', array('fw-theme-style', 'genericons'), fw()->theme->manifest->get_version()); wp_style_add_data('fw-theme-ie', 'conditional', 'lt IE 9'); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } if (is_singular() && wp_attachment_is_image()) { wp_enqueue_script('fw-theme-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), fw()->theme->manifest->get_version()); } if (is_active_sidebar('sidebar-1')) { wp_enqueue_script('jquery-masonry');