<# Syntax in WordPress olatechproJune 6, 20231 Views I was just viewing source of a WordPress Admin Screen and I noticed the <# kind of syntax. Please see the screenshot attached as well. I wanted to know what language or markup is that? Post Views: 1 Related postsGet rid of this Strict Standards warningWooCommerce: get_current_screen not working with multi languageCan’t login on WordPressForce HTTPS using .htaccess – stuck in redirect loopWordPress: Ajax not working to insert, query and result dataHow Can I pass an image file to wp_handle_upload?
If you look into wp-includes/js/wp-util.js, you’ll find the following function that parse those tags: wp.template = _.memoize(function ( id ) { var compiled, /* * Underscore's default ERB-style templates are incompatible with PHP * when asp_tags is enabled, so WordPress uses Mustache-inspired templating syntax. * * @see trac ticket #22344. */ options = { evaluate: /<#([sS]+?)#>/g, interpolate: /{{{([sS]+?)}}}/g, escape: /{{([^}]+?)}}(?!})/g, variable: 'data' }; return function ( data ) { compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options ); return compiled( data ); }; }); As the comment explain, they changed the template tag <% %> to Mustache tags in version 3.5 to avoid any conflict with asp tags.
If you look into
wp-includes/js/wp-util.js
, you’ll find the following function that parse those tags:As the comment explain, they changed the template tag
<% %>
to Mustache tags in version 3.5 to avoid any conflict with asp tags.