Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/20/2015 05:11:30 PM (9 years ago)
Author:
r-a-y
Message:

Cover Image: Wrap cover image block in a DIV.

Fixes a potential display issue when plugins try to use the
'bp_after_member_header' or 'bp_before_group_header' hooks to inject
content before the cover image.

Fixes #6673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php

    r10181 r10290  
    1414do_action( 'bp_before_group_header' ); ?>
    1515
    16 <a id="header-cover-image" href="<?php bp_group_permalink(); ?>"></a>
     16<div id="cover-image-container">
     17    <a id="header-cover-image" href="<?php bp_group_permalink(); ?>"></a>
    1718
    18 <div id="item-header-cover-image">
    19     <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
    20         <div id="item-header-avatar">
    21             <a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>">
     19    <div id="item-header-cover-image">
     20        <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
     21            <div id="item-header-avatar">
     22                <a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>">
    2223
    23                 <?php bp_group_avatar(); ?>
     24                    <?php bp_group_avatar(); ?>
    2425
    25             </a>
    26         </div><!-- #item-header-avatar -->
    27     <?php endif; ?>
     26                </a>
     27            </div><!-- #item-header-avatar -->
     28        <?php endif; ?>
    2829
    29     <div id="item-header-content">
     30        <div id="item-header-content">
    3031
    31         <div id="item-buttons">
     32            <div id="item-buttons">
     33
     34                <?php
     35
     36                /**
     37                 * Fires in the group header actions section.
     38                 *
     39                 * @since 1.2.6
     40                 */
     41                do_action( 'bp_group_header_actions' ); ?>
     42
     43            </div><!-- #item-buttons -->
    3244
    3345            <?php
    3446
    3547            /**
    36              * Fires in the group header actions section.
    37              *
    38              * @since 1.2.6
    39              */
    40             do_action( 'bp_group_header_actions' ); ?>
    41 
    42         </div><!-- #item-buttons -->
    43 
    44         <?php
    45 
    46         /**
    47          * Fires before the display of the group's header meta.
    48          *
    49          * @since 1.2.0
    50          */
    51         do_action( 'bp_before_group_header_meta' ); ?>
    52 
    53         <div id="item-meta">
    54 
    55             <?php
    56 
    57             /**
    58              * Fires after the group header actions section.
     48             * Fires before the display of the group's header meta.
    5949             *
    6050             * @since 1.2.0
    6151             */
    62             do_action( 'bp_group_header_meta' ); ?>
     52            do_action( 'bp_before_group_header_meta' ); ?>
    6353
    64             <span class="highlight"><?php bp_group_type(); ?></span>
    65             <span class="activity"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span>
     54            <div id="item-meta">
    6655
    67             <?php bp_group_description(); ?>
    68 
    69         </div>
    70     </div><!-- #item-header-content -->
    71 
    72     <div id="item-actions">
    73 
    74         <?php if ( bp_group_is_visible() ) : ?>
    75 
    76             <h3><?php _e( 'Group Admins', 'buddypress' ); ?></h3>
    77 
    78             <?php bp_group_list_admins();
    79 
    80             /**
    81              * Fires after the display of the group's administrators.
    82              *
    83              * @since 1.1.0
    84              */
    85             do_action( 'bp_after_group_menu_admins' );
    86 
    87             if ( bp_group_has_moderators() ) :
     56                <?php
    8857
    8958                /**
    90                  * Fires before the display of the group's moderators, if there are any.
     59                 * Fires after the group header actions section.
     60                 *
     61                 * @since 1.2.0
     62                 */
     63                do_action( 'bp_group_header_meta' ); ?>
     64
     65                <span class="highlight"><?php bp_group_type(); ?></span>
     66                <span class="activity"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span>
     67
     68                <?php bp_group_description(); ?>
     69
     70            </div>
     71        </div><!-- #item-header-content -->
     72
     73        <div id="item-actions">
     74
     75            <?php if ( bp_group_is_visible() ) : ?>
     76
     77                <h3><?php _e( 'Group Admins', 'buddypress' ); ?></h3>
     78
     79                <?php bp_group_list_admins();
     80
     81                /**
     82                 * Fires after the display of the group's administrators.
    9183                 *
    9284                 * @since 1.1.0
    9385                 */
    94                 do_action( 'bp_before_group_menu_mods' ); ?>
     86                do_action( 'bp_after_group_menu_admins' );
    9587
    96                 <h3><?php _e( 'Group Mods' , 'buddypress' ); ?></h3>
     88                if ( bp_group_has_moderators() ) :
    9789
    98                 <?php bp_group_list_mods();
     90                    /**
     91                     * Fires before the display of the group's moderators, if there are any.
     92                     *
     93                     * @since 1.1.0
     94                     */
     95                    do_action( 'bp_before_group_menu_mods' ); ?>
    9996
    100                 /**
    101                  * Fires after the display of the group's moderators, if there are any.
    102                  *
    103                  * @since 1.1.0
    104                  */
    105                 do_action( 'bp_after_group_menu_mods' );
     97                    <h3><?php _e( 'Group Mods' , 'buddypress' ); ?></h3>
    10698
    107             endif;
     99                    <?php bp_group_list_mods();
    108100
    109         endif; ?>
     101                    /**
     102                     * Fires after the display of the group's moderators, if there are any.
     103                     *
     104                     * @since 1.1.0
     105                     */
     106                    do_action( 'bp_after_group_menu_mods' );
    110107
    111     </div><!-- #item-actions -->
     108                endif;
    112109
    113 </div><!-- #item-header-cover-image -->
     110            endif; ?>
     111
     112        </div><!-- #item-actions -->
     113
     114    </div><!-- #item-header-cover-image -->
     115</div><!-- #cover-image-container -->
    114116
    115117<?php
Note: See TracChangeset for help on using the changeset viewer.