Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_notifications_get_notifications_for_user doesn't display bbpress notification

  • Avatar of m1000
    m1000
    Participant

    @m1000

    Hi,

    I use following code to display notifications – http://pastebin.com/Yb52ZNs8

    There is a problem with one notification of bbpress You have 1 new reply to
    It’s just displaying Array word. All other notifications are working fine extept this one.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Henry
    Henry
    Participant

    @henrywright

    Hey @m1000

    I’m not sure using BuddyPress functions will work for bbPress? Could be wrong though!

    Avatar of m1000
    m1000
    Participant

    @m1000

    I’m using Buddypress and bbpress for group forums. You have 1 new reply to … is working fine on the admin bar but somehow my code can’t display this kind of notification.

    Avatar of Henry
    Henry
    Participant

    @henrywright

    Does the code you’re using display any notifications? i.e. is it just the bbPress notifications that are not displaying?

    Avatar of m1000
    m1000
    Participant

    @m1000

    All other notifications are displaying fine.

    Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    Do a var_dump on $notifications so you can see the structures.

    Your code will need to test each $notifications[$i] to see if it’s an array and then handle it accordingly.

    Avatar of Henry
    Henry
    Participant

    @henrywright

    As @shanebp said, I think you might need to be using 2 for loops to handle cases when $notifications[$i] is of type array

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.