X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..8ab4a4532479e8db471032b51042ec8c4716d091:/wp-content/themes/twentyfifteen/functions.php diff --git a/wp-content/themes/twentyfifteen/functions.php b/wp-content/themes/twentyfifteen/functions.php index 2c4b59f3..1a8e8a3a 100644 --- a/wp-content/themes/twentyfifteen/functions.php +++ b/wp-content/themes/twentyfifteen/functions.php @@ -154,22 +154,34 @@ function twentyfifteen_fonts_url() { $fonts = array(); $subsets = 'latin,latin-ext'; - /* translators: If there are characters in your language that are not supported by Noto Sans, translate this to 'off'. Do not translate into your own language. */ + /* + * Translators: If there are characters in your language that are not supported + * by Noto Sans, translate this to 'off'. Do not translate into your own language. + */ if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Sans:400italic,700italic,400,700'; } - /* translators: If there are characters in your language that are not supported by Noto Serif, translate this to 'off'. Do not translate into your own language. */ + /* + * Translators: If there are characters in your language that are not supported + * by Noto Serif, translate this to 'off'. Do not translate into your own language. + */ if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Serif:400italic,700italic,400,700'; } - /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */ + /* + * Translators: If there are characters in your language that are not supported + * by Inconsolata, translate this to 'off'. Do not translate into your own language. + */ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Inconsolata:400,700'; } - /* translators: To add an additional character subset specific to your language, translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ + /* + * Translators: To add an additional character subset specific to your language, + * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. + */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' ); if ( 'cyrillic' == $subset ) { @@ -193,6 +205,18 @@ function twentyfifteen_fonts_url() { } endif; +/** + * JavaScript Detection. + * + * Adds a `js` class to the root `` element when JavaScript is detected. + * + * @since Twenty Fifteen 1.1 + */ +function twentyfifteen_javascript_detection() { + echo "\n"; +} +add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 ); + /** * Enqueue scripts and styles. * @@ -226,7 +250,7 @@ function twentyfifteen_scripts() { wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' ); } - wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20141212', true ); + wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array( 'expand' => '' . __( 'expand child menu', 'twentyfifteen' ) . '', 'collapse' => '' . __( 'collapse child menu', 'twentyfifteen' ) . '', @@ -266,7 +290,7 @@ function twentyfifteen_post_nav_background() { if ( $next && has_post_thumbnail( $next->ID ) ) { $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' ); $css .= ' - .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); } + .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; } .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; } .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); } ';