Changeset 22049
- Timestamp:
- 09/27/2012 07:30:27 AM (12 years ago)
- Location:
- trunk/wp-content/themes/twentytwelve
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r22020 r22049 99 99 * Adds JavaScript for handling the navigation menu hide-and-show behavior. 100 100 */ 101 wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), ' 20120920', true );101 wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true ); 102 102 103 103 /* … … 113 113 * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 ); 114 114 */ 115 /* translators: If there are characters in your language that are not supported by Open Sans, 116 enter 'disable-open-sans'. Otherwise enter 'enable-open-sans'. Do not translate into your own language. */ 117 if ( false === strpos( _x( 'enable-open-sans', 'Open Sans font: enable or disable', 'twentytwelve' ), 'disable' ) ) { 115 116 /* translators: If there are characters in your language that are not supported 117 by Open Sans, translate this to 'off'. Do not translate into your own language. */ 118 if ( 'off' == _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) { 119 118 120 $subsets = 'latin,latin-ext'; 119 /* translators: To add an additional Open Sans character subset specific to your language enter 'greek', 'cyrillic' or 'vietnamese'. 120 Otherwise enter 'open-sans-subset'. Do not translate into your own language. */121 $add_subset = _x( 'open-sans-subset', 'Additional Open Sans font subset: greek, cyrillic or vietnamese', 'twentytwelve' );122 123 if ( in_array( $add_subset, array( 'greek', 'cyrillic', 'vietnamese' ) ) ) {124 $character_sets = array( 125 'greek' => 'greek,greek-ext',126 'cyrillic' => 'cyrillic,cyrillic-ext',127 'vietnamese' => 'vietnamese'128 );129 $subsets = implode( ',', array( $subsets, $character_sets[ $add_subset ] ) );130 }121 122 /* translators: To add an additional Open Sans character subset specific to your language, translate 123 this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ 124 125 $subset = _x( '', 'Open Sans font: add new subset (greek, cyrllic, vietnamese)', 'twentytwelve' ); 126 127 if ( $subset == 'cyrillic' ) 128 $subsets .= ',cyrillic,cyrillic-ext'; 129 elseif ( $subset == 'greek' ) 130 $subsets .= ',greek,greek-ext'; 131 elseif ( $subsets == 'vietnamese' ) 132 $subsets .= ',vietnamese'; 131 133 132 134 $protocol = is_ssl() ? 'https' : 'http'; 133 135 $query_args = array( 134 136 'family' => 'Open+Sans:400italic,700italic,400,700', 135 'subset' => $subsets 137 'subset' => $subsets, 136 138 ); 137 139 wp_enqueue_style( 'twentytwelve-fonts', add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ), array(), null ); … … 142 144 */ 143 145 wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); 144 145 /*146 * Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions.147 * Ideally, should load after main CSS file.148 * See html5.js link in header.php.149 *150 * @todo depends on IE dependency being in core for JS enqueuing151 * before we can move here properly: see http://core.trac.wordpress.org/ticket/16024152 */153 146 } 154 147 add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); -
trunk/wp-content/themes/twentytwelve/header.php
r22014 r22049 22 22 <link rel="profile" href="http://gmpg.org/xfn/11" /> 23 23 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 24 <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?> 24 25 <!--[if lt IE 9]> 25 26 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
Note: See TracChangeset
for help on using the changeset viewer.