Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any).

In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that.

Looking at source of the function it is rather inflexible (no filters or anything), but since it echoes results (new line delimited list of suggestions) and dies – you don’t even need to bother with it.

Just make your own version of function for tag suggestion logic and hook it at earlier priority (also dying at end so that native one is never reached).

Leave a Comment