PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0
Elementor Website Builder – more than just a page builder v4.0.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / includes / editor-templates / panel-elements.php

panel-elements.php in Elementor Website Builder – more than just a page builder 4.0.0, at includes/editor-templates/panel-elements.php

133 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 use Elementor\Utils;
5 use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager;
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit; // Exit if accessed directly.
9 }
10 ?>
11 <script type="text/template" id="tmpl-elementor-panel-elements">
12 <# if ( $e.components.get( 'document/elements' ).utils.allowAddingWidgets()) { #>
13 <div id="elementor-panel-elements-navigation" class="elementor-panel-navigation">
14 <button class="elementor-component-tab elementor-panel-navigation-tab" data-tab="categories"><?php echo esc_html__( 'Elements', 'elementor' ); ?></button>
15 <button class="elementor-component-tab elementor-panel-navigation-tab" data-tab="global"><?php echo esc_html__( 'Globals', 'elementor' ); ?></button>
16 </div>
17 <# } #>
18 <div id="elementor-panel-elements-search-area"></div>
19 <div id="elementor-panel-elements-notice-area"></div>
20 <div id="elementor-panel-elements-wrapper"></div>
21 <div id="elementor-panel-elements-widget-creation-area"></div>
22 </script>
23
24 <script type="text/template" id="tmpl-elementor-panel-categories">
25 <div id="elementor-panel-categories"></div>
26 <?php
27 $has_pro = Utils::has_pro();
28 $get_pro_details = apply_filters( 'elementor/editor/panel/get_pro_details', [
29 'link' => 'https://go.elementor.com/pro-widgets/',
30 'message' => __( 'Get more with Elementor Pro', 'elementor' ),
31 'button_text' => __( 'Upgrade Now', 'elementor' ),
32 'show_banner' => ! $has_pro,
33 ] );
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' );
40 ?>
41 <?php if ( $get_pro_details['show_banner'] ) : ?>
42 <div id="elementor-panel-get-pro-elements" class="elementor-nerd-box">
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' ); ?>" />
44 <div class="elementor-nerd-box-message"><?php echo esc_html( $get_pro_details['message'] ); ?></div>
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>
46 </div>
47 <?php endif; ?>
48 <?php if ( ! $has_pro ) : ?>
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>
56 <?php endif; ?>
57 </script>
58
59 <script type="text/template" id="tmpl-elementor-panel-elements-category">
60 <button class="elementor-panel-heading elementor-panel-category-title">
61 <span class="elementor-panel-heading-toggle">
62 <i class="eicon-caret-right" aria-hidden="true"></i>
63 </span>
64 <span class="elementor-panel-heading-title">{{{ title }}}</span>
65 <?php do_action( 'elementor/editor/templates/panel/category' ); ?>
66 <# if ( 'undefined' !== typeof promotion && promotion ) { #>
67 <span class="elementor-panel-heading-promotion">
68 <a href="{{{ promotion.url }}}" target="_blank">
69 <i class="eicon-upgrade-crown"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?>
70 </a>
71 </span>
72 <# } #>
73 </button>
74 <div class="elementor-panel-category-items elementor-responsive-panel">
75 <?php do_action( 'elementor/editor/templates/panel/category/content' ); ?>
76 </div>
77 </script>
78
79 <script type="text/template" id="tmpl-elementor-panel-element-search">
80 <label for="elementor-panel-elements-search-input" class="screen-reader-text"><?php echo esc_html__( 'Search Widget:', 'elementor' ); ?></label>
81 <input type="search" id="elementor-panel-elements-search-input" placeholder="<?php esc_attr_e( 'Search Widget...', 'elementor' ); ?>" autocomplete="off"/>
82 <i class="eicon-search-bold" aria-hidden="true"></i>
83 </script>
84
85 <script type="text/template" id="tmpl-elementor-element-library-element">
86 <# const v4Categories = ['v4-elements', 'atomic-form']; #>
87 <button class="elementor-element" data-library-element-type="{{ elType === 'widget' ? widgetType : elType }}">
88 <# if ( obj.integration ) { #>
89 <i class="eicon-plug"></i>
90 <# } else if ( false === obj.editable ) { #>
91 <i class="eicon-lock"></i>
92 <# } #>
93 <# if ( obj.categories.some( category => v4Categories.includes( category ) ) ) { #>
94 <i class="eicon-atomic"></i>
95 <# } #>
96 <div class="icon">
97 <i class="{{ icon }}" aria-hidden="true"></i>
98 </div>
99 <div class="title-wrapper">
100 <div class="title">{{{ title }}}</div>
101 </div>
102 </button>
103 </script>
104
105 <?php if ( Plugin::$instance->experiments->is_feature_active( Modules\WidgetCreation\Module::EXPERIMENT_NAME ) ) : ?>
106 <script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-empty-state">
107 <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( 'No widget found for', 'elementor' ); ?> "{{{ searchTerm }}}"</div>
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 <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>
113 </script>
114
115 <script type="text/template" id="tmpl-elementor-panel-elements-widget-creation-search-footer">
116 <div class="elementor-panel-elements-widget-creation__title"><?php echo esc_html__( "Couldn't find what you're looking for?", 'elementor' ); ?></div>
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>
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>
122 </script>
123 <?php endif; ?>
124
125 <script type="text/template" id="tmpl-elementor-panel-global">
126 <div class="elementor-nerd-box">
127 <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' ); ?>" />
128 <div class="elementor-nerd-box-title"><?php echo esc_html__( 'Meet Our Global Widget', 'elementor' ); ?></div>
129 <div class="elementor-nerd-box-message"><?php echo esc_html__( 'With this feature, you can save a widget as global, then add it to multiple areas. All areas will be editable from one single place.', 'elementor' ); ?></div>
130 <a class="elementor-button go-pro" target="_blank" href="https://go.elementor.com/pro-global/"><?php echo esc_html__( 'Upgrade Now', 'elementor' ); ?></a>
131 </div>
132 </script>
133