Skip to content

Instantly share code, notes, and snippets.

@BhargavBhandari90
Created March 5, 2024 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BhargavBhandari90/fa8bbc8bd119c6e6e16a1114891ca65e to your computer and use it in GitHub Desktop.
Save BhargavBhandari90/fa8bbc8bd119c6e6e16a1114891ca65e to your computer and use it in GitHub Desktop.
BuddyBoss - Show all notifications in one API
<?php
/**
* We have to pass "is_new:0" and apply following filter.
*/
function modify_where( $where_sql, $table_prefix, $r ) {
$where_sql = str_replace( 'AND is_new = 0', '', $where_sql );
return $where_sql;
}
add_filter( 'bb_notifications_get_where_conditions', 'modify_where', 10 , 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment