Last active
December 7, 2020 15:01
-
-
Save nikitasinelnikov/919d953092fbfb59b2d878255fac86d4 to your computer and use it in GitHub Desktop.
Ultimate Member - User Tags: Change the field options' order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function um_user_tags_field_oprions_order( $args ) { | |
if ( $args['child_of'] == '{your_tag_source_key}' ) { | |
$args['orderby'] = 'name'; | |
$args['order'] = 'ASC'; | |
} | |
return $args; | |
} | |
add_filter( 'um_user_tags_get_terms_args', 'um_user_tags_field_oprions_order', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment