diff --git src/bp-blogs/bp-blogs-widgets.php src/bp-blogs/bp-blogs-widgets.php
index bc77206..a79aaca 100644
|
|
function bp_blogs_register_widgets() { |
21 | 21 | global $wpdb; |
22 | 22 | |
23 | 23 | if ( bp_is_active( 'activity' ) && bp_is_root_blog( $wpdb->blogid ) ) { |
24 | | add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Blogs_Recent_Posts_Widget");' ) ); |
| 24 | add_action( 'widgets_init', function() { register_widget( 'BP_Blogs_Recent_Posts_Widget' ); } ); |
25 | 25 | } |
26 | 26 | } |
27 | 27 | add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' ); |
diff --git src/bp-core/bp-core-widgets.php src/bp-core/bp-core-widgets.php
index 14e5fb9..140c69f 100644
|
|
if ( ! buddypress()->do_autoload ) { |
20 | 20 | * @since 1.0.0 |
21 | 21 | */ |
22 | 22 | function bp_core_register_widgets() { |
23 | | add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Login_Widget");') ); |
| 23 | add_action( 'widgets_init', function() { register_widget( 'BP_Core_Login_Widget' ); } ); |
24 | 24 | } |
25 | 25 | add_action( 'bp_register_widgets', 'bp_core_register_widgets' ); |
diff --git src/bp-friends/bp-friends-widgets.php src/bp-friends/bp-friends-widgets.php
index a3e567e..4b9a0aa 100644
|
|
function bp_friends_register_widgets() { |
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | | add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Core_Friends_Widget");' ) ); |
| 34 | add_action( 'widgets_init', function() { register_widget( 'BP_Core_Friends_Widget' ); } ); |
35 | 35 | } |
36 | 36 | add_action( 'bp_register_widgets', 'bp_friends_register_widgets' ); |
37 | 37 | |
diff --git src/bp-groups/bp-groups-widgets.php src/bp-groups/bp-groups-widgets.php
index 37911ac..9a2b193 100644
|
|
if ( ! buddypress()->do_autoload ) { |
20 | 20 | * @since 1.0.0 |
21 | 21 | */ |
22 | 22 | function groups_register_widgets() { |
23 | | add_action('widgets_init', create_function('', 'return register_widget("BP_Groups_Widget");') ); |
| 23 | add_action( 'widgets_init', function() { register_widget( 'BP_Groups_Widget' ); } ); |
24 | 24 | } |
25 | 25 | add_action( 'bp_register_widgets', 'groups_register_widgets' ); |
26 | 26 | |
diff --git src/bp-members/bp-members-widgets.php src/bp-members/bp-members-widgets.php
index f83a24a..e72de3f 100644
|
|
if ( ! buddypress()->do_autoload ) { |
24 | 24 | * @since 2.2.0 |
25 | 25 | */ |
26 | 26 | function bp_members_register_widgets() { |
27 | | add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Core_Members_Widget");' ) ); |
28 | | add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Core_Whos_Online_Widget");' ) ); |
29 | | add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Core_Recently_Active_Widget");' ) ); |
| 27 | add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Members_Widget' ); } ); |
| 28 | add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Whos_Online_Widget' ); } ); |
| 29 | add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Recently_Active_Widget' ); } ); |
30 | 30 | } |
31 | 31 | add_action( 'bp_register_widgets', 'bp_members_register_widgets' ); |
32 | 32 | |
diff --git src/bp-messages/bp-messages-widgets.php src/bp-messages/bp-messages-widgets.php
index 3eb8908..8cf8d7b 100644
|
|
if ( ! buddypress()->do_autoload ) { |
20 | 20 | * @since 1.9.0 |
21 | 21 | */ |
22 | 22 | function bp_messages_register_widgets() { |
23 | | add_action( 'widgets_init', create_function('', 'return register_widget( "BP_Messages_Sitewide_Notices_Widget" );') ); |
| 23 | add_action( 'widgets_init', function() { register_widget( 'BP_Messages_Sitewide_Notices_Widget' ); } ); |
24 | 24 | } |
25 | 25 | add_action( 'bp_register_widgets', 'bp_messages_register_widgets' ); |