Remove usage of WP function get_the_content

[MAILPOET-3861]
This commit is contained in:
Jan Lysý
2021-10-11 17:06:46 +02:00
committed by Veljko V
parent 3812d6c15e
commit 483dc3c7d9
2 changed files with 2 additions and 6 deletions

View File

@@ -39,9 +39,9 @@ class PostContentManager {
if ($this->wp->hasExcerpt($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) {

View File

@@ -729,10 +729,6 @@ class Functions {
_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) {
return get_the_excerpt($post);
}