diff --git a/includes/filters.php b/includes/filters.php index 79bb7ff..8c872d5 100644 --- a/includes/filters.php +++ b/includes/filters.php @@ -37,11 +37,13 @@ function activity_sticker_filter_can_delete( $can_delete ) { */ function activity_sticker_filter_cant_do( $can_do ) { - if( bp_get_activity_type() == 'sticky_update' ) + global $activities_template; + + if( ! empty( $activities_template->activity ) && bp_get_activity_type() == 'sticky_update' ) $can_do = false; return $can_do; } add_filter( 'bp_activity_can_favorite', 'activity_sticker_filter_cant_do', 10, 1 ); -add_filter( 'bp_activity_can_comment', 'activity_sticker_filter_cant_do', 10, 1 ); \ No newline at end of file +add_filter( 'bp_activity_can_comment', 'activity_sticker_filter_cant_do', 10, 1 );