WPSEO_Bulk_List_Table::__construct()publicYoast 1.0

Class constructor.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Bulk_List_Table = new WPSEO_Bulk_List_Table();
$WPSEO_Bulk_List_Table->__construct( $args );
$args(массив)
The arguments.
По умолчанию: []

Код WPSEO_Bulk_List_Table::__construct() Yoast 24.7

public function __construct( $args = [] ) {
	parent::__construct( $this->settings );

	$args = wp_parse_args(
		$args,
		[
			'nonce'        => '',
			'input_fields' => [],
		]
	);

	$this->input_fields = $args['input_fields'];
	if ( isset( $_SERVER['REQUEST_URI'] ) ) {
		$this->request_url = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
	}

	$this->current_page   = ( ! empty( $this->input_fields['paged'] ) ) ? $this->input_fields['paged'] : 1;
	$this->current_filter = ( ! empty( $this->input_fields['post_type_filter'] ) ) ? $this->input_fields['post_type_filter'] : 1;
	$this->current_status = ( ! empty( $this->input_fields['post_status'] ) ) ? $this->input_fields['post_status'] : 1;
	$this->current_order  = [
		'order'   => ( ! empty( $this->input_fields['order'] ) ) ? $this->input_fields['order'] : 'asc',
		'orderby' => ( ! empty( $this->input_fields['orderby'] ) ) ? $this->input_fields['orderby'] : 'post_title',
	];

	$this->nonce    = $args['nonce'];
	$this->page_url = "&nonce={$this->nonce}&type={$this->page_type}#top#{$this->page_type}";

	$this->populate_editable_post_types();
}