Some fixes needed to work with actual WP version
-
Hi there,
I fixed this live notifications with two simple steps, and now it works.
1. Replace enclosed quotes in server response (see file bpln.js from line 20):
var d2 = data.replace(/^\"(.*?)\"$/, "'$1'");
data=JSON.parse(d2);
2. Add NULL argument to function call in file bp-live-notification.php at line 152:
$notifications =$wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->core->table_name_notifications} WHERE id in {$list_ids} AND is_new = %d", NULL), 1 );
Optionally you can add “alert” class to notification (bp-live-notification.php, line 121:
$menu_title = sprintf( __( 'Notifications <span id="ab-pending-notifications" class="pending-count alert">%s</span>', 'buddypress' ), count( $notifications ) );
- The topic ‘Some fixes needed to work with actual WP version’ is closed to new replies.