'widget_bp_core_sitewide_messages buddypress widget', 'description' => __( 'Display Sitewide Notices posted by the site administrator', 'buddypress' ), ) ); } /** * Render the widget. * * @see WP_Widget::widget() for a description of parameters. * * @param array $args See {@WP_Widget::widget()}. * @param array $args See {@WP_Widget::widget()}. */ public function widget( $args, $instance ) { if ( ! is_user_logged_in() ) { return; } // Don't display the widget if there are no Notices to show $notices = BP_Messages_Notice::get_active(); if ( empty( $notices ) ) { return; } extract( $args ); $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; $title = apply_filters( 'widget_title', $title, $instance ); echo $before_widget; echo $before_title . $title . $after_title; ?>
Widgets. * * @see WP_Widget::form() for a description of parameters. * * @param array $instance See {@WP_Widget::form()}. */ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => '', ) ); $title = strip_tags( $instance['title'] ); ?>