removing top padding from excerpt text
This commit is contained in:
@@ -30,7 +30,7 @@ class PostContentManager {
|
||||
}
|
||||
}
|
||||
|
||||
function filterContent($content) {
|
||||
function filterContent($content, $with_post_class = true) {
|
||||
$content = self::convertEmbeddedContent($content);
|
||||
|
||||
// convert h4 h5 h6 to h3
|
||||
@@ -49,7 +49,9 @@ class PostContentManager {
|
||||
'<h2>', '<h3>', '<a>', '<ul>', '<ol>', '<li>', '<br>', '<blockquote>'
|
||||
);
|
||||
$content = strip_tags($content, implode('', $tags_not_being_stripped));
|
||||
$content = str_replace('<p', '<p class="' . self::WP_POST_CLASS .'"', wpautop($content));
|
||||
if($with_post_class) {
|
||||
$content = str_replace('<p', '<p class="' . self::WP_POST_CLASS .'"', wpautop($content));
|
||||
}
|
||||
$content = trim($content);
|
||||
|
||||
return $content;
|
||||
|
Reference in New Issue
Block a user