Changeset 12996 for trunk/src/bp-groups/bp-groups-blocks.php
- Timestamp:
- 07/12/2021 11:57:59 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-blocks.php
r12791 r12996 12 12 exit; 13 13 } 14 15 /**16 * Add BP Groups blocks specific settings to the BP Blocks Editor ones.17 *18 * @since 6.0.019 *20 * @param array $bp_editor_settings BP blocks editor settings.21 * @return array BP Groups blocks editor settings.22 */23 function bp_groups_editor_settings( $bp_editor_settings = array() ) {24 $bp = buddypress();25 26 return array_merge(27 $bp_editor_settings,28 array(29 'groups' => array(30 'isAvatarEnabled' => $bp->avatar && $bp->avatar->show_avatars && ! bp_disable_group_avatar_uploads(),31 'isCoverImageEnabled' => bp_is_active( 'groups', 'cover_image' ),32 ),33 )34 );35 }36 add_filter( 'bp_blocks_editor_settings', 'bp_groups_editor_settings' );37 14 38 15 /** … … 265 242 '<div class="item-header-avatar"> 266 243 <a href="%1$s"> 267 <img class="avatar" alt="%2$s" src="%3$s" />244 <img loading="lazy" src="%2$s" alt="%3$s" class="avatar"> 268 245 </a> 269 246 </div>', 270 247 esc_url( $group_link ), 271 248 /* Translators: %s is the group's name. */ 272 sprintf( esc_attr__( 'Group Profile photo of %s', 'buddypress' ), $group->display_name),249 sprintf( esc_attr__( 'Group Profile photo of %s', 'buddypress' ), esc_html( $group->name ) ), 273 250 esc_url( 274 251 bp_core_fetch_avatar(
Note: See TracChangeset
for help on using the changeset viewer.