[buddypress-trac] [BuddyPress Trac] #7079: BP-legacy: split group single admin.php in separate template files

buddypress-trac noreply at wordpress.org
Wed Aug 17 20:06:01 UTC 2016


#7079: BP-legacy: split group single admin.php in separate template files
-------------------------+-----------------------
 Reporter:  Offereins    |       Owner:  hnla
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  2.7
Component:  Templates    |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------
Changes (by r-a-y):

 * keywords:  has-patch needs-testing => has-patch


Comment:

 `02.patch` changes the `/groups/single/admin.php` template so we do not
 have to do so many `if` conditional statements.

 Instead, I've done this:

 {{{#!php
 <?php if ( bp_is_group_admin_screen( bp_action_variable() ) ) : ?>

         <?php bp_get_template_part( 'groups/single/admin/' .
 bp_action_variable() ); ?>

 <?php endif; ?>
 }}}

 In the same file, one thing that I haven't changed, but probably should is
 this:


 {{{#!php
 <?php
 <?php /* This is important, don't forget it */ ?>
         <input type="hidden" name="group-id" id="group-id" value="<?php
 bp_group_id(); ?>" />


 }}}

 I know this is probably a remnant from the older bp-default templates, but
 since we deem this hidden input field important, we probably shouldn't
 leave it in the template and should hook it to either
 `'groups_custom_edit_steps'` or `'bp_after_group_admin_content'` instead.

 It's not that big of deal if we do nothing here, since bp-nouveau is going
 to take over soon :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7079#comment:12>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list