~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyfourteen/functions.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
        /*
61
61
         * Make Twenty Fourteen available for translation.
62
62
         *
63
 
         * Translations can be added to the /languages/ directory.
 
63
         * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
64
64
         * If you're building a theme based on Twenty Fourteen, use a find and
65
65
         * replace to change 'twentyfourteen' to the name of your theme in all
66
66
         * template files.
67
67
         */
68
 
        load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
 
68
        load_theme_textdomain( 'twentyfourteen' );
69
69
 
70
70
        // This theme styles the visual editor to resemble the theme style.
71
71
        add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
319
319
 
320
320
        // If there is more than 1 attachment in a gallery...
321
321
        if ( count( $attachment_ids ) > 1 ) {
322
 
                foreach ( $attachment_ids as $attachment_id ) {
 
322
                foreach ( $attachment_ids as $idx => $attachment_id ) {
323
323
                        if ( $attachment_id == $post->ID ) {
324
 
                                $next_id = current( $attachment_ids );
 
324
                                $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
325
325
                                break;
326
326
                        }
327
327
                }