Changeset 13229
- Timestamp:
- 02/04/2022 04:55:37 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/10.0/src/bp-core/bp-core-widgets.php
r13153 r13229 70 70 71 71 $callbacks = array( 72 ' bp_core_register_login_widget',73 ' bp_members_register_members_widget',74 ' bp_members_register_whos_online_widget',75 ' bp_members_register_recently_active_widget',72 'BP_Core_Login_Widget' => 'bp_core_register_login_widget', 73 'BP_Core_Members_Widget' => 'bp_members_register_members_widget', 74 'BP_Core_Whos_Online_Widget' => 'bp_members_register_whos_online_widget', 75 'BP_Core_Recently_Active_Widget' => 'bp_members_register_recently_active_widget', 76 76 ); 77 77 78 78 if ( bp_is_active( 'friends' ) ) { 79 $callbacks[ ] = 'bp_friends_register_friends_widget';79 $callbacks['BP_Core_Friends_Widget'] = 'bp_friends_register_friends_widget'; 80 80 } 81 81 82 82 if ( bp_is_active( 'groups' ) ) { 83 $callbacks[ ] = 'bp_groups_register_groups_widget';83 $callbacks['BP_Groups_Widget'] = 'bp_groups_register_groups_widget'; 84 84 } 85 85 86 86 if ( bp_is_active( 'messages' ) ) { 87 $callbacks[ ] = 'bp_messages_register_sitewide_notices_widget';87 $callbacks['BP_Messages_Sitewide_Notices_Widget'] = 'bp_messages_register_sitewide_notices_widget'; 88 88 } 89 89 90 90 if ( bp_is_active( 'blogs' ) && bp_is_active( 'activity' ) && bp_is_root_blog() ) { 91 $callbacks[ ] = 'bp_blogs_register_recent_posts_widget';91 $callbacks['BP_Blogs_Recent_Posts_Widget'] = 'bp_blogs_register_recent_posts_widget'; 92 92 } 93 93 94 foreach ( $callbacks as $callback ) { 94 foreach ( $callbacks as $widget_id => $callback ) { 95 $widget_base = strtolower( $widget_id ); 96 97 // If there's an active widget, we need to carry on loading it. 98 if ( is_active_widget( false, false, $widget_base ) ) { 99 continue; 100 } 101 95 102 remove_action( 'widgets_init', $callback ); 96 103 }
Note: See TracChangeset
for help on using the changeset viewer.