Yoast\WP\SEO\Bulk_Editor\Domain\Posts

Posts_Query::__construct │ public │ Yoast 1.0

The constructor.

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

Хуков нет.

Возвращает

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

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

$Posts_Query = new Posts_Query();
$Posts_Query->__construct( $content_type, $page, $per_page, $search, $statuses, ?int $author_id, $needs_improvement, $scores_enabled, $include_ids );
$content_type(строка) (обязательный)
The content type to get posts for.
$page(int) (обязательный)
The page of results to get, starting at 1.
$per_page(int) (обязательный)
The number of posts per page.
$search(строка) (обязательный)
The search term, or an empty string for no search.
$statuses(array) (обязательный)
The post statuses to include.
?int $author_id
.
По умолчанию: null
$needs_improvement(array)
The needs-improvement fields to filter by (a field matches when empty, or — for search fields with SEO analysis enabled — when its per-field score needs improvement), or an empty array for no such filter.
По умолчанию: []
$scores_enabled(true|false)
Whether the per-field scores may back the needs-improvement filter.
По умолчанию: true
$include_ids(array)
The post IDs to limit posts to, or an empty array for no restriction.
По умолчанию: []

Код Posts_Query::__construct() Yoast 28.9

public function __construct(
	string $content_type,
	int $page,
	int $per_page,
	string $search,
	array $statuses,
	?int $author_id = null,
	array $needs_improvement = [],
	bool $scores_enabled = true,
	array $include_ids = []
) {
	$this->content_type      = $content_type;
	$this->page              = $page;
	$this->per_page          = $per_page;
	$this->search            = $search;
	$this->statuses          = $statuses;
	$this->author_id         = $author_id;
	$this->needs_improvement = $needs_improvement;
	$this->scores_enabled    = $scores_enabled;
	$this->include_ids       = $include_ids;
}