| @@ -56,9 +56,9 @@ | ||
| 56 | 56 | public function register_styles() { |
| 57 | 57 | wp_register_style( |
| 58 | 58 | 'helloplus-forms', |
| 59 | 59 | HELLOPLUS_STYLE_URL . 'helloplus-forms.css', |
| 60 | - [ 'elementor-frontend' ], | |
| 60 | + [ 'elementor-frontend', 'elementor-icons' ], | |
| 61 | 61 | HELLOPLUS_VERSION |
| 62 | 62 | ); |
| 63 | 63 | } |
| 64 | 64 | |
| @@ -92,15 +92,33 @@ | ||
| 92 | 92 | [ 'elementor-editor', 'wp-i18n' ], |
| 93 | 93 | HELLOPLUS_VERSION, |
| 94 | 94 | true |
| 95 | 95 | ); |
| 96 | + | |
| 97 | + $promotion_data = [ | |
| 98 | + 'title' => __( 'Collect Submissions', 'hello-plus' ), | |
| 99 | + 'description' => [ __( 'Unlock form submissions by upgrading to Elementor Pro on an eligible plan.', 'hello-plus' ) ], | |
| 100 | + 'upgrade_text' => __( 'Upgrade', 'hello-plus' ), | |
| 101 | + 'upgrade_url' => 'https://go.elementor.com/biz-form-submissions', | |
| 102 | + 'image' => HELLOPLUS_IMAGES_URL . 'collect-submission.jpg', | |
| 103 | + 'image_alt' => __( 'Upgrade', 'hello-plus' ), | |
| 104 | + ]; | |
| 105 | + | |
| 106 | + wp_localize_script( | |
| 107 | + 'helloplus-forms-editor', | |
| 108 | + 'ehpFormsPromotionData', | |
| 109 | + $promotion_data | |
| 110 | + ); | |
| 111 | + | |
| 112 | + wp_set_script_translations( 'helloplus-forms-editor', 'hello-plus' ); | |
| 96 | 113 | } |
| 97 | 114 | |
| 98 | 115 | public function register_scripts() { |
| 116 | + | |
| 99 | 117 | wp_register_script( |
| 100 | 118 | 'helloplus-forms-fe', |
| 101 | 119 | HELLOPLUS_SCRIPTS_URL . 'helloplus-forms-fe.js', |
| 102 | - [ 'elementor-common', 'elementor-frontend-modules', 'elementor-frontend' ], | |
| 120 | + [ 'elementor-frontend-modules', 'elementor-frontend' ], | |
| 103 | 121 | HELLOPLUS_VERSION, |
| 104 | 122 | true |
| 105 | 123 | ); |
| 106 | 124 | |