Skip to content

Commit

Permalink
feat(components): Allow setting of custom classes on member_list
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Mar 4, 2019
1 parent f33f5c8 commit e634ac6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/member_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ function member_list(array $opts)
$members = $opts['members'];
$heading = array_key_exists('heading', $opts) ? $opts['heading'] : 'Composers';
$show_image = array_key_exists('show_image', $opts) ? $opts['show_image'] : true;
$classes = is_front_page() ? 'composers fp-section' : 'composers p-section';
$classes = array(is_front_page() ? 'composers fp-section' : 'composers p-section');
if (isset($opts['classes'])) {
$classes = array_merge($classes, $opts['classes']);
}

$html = '<section class="' . $classes . '">' .
$html = '<section class="' . implode(' ', $classes) . '">' .
'<h2>' . $heading . '</h2>' .
'<ul>';

Expand Down

0 comments on commit e634ac6

Please sign in to comment.