Support » Plugin: Events Manager » [Plugin: Events Manager] Alphabetical order of countries in localized versions

Viewing 15 replies - 1 through 15 (of 18 total)
  • you can try to hook into em_get_countries filter.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    untested, but try:

    function my_countries_mod($countries){
    return sort($countries);
    }
    add_filter('em_get_countries','my_countries_mod');

    But that is not update-safe. Will this be fixed in the next version?

    EM won’t remove that if you put it in your theme functions.php

    But wouldn’t it be better if EM supports that from the core?

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    yes but ideally a lot of stuff would be, so for now you can use this 😉

    I’ve tested the function mentioned above, but now my country-selector is blank… 🙁

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    oops,

    function my_countries_mod($countries){
    sort($countries);
    return $countries;
    }
    add_filter('em_get_countries','my_countries_mod');

    that should work

    I’m sorry but it does not. The selector is still empty then.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    what about just

    function my_countries_mod($countries){
    return $countries;
    }
    add_filter('em_get_countries','my_countries_mod');

    without any sorting? if not then maybe you’re doing something wrong somewhere else.

    That works, but as you said, with no sorting.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    the latest update fixes this issue

    Great, it works! Thank you so much for your efforts!

    Will the order also be fixed in the backend with one of the next updates?

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    Where in the backend are you seeing this problem? If it exists, then we’ll fix it asap too.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: Events Manager] Alphabetical order of countries in localized versions’ is closed to new replies.