1167 | | |
1168 | | if ( '' != locate_template( array( 'groups/single/home.php' ), false ) ) { |
1169 | | bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) ); |
1170 | | } else { |
1171 | | add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) ); |
1172 | | add_action( 'bp_template_content', array( &$this, 'edit_screen' ) ); |
1173 | | bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) ); |
1174 | | } |
| 1167 | |
| 1168 | // The template must be loaded very late so that other functions |
| 1169 | // hooked to 'wp' have a chance to run |
| 1170 | add_action( 'wp', array( &$this, '_load_edit_template' ), 999 ); |
| 1192 | |
| 1193 | /** |
| 1194 | * Load the extension's admin template |
| 1195 | * |
| 1196 | * @since 1.3 |
| 1197 | */ |
| 1198 | function _load_edit_template() { |
| 1199 | if ( '' != locate_template( array( 'groups/single/home.php' ), false ) ) { |
| 1200 | bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) ); |
| 1201 | } else { |
| 1202 | add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) ); |
| 1203 | add_action( 'bp_template_content', array( &$this, 'edit_screen' ) ); |
| 1204 | bp_core_load_template( apply_filters( 'bp_core_template_plugin', '/groups/single/plugins' ) ); |
| 1205 | } |
| 1206 | } |