~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyfourteen/inc/template-tags.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
 
190
190
        <?php else : ?>
191
191
 
192
 
        <a class="post-thumbnail" href="<?php the_permalink(); ?>">
 
192
        <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
193
193
        <?php
194
194
                if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
195
195
                        the_post_thumbnail( 'twentyfourteen-full-width' );
196
196
                } else {
197
 
                        the_post_thumbnail();
 
197
                        the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
198
198
                }
199
199
        ?>
200
200
        </a>
201
201
 
202
202
        <?php endif; // End is_singular()
203
203
}
 
204
 
 
205
if ( ! function_exists( 'twentyfourteen_excerpt_more' ) && ! is_admin() ) :
 
206
/**
 
207
 * Replaces "[...]" (appended to automatically generated excerpts) with ...
 
208
 * and a Continue reading link.
 
209
 *
 
210
 * @since Twenty Fourteen 1.3
 
211
 *
 
212
 * @param string $more Default Read More excerpt link.
 
213
 * @return string Filtered Read More excerpt link.
 
214
 */
 
215
function twentyfourteen_excerpt_more( $more ) {
 
216
        $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
 
217
                esc_url( get_permalink( get_the_ID() ) ),
 
218
                        /* translators: %s: Name of current post */
 
219
                        sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
 
220
                );
 
221
        return ' &hellip; ' . $link;
 
222
}
 
223
add_filter( 'excerpt_more', 'twentyfourteen_excerpt_more' );
 
224
endif;