Automattic\WooCommerce\Internal\Admin\Orders
ListTable::print_hidden_form_fields
Outputs hidden fields used to retain state when filtering.
Метод класса: ListTable{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->print_hidden_form_fields(): void;
Код ListTable::print_hidden_form_fields() ListTable::print hidden form fields WC 10.6.2
private function print_hidden_form_fields(): void {
echo '<input type="hidden" name="page" value="wc-orders' . ( 'shop_order' === $this->order_type ? '' : '--' . $this->order_type ) . '" >'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$state_params = array(
'paged',
'status',
);
foreach ( $state_params as $param ) {
if ( ! isset( $_GET[ $param ] ) ) {
continue;
}
echo '<input type="hidden" name="' . esc_attr( $param ) . '" value="' . esc_attr( sanitize_text_field( wp_unslash( $_GET[ $param ] ) ) ) . '" >';
}
}