BBP_Search_Widget::widget( $args, $instance )
Displays the output, the search form
Description
Source
File: bp-forums/common/widgets.php
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | public function widget( $args , $instance ) { // Bail if search is disabled if ( ! bbp_allow_search() ) return ; // Get widget settings $settings = $this ->parse_settings( $instance ); // Typical WordPress filter $settings [ 'title' ] = apply_filters( 'widget_title' , $settings [ 'title' ], $instance , $this ->id_base ); // Forums filter $settings [ 'title' ] = apply_filters( 'bbp_search_widget_title' , $settings [ 'title' ], $instance , $this ->id_base ); echo $args [ 'before_widget' ]; if ( ! empty ( $settings [ 'title' ] ) ) { echo $args [ 'before_title' ] . $settings [ 'title' ] . $args [ 'after_title' ]; } bbp_get_template_part( 'form' , 'search' ); echo $args [ 'after_widget' ]; } |
Changelog
Version | Description |
---|---|
bbPress (r4579) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.