Automattic\WooCommerce\Internal\Admin\Orders\MetaBoxes
TaxonomiesMetaBox::sanitize_tax_input()
Sanitize taxonomy input by calling sanitize callbacks for each registered taxonomy.
Метод класса: TaxonomiesMetaBox{}
Хуков нет.
Возвращает
Массив
. Sanitized taxonomy input.
Использование
// private - только в коде основоного (родительского) класса $result = $this->sanitize_tax_input( $taxonomy_data ) : array;
- $taxonomy_data(массив|null) (обязательный)
- Nonce verified taxonomy input.
Код TaxonomiesMetaBox::sanitize_tax_input() TaxonomiesMetaBox::sanitize tax input WC 9.3.3
private function sanitize_tax_input( $taxonomy_data ) : array { $sanitized_tax_input = array(); if ( ! is_array( $taxonomy_data ) ) { return $sanitized_tax_input; } // Convert taxonomy input to term IDs, to avoid ambiguity. foreach ( $taxonomy_data as $taxonomy => $terms ) { $tax_object = get_taxonomy( $taxonomy ); if ( $tax_object && isset( $tax_object->meta_box_sanitize_cb ) ) { $sanitized_tax_input[ $taxonomy ] = call_user_func_array( $tax_object->meta_box_sanitize_cb, array( $taxonomy, $terms ) ); } } return $sanitized_tax_input; }