Make WordPress Core


Ignore:
Timestamp:
08/14/2013 04:38:01 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: first pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r24832 r25021  
    3636    ?>
    3737    <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
    38         <h1 class="assistive-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
     38        <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
    3939
    4040    <?php if ( is_single() ) : // navigation links for single posts ?>
     
    183183}
    184184add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
    185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
     185add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
    186186
    187187/**
     
    190190 */
    191191function twentyfourteen_get_template_part() {
    192 
    193     $format = get_post_format();
    194 
    195     switch( $format ) {
    196         case 'aside':
    197         case 'quote':
    198         case 'link':
    199         case 'video':
    200         case 'image':
    201             get_template_part( 'content', 'post-format' );
    202             break;
    203         default:
    204             get_template_part( 'content', get_post_format() );
    205             break;
    206     }
    207 
     192    if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) )
     193        get_template_part( 'content', 'post-format' );
     194    else
     195        get_template_part( 'content', get_post_format() );
    208196}
Note: See TracChangeset for help on using the changeset viewer.