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-members/bp-members-blocks.php

    r13486 r13596  
    197197    if ( ! array_filter( $member_ids ) ) {
    198198        return '';
     199    }
     200
     201    // Make sure the avatar size exists.
     202    if ( ! in_array( $block_args['avatarSize'], array( 'thumb', 'full' ), true ) ) {
     203        $block_args['avatarSize'] = 'none';
    199204    }
    200205
Note: See TracChangeset for help on using the changeset viewer.