Skip to:
Content
Pages
Categories
Search
Top
Bottom

problem formatting notification

  • Avatar of Grosbouff
    grosbouff
    Participant

    @grosbouff

    Hi, I have a main component (buddypress maps)

    and I’m writing a plugin to extend it.

    From that plugin, I would like to fire a new notification.

    In the component, I have

    $bp->maps->format_notification_function = ‘bp_maps_format_notifications’;

    function bp_maps_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) {

    global $bp;

    switch ( $action ) {

    }

    return do_action( ‘bp_maps_format_notifications’, $action, $item_id, $secondary_item_id, $total_items );

    }

    in the plugin, I have

    add_action(‘bp_maps_format_notifications’,’bp_maps_profile_batch_locate_format_notifications’,10,4);

    function bp_maps_profile_batch_locate_format_notifications ($action, $item_id, $secondary_item_id, $total_items ) {

    global $bp;

    switch ( $action ) {

    case ‘batch_profile_marker_set’:

    $profile_edition_link=$bp->loggedin_user->domain . $bp->profile->slug.’/edit/group/’.$bp->maps_profile->options['group_id'];

    $link = ‘‘ . __(‘A location marker has been set using your profile information. Please check that its position is correct ! You can also edit or delete it.’, ‘bp-maps-profile-batch-locate’ ) . ‘‘;

    return apply_filters( ‘bp_maps_single_marker_set_notification’,$link);

    break;

    }

    do_action( ‘bp_maps_profile_batch_locate_format_notifications’, $action, $item_id, $secondary_item_id, $total_items );

    return false;

    }

    The notification IS saved; the notification count in buddypress IS show; but the notification link do not appear.

    Maybe a priority problem or something like this.

    Any idea ?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.