WordPress.org

Make WordPress Core

Ticket #23837: 23837.diff

File 23837.diff, 1.9 KB (added by lancewillett, 2 years ago)
  • wp-includes/category-template.php

     
    1212 * @since 1.0.0 
    1313 * @see get_term_link() 
    1414 * 
    15  * @param int|object $category Category ID or object. 
     15 * @param int|object|string $category Category ID, object, or string. 
    1616 * @return string Link on success, empty string if category does not exist. 
    1717 */ 
    1818function get_category_link( $category ) { 
    19         if ( ! is_object( $category ) ) 
    20                 $category = (int) $category; 
    21  
    2219        $category = get_term_link( $category, 'category' ); 
    2320 
    2421        if ( is_wp_error( $category ) ) 
  • wp-content/themes/twentyten/loop.php

     
    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> 
    9595                        <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 
    96                                 <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> 
     96                                <a href="<?php echo get_category_link( _x( 'gallery', 'gallery category slug', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 
    9797                                <span class="meta-sep">|</span> 
    9898                        <?php endif; ?> 
    9999                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>