Remove usage of WP function get_the_content
[MAILPOET-3861]
This commit is contained in:
@@ -39,9 +39,9 @@ class PostContentManager {
|
|||||||
if ($this->wp->hasExcerpt($post)) {
|
if ($this->wp->hasExcerpt($post)) {
|
||||||
return self::stripShortCodes($this->wp->getTheExcerpt($post));
|
return self::stripShortCodes($this->wp->getTheExcerpt($post));
|
||||||
}
|
}
|
||||||
return $this->generateExcerpt($this->wp->getTheContent(null, false, $post));
|
return $this->generateExcerpt($post->post_content); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||||
}
|
}
|
||||||
return self::stripShortCodes($this->wp->getTheContent(null, false, $post));
|
return self::stripShortCodes($post->post_content); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||||
}
|
}
|
||||||
|
|
||||||
public function filterContent($content, $displayType, $withPostClass = true) {
|
public function filterContent($content, $displayType, $withPostClass = true) {
|
||||||
|
@@ -729,10 +729,6 @@ class Functions {
|
|||||||
_deprecated_hook($hook_name, $version, $replacement, $message);
|
_deprecated_hook($hook_name, $version, $replacement, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTheContent($moreLinkText = null, $stripTeaser = false, $post = null) {
|
|
||||||
return get_the_content($moreLinkText, $stripTeaser, $post);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTheExcerpt($post = null) {
|
public function getTheExcerpt($post = null) {
|
||||||
return get_the_excerpt($post);
|
return get_the_excerpt($post);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user