Skip to content

Commit

Permalink
fix(users): sort locales (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Feb 23, 2022
1 parent 8b9e886 commit 9f68b42
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions buddypress/members/index-directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,8 @@

}

asort( $used_country_list );

if ( $offset >= count( $filtered_members ) ) {
$offset = count( $filtered_members ) - $members_per_page;
}
Expand Down Expand Up @@ -789,14 +791,14 @@
<option value=""><?php esc_html_e( 'Select', 'community-portal' ); ?></option>
<?php foreach ( $used_languages as $code => $language ) : ?>
<?php if ( strlen( $code ) > 1 ) : ?>
<option value="<?php echo esc_attr( $code ); ?>"
<option value="<?php echo esc_attr( $code ); ?>"
<?php
if ( isset( $_GET['language'] ) && strtolower( trim( $get_language ) ) === strtolower( $code ) ) :
?>
selected<?php endif; ?>><?php echo esc_html( $language ); ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
</select>
</div>
<?php endif; ?>
<div class="members__select-container">
Expand All @@ -809,13 +811,13 @@
$loop_tag->slug = substr( $loop_tag->slug, 0, stripos( $loop_tag->slug, '_' ) );
}
?>
<option value="<?php echo esc_attr( $loop_tag->slug ); ?>"
<option value="<?php echo esc_attr( $loop_tag->slug ); ?>"
<?php
if ( isset( $_GET['tag'] ) && strtolower( trim( $get_tag ) ) === strtolower( $loop_tag->slug ) ) :
?>
selected<?php endif; ?>><?php echo esc_html( $loop_tag->name ); ?></option>
<?php endforeach; ?>
</select>
</select>
</div>
</div>
<div class="members__show-filters-container">
Expand Down Expand Up @@ -855,7 +857,7 @@
<?php
if ( false === $info['profile_image']->display || false === $info['profile_image']->value ) :
?>
members__avatar--identicon<?php endif; ?>"
members__avatar--identicon<?php endif; ?>"
<?php
if ( $info['profile_image']->display && $info['profile_image']->value ) :
?>
Expand Down

0 comments on commit 9f68b42

Please sign in to comment.