WPSEO_Replace_Vars::retrieve_post_content()
Retrieve the post/page/cpt content for use as replacement string.
Метод класса: WPSEO_Replace_Vars{}
Хуков нет.
Возвращает
Строку|null
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->retrieve_post_content();
Код WPSEO_Replace_Vars::retrieve_post_content() WPSEO Replace Vars::retrieve post content Yoast 24.9
private function retrieve_post_content() { $replacement = null; // The check `post_password_required` is because content must be hidden for a post with a password. if ( ! empty( $this->args->ID ) && $this->args->post_content !== '' && ! post_password_required( $this->args->ID ) ) { $content = strip_shortcodes( $this->args->post_content ); $replacement = wp_strip_all_tags( $content ); } return $replacement; }