| @@ -2,14 +2,14 @@ | ||
| 2 | 2 | namespace Elementor\Core\Editor; |
| 3 | 3 | |
| 4 | 4 | use Elementor\Core\Base\Base_Object; |
| 5 | 5 | use Elementor\Core\Common\Modules\Ajax\Module as Ajax; |
| 6 | -use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; | |
| 6 | +use Elementor\Core\Utils\Promotions\Validate_Promotion; | |
| 7 | 7 | use Elementor\Plugin; |
| 8 | 8 | use Elementor\Utils; |
| 9 | 9 | |
| 10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | - exit; // Exit if accessed directly. | |
| 11 | + exit; // Exit if accessed directly | |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | class Notice_Bar extends Base_Object { |
| 15 | 15 | |
| @@ -25,9 +25,13 @@ | ||
| 25 | 25 | 'upgrade_text' => $this->get_upgrade_text(), |
| 26 | 26 | 'upgrade_url' => $upgrade_url, |
| 27 | 27 | ]; |
| 28 | 28 | |
| 29 | - $config = Filtered_Promotions_Manager::get_filtered_promotion_data( $config, 'elementor/notice-bar/custom_promotion', 'upgrade_url' ); | |
| 29 | + $config = apply_filters( 'elementor/notice-bar/custom_promotion', $config ); | |
| 30 | + | |
| 31 | + if ( isset( $config['upgrade_url'] ) && ! Validate_Promotion::domain_is_on_elementor_dot_com( $config['upgrade_url'] ) ) { | |
| 32 | + $config['upgrade_url'] = esc_url( $upgrade_url ); | |
| 33 | + } | |
| 30 | 34 | |
| 31 | 35 | return [ |
| 32 | 36 | 'muted_period' => 14, |
| 33 | 37 | 'option_key' => '_elementor_editor_upgrade_notice_dismissed', |