diff --git a/wp-content/themes/twentythirteen/functions.php b/wp-content/themes/twentythirteen/functions.php index e1f27ad09b51c5c30f264fc8a0c1db84fe9c9ba8..d1f7d5b482398f5a58becc33ba5130d3e9ffefae 100644 --- a/wp-content/themes/twentythirteen/functions.php +++ b/wp-content/themes/twentythirteen/functions.php @@ -61,12 +61,12 @@ function twentythirteen_setup() { /* * Makes Twenty Thirteen available for translation. * - * Translations can be added to the /languages/ directory. + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentythirteen * If you're building a theme based on Twenty Thirteen, use a find and * replace to change 'twentythirteen' to the name of your theme in all * template files. */ - load_theme_textdomain( 'twentythirteen', get_template_directory() . '/languages' ); + load_theme_textdomain( 'twentythirteen' ); /* * This theme styles the visual editor to resemble the theme style, @@ -173,7 +173,7 @@ function twentythirteen_scripts_styles() { wp_enqueue_script( 'jquery-masonry' ); // Loads JavaScript file with functionality specific to Twenty Thirteen. - wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); + wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true ); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); @@ -190,6 +190,31 @@ function twentythirteen_scripts_styles() { } add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); +/** + * Add preconnect for Google Fonts. + * + * @since Twenty Thirteen 2.1 + * + * @param array $urls URLs to print for resource hints. + * @param string $relation_type The relation type the URLs are printed. + * @return array URLs to print for resource hints. + */ +function twentythirteen_resource_hints( $urls, $relation_type ) { + if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { + if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { + $urls[] = array( + 'href' => 'https://fonts.gstatic.com', + 'crossorigin', + ); + } else { + $urls[] = 'https://fonts.gstatic.com'; + } + } + + return $urls; +} +add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 ); + /** * Filter the page title. * @@ -421,9 +446,9 @@ function twentythirteen_the_attached_image() { // If there is more than 1 attachment in a gallery... if ( count( $attachment_ids ) > 1 ) { - foreach ( $attachment_ids as $attachment_id ) { + foreach ( $attachment_ids as $idx => $attachment_id ) { if ( $attachment_id == $post->ID ) { - $next_id = current( $attachment_ids ); + $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; break; } } diff --git a/wp-content/themes/twentythirteen/js/functions.js b/wp-content/themes/twentythirteen/js/functions.js index e0d759b9cb28666f57bf2b630b653c5b2d2ea18a..88e8d0b5a754903dadf9c8401493a997eff7bad2 100644 --- a/wp-content/themes/twentythirteen/js/functions.js +++ b/wp-content/themes/twentythirteen/js/functions.js @@ -119,9 +119,13 @@ /** * Arranges footer widgets vertically. */ - if ( $.isFunction( $.fn.masonry ) ) { - var columnWidth = body.is( '.sidebar' ) ? 228 : 245, - widgetArea = $( '#secondary .widget-area' ); + $( function() { + var columnWidth, widgetArea; + if ( ! $.isFunction( $.fn.masonry ) ) { + return; + } + columnWidth = body.is( '.sidebar' ) ? 228 : 245; + widgetArea = $( '#secondary .widget-area' ); widgetArea.masonry( { itemSelector: '.widget', @@ -157,5 +161,5 @@ } } ); } - } + } ); } )( jQuery ); \ No newline at end of file diff --git a/wp-content/themes/twentythirteen/readme.txt b/wp-content/themes/twentythirteen/readme.txt index 0fd7c9a91569bbb35e60cc6289e72538496fbcd9..b583fbe694ed15908844bb28de763ce557ab9482 100644 --- a/wp-content/themes/twentythirteen/readme.txt +++ b/wp-content/themes/twentythirteen/readme.txt @@ -1,11 +1,11 @@ === Twenty Thirteen === Contributors: the WordPress team Requires at least: WordPress 3.6 -Tested up to: WordPress 4.6-trunk -Stable tag: 1.9 +Tested up to: WordPress 4.8-trunk +Stable tag: 2.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready +Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready == Description == The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small. @@ -22,7 +22,7 @@ For more information about Twenty Thirteen please go to https://codex.wordpress. == Copyright == -Twenty Thirteen WordPress Theme, Copyright 2013-2015 WordPress.org & Automattic.com +Twenty Thirteen WordPress Theme, Copyright 2013-2016 WordPress.org & Automattic.com Twenty Thirteen is Distributed under the terms of the GNU GPL This program is free software: you can redistribute it and/or modify @@ -41,12 +41,22 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas Licenses: MIT/GPL2 Source: https://github.com/aFarkas/html5shiv -Genericons icon font, Copyright 2013-2015 Automattic.com +Genericons icon font, Copyright 2013-2016 Automattic.com License: GNU GPL, Version 2 (or later) Source: http://www.genericons.com == Changelog == += 2.1 = +* Released: December 6, 2016 + +https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_2.1 + += 2.0 = +* Released: August 15, 2016 + +https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_2.0 + = 1.9 = * Released: April 12, 2016 diff --git a/wp-content/themes/twentythirteen/style.css b/wp-content/themes/twentythirteen/style.css index b947dc900afb46d087fb30f39c2c5c4a39e6bdb3..de890f84348d679cc202dd9078ad5f699516bf14 100644 --- a/wp-content/themes/twentythirteen/style.css +++ b/wp-content/themes/twentythirteen/style.css @@ -4,10 +4,10 @@ Theme URI: https://wordpress.org/themes/twentythirteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small. -Version: 1.9 +Version: 2.1 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready +Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready Text Domain: twentythirteen This theme, like WordPress, is licensed under the GPL.