Skip to:
Content

BuddyPress.org

Changeset 4624


Ignore:
Timestamp:
07/07/2011 11:27:26 PM (13 years ago)
Author:
boonebgorges
Message:

Variable name cleanup to ensure that WP Admin Bar notification items get queued without overlapping each other. Fixes #3294

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-notifications.php

    r4621 r4624  
    5757    if ( empty( $grouped_notifications ) )
    5858        return false;
    59        
     59   
     60    $renderable = array();
     61   
    6062    // Calculate a renderable output for each notification type
    6163    foreach ( (array)$grouped_notifications as $component_name => $action_arrays ) {
     
    7678                    $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count, 'array' );
    7779                   
     80                    $notification_object = new stdClass;
     81                   
    7882                    // Minimal backpat with non-compatible notification
    7983                    // callback functions
    8084                    if ( is_string( $content ) ) {
    81                         $notification->content = $content;
    82                         $notification->href    = bp_loggedin_user_domain();
     85                        $notification_object->content = $content;
     86                        $notification_object->href    = bp_loggedin_user_domain();
    8387                    } else {
    84                         $notification->content = $content['text'];
    85                         $notification->href    = $content['link'];
     88                        $notification_object->content = $content['text'];
     89                        $notification_object->href    = $content['link'];
    8690                    }
    8791                   
    88                     $renderable[]          = $notification;
     92                    $notification_object->id = $component_action_items[0]->id;
     93                   
     94                    $renderable[]     = $notification_object;
    8995                } else {
    9096                    $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count );
Note: See TracChangeset for help on using the changeset viewer.