diff --git a/wp-content/themes/twentytwelve/functions.php b/wp-content/themes/twentytwelve/functions.php index ca6d51111e..51fe27ed8f 100644 --- a/wp-content/themes/twentytwelve/functions.php +++ b/wp-content/themes/twentytwelve/functions.php @@ -98,7 +98,7 @@ function twentytwelve_scripts_styles() { /* * Adds JavaScript for handling the navigation menu hide-and-show behavior. */ - wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120920', true ); + wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true ); /* * Loads our special font CSS file. @@ -112,27 +112,29 @@ function twentytwelve_scripts_styles() { * } * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 ); */ - /* translators: If there are characters in your language that are not supported by Open Sans, - enter 'disable-open-sans'. Otherwise enter 'enable-open-sans'. Do not translate into your own language. */ - if ( false === strpos( _x( 'enable-open-sans', 'Open Sans font: enable or disable', 'twentytwelve' ), 'disable' ) ) { - $subsets = 'latin,latin-ext'; - /* translators: To add an additional Open Sans character subset specific to your language enter 'greek', 'cyrillic' or 'vietnamese'. - Otherwise enter 'open-sans-subset'. Do not translate into your own language. */ - $add_subset = _x( 'open-sans-subset', 'Additional Open Sans font subset: greek, cyrillic or vietnamese', 'twentytwelve' ); - if ( in_array( $add_subset, array( 'greek', 'cyrillic', 'vietnamese' ) ) ) { - $character_sets = array( - 'greek' => 'greek,greek-ext', - 'cyrillic' => 'cyrillic,cyrillic-ext', - 'vietnamese' => 'vietnamese' - ); - $subsets = implode( ',', array( $subsets, $character_sets[ $add_subset ] ) ); - } + /* translators: If there are characters in your language that are not supported + by Open Sans, translate this to 'off'. Do not translate into your own language. */ + if ( 'off' == _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) { + + $subsets = 'latin,latin-ext'; + + /* translators: To add an additional Open Sans character subset specific to your language, translate + this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ + + $subset = _x( '', 'Open Sans font: add new subset (greek, cyrllic, vietnamese)', 'twentytwelve' ); + + if ( $subset == 'cyrillic' ) + $subsets .= ',cyrillic,cyrillic-ext'; + elseif ( $subset == 'greek' ) + $subsets .= ',greek,greek-ext'; + elseif ( $subsets == 'vietnamese' ) + $subsets .= ',vietnamese'; $protocol = is_ssl() ? 'https' : 'http'; $query_args = array( 'family' => 'Open+Sans:400italic,700italic,400,700', - 'subset' => $subsets + 'subset' => $subsets, ); wp_enqueue_style( 'twentytwelve-fonts', add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ), array(), null ); } @@ -141,15 +143,6 @@ function twentytwelve_scripts_styles() { * Loads our main stylesheet. */ wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); - - /* - * Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. - * Ideally, should load after main CSS file. - * See html5.js link in header.php. - * - * @todo depends on IE dependency being in core for JS enqueuing - * before we can move here properly: see http://core.trac.wordpress.org/ticket/16024 - */ } add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); diff --git a/wp-content/themes/twentytwelve/header.php b/wp-content/themes/twentytwelve/header.php index 0613f54bb8..5195c90645 100644 --- a/wp-content/themes/twentytwelve/header.php +++ b/wp-content/themes/twentytwelve/header.php @@ -21,6 +21,7 @@