Changeset 7140
- Timestamp:
- 06/03/2013 02:09:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r7134 r7140 2045 2045 add_action( 'groups_custom_edit_steps', array( &$this, 'call_edit_screen' ) ); 2046 2046 2047 // Determine the proper template and save for later 2048 // loading 2047 2049 if ( '' !== bp_locate_template( array( 'groups/single/home.php' ), false ) ) { 2048 bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );2050 $this->edit_screen_template = '/groups/single/home'; 2049 2051 } else { 2050 2052 add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) ); 2051 2053 add_action( 'bp_template_content', array( &$this, 'call_edit_screen' ) ); 2052 bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) );2054 $this->edit_screen_template = '/groups/single/plugins'; 2053 2055 } 2056 2057 // We load the template at bp_screens, to give all 2058 // extensions a chance to load 2059 add_action( 'bp_screens', array( $this, 'call_edit_screen_template_loader' ) ); 2054 2060 } 2055 2061 } … … 2093 2099 $this->check_nonce( 'edit' ); 2094 2100 call_user_func( $this->screens['edit']['screen_save_callback'], $this->group_id ); 2101 } 2102 2103 /** 2104 * Load the template that houses the Edit screen 2105 * 2106 * Separated out into a callback so that it can run after all other 2107 * Group Extensions have had a chance to register their navigation, to 2108 * avoid missing tabs. 2109 * 2110 * Hooked to 'bp_screens'. 2111 * 2112 * @see BP_Group_Extension::setup_edit_hooks() 2113 * @access public So that do_action() has access. Do not call directly. 2114 * @since BuddyPress (1.8) 2115 */ 2116 public function call_edit_screen_template_loader() { 2117 bp_core_load_template( $this->edit_screen_template ); 2095 2118 } 2096 2119
Note: See TracChangeset
for help on using the changeset viewer.