WordPress.org

Make WordPress Core

Changeset 16782


Ignore:
Timestamp:
12/07/10 23:31:35 (3 years ago)
Author:
nacin
Message:

Add 'View Galleries' link for post formats. fixes #15506.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/loop.php

    r16726 r16782  
    5959?> 
    6060 
    61 <?php /* How to display posts in the Gallery category. */ ?> 
     61<?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> 
    6262 
    63     <?php if ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) || 'gallery' == get_post_format( $post->ID ) ) : ?> 
     63    <?php if ( 'gallery' == get_post_format( $post->ID ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 
    6464        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    6565            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> 
     
    9393 
    9494            <div class="entry-utility"> 
    95             <?php if ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 
     95            <?php if ( 'gallery' == get_post_format( $post->ID ) ) : ?> 
     96                <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 
     97                <span class="meta-sep">|</span> 
     98            <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 
    9699                <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 
    97100                <span class="meta-sep">|</span> 
     
    102105        </div><!-- #post-## --> 
    103106 
    104 <?php /* How to display posts in the asides category */ ?> 
     107<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> 
    105108 
    106     <?php elseif ( in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) || 'aside' == get_post_format( $post->ID ) ) : ?> 
     109    <?php elseif ( 'aside' == get_post_format( $post->ID ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> 
    107110        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    108111 
Note: See TracChangeset for help on using the changeset viewer.