javascripttagskirki

What does a <# … #> tag mean?


What does this syntax mean <# #> in a script?

<#for (i in data) { #>
   <# if ( ! data.hasOwnProperty( i ) ) continue; #>
   <# field = data[i]; #>
   <# if ( ! field.type ) continue; #>

Solution

  • This notation is used for templates in the source code of Kirki, a Wordpress tool. You might be familiar with other template tag variations such as <% %> (Rails).

    I assume that the snippet from your image is taken from this file.