WC_Widget_Brand_Nav::get_chosen_attributes
Gets the currently selected attributes
Метод класса: WC_Widget_Brand_Nav{}
Хуков нет.
Возвращает
Массив.
Использование
$WC_Widget_Brand_Nav = new WC_Widget_Brand_Nav(); $WC_Widget_Brand_Nav->get_chosen_attributes();
Код WC_Widget_Brand_Nav::get_chosen_attributes() WC Widget Brand Nav::get chosen attributes WC 10.4.2
public function get_chosen_attributes() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! empty( $_GET['filter_product_brand'] ) ) {
$filter_product_brand = wc_clean( wp_unslash( $_GET['filter_product_brand'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return array_map( 'intval', explode( ',', $filter_product_brand ) );
}
return array();
}