from theme's subfolder

xili-language v. 2.15.1: flag features improved for theme’s developer

xili-language v. 2.15.0 introduced function add_theme_support ( 'custom_xili_flag') to permit flag features inside Media Library.
By adding a parameter array ($args), xili-language v. 2.15.1 introduces a way to register default flags coming from a sub-folder of the theme’s folder. An easy way to provide adapted flags to the webmaster in conformity with the design and look of the theme. No need to upload these preset images.

Example of code to put inside a function call by an add_action ‘after_setup_theme‘ (priority set to 12)

%2$s is used in ‘path’ because the flags are inside the child theme in this example. Here, it is supposed that all the pictures are present.

To deliver examples of loop, twenty fourteen-xili theme is managed inside xili-language plugin itself using available language list and testing if picture exists. And latest version of twenty thirteen-xili, will include another way.