Skip to:
Content
Pages
Categories
Search
Top
Bottom

need hLep in activity_custom_update!


  • imjscn
    Participant

    @imjscn

    I made a custom component( x-object ) and use the following code to post update in activity stream. It works perfectly.
    Then, I made another component( y-object ) and use the following code(replace x with y), — Neither component can post updates when they are both activated, can only active one of them.
    `function bp_xobject_activity_custom_update( $object, $item_id, $content ) {
    if ( ‘xobject’ == $object ) {
    return bp_xobject_post_update( array( ‘type’ => BP_XOBJECT_ACTIVITY_ACTION_COMMENT, ‘xobject_id’ => $item_id, ‘content’ => $content ) );
    }
    }
    add_filter( ‘bp_activity_custom_update’, ‘bp_myobject_activity_custom_update’, 10, 3 );`

    If I remove this line:
    `if ( ‘xobject’ == $object )`
    then, both components can post, but their activities cross over to all other component’s activity page.

    Need help desperately.
    Please forgive me for calling the magical names.. @r-a-y , @boonebgorges

  • The topic ‘need hLep in activity_custom_update!’ is closed to new replies.
Skip to toolbar