Changeset 7117
- Timestamp:
- 04/16/2018 11:06:36 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php
r7107 r7117 33 33 34 34 /** 35 * Register custom fonts. 36 */ 37 function get_fonts_url() { 38 $fonts_url = ''; 39 $fonts = array(); 40 $subsets = 'cyrillic,cyrillic-ext,greek,greek-ext,latin,latin-ext,vietnamese'; 41 42 /* 43 * Translators: If there are characters in your language that are not supported 44 * by Source Sans Pro, translate this to 'off'. Do not translate into your own language. 45 */ 46 if ( 'off' !== _x( 'on', 'Source Sans Pro font: on or off', 'wp15' ) ) { 47 $fonts[] = 'Source Sans Pro:400,400i,600,700'; 48 } 49 50 /* 51 * Translators: If there are characters in your language that are not supported 52 * by Crete Round, translate this to 'off'. Do not translate into your own language. 53 */ 54 if ( 'off' !== _x( 'on', 'Crete Round font: on or off', 'wp15' ) ) { 55 $fonts[] = 'Crete Round'; 56 } 57 58 if ( $fonts ) { 59 $fonts_url = add_query_arg( array( 60 'family' => rawurlencode( implode( '|', $fonts ) ), 61 'subset' => rawurlencode( $subsets ), 62 ), 'https://fonts.googleapis.com/css' ); 63 } 64 65 return $fonts_url; 66 } 67 68 /** 35 69 * Enqueue scripts and styles 36 70 */ 37 71 function enqueue_scripts() { 38 72 wp_register_style( 39 ' source-sans-pro',40 'https://fonts.googleapis.com/css?family=Crete+Round|Source+Sans+Pro:400,400i,600,700&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese'73 'twentyseventeen-wp15-fonts', 74 get_fonts_url() 41 75 ); 42 76 … … 49 83 'twentyseventeen-style', 50 84 get_stylesheet_directory_uri() . '/style.css', 51 array( 'twentyseventeen-parent-style', ' source-sans-pro', 'dashicons' ),85 array( 'twentyseventeen-parent-style', 'twentyseventeen-wp15-fonts', 'dashicons' ), 52 86 filemtime( __DIR__ . '/style.css' ) 53 87 );
Note: See TracChangeset
for help on using the changeset viewer.