Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/06/2016 08:18:49 AM (7 years ago)
Author:
r-a-y
Message:

bp-legacy: Do not show trailing dash for empty group type description.

Also adds a translator note and HTML-escapes the group type description
string.

See #7210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/create.php

    r11171 r11177  
    158158                                <label for="<?php printf( 'group-type-%s', $type->name ); ?>"><input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" /> <?php echo esc_html( $type->labels['name'] ); ?>
    159159                                    <?php
    160                                         if ( isset( $type->description ) ) {
    161                                             printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . $type->description . '</span>' );
     160                                        if ( ! empty( $type->description ) ) {
     161                                            /* translators: Group type description shown when creating a group. */
     162                                            printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
    162163                                        }
    163164                                    ?>
Note: See TracChangeset for help on using the changeset viewer.