| @@ -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 | } |
| @@ -18,20 +17,17 @@ | ||
| 18 | 17 | <# } #> |
| 19 | 18 | <div id="elementor-panel-elements-search-area"></div> |
| 20 | 19 | <div id="elementor-panel-elements-notice-area"></div> |
| 21 | 20 | <div id="elementor-panel-elements-wrapper"></div> |
| 22 | - <div id="elementor-panel-elements-widget-creation-area"></div> | |
| 23 | 21 | </script> |
| 24 | 22 | |
| 25 | 23 | <script type="text/template" id="tmpl-elementor-panel-categories"> |
| 26 | 24 | <div id="elementor-panel-categories"></div> |
| 27 | 25 | <?php |
| 28 | - $has_pro = Utils::has_pro(); | |
| 29 | 26 | $get_pro_details = apply_filters( 'elementor/editor/panel/get_pro_details', [ |
| 30 | 27 | 'link' => 'https://go.elementor.com/pro-widgets/', |
| 31 | 28 | 'message' => __( 'Get more with Elementor Pro', 'elementor' ), |
| 32 | 29 | 'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 33 | - 'show_banner' => ! $has_pro, | |
| 34 | 30 | ] ); |
| 35 | 31 | $promotion_data_sticky = [ |
| 36 | 32 | 'url' => 'https://go.elementor.com/go-pro-sticky-widget-panel/', |
| 37 | 33 | 'message' => __( 'Access all Pro widgets.', 'elementor' ), |
| @@ -37,16 +33,15 @@ | ||
| 37 | 33 | 'message' => __( 'Access all Pro widgets.', 'elementor' ), |
| 38 | 34 | 'button_text' => __( 'Upgrade Now', 'elementor' ), |
| 39 | 35 | ]; |
| 40 | 36 | $promotion_data_sticky = Filtered_Promotions_Manager::get_filtered_promotion_data( $promotion_data_sticky, 'elementor/editor/panel/get_pro_details-sticky', 'url' ); |
| 37 | + $has_pro = Utils::has_pro(); | |
| 41 | 38 | ?> |
| 42 | - <?php if ( $get_pro_details['show_banner'] ) : ?> | |
| 43 | 39 | <div id="elementor-panel-get-pro-elements" class="elementor-nerd-box"> |
| 44 | 40 | <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' ); ?>" /> |
| 45 | 41 | <div class="elementor-nerd-box-message"><?php echo esc_html( $get_pro_details['message'] ); ?></div> |
| 46 | 42 | <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 | 43 | </div> |
| 48 | - <?php endif; ?> | |
| 49 | 44 | <?php if ( ! $has_pro ) : ?> |
| 50 | 45 | <div id="elementor-panel-get-pro-elements-sticky"> |
| 51 | 46 | <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 | 47 | <div class="elementor-get-pro-sticky-message"> |
| @@ -71,11 +66,9 @@ | ||
| 71 | 66 | </a> |
| 72 | 67 | </span> |
| 73 | 68 | <# } #> |
| 74 | 69 | </button> |
| 75 | - <div class="elementor-panel-category-items elementor-responsive-panel"> | |
| 76 | - <?php do_action( 'elementor/editor/templates/panel/category/content' ); ?> | |
| 77 | - </div> | |
| 70 | + <div class="elementor-panel-category-items elementor-responsive-panel"></div> | |
| 78 | 71 | </script> |
| 79 | 72 | |
| 80 | 73 | <script type="text/template" id="tmpl-elementor-panel-element-search"> |
| 81 | 74 | <label for="elementor-panel-elements-search-input" class="screen-reader-text"><?php echo esc_html__( 'Search Widget:', 'elementor' ); ?></label> |
| @@ -83,16 +76,15 @@ | ||
| 83 | 76 | <i class="eicon-search-bold" aria-hidden="true"></i> |
| 84 | 77 | </script> |
| 85 | 78 | |
| 86 | 79 | <script type="text/template" id="tmpl-elementor-element-library-element"> |
| 87 | - <# const v4Categories = ['v4-elements', 'atomic-form']; #> | |
| 88 | - <button class="elementor-element" data-library-element-type="{{ elType === 'widget' ? widgetType : elType }}"> | |
| 80 | + <button class="elementor-element"> | |
| 89 | 81 | <# if ( obj.integration ) { #> |
| 90 | 82 | <i class="eicon-plug"></i> |
| 91 | - <# } else if ( false === obj.editable && !obj.atomicFormPromotion ) { #> | |
| 83 | + <# } else if ( false === obj.editable ) { #> | |
| 92 | 84 | <i class="eicon-lock"></i> |
| 93 | 85 | <# } #> |
| 94 | - <# if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #> | |
| 86 | + <# if ( obj.categories.includes( 'v4-elements' ) ) { #> | |
| 95 | 87 | <i class="eicon-atomic"></i> |
| 96 | 88 | <# } #> |
| 97 | 89 | <div class="icon"> |
| 98 | 90 | <i class="{{ icon }}" aria-hidden="true"></i> |
| @@ -101,27 +93,8 @@ | ||
| 101 | 93 | <div class="title">{{{ title }}}</div> |
| 102 | 94 | </div> |
| 103 | 95 | </button> |
| 104 | 96 | </script> |
| 105 | - | |
| 106 | -<?php if ( Plugin::$instance->experiments->is_feature_active( Modules\WidgetCreation\Module::EXPERIMENT_NAME ) ) : ?> | |
| 107 | - <?php | |
| 108 | - $widget_creation_cta_text = Hints::is_plugin_active( 'angie' ) | |
| 109 | - ? __( 'Create custom widget', 'elementor' ) | |
| 110 | - : __( 'Try for free', 'elementor' ); | |
| 111 | - ?> | |
| 112 | -<script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-empty-state"> | |
| 113 | - <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( 'No widget found for', 'elementor' ); ?> "{{{ searchTerm }}}"</div> | |
| 114 | - <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> | |
| 115 | - <button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> | |
| 116 | -</script> | |
| 117 | - | |
| 118 | -<script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-search-footer"> | |
| 119 | - <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( "Couldn't find what you're looking for?", 'elementor' ); ?></div> | |
| 120 | - <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> | |
| 121 | - <button type="button" class="elementor-panel-elements-widget-creation__cta"><?php echo esc_html( $widget_creation_cta_text ); ?></button> | |
| 122 | -</script> | |
| 123 | -<?php endif; ?> | |
| 124 | 97 | |
| 125 | 98 | <script type="text/template" id="tmpl-elementor-panel-global"> |
| 126 | 99 | <div class="elementor-nerd-box"> |
| 127 | 100 | <img class="elementor-nerd-box-icon" src="<?php echo ELEMENTOR_ASSETS_URL . 'images/information.svg'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" loading="lazy" alt="<?php echo esc_attr__( 'Elementor', 'elementor' ); ?>" /> |