PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | templates/account-page.php +12 -1 3.0.9 → 3.0.16 View file →
@@ -27,15 +27,26 @@
27 27 );
28 28 wp_enqueue_script(
29 29 'yatra-login-shortcode',
30 30 YATRA_PLUGIN_URL . 'assets/js/login-shortcode.js',
31 - ['jquery'],
31 + ['jquery', 'wp-i18n'],
32 32 YATRA_VERSION,
33 33 true
34 34 );
35 + // Load JS translations so __() strings in login-shortcode.js are localized
36 + // on this standalone account page (mirrors LoginShortcode::enqueueAssets).
37 + if (function_exists('wp_set_script_translations')) {
38 + wp_set_script_translations(
39 + 'yatra-login-shortcode',
40 + 'yatra',
41 + YATRA_PLUGIN_PATH . 'i18n/languages'
42 + );
43 + }
35 44 wp_localize_script('yatra-login-shortcode', 'yatra_ajax', [
36 45 'ajax_url' => admin_url('admin-ajax.php'),
37 46 'nonce' => wp_create_nonce('yatra_login_nonce'),
47 + 'rest_url' => esc_url_raw(rest_url('yatra/v1')),
48 + 'rest_nonce' => wp_create_nonce('wp_rest'),
38 49 'debug' => defined('WP_DEBUG') && WP_DEBUG,
39 50 'strings' => [
40 51 'login_error' => __('Login failed. Please try again.', 'yatra'),
41 52 'network_error' => __('Network error. Please check your connection.', 'yatra'),