| @@ -373,9 +373,9 @@ | ||
| 373 | 373 | array_unshift( $links, $settings_link ); |
| 374 | 374 | |
| 375 | 375 | $go_pro_text = esc_html__( 'Get Elementor Pro', 'elementor' ); |
| 376 | 376 | if ( Utils::is_sale_time() ) { |
| 377 | - $go_pro_text = esc_html__( 'Sale! Upgrade Now', 'elementor' ); | |
| 377 | + $go_pro_text = esc_html__( 'Discounted Upgrades Now!', 'elementor' ); | |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | $links['go_pro'] = sprintf( '<a href="%1$s" target="_blank" class="elementor-plugins-gopro">%2$s</a>', 'https://go.elementor.com/go-pro-wp-plugins/', $go_pro_text ); |
| 381 | 381 | |
| @@ -1133,14 +1133,14 @@ | ||
| 1133 | 1133 | $description = esc_html__( 'Automatically optimize images to improve site speed and performance. Included with your ONE subscription.', 'elementor' ); |
| 1134 | 1134 | $button_text = esc_html__( 'Install now', 'elementor' ); |
| 1135 | 1135 | $button_url = Hints::get_plugin_install_url( $plugin_slug ); |
| 1136 | 1136 | } elseif ( ! $is_active ) { |
| 1137 | - $description = esc_html__( 'Image Optimization is installed and included in your ONE subscription. Activate it to optimize images and improve site performance.', 'elementor' ); | |
| 1137 | + $description = esc_html__( 'Image Optimizer is installed and included in your ONE subscription. Activate it to optimize images and improve site performance.', 'elementor' ); | |
| 1138 | 1138 | $button_text = esc_html__( 'Activate now', 'elementor' ); |
| 1139 | 1139 | $button_url = Hints::get_plugin_activate_url( $plugin_slug ); |
| 1140 | 1140 | } |
| 1141 | 1141 | } else { |
| 1142 | - $description = esc_html__( 'Optimize your images to enhance site performance by using Image Optimization.', 'elementor' ); | |
| 1142 | + $description = esc_html__( 'Optimize your images to enhance site performance by using Image Optimizer.', 'elementor' ); | |
| 1143 | 1143 | if ( ! $is_installed ) { |
| 1144 | 1144 | $button_text = esc_html__( 'Install now', 'elementor' ); |
| 1145 | 1145 | $button_url = Hints::get_plugin_install_url( $plugin_slug ); |
| 1146 | 1146 | } elseif ( ! $is_active ) { |
| @@ -1150,9 +1150,9 @@ | ||
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | 1152 | $dismissible = 'image_optimizer_hint'; |
| 1153 | 1153 | |
| 1154 | - $title = esc_html__( 'Speed up your website with Image Optimization', 'elementor' ); | |
| 1154 | + $title = esc_html__( 'Speed up your website with Image Optimizer', 'elementor' ); | |
| 1155 | 1155 | $content = sprintf( |
| 1156 | 1156 | "<strong>%1\$s</strong><br>%2\$s <a class='e-btn-1' href='%3\$s' target='_blank'>%4\$s</a>!", |
| 1157 | 1157 | $title, |
| 1158 | 1158 | $description, |
| @@ -1190,12 +1190,16 @@ | ||
| 1190 | 1190 | if ( ! current_user_can( 'install_plugins' ) ) { |
| 1191 | 1191 | return; |
| 1192 | 1192 | } |
| 1193 | 1193 | |
| 1194 | + if ( empty( $request['source'] ) ) { | |
| 1195 | + return; | |
| 1196 | + } | |
| 1197 | + | |
| 1194 | 1198 | $campaign_data = [ |
| 1195 | - 'campaign' => sanitize_key( $request['campaign'] ?? '' ), | |
| 1196 | - 'source' => sanitize_key( $request['source'] ?? '' ), | |
| 1197 | - 'medium' => sanitize_key( $request['medium'] ?? '' ), | |
| 1199 | + 'source' => sanitize_key( $request['source'] ), | |
| 1200 | + 'campaign' => 'ally-plg', | |
| 1201 | + 'medium' => 'wp-dash', | |
| 1198 | 1202 | ]; |
| 1199 | 1203 | |
| 1200 | 1204 | set_transient( 'elementor_ea11y_campaign', $campaign_data, 30 * DAY_IN_SECONDS ); |
| 1201 | 1205 | } |
| @@ -1204,12 +1208,26 @@ | ||
| 1204 | 1208 | if ( ! current_user_can( 'install_plugins' ) ) { |
| 1205 | 1209 | return; |
| 1206 | 1210 | } |
| 1207 | 1211 | |
| 1212 | + if ( empty( $request['source'] ) ) { | |
| 1213 | + return; | |
| 1214 | + } | |
| 1215 | + | |
| 1216 | + $one_subscription = Hints::is_plugin_connected_to_one_subscription(); | |
| 1217 | + | |
| 1218 | + if ( $one_subscription && strpos( $request['source'], 'editor' ) !== false ) { | |
| 1219 | + $medium = 'editor-one'; | |
| 1220 | + } elseif ( $one_subscription ) { | |
| 1221 | + $medium = 'wp-dash-one'; | |
| 1222 | + } else { | |
| 1223 | + $medium = 'wp-dash'; | |
| 1224 | + } | |
| 1225 | + | |
| 1208 | 1226 | $campaign_data = [ |
| 1209 | - 'campaign' => sanitize_key( $request['campaign'] ?? '' ), | |
| 1210 | - 'source' => sanitize_key( $request['source'] ?? '' ), | |
| 1211 | - 'medium' => sanitize_key( $request['medium'] ?? '' ), | |
| 1227 | + 'source' => sanitize_key( $request['source'] ), | |
| 1228 | + 'campaign' => $one_subscription ? 'io-plg-one' : 'io-plg', | |
| 1229 | + 'medium' => $medium, | |
| 1212 | 1230 | ]; |
| 1213 | 1231 | |
| 1214 | 1232 | set_transient( 'elementor_image_optimization_campaign', $campaign_data, 30 * DAY_IN_SECONDS ); |
| 1215 | 1233 | } |
| @@ -1218,12 +1236,16 @@ | ||
| 1218 | 1236 | if ( ! current_user_can( 'install_plugins' ) ) { |
| 1219 | 1237 | return; |
| 1220 | 1238 | } |
| 1221 | 1239 | |
| 1240 | + if ( empty( $request['source'] ) ) { | |
| 1241 | + return; | |
| 1242 | + } | |
| 1243 | + | |
| 1222 | 1244 | $campaign_data = [ |
| 1223 | - 'campaign' => sanitize_key( $request['campaign'] ?? '' ), | |
| 1224 | - 'source' => sanitize_key( $request['source'] ?? '' ), | |
| 1225 | - 'medium' => sanitize_key( $request['medium'] ?? '' ), | |
| 1245 | + 'source' => sanitize_key( $request['source'] ), | |
| 1246 | + 'campaign' => 'sm-plg', | |
| 1247 | + 'medium' => 'wp-dash', | |
| 1226 | 1248 | ]; |
| 1227 | 1249 | |
| 1228 | 1250 | set_transient( 'elementor_site_mailer_campaign', $campaign_data, 30 * DAY_IN_SECONDS ); |
| 1229 | 1251 | } |