Skip to:
Content

BuddyPress.org

Changeset 2344


Ignore:
Timestamp:
01/18/2010 09:18:57 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Refactor 'new_wire_post' and rename to 'activity_update' for consistency. Some AJAX filters renamed to prevent "_activity_activity_update" naming issues due to refactoring. Actual 'new_wire_post' filter type moved to backpat Wire component.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2343 r2344  
    396396         *  'user_id' => false, // user_id to filter on
    397397         *  'object' => false, // object to filter on e.g. groups, profile, status, friends
    398          *  'action' => false, // action to filter on e.g. new_wire_post, profile_updated
     398         *  'action' => false, // action to filter on e.g. activity_update, profile_updated
    399399         *  'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    400400         *  'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
     
    435435        'primary_link' => false, // The primary URL for this item in RSS feeds
    436436        'component_name' => false, // The name/ID of the component e.g. groups, profile, mycomponent
    437         'component_action' => false, // The component action e.g. new_wire_post, profile_updated
     437        'component_action' => false, // The component action e.g. activity_update, profile_updated
    438438
    439439        'user_id' => $bp->loggedin_user->id, // Optional: The user to record the activity for, can be false if this activity is not for a user.
     
    502502        'primary_link' => apply_filters( 'bp_activity_new_update_primary_link', $primary_link ),
    503503        'component_name' => $bp->activity->id,
    504         'component_action' => 'new_wire_post'
     504        'component_action' => 'activity_update'
    505505    ) );
    506506
  • trunk/bp-activity/bp-activity-templatetags.php

    r2291 r2344  
    125125        'user_id' => false, // user_id to filter on
    126126        'object' => false, // object to filter on e.g. groups, profile, status, friends
    127         'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
     127        'action' => false, // action to filter on e.g. activity_update, new_forum_post, profile_updated
    128128        'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    129129        'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
     
    733733            $title = substr( $title, 0, -1 );
    734734
    735         if ( 'new_wire_post' == $activities_template->activity->component_action ) {
     735        if ( 'activity_update' == $activities_template->activity->component_action ) {
    736736            $content = explode( '<div class="activity-inner">', $activities_template->activity->content );
    737737            $title .= ': ' . strip_tags( bp_create_excerpt( $content[1], 15 ));
  • trunk/bp-groups.php

    r2343 r2344  
    19181918        'content' => apply_filters( 'groups_activity_new_update_content', $activity_content ),
    19191919        'primary_link' => apply_filters( 'groups_activity_new_update_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    1920         'component_action' => 'new_wire_post',
     1920        'component_action' => 'activity_update',
    19211921        'item_id' => $bp->groups->current_group->id
    19221922    ) );
  • trunk/bp-themes/bp-default/activity/index.php

    r2287 r2344  
    5151                        <select>
    5252                            <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
    53                             <option value="new_wire_post"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
     53                            <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
    5454                            <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
    5555                            <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
  • trunk/bp-themes/bp-default/groups/single/activity.php

    r2287 r2344  
    88            <select>
    99                <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
    10                 <option value="new_wire_post"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
     10                <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
    1111                <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
    1212                <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
  • trunk/bp-themes/bp-default/members/single/activity.php

    r2321 r2344  
    1010            <select>
    1111                <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
    12                 <option value="new_wire_post"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
     12                <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
    1313                <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
    1414                <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
  • trunk/bp-themes/bp-sn-parent/_inc/ajax.php

    r2139 r2344  
    447447        $activity_id = xprofile_record_activity( array(
    448448            'user_id' => $bp->loggedin_user->id,
    449             'content' => apply_filters( 'xprofile_activity_new_wire_post', $activity_content, &$wire_post ),
    450             'primary_link' => apply_filters( 'xprofile_activity_new_wire_post_primary_link', $primary_link ),
    451             'component_action' => 'new_wire_post'
     449            'content' => apply_filters( 'xprofile_activity_update', $activity_content, &$wire_post ),
     450            'primary_link' => apply_filters( 'xprofile_activity_update_primary_link', $primary_link ),
     451            'component_action' => 'activity_update'
    452452        ) );
    453453
    454         do_action( 'xprofile_new_wire_post', &$wire_post );
     454        do_action( 'xprofile_activity_update', &$wire_post );
    455455    } else {
    456456        $bp->groups->current_group = new BP_Groups_Group( $item_id );
     
    462462
    463463        $activity_id = groups_record_activity( array(
    464             'content' => apply_filters( 'groups_activity_new_wire_post', $activity_content ),
    465             'primary_link' => apply_filters( 'groups_activity_new_wire_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    466             'component_action' => 'new_wire_post',
     464            'content' => apply_filters( 'groups_activity_update', $activity_content ),
     465            'primary_link' => apply_filters( 'groups_activity_update_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
     466            'component_action' => 'activity_update',
    467467            'item_id' => $item_id
    468468        ) );
    469469
    470         do_action( 'groups_new_wire_post', $item_id, $wire_post->id );
     470        do_action( 'groups_activity_update', $item_id, $wire_post->id );
    471471    }
    472472
  • trunk/bp-themes/bp-sn-parent/functions.php

    r2281 r2344  
    163163                    <select>
    164164                        <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
    165                         <option value="new_wire_post"><?php _e( 'Updates Only', 'buddypress' ) ?></option>
     165                        <option value="activity_update"><?php _e( 'Updates Only', 'buddypress' ) ?></option>
    166166                        <option value="new_forum_post,new_forum_topic"><?php _e( 'Group Forum Activity Only', 'buddypress' ) ?></option>
    167167                        <option value="new_blog_post,new_blog_comment"><?php _e( 'Blog Activity Only', 'buddypress' ) ?></option>
Note: See TracChangeset for help on using the changeset viewer.