- Timestamp:
- 09/02/2013 11:02:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/functions.php
r25090 r25217 50 50 */ 51 51 load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' ); 52 53 /* 54 * This theme styles the visual editor to resemble the theme style. 55 */ 56 add_editor_style( array( 'editor-style.css', twentyfourteen_font_url() ) ); 52 57 53 58 // Adds RSS feed links to <head> for posts and comments. … … 175 180 176 181 /** 177 * Register Google fonts for Twenty Fourteen. 178 * 179 * @return void 180 */ 181 function twentyfourteen_fonts() { 182 /* translators: If there are characters in your language that are not supported 183 by Lato, translate this to 'off'. Do not translate into your own language. */ 182 * Register Lato Google font for Twenty Fourteen. 183 * 184 * @return void 185 */ 186 function twentyfourteen_font_url() { 187 $font_url = ''; 188 /* 189 * Translators: If there are characters in your language that are not supported 190 * by Lato, translate this to 'off'. Do not translate into your own language. 191 */ 184 192 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) 185 wp_register_style( 'twentyfourteen-lato', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', array(), null ); 186 } 187 add_action( 'init', 'twentyfourteen_fonts' ); 193 $font_url = add_query_arg( 'family', urlencode( 'Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' ), "//fonts.googleapis.com/css" ); 194 195 return $font_url; 196 } 188 197 189 198 /** … … 213 222 214 223 wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130820', true ); 224 225 // Add Lato font used in the main stylesheet. 226 wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); 215 227 } 216 228 add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
Note: See TracChangeset
for help on using the changeset viewer.