Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::set_review_status
Sets the $comment_status global based on the current request.
Метод класса: ReviewsListTable{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->set_review_status() : void;
Заметки
- Global. Строка. $comment_status
Код ReviewsListTable::set_review_status() ReviewsListTable::set review status WC 10.3.4
protected function set_review_status() : void {
global $comment_status;
$comment_status = sanitize_text_field( wp_unslash( $_REQUEST['comment_status'] ?? 'all' ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
if ( ! in_array( $comment_status, [ 'all', 'moderated', 'approved', 'spam', 'trash' ], true ) ) {
$comment_status = 'all'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
}
}