← All changes
|
includes/Extensions/ExitIntent/ExitIntentNotification.php
+7
-3
3.2.11
→
3.3.3
View file →
| @@ -74,9 +74,9 @@ | ||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | echo "<style id='nx-exit-intent-section-constraint'>\n"; |
| 77 | 77 | if ( '' !== $vars ) { |
| 78 | - echo "body.single-nx_exit_intent{" . $vars . "}\n"; | |
| 78 | + echo "body.single-nx_exit_intent{" . esc_html( $vars ) . "}\n"; | |
| 79 | 79 | } |
| 80 | 80 | echo ".nx-exit-intent-section{width:100%!important;max-width:var(--nx-exit-width,540px)!important;margin-left:auto!important;margin-right:auto!important;}\n"; |
| 81 | 81 | if ( is_singular( 'nx_exit_intent' ) ) { |
| 82 | 82 | echo "body.single-nx_exit_intent .elementor-section,body.single-nx_exit_intent .e-con{width:100%!important;max-width:var(--nx-exit-width,540px)!important;margin-left:auto!important;margin-right:auto!important;}\n"; |
| @@ -104,8 +104,9 @@ | ||
| 104 | 104 | $settings['mode'] = 'built_in'; |
| 105 | 105 | return $settings; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. | |
| 108 | 109 | $resolved_id = apply_filters( 'wpml_object_id', $elementor_id, 'nx_exit_intent', true ); |
| 109 | 110 | $html = \Elementor\Plugin::$instance->frontend->get_builder_content_for_display( $resolved_id, false ); |
| 110 | 111 | |
| 111 | 112 | // Surface the Layout-panel settings (registered in register_popup_layout_controls) |
| @@ -557,19 +558,21 @@ | ||
| 557 | 558 | public function delete_elementor_post( $elementor_id ) { |
| 558 | 559 | if ( empty( $elementor_id ) ) { |
| 559 | 560 | return; |
| 560 | 561 | } |
| 562 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. | |
| 561 | 563 | $languages = apply_filters( 'wpml_active_languages', null ); |
| 562 | 564 | if ( is_array( $languages ) ) { |
| 563 | 565 | foreach ( $languages as $lang => $val ) { |
| 566 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. | |
| 564 | 567 | $translated_id = apply_filters( 'wpml_object_id', $elementor_id, 'nx_exit_intent', false, $lang ); |
| 565 | 568 | if ( $translated_id ) { |
| 566 | - wp_delete_post( $translated_id, true ); | |
| 569 | + Helper::delete_owned_post( $translated_id, 'nx_exit_intent' ); | |
| 567 | 570 | } |
| 568 | 571 | } |
| 569 | 572 | return; |
| 570 | 573 | } |
| 571 | - wp_delete_post( $elementor_id, true ); | |
| 574 | + Helper::delete_owned_post( $elementor_id, 'nx_exit_intent' ); | |
| 572 | 575 | } |
| 573 | 576 | |
| 574 | 577 | /** |
| 575 | 578 | * Redirect WP "Edit" links for nx_exit_intent posts straight into the Elementor editor. |
| @@ -2269,8 +2272,9 @@ | ||
| 2269 | 2272 | return $fields; |
| 2270 | 2273 | } |
| 2271 | 2274 | |
| 2272 | 2275 | public function doc() { |
| 2276 | + /* translators: %1$s: documentation link URL */ | |
| 2273 | 2277 | return sprintf(__(' |
| 2274 | 2278 | <p>Show a targeted message at the exact moment someone is about to close your tab & bring them back into the funnel. Need help? Check out our <a target="_blank" href="%1$s">documentation</a>.</p>', |
| 2275 | 2279 | 'notificationx'), |
| 2276 | 2280 | 'https://notificationx.com/docs/how-to-configure-exit-intent-popup/', |