| @@ -31,14 +31,9 @@ | ||
| 31 | 31 | 'message' => __( 'Get more with Elementor Pro', 'elementor' ), |
| 32 | 32 | 'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 33 | 33 | 'show_banner' => ! $has_pro, |
| 34 | 34 | ] ); |
| 35 | - $promotion_data_sticky = [ | |
| 36 | - 'url' => 'https://go.elementor.com/go-pro-sticky-widget-panel/', | |
| 37 | - 'message' => __( 'Access all Pro widgets.', 'elementor' ), | |
| 38 | - 'button_text' => __( 'Upgrade Now', 'elementor' ), | |
| 39 | - ]; | |
| 40 | - $promotion_data_sticky = Filtered_Promotions_Manager::get_filtered_promotion_data( $promotion_data_sticky, 'elementor/editor/panel/get_pro_details-sticky', 'url' ); | |
| 35 | + $promotion_data_sticky = Filtered_Promotions_Manager::get_editor_panel_sticky_promotion(); | |
| 41 | 36 | ?> |
| 42 | 37 | <?php if ( $get_pro_details['show_banner'] ) : ?> |
| 43 | 38 | <div id="elementor-panel-get-pro-elements" class="elementor-nerd-box"> |
| 44 | 39 | <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' ); ?>" /> |
| @@ -46,18 +41,18 @@ | ||
| 46 | 41 | <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> |
| 47 | 42 | </div> |
| 48 | 43 | <?php endif; ?> |
| 49 | 44 | <?php if ( ! $has_pro ) : ?> |
| 50 | - <div id="elementor-panel-get-pro-elements-sticky"> | |
| 51 | - <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' ); ?>"/> | |
| 52 | - <div class="elementor-get-pro-sticky-message"> | |
| 53 | - <?php echo esc_html( $promotion_data_sticky['message'] ); ?> | |
| 54 | - <a target="_blank" href="<?php echo esc_url( $promotion_data_sticky['url'] ); ?>"><?php echo esc_html( $promotion_data_sticky['button_text'] ); ?></a> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 45 | + <?php require __DIR__ . '/panel-elements-sticky-promotion.php'; ?> | |
| 57 | 46 | <?php endif; ?> |
| 58 | 47 | </script> |
| 59 | 48 | |
| 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 | + | |
| 60 | 55 | <script type="text/template" id="tmpl-elementor-panel-elements-category"> |
| 61 | 56 | <button class="elementor-panel-heading elementor-panel-category-title"> |
| 62 | 57 | <span class="elementor-panel-heading-toggle"> |
| 63 | 58 | <i class="eicon-caret-right" aria-hidden="true"></i> |
| @@ -66,9 +61,9 @@ | ||
| 66 | 61 | <?php do_action( 'elementor/editor/templates/panel/category' ); ?> |
| 67 | 62 | <# if ( 'undefined' !== typeof promotion && promotion ) { #> |
| 68 | 63 | <span class="elementor-panel-heading-promotion"> |
| 69 | 64 | <a href="{{{ promotion.url }}}" target="_blank"> |
| 70 | - <i class="eicon-upgrade-crown"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?> | |
| 65 | + <i class="eicon-upgrade-crown-full"></i>{{{ promotion.text || <?php echo wp_json_encode( __( 'Upgrade', 'elementor' ) ); ?> }}} | |
| 71 | 66 | </a> |
| 72 | 67 | </span> |
| 73 | 68 | <# } #> |
| 74 | 69 | </button> |
| @@ -87,12 +82,11 @@ | ||
| 87 | 82 | <# const v4Categories = ['v4-elements', 'atomic-form']; #> |
| 88 | 83 | <button class="elementor-element" data-library-element-type="{{ elType === 'widget' ? widgetType : elType }}"> |
| 89 | 84 | <# if ( obj.integration ) { #> |
| 90 | 85 | <i class="eicon-plug"></i> |
| 91 | - <# } else if ( false === obj.editable && !obj.atomicFormPromotion ) { #> | |
| 92 | - <i class="eicon-lock"></i> | |
| 93 | - <# } #> | |
| 94 | - <# if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 86 | + <# } else if ( false === obj.editable ) { #> | |
| 87 | + <i class="eicon-upgrade-crown-full"></i> | |
| 88 | + <# } else if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 95 | 89 | <i class="eicon-atomic"></i> |
| 96 | 90 | <# } #> |
| 97 | 91 | <div class="icon"> |
| 98 | 92 | <i class="{{ icon }}" aria-hidden="true"></i> |