From 76088dd24f525be478ea0dd7a54f46ab267330c5 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 3 Dec 2013 17:27:57 +0000 Subject: [PATCH] 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`. git-svn-id: https://develop.svn.wordpress.org/trunk@26560 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 1dfad29aa3..d5b632b320 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -158,7 +158,7 @@ function twentyfourteen_get_featured_posts() { */ function twentyfourteen_has_featured_posts() { /** This filter is documented in functions.php */ - return ! is_paged() && (bool) apply_filters( 'twentyfourteen_get_featured_posts', false ); + return ! is_paged() && (bool) twentyfourteen_get_featured_posts(); } /** @@ -237,10 +237,10 @@ function twentyfourteen_scripts() { wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' ); // Load our main stylesheet. - wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() ); + wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array( 'twentyfourteen-genericons' ) ); // Load the Internet Explorer specific stylesheet. - wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131110' ); + wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style', 'twentyfourteen-genericons' ), '20131110' ); wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { @@ -275,7 +275,7 @@ add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); * @return void */ function twentyfourteen_admin_fonts() { - wp_enqueue_style( 'twentyfourteen-lato' ); + wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); } add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );