'ahncommerce_widget_search', 'description' => __( 'A search form for your site.', 'ahncommerce' ), 'customize_selective_refresh' => true, 'show_instance_in_rest' => true, ); parent::__construct( 'ahncommerce-search', _x( 'AhnCommerce Search', 'Widget title', 'ahncommerce' ), $widget_ops ); } /** * Outputs the content for the current Search widget instance. * * @since 1.0.0 * * @param array $args Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'. * @param array $instance Settings for the current Search widget instance. */ public function widget( $args, $instance ) { echo '
'; ?>
'; } /** * Outputs the settings form for the Search widget. * * @since 1.0.0 * * @param array $instance Current settings. */ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $title = $instance['title']; ?>

'' ) ); $instance['title'] = sanitize_text_field( $new_instance['title'] ); return $instance; } }