Yoast\WP\SEO\Bulk_Editor\Domain\Posts

Post::__construct │ public │ Yoast 1.0

The constructor.

Метод класса: Post{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Post = new Post();
$Post->__construct( $id, $title, $status, $edit_link, $focus_keyphrase, $seo_title, $meta_description, $social_title, $social_description, $editable, $needs_improvement, $seo_title_fallback, $meta_description_fallback, $social_title_fallback, $social_description_fallback );
$id(int) (обязательный)
The post ID.
$title(строка) (обязательный)
The post title.
$status(строка) (обязательный)
The post status.
$edit_link(строка) (обязательный)
The URL to edit the post.
$focus_keyphrase(строка) (обязательный)
The focus keyphrase.
$seo_title(строка) (обязательный)
The raw stored SEO title.
$meta_description(строка) (обязательный)
The raw stored meta description.
$social_title(строка) (обязательный)
The raw stored social title.
$social_description(строка) (обязательный)
The raw stored social description.
$editable(true|false) (обязательный)
Whether the current user may edit this post.
$needs_improvement(array<string, bool>)
Whether each field needs improvement, keyed by field param.
По умолчанию: []
$seo_title_fallback(строка)
The post type's SEO title template (empty when stored value is set).
По умолчанию: ''
$meta_description_fallback(строка)
The post type's meta description template (empty when stored value is set).
По умолчанию: ''
$social_title_fallback(строка)
The post type's social title template (empty when stored value is set).
По умолчанию: ''
$social_description_fallback(строка)
The post type's social description template (empty when stored value is set).
По умолчанию: ''

Код Post::__construct() Yoast 28.7

public function __construct(
	int $id,
	string $title,
	string $status,
	string $edit_link,
	string $focus_keyphrase,
	string $seo_title,
	string $meta_description,
	string $social_title,
	string $social_description,
	bool $editable,
	array $needs_improvement = [],
	string $seo_title_fallback = '',
	string $meta_description_fallback = '',
	string $social_title_fallback = '',
	string $social_description_fallback = ''
) {
	$this->id                          = $id;
	$this->title                       = $title;
	$this->status                      = $status;
	$this->edit_link                   = $edit_link;
	$this->focus_keyphrase             = $focus_keyphrase;
	$this->seo_title                   = $seo_title;
	$this->meta_description            = $meta_description;
	$this->social_title                = $social_title;
	$this->social_description          = $social_description;
	$this->editable                    = $editable;
	$this->needs_improvement           = $needs_improvement;
	$this->seo_title_fallback          = $seo_title_fallback;
	$this->meta_description_fallback   = $meta_description_fallback;
	$this->social_title_fallback       = $social_title_fallback;
	$this->social_description_fallback = $social_description_fallback;
}