Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions includes/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
add_filter( 'bp_activity_can_comment', 'activity_sticker_filter_cant_do', 10, 1 );