Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save champsupertramp/c52c5c43d3edcc8f192e1d096620bd91 to your computer and use it in GitHub Desktop.
Save champsupertramp/c52c5c43d3edcc8f192e1d096620bd91 to your computer and use it in GitHub Desktop.
Ultimate Member - Reorder languages filter in Member Directory
add_filter("um_member_directory_filter_select_options_sorted","um_011723_sort_languages",10,2);
function um_011723_sort_languages( $options, $atts ){
if( "languages" == $atts['metakey'] ){
$key = 'en';
$value = $options[$key];
unset($options[$key]);
array_unshift($options, $value);
$key = 'nl';
$value = $options[$key];
unset($options[$key]);
array_unshift($options, $value);
}
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment