WordPress.org

Make WordPress Core

Changeset 26560


Ignore:
Timestamp:
12/03/2013 05:27:57 PM (6 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: code cleanup, props kovshenin. See #25946.

  • Filtering twentyfourteen_has_featured_posts() false suggests the filter expects a boolean value, but we expect an array. Use an existing function instead.
  • In both style.css and ie.css use Genericons, so let's not forget to declare the dependancy.
  • Make sure Lato font is enqueued in admin_print_scripts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r26556 r26560  
    159159function twentyfourteen_has_featured_posts() {
    160160    /** This filter is documented in functions.php */
    161     return ! is_paged() && (bool) apply_filters( 'twentyfourteen_get_featured_posts', false );
     161    return ! is_paged() && (bool) twentyfourteen_get_featured_posts();
    162162}
    163163
     
    238238
    239239    // Load our main stylesheet.
    240     wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
     240    wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'twentyfourteen-genericons' ) );
    241241
    242242    // Load the Internet Explorer specific stylesheet.
    243     wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131110' );
     243    wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'twentyfourteen-genericons' ), '20131110' );
    244244    wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
    245245
     
    276276 */
    277277function twentyfourteen_admin_fonts() {
    278     wp_enqueue_style( 'twentyfourteen-lato' );
     278    wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
    279279}
    280280add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );
Note: See TracChangeset for help on using the changeset viewer.