Changeset 1989422
- Timestamp:
- 12/08/2018 06:16:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
yamap-block-gutenberg/trunk/yamap-block-gutenberg.php
r1989393 r1989422 122 122 'editor_style' => 'guyamap-editor-style' 123 123 ) ); 124 124 125 125 126 126 if(function_exists('wp_set_script_translations')) { … … 142 142 $locale_data = $this->get_jed_locale_data( 'guyamap' ); 143 143 wp_add_inline_script( 144 'wp-i18n', 145 'wp.i18n.setLocaleData( ' . json_encode( $locale_data ) . ', \'guyamap\' );' 144 'guyamap-editor-script', 145 '(function( translations ){translations.locale_data.messages[""].domain = "guyamap";wp.i18n.setLocaleData( translations.locale_data.messages, "guyamap" );})({"domain": "messages","locale_data": {"messages": ' . json_encode( $locale_data ) . '}});', 146 'before' 146 147 ); 147 148
Note: See TracChangeset
for help on using the changeset viewer.