BBP_Stats_Widget::widget( mixed $args = array(), array $instance = array() )
Displays the output, the statistics
Description
Parameters
- $args
-
(Optional) Arguments
Default value: array()
- $instance
-
(Optional) Instance
Default value: array()
Source
File: bp-forums/common/widgets.php
public function widget( $args = array(), $instance = array() ) {
// Get widget settings
$settings = $this->parse_settings( $instance );
// Typical WordPress filter
$settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
// Forums widget title filter
$settings['title'] = apply_filters( 'bbp_stats_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( 'content', 'statistics' );
echo $args['after_widget'];
}
Changelog
| Version | Description |
|---|---|
| bbPress (r4509) | 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.