| @@ -1,10 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | -use Elementor\Core\Utils\Hints; | |
| 4 | +use Elementor\Utils; | |
| 5 | 5 | use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; |
| 6 | -use Elementor\Utils; | |
| 7 | 6 | |
| 8 | 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | 8 | exit; // Exit if accessed directly. |
| 10 | 9 | } |
| @@ -31,9 +30,14 @@ | ||
| 31 | 30 | 'message' => __( 'Get more with Elementor Pro', 'elementor' ), |
| 32 | 31 | 'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 33 | 32 | 'show_banner' => ! $has_pro, |
| 34 | 33 | ] ); |
| 35 | - $promotion_data_sticky = Filtered_Promotions_Manager::get_editor_panel_sticky_promotion(); | |
| 34 | + $promotion_data_sticky = [ | |
| 35 | + 'url' => 'https://go.elementor.com/go-pro-sticky-widget-panel/', | |
| 36 | + 'message' => __( 'Access all Pro widgets.', 'elementor' ), | |
| 37 | + 'button_text' => __( 'Upgrade Now', 'elementor' ), | |
| 38 | + ]; | |
| 39 | + $promotion_data_sticky = Filtered_Promotions_Manager::get_filtered_promotion_data( $promotion_data_sticky, 'elementor/editor/panel/get_pro_details-sticky', 'url' ); | |
| 36 | 40 | ?> |
| 37 | 41 | <?php if ( $get_pro_details['show_banner'] ) : ?> |
| 38 | 42 | <div id="elementor-panel-get-pro-elements" class="elementor-nerd-box"> |
| 39 | 43 | <img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/go-pro.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Upgrade', 'elementor' ); ?>" /> |
| @@ -41,18 +45,18 @@ | ||
| 41 | 45 | <a class="elementor-button go-pro" target="_blank" href="<?php echo esc_url( $get_pro_details['link'] ); ?>"><?php echo esc_html( $get_pro_details['button_text'] ); ?></a> |
| 42 | 46 | </div> |
| 43 | 47 | <?php endif; ?> |
| 44 | 48 | <?php if ( ! $has_pro ) : ?> |
| 45 | - <?php require __DIR__ . '/panel-elements-sticky-promotion.php'; ?> | |
| 49 | + <div id="elementor-panel-get-pro-elements-sticky"> | |
| 50 | + <img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/unlock-sticky.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Upgrade', 'elementor' ); ?>"/> | |
| 51 | + <div class="elementor-get-pro-sticky-message"> | |
| 52 | + <?php echo esc_html( $promotion_data_sticky['message'] ); ?> | |
| 53 | + <a target="_blank" href="<?php echo esc_url( $promotion_data_sticky['url'] ); ?>"><?php echo esc_html( $promotion_data_sticky['button_text'] ); ?></a> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 46 | 56 | <?php endif; ?> |
| 47 | 57 | </script> |
| 48 | 58 | |
| 49 | -<script type="text/template" id="tmpl-elementor-panel-element-sticky-promotion"> | |
| 50 | - <?php if ( ! $has_pro ) : ?> | |
| 51 | - <?php require __DIR__ . '/panel-elements-sticky-promotion.php'; ?> | |
| 52 | - <?php endif; ?> | |
| 53 | -</script> | |
| 54 | - | |
| 55 | 59 | <script type="text/template" id="tmpl-elementor-panel-elements-category"> |
| 56 | 60 | <button class="elementor-panel-heading elementor-panel-category-title"> |
| 57 | 61 | <span class="elementor-panel-heading-toggle"> |
| 58 | 62 | <i class="eicon-caret-right" aria-hidden="true"></i> |
| @@ -61,9 +65,9 @@ | ||
| 61 | 65 | <?php do_action( 'elementor/editor/templates/panel/category' ); ?> |
| 62 | 66 | <# if ( 'undefined' !== typeof promotion && promotion ) { #> |
| 63 | 67 | <span class="elementor-panel-heading-promotion"> |
| 64 | 68 | <a href="{{{ promotion.url }}}" target="_blank"> |
| 65 | - <i class="eicon-upgrade-crown-full"></i>{{{ promotion.text || <?php echo wp_json_encode( __( 'Upgrade', 'elementor' ) ); ?> }}} | |
| 69 | + <i class="eicon-upgrade-crown"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?> | |
| 66 | 70 | </a> |
| 67 | 71 | </span> |
| 68 | 72 | <# } #> |
| 69 | 73 | </button> |
| @@ -84,9 +88,10 @@ | ||
| 84 | 88 | <# if ( obj.integration ) { #> |
| 85 | 89 | <i class="eicon-plug"></i> |
| 86 | 90 | <# } else if ( false === obj.editable ) { #> |
| 87 | 91 | <i class="eicon-lock"></i> |
| 88 | - <# } else if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 92 | + <# } #> | |
| 93 | + <# if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 89 | 94 | <i class="eicon-atomic"></i> |
| 90 | 95 | <# } #> |
| 91 | 96 | <div class="icon"> |
| 92 | 97 | <i class="{{ icon }}" aria-hidden="true"></i> |
| @@ -97,27 +102,24 @@ | ||
| 97 | 102 | </button> |
| 98 | 103 | </script> |
| 99 | 104 | |
| 100 | 105 | <?php if ( Plugin::$instance->experiments->is_feature_active( Modules\WidgetCreation\Module::EXPERIMENT_NAME ) ) : ?> |
| 101 | - <?php | |
| 102 | - $widget_creation_cta_text = Hints::is_plugin_active( 'angie' ) | |
| 103 | - ? __( 'Create custom widget', 'elementor' ) | |
| 104 | - : __( 'Try for free', 'elementor' ); | |
| 105 | - ?> | |
| 106 | 106 | <script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-empty-state"> |
| 107 | 107 | <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( 'No widget found for', 'elementor' ); ?> "{{{ searchTerm }}}"</div> |
| 108 | 108 | <div class="elementor-panel-elements-widget-creation__message"><?php echo esc_html__( 'Build a custom widget with Angie by describing what you need.', 'elementor' ); ?></div> |
| 109 | - <?php if ( current_user_can( 'manage_options' ) ) : ?> | |
| 110 | - <button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> | |
| 111 | - <?php endif; ?> | |
| 109 | + <button type="button" class="elementor-panel-elements-widget-creation__cta"> | |
| 110 | + <i class="eicon-ai" aria-hidden="true"></i> | |
| 111 | + <?php echo esc_html__( 'Create custom widget', 'elementor' ); ?> | |
| 112 | + </button> | |
| 112 | 113 | </script> |
| 113 | 114 | |
| 114 | 115 | <script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-search-footer"> |
| 115 | 116 | <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( "Couldn't find what you're looking for?", 'elementor' ); ?></div> |
| 116 | 117 | <div class="elementor-panel-elements-widget-creation__message"><?php echo esc_html__( 'Build a custom widget with Angie by describing what you need.', 'elementor' ); ?></div> |
| 117 | - <?php if ( current_user_can( 'manage_options' ) ) : ?> | |
| 118 | - <button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> | |
| 119 | - <?php endif; ?> | |
| 118 | + <button type="button" class="elementor-panel-elements-widget-creation__cta"> | |
| 119 | + <i class="eicon-ai" aria-hidden="true"></i> | |
| 120 | + <?php echo esc_html__( 'Create custom widget', 'elementor' ); ?> | |
| 121 | + </button> | |
| 120 | 122 | </script> |
| 121 | 123 | <?php endif; ?> |
| 122 | 124 | |
| 123 | 125 | <script type="text/template" id="tmpl-elementor-panel-global"> |