WordPress.org

Make WordPress Core

Ticket #39860: twentyten.diff

File twentyten.diff, 865 bytes (added by sixhours, 3 years ago)

Check for is_wp_error() before outputting get_the_tag_list() in Twenty Ten

  • wp-content/themes/twentyten/functions.php

     
    536536function twentyten_posted_in() {
    537537        // Retrieves tag list of current post, separated by commas.
    538538        $tag_list = get_the_tag_list( '', ', ' );
    539         if ( $tag_list ) {
     539        if ( $tag_list && ! is_wp_error( $tag_list ) ) {
    540540                $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    541541        } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    542542                $posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );