if ( !
count( $group_data ) ) { return;
} if ( !
empty( $group_data['shuffle'
] ) ) { shuffle( $group_data['data'
] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
} switch ( $group_data['type'
] ) { case 'list':
array_walk( $group_data['data'
], '_wp_credits_add_profile_link',
$credits_data['profiles'
] );
echo '<p class="wp-credits-list">' .
wp_sprintf( '%l.',
$group_data['data'
] ) . "</p>\n\n";
break;
case 'libraries':
array_walk( $group_data['data'
], '_wp_credits_build_object_link'
);
echo '<p class="wp-credits-list">' .
wp_sprintf( '%l.',
$group_data['data'
] ) . "</p>\n\n";
break;
default:
$compact = 'compact' ===
$group_data['type'
];
$classes = 'wp-people-group ' .
( $compact ? 'compact' : ''
);
echo '<ul class="' .
$classes . '" id="wp-people-group-' .
$slug . '">' . "\n";
foreach ( $group_data['data'
] as $person_data ) { echo '<li class="wp-person" id="wp-person-' .
esc_attr( $person_data[2
] ) . '">' . "\n\t";