Skip to:
Content

BuddyPress.org

Changeset 3609


Ignore:
Timestamp:
12/28/2010 10:08:23 PM (14 years ago)
Author:
boonebgorges
Message:

Modifies the BP_Group_Extension class to call ->edit_screen_save() directly. Fixes #2976. Removes the die statements in the group extension methods to be overridden by plugins

File:
1 edited

Legend:

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

    r3597 r3609  
    11171117    // Methods you should override
    11181118
    1119     function display() {
    1120         die( 'function BP_Group_Extension::display() must be over-ridden in a sub-class.' );
    1121     }
    1122 
    1123     function widget_display() {
    1124         die( 'function BP_Group_Extension::widget_display() must be over-ridden in a sub-class.' );
    1125     }
    1126 
    1127     function edit_screen() {
    1128         die( 'function BP_Group_Extension::edit_screen() must be over-ridden in a sub-class.' );
    1129     }
    1130 
    1131     function edit_screen_save() {
    1132         die( 'function BP_Group_Extension::edit_screen_save() must be over-ridden in a sub-class.' );
    1133     }
    1134 
    1135     function create_screen() {
    1136         die( 'function BP_Group_Extension::create_screen() must be over-ridden in a sub-class.' );
    1137     }
    1138 
    1139     function create_screen_save() {
    1140         die( 'function BP_Group_Extension::create_screen_save() must be over-ridden in a sub-class.' );
    1141     }
     1119    function display() {}
     1120
     1121    function widget_display() {}
     1122
     1123    function edit_screen() {}
     1124
     1125    function edit_screen_save() {}
     1126
     1127    function create_screen() {}
     1128
     1129    function create_screen_save() {}
    11421130
    11431131    // Private Methods
     
    11631151            // Catch the edit screen and forward it to the plugin template
    11641152            if ( $bp->current_component == $bp->groups->slug && 'admin' == $bp->current_action && !empty( $bp->action_variables[0] ) && $this->slug == $bp->action_variables[0] ) {
    1165                 add_action( 'wp', array( &$this, 'edit_screen_save' ) );
     1153                // Check whether the user is saving changes
     1154                $this->edit_screen_save();     
     1155               
    11661156                add_action( 'groups_custom_edit_steps', array( &$this, 'edit_screen' ) );
    11671157
Note: See TracChangeset for help on using the changeset viewer.