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