Skip to:
Content

BuddyPress.org

Changeset 962


Ignore:
Timestamp:
01/29/2009 06:00:10 PM (15 years ago)
Author:
apeatling
Message:

Added hooks on group admin actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r957 r962  
    621621                    bp_core_add_message( __( 'Group details were successfully updated.', 'buddypress' ) );
    622622                }
     623               
     624                do_action( 'groups_group_details_edited', $group_obj->id );
     625               
    623626                bp_core_redirect( site_url() . '/' . $bp['current_component'] . '/' . $bp['current_item'] . '/admin/edit-details' );
    624627            }
     
    655658                bp_core_add_message( __( 'Group settings were successfully updated.', 'buddypress' ) );
    656659            }
     660
     661            do_action( 'groups_group_settings_edited', $group_obj->id );
    657662           
    658663            bp_core_redirect( site_url() . '/' . $bp['current_component'] . '/' . $bp['current_item'] . '/admin/group-settings' );
     
    698703                bp_core_add_message( __( 'The group avatar was successfully updated.', 'buddypress' ) );
    699704            }
     705
     706            do_action( 'groups_group_avatar_edited', $group_obj->id );
    700707
    701708            bp_core_redirect( site_url() . '/' . $bp['current_component'] . '/' . $bp['current_item'] . '/admin/group-avatar' );
     
    801808        if ( isset($request_action) && isset($membership_id) ) {
    802809            if ( $request_action == 'accept' && is_numeric($membership_id) ) {
     810
    803811                // Accept the membership request
    804812                if ( !groups_accept_membership_request( $membership_id ) ) {
     
    807815                    bp_core_add_message( __( 'Group membership request accepted', 'buddypress' ) );
    808816                }
     817
    809818            } else if ( $request_action == 'reject' && is_numeric($membership_id) ) {
     819
    810820                // Reject the membership request
    811821                if ( !groups_reject_membership_request( $membership_id ) ) {
     
    814824                    bp_core_add_message( __( 'Group membership request rejected', 'buddypress' ) );
    815825                }   
    816             }
     826
     827            }
     828           
     829            do_action( 'groups_group_request_managed', $group_obj->id, $request_action, $membership_id );
     830           
    817831            bp_core_redirect( site_url() . '/' . $bp['current_component'] . '/' . $bp['current_item'] . '/admin/membership-requests' );
    818832        }
     
    841855                bp_core_redirect( site_url() . '/' . $bp['groups']['slug'] . '/' );
    842856            }
     857
     858            do_action( 'groups_group_deleted', $_POST['group-id'] );
     859
    843860            bp_core_redirect( $bp['loggedin_domain'] . $bp['current_component'] );
    844861        } else {
Note: See TracChangeset for help on using the changeset viewer.