WordPress action hook
bp_before_activity_loop
Fired by 12 WordPress plugins, running on 101K+ sites between them.
“Fires before the start of the activity loop.”
How to use bp_before_activity_loop
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'bp_before_activity_loop', function() {
// Your code runs here.
}, 10, 1 );Argument names come from BuddyPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
12 plugins that fire bp_before_activity_loop
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
BuddyPress90,000+ installs
do_action( 'bp_before_activity_loop' )bp-templates/bp-legacy/buddypress/activity/activity-loop.php:15 -
BP Classic6,000+ installs
do_action( 'bp_before_activity_loop' )themes/bp-default/activity/activity-loop.php:14 -
Youzify4,000+ installs
do_action( 'bp_before_activity_loop' )includes/public/templates/activity/activity-loop.php:13 -
BuddyPress Activity Shortcode1,000+ installs
do_action( 'bp_before_activity_loop' )core/class-bpas-shortcode-helper.php:206 -
BuddyPress Wall40+ installs
do_action( 'bp_before_activity_loop' )includes/templates/bp-default/activity/activity-wall-loop.php:14 -
BuddyPress Groupblog40+ installs
do_action( 'bp_before_activity_loop' )themes/bp-groupblog/activity-loop.php:1 -
Suffusion BuddyPress Pack10+ installs
do_action( 'bp_before_activity_loop' )template-1.5/activity/activity-loop.php:14 -
LS Buddypress Activity plus tabs extension10+ installs
do_action( 'bp_before_activity_loop' )lib/class-ls-bpfb-current-group-links-widget.php:51 -
BuddyPress User Activity10+ installs
do_action( 'bp_before_activity_loop' )bp-user-activity.php:92 -
Buddypress Jquery Activity Stream Widget10+ installs
do_action( 'bp_before_activity_loop' )activity/activity-loop.php:2 -
BuddyMobile10+ installs
do_action( 'bp_before_activity_loop' )themes/mobile/iphone/buddypress/activity/activity-loop.php:1 -
External Group RSS tab extension10+ installs
do_action( 'bp_before_activity_loop' )extgr_rss_tab.php:51
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.