mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Strip shortcodes when making excerpts. Props hailin. fixes #7100
git-svn-id: https://develop.svn.wordpress.org/trunk@8054 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -839,6 +839,9 @@ function human_time_diff( $from, $to = '' ) {
|
||||
function wp_trim_excerpt($text) { // Fakes an excerpt if needed
|
||||
if ( '' == $text ) {
|
||||
$text = get_the_content('');
|
||||
|
||||
$text = strip_shortcodes( $text );
|
||||
|
||||
$text = apply_filters('the_content', $text);
|
||||
$text = str_replace(']]>', ']]>', $text);
|
||||
$text = strip_tags($text);
|
||||
|
||||
Reference in New Issue
Block a user