Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/19/2009 12:21:53 PM (17 years ago)
Author:
apeatling
Message:

Added value filters and before and after actions to all save() methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r1348 r1351  
    9191        global $wpdb, $bp;
    9292       
    93         $this->creator_id = apply_filters( 'groups_details_creator_id_pre_save', $this->creator_id, $this->id );
    94         $this->name = apply_filters( 'groups_details_name_pre_save', $this->name, $this->id );
    95         $this->slug = apply_filters( 'groups_details_slug_pre_save', $this->slug, $this->id );
    96         $this->description = apply_filters( 'groups_details_description_pre_save', $this->description, $this->id );
    97         $this->news = apply_filters( 'groups_details_news_pre_save', $this->news, $this->id );
    98         $this->status = apply_filters( 'groups_details_status_pre_save', $this->status, $this->id );
    99         $this->is_invitation_only = apply_filters( 'groups_details_is_invitation_only_pre_save', $this->is_invitation_only, $this->id );
    100         $this->enable_wire = apply_filters( 'groups_details_enable_wire_pre_save', $this->enable_wire, $this->id );
    101         $this->enable_forum = apply_filters( 'groups_details_enable_forum_pre_save', $this->enable_forum, $this->id );
    102         $this->enable_photos = apply_filters( 'groups_details_enable_photos_pre_save', $this->enable_photos, $this->id );
    103         $this->photos_admin_only = apply_filters( 'groups_details_photos_admin_only_pre_save', $this->photos_admin_only, $this->id );
    104         $this->date_created = apply_filters( 'groups_details_date_created_pre_save', $this->date_created, $this->id );
    105         $this->avatar_thumb = apply_filters( 'groups_details_avatar_thumb_pre_save', $this->avatar_thumb, $this->id );
    106         $this->avatar_full = apply_filters( 'groups_details_avatar_full_pre_save', $this->avatar_full, $this->id );
    107 
    108         do_action( 'groups_group_pre_save', $this );
     93        $this->creator_id = apply_filters( 'groups_group_creator_id_before_save', $this->creator_id, $this->id );
     94        $this->name = apply_filters( 'groups_group_name_before_save', $this->name, $this->id );
     95        $this->slug = apply_filters( 'groups_group_slug_before_save', $this->slug, $this->id );
     96        $this->description = apply_filters( 'groups_group_description_before_save', $this->description, $this->id );
     97        $this->news = apply_filters( 'groups_group_news_before_save', $this->news, $this->id );
     98        $this->status = apply_filters( 'groups_group_status_before_save', $this->status, $this->id );
     99        $this->is_invitation_only = apply_filters( 'groups_group_is_invitation_only_before_save', $this->is_invitation_only, $this->id );
     100        $this->enable_wire = apply_filters( 'groups_group_enable_wire_before_save', $this->enable_wire, $this->id );
     101        $this->enable_forum = apply_filters( 'groups_group_enable_forum_before_save', $this->enable_forum, $this->id );
     102        $this->enable_photos = apply_filters( 'groups_group_enable_photos_before_save', $this->enable_photos, $this->id );
     103        $this->photos_admin_only = apply_filters( 'groups_group_photos_admin_only_before_save', $this->photos_admin_only, $this->id );
     104        $this->date_created = apply_filters( 'groups_group_date_created_before_save', $this->date_created, $this->id );
     105        $this->avatar_thumb = apply_filters( 'groups_group_avatar_thumb_before_save', $this->avatar_thumb, $this->id );
     106        $this->avatar_full = apply_filters( 'groups_group_avatar_full_before_save', $this->avatar_full, $this->id );
     107
     108        do_action( 'groups_group_before_save', $this );
    109109       
    110110        if ( $this->id ) {
     
    188188        }
    189189
    190         do_action( 'groups_group_post_save', $this );
     190        do_action( 'groups_group_after_save', $this );
    191191       
    192192        return true;
Note: See TracChangeset for help on using the changeset viewer.