Wordpress 4.6
[autoinstalls/wordpress.git] / wp-content / themes / twentyfourteen / functions.php
index 9b7cf0b6d8c9d3176c948d8cc8823cbad2436279..f85ef1ca6291e21847377ea6e2898da161d9d27b 100644 (file)
@@ -60,12 +60,12 @@ function twentyfourteen_setup() {
        /*
         * Make Twenty Fourteen 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/twentyfourteen
         * If you're building a theme based on Twenty Fourteen, use a find and
         * replace to change 'twentyfourteen' to the name of your theme in all
         * template files.
         */
-       load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
+       load_theme_textdomain( 'twentyfourteen' );
 
        // This theme styles the visual editor to resemble the theme style.
        add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
@@ -319,9 +319,9 @@ function twentyfourteen_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;
                        }
                }