WC_Widget_Brand_Nav::update()
Update function.
Метод класса: WC_Widget_Brand_Nav{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_Widget_Brand_Nav = new WC_Widget_Brand_Nav(); $WC_Widget_Brand_Nav->update( $new_instance, $old_instance );
- $new_instance(массив) (обязательный)
- The new settings for the particular instance of the widget.
- $old_instance(массив) (обязательный)
- The old settings for the particular instance of the widget.
Заметки
- Смотрите: WP_Widget->update
Код WC_Widget_Brand_Nav::update() WC Widget Brand Nav::update WC 9.8.2
public function update( $new_instance, $old_instance ) { global $woocommerce; if ( empty( $new_instance['title'] ) ) { $new_instance['title'] = __( 'Brands', 'woocommerce' ); } $instance['title'] = wp_strip_all_tags( stripslashes( $new_instance['title'] ) ); $instance['display_type'] = stripslashes( $new_instance['display_type'] ); return $instance; }