[buddypress-trac] [BuddyPress] #5143: Add new sitewide messages widget & check for active widget in bp_legacy class

buddypress-trac noreply at wordpress.org
Fri Aug 16 17:45:44 UTC 2013


#5143: Add new sitewide messages widget & check for active widget in bp_legacy
class
--------------------------+-----------------------------
 Reporter:  hnla          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Patch adds new widget to display sitewide messages in sidebars.

 Adds a check on {{{is_active_widget('bp_core_sitewide_messages_widget')}}}
 to wrap:
 {{{add_action( 'wp_footer', array( $this, 'sitewide_notices' ), 9999 );}}}
 in class BP_legacy

 If widget is active we don't render messages via wp_footer.

 My widget class pretty much matches other BP ones but may need adjustments
 / checking over.

 The add_action to register widget is wrapped in a check for {{{
 bp_is_theme_compat_active() }}} to prevent the widget being provided in
 themes running bp-default as it already has messages hardcoded to the main
 sidebar.

 Tested to work as expected for twentytwelve / bp-default themes, single
 site.

 This patch prompted by part of the discussion on #4802.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5143>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list