Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/20/2020 05:47:32 PM (4 years ago)
Author:
imath
Message:

Group Types: improve the bp_group_type_list() template tag

  • Make sure to avoid displaying empty links if the Group Types object’s has_directory property is set to false.
  • To improve consistency with the Groups directory message informing it is filtered according to a Group Type, use singular Group Type names for the texts used into the list.
  • Edit The $r['label'] argument of the bp_get_group_type_list() function so that it accepts an array containing the plural & singular labels to use according to the Group's number of group types it is assigned to.
  • Ensure backward compatibility in case developers are still using a string for this $r['label'] argument.

Fixes #8401

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/group-header.php

    r12791 r12801  
    4444        bp_get_group_id(),
    4545        array(
    46             'label'        => __( 'Group Types', 'buddypress' ),
     46            'label'        => array(
     47                'plural'   => __( 'Group Types', 'buddypress' ),
     48                'singular' => __( 'Group Type', 'buddypress' ),
     49            ),
    4750            'list_element' => 'span',
    4851        )
Note: See TracChangeset for help on using the changeset viewer.