strip_shortcodes is used in get_the_excerpt to strip shortcodes from content before generating the excerpt. This is ok, but that function is based on
return preg_replace('/'.$pattern.'/s', '$1$6', $content);
The result is that it does NOT strip ONLY the shortcode, but also ITS CONTENT! So, if you have a shortcode that is embedding the whole post as
[translate_this]my post content[\translate_this]
you have an EMPTY excerpt. Is there any hope to change that statement to
return preg_replace('/'.$pattern.'/s', '$1$4$6', $content);
- The topic ‘There is a SERIOUS problem in strip_shortcodes’ is closed to new replies.