PluginProbe
Elementor Website Builder – more than just a page builder / 3.27.3
Elementor Website Builder – more than just a page builder v3.27.3
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.27.3, at includes/editor-templates/templates.php

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