Changeset 27691 for trunk/src/wp-includes/default-widgets.php
- Timestamp:
- 03/24/2014 09:07:10 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-widgets.php
r27561 r27691 867 867 $title = __('Untitled'); 868 868 869 $desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) ); 870 $excerpt = wp_html_excerpt( $desc, 360 ); 871 872 // Append ellipsis. Change existing [...] to […]. 873 if ( '[...]' == substr( $excerpt, -5 ) ) 874 $excerpt = substr( $excerpt, 0, -5 ) . '[…]'; 875 elseif ( '[…]' != substr( $excerpt, -10 ) && $desc != $excerpt ) 876 $excerpt .= ' […]'; 877 878 $excerpt = esc_html( $excerpt ); 879 869 $desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ); 870 $desc = esc_attr( strip_tags( $desc ) ); 871 $desc = trim( str_replace( array( "\n", "\r" ), ' ', $desc ) ); 872 $desc = wp_html_excerpt( $desc, 360 ); 873 874 $summary = ''; 880 875 if ( $show_summary ) { 881 $summary = "<div class='rssSummary'>$excerpt</div>"; 882 } else { 883 $summary = ''; 876 $summary = $desc; 877 878 // Append ellipsis. Change existing [...] to […]. 879 if ( '[...]' == substr( $summary, -5 ) ) { 880 $summary = substr( $summary, 0, -5 ) . '[…]'; 881 } elseif ( '[…]' != substr( $summary, -10 ) && $desc !== $summary ) { 882 $summary .= ' […]'; 883 } 884 885 $summary = '<div class="rssSummary">' . esc_html( $summary ) . '</div>'; 884 886 } 885 887 … … 904 906 if ( $link == '' ) { 905 907 echo "<li>$title{$date}{$summary}{$author}</li>"; 908 } elseif ( $show_summary ) { 909 echo "<li><a class='rsswidget' href='$link'>$title</a>{$date}{$summary}{$author}</li>"; 906 910 } else { 907 echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$ summary}{$author}</li>";911 echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$author}</li>"; 908 912 } 909 913 }
Note: See TracChangeset
for help on using the changeset viewer.