Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/17/2023 04:57:01 PM (12 months ago)
Author:
imath
Message:

Groups/Members block PHP callbacks: only allow supported avatar sizes

If the avatarSize property transported into the PHP render callbacks for the bp/members and bp/groups blocks is not set to "full" or "thumb", reset this property to "none".

Fix applied to Trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-blocks.php

    r13487 r13596  
    206206    if ( ! array_filter( $group_ids ) ) {
    207207        return '';
     208    }
     209
     210    // Make sure the avatar size exists.
     211    if ( ! in_array( $block_args['avatarSize'], array( 'thumb', 'full' ), true ) ) {
     212        $block_args['avatarSize'] = 'none';
    208213    }
    209214
Note: See TracChangeset for help on using the changeset viewer.