use var instead of const to make global object available on window object
This commit is contained in:
parent
aed6d25115
commit
4372ffc66c
|
@ -52,7 +52,7 @@ final class Mobilizon_Connector {
|
|||
'timeZone' => wp_timezone_string(),
|
||||
'url' => MobilizonConnector\Settings::getUrl()
|
||||
);
|
||||
wp_add_inline_script($scriptName, 'const MOBILIZON_CONNECTOR = ' . json_encode($settings), 'before');
|
||||
wp_add_inline_script($scriptName, 'var MOBILIZON_CONNECTOR = ' . json_encode($settings), 'before');
|
||||
}
|
||||
|
||||
public function register_blocks() {
|
||||
|
|
Loading…
Reference in New Issue