X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/784f914b1e4b1c62d6657e86397c2e83bcee4295..febc815b2c9d85be5717da9e8d164bd2daa97e31:/wp-content/themes/twentyfourteen/functions.php diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index 9b7cf0b6..f85ef1ca 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -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; } }