Make WordPress Core

Changeset 17469


Ignore:
Timestamp:
02/21/2011 06:35:37 PM (14 years ago)
Author:
ryan
Message:

3.0 compat for twentyten

File:
1 edited

Legend:

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

    r17111 r17469  
    5858<?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
    5959
    60     <?php if ( 'gallery' == get_post_format( $post->ID ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
     60    <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
    6161        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    6262            <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>
     
    9090
    9191            <div class="entry-utility">
    92             <?php if ( 'gallery' == get_post_format( $post->ID ) ) : ?>
     92            <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
    9393                <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    9494                <span class="meta-sep">|</span>
     
    104104<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
    105105
    106     <?php elseif ( 'aside' == get_post_format( $post->ID ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) )  ) : ?>
     106    <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) )  ) : ?>
    107107        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    108108
Note: See TracChangeset for help on using the changeset viewer.