Changeset 6992 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 05/03/2013 01:54:38 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r6988 r6992 1428 1428 function widget_display() {} 1429 1429 1430 function edit_screen( ) {}1431 1432 function edit_screen_save( ) {}1433 1434 function create_screen( ) {}1435 1436 function create_screen_save( ) {}1430 function edit_screen( $group_id = null ) {} 1431 1432 function edit_screen_save( $group_id = null ) {} 1433 1434 function create_screen( $group_id = null ) {} 1435 1436 function create_screen_save( $group_id = null ) {} 1437 1437 1438 1438 // Private Methods … … 1516 1516 // Catch the edit screen and forward it to the plugin template 1517 1517 if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $this->admin_slug, 0 ) ) { 1518 // Check whether the user is saving changes 1519 $this->edit_screen_save(); 1520 1521 add_action( 'groups_custom_edit_steps', array( &$this, 'edit_screen' ) ); 1518 $this->edit_screen_save( bp_get_current_group_id() ); 1519 1520 add_action( 'groups_custom_edit_steps', array( &$this, 'call_edit_screen' ) ); 1522 1521 1523 1522 if ( '' != bp_locate_template( array( 'groups/single/home.php' ), false ) ) { … … 1525 1524 } else { 1526 1525 add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) ); 1527 add_action( 'bp_template_content', array( &$this, ' edit_screen' ) );1526 add_action( 'bp_template_content', array( &$this, 'call_edit_screen' ) ); 1528 1527 bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) ); 1529 1528 } … … 1572 1571 1573 1572 /** 1573 * Call the edit_screen() method 1574 * 1575 * Broken into a standalone method so we can pass the current group id 1576 * to edit_screen() 1577 * 1578 * @since 1.8 1579 */ 1580 public function call_edit_screen() { 1581 $this->edit_screen( bp_get_current_group_id() ); 1582 } 1583 1584 /** 1574 1585 * Call the create_screen() method, if we're on the right page 1575 1586 * … … 1578 1589 public function maybe_create_screen() { 1579 1590 if ( bp_is_group_creation_step( $this->slug ) ) { 1580 $this->create_screen( );1591 $this->create_screen( bp_get_new_group_id() ); 1581 1592 } 1582 1593 } … … 1589 1600 public function maybe_create_screen_save() { 1590 1601 if ( bp_is_group_creation_step( $this->slug ) ) { 1591 $this->create_screen_save( );1602 $this->create_screen_save( bp_get_new_group_id() ); 1592 1603 } 1593 1604 }
Note: See TracChangeset
for help on using the changeset viewer.