removing images and headings from the excerpt

This commit is contained in:
Amine Ben hammou
2018-06-01 11:21:59 +00:00
parent 8793d904fb
commit 67b66856f5
2 changed files with 10 additions and 11 deletions

View File

@@ -45,8 +45,8 @@ class PostContentManager {
// strip useless tags
$tags_not_being_stripped = array(
'<img>', '<p>', '<em>', '<span>', '<b>', '<strong>', '<i>', '<h1>',
'<h2>', '<h3>', '<a>', '<ul>', '<ol>', '<li>', '<br>', '<blockquote>'
'<p>', '<em>', '<span>', '<b>', '<strong>', '<i>',
'<a>', '<ul>', '<ol>', '<li>', '<br>', '<blockquote>'
);
$content = strip_tags($content, implode('', $tags_not_being_stripped));
if($with_post_class) {