@@ -900,6 +900,42 @@ public function register_scripts(): void {
900900
901901 wp_register_script ('wu-functions ' , wu_get_asset ('functions.js ' , 'js ' ), ['jquery ' ], \WP_Ultimo::VERSION , true );
902902
903+ /*
904+ * Localize selectizer
905+ */
906+ wp_localize_script (
907+ 'wu-functions ' ,
908+ 'wu_selectizer ' ,
909+ [
910+ 'ajaxurl ' => wu_ajax_url ('init ' ),
911+ ]
912+ );
913+
914+ wp_localize_script (
915+ 'wu-functions ' ,
916+ 'wu_settings ' ,
917+ [
918+ 'currency ' => wu_get_setting ('currency_symbol ' , 'USD ' ),
919+ 'currency_symbol ' => wu_get_currency_symbol (),
920+ 'currency_position ' => wu_get_setting ('currency_position ' , '%s %v ' ),
921+ 'decimal_separator ' => wu_get_setting ('decimal_separator ' , '. ' ),
922+ 'thousand_separator ' => wu_get_setting ('thousand_separator ' , ', ' ),
923+ 'precision ' => wu_get_setting ('precision ' , 2 ),
924+ 'use_container ' => get_user_setting ('wu_use_container ' , false ),
925+ 'disable_image_zoom ' => wu_get_setting ('disable_image_zoom ' , false ),
926+ ]
927+ );
928+
929+ wp_localize_script (
930+ 'wu-functions ' ,
931+ 'wu_ticker ' ,
932+ [
933+ 'server_clock_offset ' => (wu_get_current_time ('timestamp ' ) - time ()) / 60 / 60 , // phpcs:ignore
934+ 'moment_clock_timezone_name ' => wp_date ('e ' ),
935+ 'moment_clock_timezone_offset ' => wp_date ('Z ' ),
936+ ]
937+ );
938+
903939 wp_register_script ('wubox ' , wu_get_asset ('wubox.js ' , 'js ' ), ['wu-functions ' ], \WP_Ultimo::VERSION , true );
904940
905941 wp_localize_script (
@@ -917,6 +953,13 @@ public function register_scripts(): void {
917953 );
918954
919955 wp_add_inline_script ('wu-setup-wizard-extra ' , 'document.addEventListener("DOMContentLoaded", () => wu_initialize_imagepicker()); ' , 'after ' );
956+
957+ // All these just so the toggle of footer credits shows the other options.
958+ wp_register_script ('wu-vue ' , wu_get_asset ('lib/vue.js ' , 'js ' ), [], wu_get_version (), true );
959+ wp_register_script ('wu-money-mask ' , wu_get_asset ('lib/v-money.js ' , 'js ' ), ['wu-vue ' ], wu_get_version (), true );
960+ wp_register_script ('wu-input-mask ' , wu_get_asset ('lib/vue-the-mask.js ' , 'js ' ), ['wu-vue ' ], wu_get_version (), true );
961+ wp_register_script ('wu-vue-apps ' , wu_get_asset ('vue-apps.js ' , 'js ' ), ['wu-functions ' , 'wu-vue ' , 'wu-money-mask ' , 'wu-input-mask ' , 'wp-hooks ' ], wu_get_version (), true );
962+ wp_enqueue_script ('wu-vue-apps ' );
920963 }
921964
922965 wp_enqueue_script ('wu-setup-wizard-extra ' , wu_get_asset ('setup-wizard-extra.js ' , 'js ' ), ['jquery ' , 'wu-fields ' , 'wu-functions ' , 'wubox ' ], wu_get_version (), true );
0 commit comments