This allows you to translate string values, if necessary. I would like to enable translations (see // label: ait_php_var.event_category, instead of label: 'Event Category', in the JS file on the one hand and pass variables ( see console.log(ait_php_var.ackids);) on the other, which I can continue to use in the JS file. wp_add_inline_script() was introduced in WP v4.5 , and is now the best practice for that use case. >> You can localize these strings by using the "wp_localize_script" function: ... To make sure I fully understand that function, can I ask you a question about the example included on that page? 0. So for an example this: would echo