Ticket #7100: 7100_strip_shortcodes.diff
| File 7100_strip_shortcodes.diff, 1.3 KB (added by , 18 years ago) |
|---|
-
C:/xampp/htdocs/wordpress_trunk/wp-includes/shortcodes.php
134 134 return $out; 135 135 } 136 136 137 /* 138 * stip all the shortcodes from a post's content 139 * returns the content without shortcodes 140 */ 141 function strip_shortcodes( $content ) { 142 143 global $shortcode_tags; 144 145 if (empty($shortcode_tags) || !is_array($shortcode_tags)) 146 return $content; 147 148 $pattern = get_shortcode_regex(); 149 150 return preg_replace('/'.$pattern.'/s', '', $content); 151 152 } 153 137 154 add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() 138 155 139 156 ?> -
C:/xampp/htdocs/wordpress_trunk/wp-includes/formatting.php
839 839 function wp_trim_excerpt($text) { // Fakes an excerpt if needed 840 840 if ( '' == $text ) { 841 841 $text = get_the_content(''); 842 843 $text = strip_shortcodes( $text ); 844 842 845 $text = apply_filters('the_content', $text); 843 846 $text = str_replace(']]>', ']]>', $text); 844 847 $text = strip_tags($text);