PluginProbe
Elementor Website Builder – more than just a page builder / 3.22.2
Elementor Website Builder – more than just a page builder v3.22.2
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 / templates.php

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

320 lines 18.3 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 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7 ?>
8 <script type="text/template" id="tmpl-elementor-template-library-header-actions">
9 <?php if ( User::is_current_user_can_upload_json() ) { ?>
10 <div id="elementor-template-library-header-import" class="elementor-templates-modal__header__item">
11 <i class="eicon-upload-circle-o" aria-hidden="true" title="<?php esc_attr_e( 'Import Template', 'elementor' ); ?>"></i>
12 <span class="elementor-screen-only"><?php echo esc_html__( 'Import Template', 'elementor' ); ?></span>
13 </div>
14 <?php } ?>
15 <div id="elementor-template-library-header-sync" class="elementor-templates-modal__header__item">
16 <i class="eicon-sync" aria-hidden="true" title="<?php esc_attr_e( 'Sync Library', 'elementor' ); ?>"></i>
17 <span class="elementor-screen-only"><?php echo esc_html__( 'Sync Library', 'elementor' ); ?></span>
18 </div>
19 <div id="elementor-template-library-header-save" class="elementor-templates-modal__header__item">
20 <i class="eicon-save-o" aria-hidden="true" title="<?php esc_attr_e( 'Save', 'elementor' ); ?>"></i>
21 <span class="elementor-screen-only"><?php echo esc_html__( 'Save', 'elementor' ); ?></span>
22 </div>
23 </script>
24
25 <script type="text/template" id="tmpl-elementor-template-library-header-menu">
26 <# jQuery.each( tabs, ( tab, args ) => { #>
27 <div class="elementor-component-tab elementor-template-library-menu-item" data-tab="{{{ tab }}}">{{{ args.title }}}</div>
28 <# } ); #>
29 </script>
30
31 <script type="text/template" id="tmpl-elementor-template-library-header-preview">
32 <div id="elementor-template-library-header-preview-insert-wrapper" class="elementor-templates-modal__header__item">
33 {{{ elementor.templates.layout.getTemplateActionButton( obj ) }}}
34 </div>
35 </script>
36
37 <script type="text/template" id="tmpl-elementor-template-library-header-back">
38 <i class="eicon-" aria-hidden="true"></i>
39 <span><?php echo esc_html__( 'Back to Library', 'elementor' ); ?></span>
40 </script>
41
42 <script type="text/template" id="tmpl-elementor-template-library-loading">
43 <div class="elementor-loader-wrapper">
44 <div class="elementor-loader">
45 <div class="elementor-loader-boxes">
46 <div class="elementor-loader-box"></div>
47 <div class="elementor-loader-box"></div>
48 <div class="elementor-loader-box"></div>
49 <div class="elementor-loader-box"></div>
50 </div>
51 </div>
52 <div class="elementor-loading-title"><?php echo esc_html__( 'Loading', 'elementor' ); ?></div>
53 </div>
54 </script>
55
56 <script type="text/template" id="tmpl-elementor-template-library-templates">
57 <#
58 var activeSource = elementor.templates.getFilter('source');
59 #>
60 <div id="elementor-template-library-toolbar">
61 <# if ( 'remote' === activeSource ) {
62 var activeType = elementor.templates.getFilter('type');
63 #>
64 <div id="elementor-template-library-filter-toolbar-remote" class="elementor-template-library-filter-toolbar">
65 <# if ( 'page' === activeType ) { #>
66 <div id="elementor-template-library-order">
67 <input type="radio" id="elementor-template-library-order-new" class="elementor-template-library-order-input" name="elementor-template-library-order" value="date">
68 <label for="elementor-template-library-order-new" class="elementor-template-library-order-label"><?php echo esc_html__( 'New', 'elementor' ); ?></label>
69 <input type="radio" id="elementor-template-library-order-trend" class="elementor-template-library-order-input" name="elementor-template-library-order" value="trendIndex">
70 <label for="elementor-template-library-order-trend" class="elementor-template-library-order-label"><?php echo esc_html__( 'Trend', 'elementor' ); ?></label>
71 <input type="radio" id="elementor-template-library-order-popular" class="elementor-template-library-order-input" name="elementor-template-library-order" value="popularityIndex">
72 <label for="elementor-template-library-order-popular" class="elementor-template-library-order-label"><?php echo esc_html__( 'Popular', 'elementor' ); ?></label>
73 </div>
74 <# } else if ( 'lb' !== activeType ) {
75 var config = elementor.templates.getConfig( activeType );
76 if ( config.categories ) { #>
77 <div id="elementor-template-library-filter">
78 <select id="elementor-template-library-filter-subtype" class="elementor-template-library-filter-select" data-elementor-filter="subtype">
79 <option></option>
80 <# config.categories.forEach( function( category ) {
81 var selected = category === elementor.templates.getFilter( 'subtype' ) ? ' selected' : '';
82 #>
83 <option value="{{ category }}"{{{ selected }}}>{{{ category }}}</option>
84 <# } ); #>
85 </select>
86 </div>
87 <# }
88 } #>
89 <div id="elementor-template-library-my-favorites">
90 <# var checked = elementor.templates.getFilter( 'favorite' ) ? ' checked' : ''; #>
91 <input id="elementor-template-library-filter-my-favorites" type="checkbox"{{{ checked }}}>
92 <label id="elementor-template-library-filter-my-favorites-label" for="elementor-template-library-filter-my-favorites">
93 <i class="eicon" aria-hidden="true"></i>
94 <?php echo esc_html__( 'My Favorites', 'elementor' ); ?>
95 </label>
96 </div>
97 </div>
98 <# } else { #>
99 <div id="elementor-template-library-filter-toolbar-local" class="elementor-template-library-filter-toolbar"></div>
100 <# } #>
101 <div id="elementor-template-library-filter-text-wrapper">
102 <label for="elementor-template-library-filter-text" class="elementor-screen-only"><?php echo esc_html__( 'Search Templates:', 'elementor' ); ?></label>
103 <input id="elementor-template-library-filter-text" placeholder="<?php echo esc_attr__( 'Search', 'elementor' ); ?>">
104 <i class="eicon-search"></i>
105 </div>
106 </div>
107 <# if ( 'local' === activeSource ) { #>
108 <div id="elementor-template-library-order-toolbar-local">
109 <div class="elementor-template-library-local-column-1">
110 <input type="radio" id="elementor-template-library-order-local-title" class="elementor-template-library-order-input" name="elementor-template-library-order-local" value="title" data-default-ordering-direction="asc">
111 <label for="elementor-template-library-order-local-title" class="elementor-template-library-order-label"><?php echo esc_html__( 'Name', 'elementor' ); ?></label>
112 </div>
113 <div class="elementor-template-library-local-column-2">
114 <input type="radio" id="elementor-template-library-order-local-type" class="elementor-template-library-order-input" name="elementor-template-library-order-local" value="type" data-default-ordering-direction="asc">
115 <label for="elementor-template-library-order-local-type" class="elementor-template-library-order-label"><?php echo esc_html__( 'Type', 'elementor' ); ?></label>
116 </div>
117 <div class="elementor-template-library-local-column-3">
118 <input type="radio" id="elementor-template-library-order-local-author" class="elementor-template-library-order-input" name="elementor-template-library-order-local" value="author" data-default-ordering-direction="asc">
119 <label for="elementor-template-library-order-local-author" class="elementor-template-library-order-label"><?php echo esc_html__( 'Created By', 'elementor' ); ?></label>
120 </div>
121 <div class="elementor-template-library-local-column-4">
122 <input type="radio" id="elementor-template-library-order-local-date" class="elementor-template-library-order-input" name="elementor-template-library-order-local" value="date">
123 <label for="elementor-template-library-order-local-date" class="elementor-template-library-order-label"><?php echo esc_html__( 'Creation Date', 'elementor' ); ?></label>
124 </div>
125 <div class="elementor-template-library-local-column-5">
126 <div class="elementor-template-library-order-label"><?php echo esc_html__( 'Actions', 'elementor' ); ?></div>
127 </div>
128 </div>
129 <# } #>
130 <div id="elementor-template-library-templates-container"></div>
131 <# if ( 'remote' === activeSource ) { #>
132 <div id="elementor-template-library-footer-banner">
133 <img class="elementor-nerd-box-icon" src="<?php
134 Utils::print_unescaped_internal_string( ELEMENTOR_ASSETS_URL . 'images/information.svg' );
135 ?>" loading="lazy" alt="<?php echo esc_attr__( 'Elementor', 'elementor' ); ?>" />
136 <div class="elementor-excerpt"><?php echo esc_html__( 'Stay tuned! More awesome templates coming real soon.', 'elementor' ); ?></div>
137 </div>
138 <# } #>
139 </script>
140
141 <script type="text/template" id="tmpl-elementor-template-library-template-remote">
142 <div class="elementor-template-library-template-body">
143 <?php // 'lp' stands for Landing Pages Library type. ?>
144 <# if ( 'page' === type || 'lp' === type ) { #>
145 <div class="elementor-template-library-template-screenshot" style="background-image: url({{ thumbnail }});"></div>
146 <# } else { #>
147 <img src="{{ thumbnail }}" loading="lazy">
148 <# } #>
149 <div class="elementor-template-library-template-preview">
150 <i class="eicon-zoom-in-bold" aria-hidden="true"></i>
151 </div>
152 </div>
153 <div class="elementor-template-library-template-footer">
154 {{{ elementor.templates.layout.getTemplateActionButton( obj ) }}}
155 <div class="elementor-template-library-template-name">{{{ title }}} - {{{ type }}}</div>
156 <div class="elementor-template-library-favorite">
157 <input id="elementor-template-library-template-{{ template_id }}-favorite-input" class="elementor-template-library-template-favorite-input" type="checkbox"{{ favorite ? " checked" : "" }}>
158 <label for="elementor-template-library-template-{{ template_id }}-favorite-input" class="elementor-template-library-template-favorite-label">
159 <i class="eicon-heart-o" aria-hidden="true"></i>
160 <span class="elementor-screen-only"><?php echo esc_html__( 'Favorite', 'elementor' ); ?></span>
161 </label>
162 </div>
163 </div>
164 </script>
165
166 <script type="text/template" id="tmpl-elementor-template-library-template-local">
167 <div class="elementor-template-library-template-name elementor-template-library-local-column-1">{{ title }}</div>
168 <div class="elementor-template-library-template-meta elementor-template-library-template-type elementor-template-library-local-column-2">{{{ elementor.translate( type ) }}}</div>
169 <div class="elementor-template-library-template-meta elementor-template-library-template-author elementor-template-library-local-column-3">{{{ author }}}</div>
170 <div class="elementor-template-library-template-meta elementor-template-library-template-date elementor-template-library-local-column-4">{{{ human_date }}}</div>
171 <div class="elementor-template-library-template-controls elementor-template-library-local-column-5">
172 <div class="elementor-template-library-template-preview elementor-button e-btn-txt">
173 <i class="eicon-preview-medium" aria-hidden="true"></i>
174 <span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Preview', 'elementor' ); ?></span>
175 </div>
176 <button class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary e-btn-txt">
177 <i class="eicon-file-download" aria-hidden="true"></i>
178 <span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span>
179 </button>
180 <div class="elementor-template-library-template-more-toggle">
181 <i class="eicon-ellipsis-h" aria-hidden="true"></i>
182 <span class="elementor-screen-only"><?php echo esc_html__( 'More actions', 'elementor' ); ?></span>
183 </div>
184 <div class="elementor-template-library-template-more">
185 <div class="elementor-template-library-template-delete">
186 <i class="eicon-trash-o" aria-hidden="true"></i>
187 <span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Delete', 'elementor' ); ?></span>
188 </div>
189 <div class="elementor-template-library-template-export">
190 <a href="{{ export_link }}">
191 <i class="eicon-sign-out" aria-hidden="true"></i>
192 <span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Export', 'elementor' ); ?></span>
193 </a>
194 </div>
195 </div>
196 </div>
197 </script>
198
199 <script type="text/template" id="tmpl-elementor-template-library-insert-button">
200 <a class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary">
201 <i class="eicon-file-download" aria-hidden="true"></i>
202 <span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span>
203 </a>
204 </script>
205
206 <script type="text/template" id="tmpl-elementor-template-library-apply-ai-button">
207 <a class="elementor-template-library-template-action elementor-template-library-template-apply-ai elementor-button e-primary">
208 <i class="eicon-file-download" aria-hidden="true"></i>
209 <span class="elementor-button-title"><?php echo esc_html__( 'Apply', 'elementor' ); ?></span>
210 </a>
211 </script>
212
213 <script type="text/template" id="tmpl-elementor-template-library-insert-and-ai-variations-buttons">
214 <a class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary">
215 <i class="eicon-file-download" aria-hidden="true"></i>
216 <span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span>
217 </a>
218 <a class="elementor-template-library-template-action elementor-template-library-template-generate-variation elementor-button e-btn-txt e-btn-txt-border">
219 <i class="eicon-ai" aria-hidden="true"></i>
220 <span class="elementor-button-title"><?php echo esc_html__( 'Generate Variations', 'elementor' ); ?></span>
221 </a>
222 </script>
223
224 <script type="text/template" id="tmpl-elementor-template-library-upgrade-plan-button">
225 <a
226 class="elementor-template-library-template-action elementor-button go-pro"
227 href="{{{ promotionLink }}}"
228 target="_blank"
229 >
230 <span class="elementor-button-title">{{{ promotionText }}}</span>
231 </a>
232 </script>
233
234 <script type="text/template" id="tmpl-elementor-template-library-save-template">
235 <div class="elementor-template-library-blank-icon">
236 <i class="eicon-library-upload" aria-hidden="true"></i>
237 <span class="elementor-screen-only"><?php echo esc_html__( 'Save', 'elementor' ); ?></span>
238 </div>
239 <div class="elementor-template-library-blank-title">{{{ title }}}</div>
240 <div class="elementor-template-library-blank-message">{{{ description }}}</div>
241 <form id="elementor-template-library-save-template-form">
242 <input type="hidden" name="post_id" value="<?php echo get_the_ID(); ?>">
243 <input id="elementor-template-library-save-template-name" name="title" placeholder="<?php echo esc_attr__( 'Enter Template Name', 'elementor' ); ?>" required>
244 <button id="elementor-template-library-save-template-submit" class="elementor-button e-primary">
245 <span class="elementor-state-icon">
246 <i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i>
247 </span>
248 <?php echo esc_html__( 'Save', 'elementor' ); ?>
249 </button>
250 </form>
251 <div class="elementor-template-library-blank-footer">
252 <?php echo esc_html__( 'Want to learn more about the Elementor library?', 'elementor' ); ?>
253 <a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Click here', 'elementor' ); ?></a>
254 </div>
255 </script>
256
257 <script type="text/template" id="tmpl-elementor-template-library-import">
258 <form id="elementor-template-library-import-form">
259 <div class="elementor-template-library-blank-icon">
260 <i class="eicon-library-upload" aria-hidden="true"></i>
261 </div>
262 <div class="elementor-template-library-blank-title"><?php echo esc_html__( 'Import Template to Your Library', 'elementor' ); ?></div>
263 <div class="elementor-template-library-blank-message"><?php echo esc_html__( 'Drag & drop your .JSON or .zip template file', 'elementor' ); ?></div>
264 <div id="elementor-template-library-import-form-or"><?php echo esc_html__( 'or', 'elementor' ); ?></div>
265 <label for="elementor-template-library-import-form-input" id="elementor-template-library-import-form-label" class="elementor-button e-primary"><?php echo esc_html__( 'Select File', 'elementor' ); ?></label>
266 <input id="elementor-template-library-import-form-input" type="file" name="file" accept=".json,.zip" required/>
267 <div class="elementor-template-library-blank-footer">
268 <?php echo esc_html__( 'Want to learn more about the Elementor library?', 'elementor' ); ?>
269 <a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Click here', 'elementor' ); ?></a>
270 </div>
271 </form>
272 </script>
273
274 <script type="text/template" id="tmpl-elementor-template-library-templates-empty">
275 <div class="elementor-template-library-blank-icon">
276 <img src="<?php Utils::print_unescaped_internal_string( ELEMENTOR_ASSETS_URL . 'images/no-search-results.svg' ); ?>" class="elementor-template-library-no-results" loading="lazy" />
277 </div>
278 <div class="elementor-template-library-blank-title"></div>
279 <div class="elementor-template-library-blank-message"></div>
280 <div class="elementor-template-library-blank-footer">
281 <?php echo esc_html__( 'Want to learn more about the Elementor library?', 'elementor' ); ?>
282 <a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Click here', 'elementor' ); ?></a>
283 </div>
284 </script>
285
286 <script type="text/template" id="tmpl-elementor-template-library-preview">
287 <iframe></iframe>
288 </script>
289
290 <script type="text/template" id="tmpl-elementor-template-library-connect">
291 <div id="elementor-template-library-connect-logo" class="e-logo-wrapper">
292 <i class="eicon-elementor" aria-hidden="true"></i>
293 </div>
294 <div class="elementor-template-library-blank-title">
295 {{{ title }}}
296 </div>
297 <div class="elementor-template-library-blank-message">
298 {{{ message }}}
299 </div>
300 <?php
301 $url = Plugin::$instance->common->get_component( 'connect' )->get_app( 'library' )->get_admin_url( 'authorize', [
302 'utm_source' => 'template-library',
303 'utm_medium' => 'wp-dash',
304 'utm_campaign' => 'library-connect',
305 'utm_content' => '%%template_type%%', // will be replaced in the frontend
306 ] );
307 ?>
308 <a id="elementor-template-library-connect__button" class="elementor-button e-primary" href="<?php echo esc_url( $url ); ?>">
309 {{{ button }}}
310 </a>
311 <?php
312 $base_images_url = $this->get_assets_base_url() . '/assets/images/library-connect/';
313
314 $images = [ 'left-1', 'left-2', 'right-1', 'right-2' ];
315
316 foreach ( $images as $image ) : ?>
317 <img id="elementor-template-library-connect__background-image-<?php Utils::print_unescaped_internal_string( $image ); ?>" class="elementor-template-library-connect__background-image" src="<?php Utils::print_unescaped_internal_string( $base_images_url . $image ); ?>.png" draggable="false" loading="lazy" />
318 <?php endforeach; ?>
319 </script>
320