WordPress.org

Making WordPress.org

Changeset 1950


Ignore:
Timestamp:
10/07/2015 09:47:20 PM (6 years ago)
Author:
iandunn
Message:

WordCamp Base: Add post titles to Continue Reading links for screen readers.

Fixes #1289
Props pixolin

Location:
sites/trunk/wordcamp.org/public_html/wp-content/themes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/content.php

    r2 r1950  
    2323    <?php else : ?>
    2424    <div class="entry-content">
    25         <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wcbs' ) ); ?>
     25        <?php the_content( sprintf(
     26            // translators: The title of the post to continue reading
     27            __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wcbs' ),
     28            the_title( '<span class="assistive-text">', '</span> ', false )
     29        ) ); ?>
    2630        <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'wcbs' ), 'after' => '</div>' ) ); ?>
    2731    </div><!-- .entry-content -->
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/twentyten-functions.php

    r2 r1950  
    232232 */
    233233function twentyten_continue_reading_link() {
    234     return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wordcampbase' ) . '</a>';
     234    $link = sprintf(
     235        ' <a href="%s">%s</a>',
     236        esc_url( get_permalink() ),
     237        sprintf(
     238            // translators: The title of the post to continue reading
     239            __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wordcampbase' ),
     240            sprintf( '<span class="assistive-text">%s</span> ', get_the_title() )
     241        )
     242    );
     243
     244    return $link;
    235245}
    236246
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/attachment.php

    r478 r1950  
    103103                        <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    104104
    105 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wordcampbase' ) ); ?>
     105<?php the_content( sprintf(
     106    // translators: The title of the post to continue reading
     107    __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wordcampbase' ),
     108    the_title( '<span class="screen-reader-text">', '</span> ', false )
     109) ); ?>
    106110<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'wordcampbase' ), 'after' => '</div>' ) ); ?>
    107111
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/utils/twentyten-functions.php

    r2 r1950  
    234234 */
    235235function twentyten_continue_reading_link() {
    236     return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wordcampbase' ) . '</a>';
     236    $link = sprintf(
     237        ' <a href="%s">%s</a>',
     238        esc_url( get_permalink() ),
     239        sprintf(
     240            // translators: The title of the post to continue reading
     241            __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wordcampbase' ),
     242            sprintf( '<span class="screen-reader-text">%s</span> ', get_the_title() )
     243        )
     244    );
     245
     246    return $link;
    237247}
    238248
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/loop-attachment.php

    r2 r1950  
    102102                        <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    103103
    104 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wordcampbase' ) ); ?>
     104<?php the_content( sprintf(
     105    // translators: The title of the post to continue reading
     106    __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wordcampbase' ),
     107    the_title( '<span class="screen-reader-text">', '</span> ', false )
     108) ); ?>
    105109<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'wordcampbase' ), 'after' => '</div>' ) ); ?>
    106110
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/loop.php

    r2 r1950  
    136136    <?php else : ?>
    137137            <div class="entry-content">
    138                 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wordcampbase' ) ); ?>
     138                <?php the_content( sprintf(
     139                    // translators: The title of the post to continue reading
     140                    __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'wordcampbase' ),
     141                    the_title( '<span class="screen-reader-text">', '</span> ', false )
     142                ) ); ?>
    139143                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'wordcampbase' ), 'after' => '</div>' ) ); ?>
    140144            </div><!-- .entry-content -->
Note: See TracChangeset for help on using the changeset viewer.