| 1 |
<?php |
| 2 |
namespace Elementor; |
| 3 |
|
| 4 |
use Elementor\Plugin; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; // Exit if accessed directly. |
| 8 |
} |
| 9 |
?> |
| 10 |
<script type="text/template" id="tmpl-elementor-template-library-header-actions"> |
| 11 |
<?php if ( User::is_current_user_can_upload_json() ) { ?> |
| 12 |
<div id="elementor-template-library-header-import" class="elementor-templates-modal__header__item"> |
| 13 |
<i class="eicon-upload-circle-o" aria-hidden="true"></i> |
| 14 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Import Template', 'elementor' ); ?></span> |
| 15 |
</div> |
| 16 |
<?php } ?> |
| 17 |
<div id="elementor-template-library-header-sync" class="elementor-templates-modal__header__item"> |
| 18 |
<i class="eicon-sync" aria-hidden="true"></i> |
| 19 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Sync Library', 'elementor' ); ?></span> |
| 20 |
</div> |
| 21 |
<div id="elementor-template-library-header-save" class="elementor-templates-modal__header__item"> |
| 22 |
<i class="eicon-save-o" aria-hidden="true"></i> |
| 23 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Save', 'elementor' ); ?></span> |
| 24 |
</div> |
| 25 |
</script> |
| 26 |
|
| 27 |
<script type="text/template" id="tmpl-elementor-template-library-header-menu"> |
| 28 |
<# jQuery.each( tabs, ( tab, args ) => { #> |
| 29 |
<div class="elementor-component-tab elementor-template-library-menu-item" data-tab="{{{ tab }}}">{{{ args.title }}}</div> |
| 30 |
<# } ); #> |
| 31 |
</script> |
| 32 |
|
| 33 |
<script type="text/template" id="tmpl-elementor-template-library-header-preview"> |
| 34 |
<div id="elementor-template-library-header-preview-insert-wrapper" class="elementor-templates-modal__header__item"> |
| 35 |
{{{ elementor.templates.layout.getTemplateActionButton( obj ) }}} |
| 36 |
</div> |
| 37 |
</script> |
| 38 |
|
| 39 |
<script type="text/template" id="tmpl-elementor-template-library-header-back"> |
| 40 |
<i class="eicon-" aria-hidden="true"></i> |
| 41 |
<span><?php echo esc_html__( 'Back to Library', 'elementor' ); ?></span> |
| 42 |
</script> |
| 43 |
|
| 44 |
<script type="text/template" id="tmpl-elementor-template-library-loading"> |
| 45 |
<div class="elementor-loader-wrapper"> |
| 46 |
<div class="elementor-loader"> |
| 47 |
<div class="elementor-loader-boxes"> |
| 48 |
<div class="elementor-loader-box"></div> |
| 49 |
<div class="elementor-loader-box"></div> |
| 50 |
<div class="elementor-loader-box"></div> |
| 51 |
<div class="elementor-loader-box"></div> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
<div class="elementor-loading-title"><?php echo esc_html__( 'Loading', 'elementor' ); ?></div> |
| 55 |
</div> |
| 56 |
</script> |
| 57 |
|
| 58 |
<script type="text/template" id="tmpl-elementor-template-library-templates"> |
| 59 |
<# |
| 60 |
var activeSource = elementor.templates.getFilter('source'); |
| 61 |
/** |
| 62 |
* Filter template source. |
| 63 |
* |
| 64 |
* @param bool isRemote - If `true` the source is a remote source. |
| 65 |
* @param string activeSource - The current template source. |
| 66 |
*/ |
| 67 |
const isRemote = elementor.hooks.applyFilters( 'templates/source/is-remote', activeSource === 'remote', activeSource ); |
| 68 |
#> |
| 69 |
<div id="elementor-template-library-toolbar"> |
| 70 |
<# if ( isRemote ) { |
| 71 |
var activeType = elementor.templates.getFilter('type'); |
| 72 |
#> |
| 73 |
<div id="elementor-template-library-filter-toolbar-remote" class="elementor-template-library-filter-toolbar"> |
| 74 |
<# if ( 'page' === activeType ) { #> |
| 75 |
<div id="elementor-template-library-order"> |
| 76 |
<input type="radio" id="elementor-template-library-order-new" class="elementor-template-library-order-input" name="elementor-template-library-order" value="date"> |
| 77 |
<label for="elementor-template-library-order-new" class="elementor-template-library-order-label"><?php echo esc_html__( 'New', 'elementor' ); ?></label> |
| 78 |
<input type="radio" id="elementor-template-library-order-trend" class="elementor-template-library-order-input" name="elementor-template-library-order" value="trendIndex"> |
| 79 |
<label for="elementor-template-library-order-trend" class="elementor-template-library-order-label"><?php echo esc_html__( 'Trend', 'elementor' ); ?></label> |
| 80 |
<input type="radio" id="elementor-template-library-order-popular" class="elementor-template-library-order-input" name="elementor-template-library-order" value="popularityIndex"> |
| 81 |
<label for="elementor-template-library-order-popular" class="elementor-template-library-order-label"><?php echo esc_html__( 'Popular', 'elementor' ); ?></label> |
| 82 |
</div> |
| 83 |
<# } else if ( 'lb' !== activeType ) { |
| 84 |
var config = elementor.templates.getConfig( activeType ); |
| 85 |
if ( config.categories ) { #> |
| 86 |
<div id="elementor-template-library-filter"> |
| 87 |
<select id="elementor-template-library-filter-subtype" class="elementor-template-library-filter-select" data-elementor-filter="subtype"> |
| 88 |
<option></option> |
| 89 |
<# config.categories.forEach( function( category ) { |
| 90 |
var selected = category === elementor.templates.getFilter( 'subtype' ) ? ' selected' : ''; |
| 91 |
#> |
| 92 |
<option value="{{ category }}"{{{ selected }}}>{{{ category }}}</option> |
| 93 |
<# } ); #> |
| 94 |
</select> |
| 95 |
</div> |
| 96 |
<# } |
| 97 |
} #> |
| 98 |
<div id="elementor-template-library-my-favorites"> |
| 99 |
<# var checked = elementor.templates.getFilter( 'favorite' ) ? ' checked' : ''; #> |
| 100 |
<input id="elementor-template-library-filter-my-favorites" type="checkbox"{{{ checked }}}> |
| 101 |
<label id="elementor-template-library-filter-my-favorites-label" for="elementor-template-library-filter-my-favorites"> |
| 102 |
<i class="eicon" aria-hidden="true"></i> |
| 103 |
<?php echo esc_html__( 'My Favorites', 'elementor' ); ?> |
| 104 |
</label> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
<# } else { #> |
| 108 |
<div id="elementor-template-library-filter-toolbar-local" class="elementor-template-library-filter-toolbar"> |
| 109 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 110 |
<div id="elementor-template-library-filter"> |
| 111 |
<div class="elementor-template-library-filter-select-source"> |
| 112 |
<div class="source-option<# if ( activeSource === 'local' ) { #> selected<# } #>" data-source="local"> |
| 113 |
<i class="eicon-header" aria-hidden="true"></i> |
| 114 |
<?php echo esc_html__( 'Site templates', 'elementor' ); ?> |
| 115 |
</div> |
| 116 |
<div class="source-option<# if ( activeSource === 'cloud' ) { #> selected<# } #>" data-source="cloud"> |
| 117 |
<i class="eicon-library-cloud-empty" aria-hidden="true"></i> |
| 118 |
<?php echo esc_html__( 'Cloud templates', 'elementor' ); ?> |
| 119 |
<# |
| 120 |
const tabIcon = elementor.templates.hasCloudLibraryQuota() |
| 121 |
? '<span class="new-badge"><?php echo esc_html__( 'New', 'elementor' ); ?></span>' |
| 122 |
: '<span class="new-badge"><i class="eicon-upgrade-crown" style="margin-inline-end: 0;"></i> <?php echo esc_html__( 'Pro', 'elementor' ); ?></span>'; |
| 123 |
|
| 124 |
print( tabIcon ); |
| 125 |
#> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
</div> |
| 129 |
<?php endif; ?> |
| 130 |
</div> |
| 131 |
<# } #> |
| 132 |
|
| 133 |
<div class="elementor-template-library-filter-toolbar-side-actions"> |
| 134 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 135 |
<# if ( 'cloud' === activeSource ) { #> |
| 136 |
<div id="elementor-template-library-add-new-folder" class="elementor-template-library-action-item"> |
| 137 |
<i class="eicon-folder-plus" aria-hidden="true"></i> |
| 138 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Create a New Folder', 'elementor' ); ?></span> |
| 139 |
</div> |
| 140 |
<span class="divider"></span> |
| 141 |
<div id="elementor-template-library-view-grid" class="elementor-template-library-action-item"> |
| 142 |
<i class="eicon-library-grid" aria-hidden="true"></i> |
| 143 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Grid view', 'elementor' ); ?></span> |
| 144 |
</div> |
| 145 |
<div id="elementor-template-library-view-list" class="elementor-template-library-action-item"> |
| 146 |
<i class="eicon-library-list" aria-hidden="true"></i> |
| 147 |
<span class="elementor-screen-only"><?php echo esc_html__( 'List view', 'elementor' ); ?></span> |
| 148 |
</div> |
| 149 |
<# } #> |
| 150 |
<?php endif; ?> |
| 151 |
<div id="elementor-template-library-filter-text-wrapper"> |
| 152 |
<label for="elementor-template-library-filter-text" class="elementor-screen-only"><?php echo esc_html__( 'Search Templates:', 'elementor' ); ?></label> |
| 153 |
<input id="elementor-template-library-filter-text" placeholder="<?php echo esc_attr__( 'Search', 'elementor' ); ?>"> |
| 154 |
<i class="eicon-search"></i> |
| 155 |
</div> |
| 156 |
</div> |
| 157 |
</div> |
| 158 |
<# if ( 'local' === activeSource || 'cloud' === activeSource ) { #> |
| 159 |
<div class="toolbar-container"> |
| 160 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 161 |
<div class="bulk-selection-action-bar"> |
| 162 |
<span class="clear-bulk-selections"><i class="eicon-editor-close"></i></span> |
| 163 |
<span class="selected-count"></span> |
| 164 |
<# if ( elementor.templates.hasCloudLibraryQuota() && ! elementor.templates.cloudLibraryIsDeactivated() ) { #> |
| 165 |
<span class="bulk-copy"><i class="eicon-library-copy" aria-hidden="true" title="<?php esc_attr_e( 'Copy', 'elementor' ); ?>"></i></span> |
| 166 |
<span class="bulk-move"><i class="eicon-library-move" aria-hidden="true" title="<?php esc_attr_e( 'Move', 'elementor' ); ?>"></i></span> |
| 167 |
<# } #> |
| 168 |
<span class="bulk-delete"><i class="eicon-library-delete" aria-hidden="true" title="<?php esc_attr_e( 'Delete', 'elementor' ); ?>"></i></span> |
| 169 |
</div> |
| 170 |
<?php endif; ?> |
| 171 |
<div id="elementor-template-library-navigation-container"></div> |
| 172 |
|
| 173 |
<# if ( 'cloud' === activeSource ) { #> |
| 174 |
<div class="quota-progress-container"> |
| 175 |
<span class="quota-progress-info"> |
| 176 |
<?php echo esc_html__( 'Usage', 'elementor' ); ?> |
| 177 |
</span> |
| 178 |
<div class="progress-bar-container"> |
| 179 |
<div class="quota-progress-bar quota-progress-bar-normal"> |
| 180 |
<div class="quota-progress-bar-fill"></div> |
| 181 |
</div> |
| 182 |
<span class="quota-warning"></span> |
| 183 |
</div> |
| 184 |
<div class="quota-progress-bar-value"></div> |
| 185 |
</div> |
| 186 |
<# } #> |
| 187 |
</div> |
| 188 |
<div id="elementor-template-library-order-toolbar-local"> |
| 189 |
<div class="elementor-template-library-local-column-1"> |
| 190 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 191 |
<input type="checkbox" id="bulk-select-all"> |
| 192 |
<?php endif; ?> |
| 193 |
<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"> |
| 194 |
<label for="elementor-template-library-order-local-title" class="elementor-template-library-order-label"><?php echo esc_html__( 'Name', 'elementor' ); ?></label> |
| 195 |
</div> |
| 196 |
<div class="elementor-template-library-local-column-2"> |
| 197 |
<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"> |
| 198 |
<label for="elementor-template-library-order-local-type" class="elementor-template-library-order-label"><?php echo esc_html__( 'Type', 'elementor' ); ?></label> |
| 199 |
</div> |
| 200 |
<div class="elementor-template-library-local-column-3"> |
| 201 |
<# if ( 'cloud' !== activeSource ) { #> |
| 202 |
<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"> |
| 203 |
<# } #> |
| 204 |
<label for="elementor-template-library-order-local-author" class="elementor-template-library-order-label"><?php echo esc_html__( 'Created By', 'elementor' ); ?></label> |
| 205 |
</div> |
| 206 |
<div class="elementor-template-library-local-column-4"> |
| 207 |
<input type="radio" id="elementor-template-library-order-local-date" class="elementor-template-library-order-input" name="elementor-template-library-order-local" value="date"> |
| 208 |
<label for="elementor-template-library-order-local-date" class="elementor-template-library-order-label"><?php echo esc_html__( 'Creation Date', 'elementor' ); ?></label> |
| 209 |
</div> |
| 210 |
<div class="elementor-template-library-local-column-5"> |
| 211 |
<div class="elementor-template-library-order-label"><?php echo esc_html__( 'Actions', 'elementor' ); ?></div> |
| 212 |
</div> |
| 213 |
</div> |
| 214 |
<# } #> |
| 215 |
<div id="elementor-template-library-templates-container"></div> |
| 216 |
<# if ( isRemote ) { #> |
| 217 |
<div id="elementor-template-library-footer-banner"> |
| 218 |
<img class="elementor-nerd-box-icon" src="<?php |
| 219 |
Utils::print_unescaped_internal_string( ELEMENTOR_ASSETS_URL . 'images/information.svg' ); |
| 220 |
?>" loading="lazy" alt="<?php echo esc_attr__( 'Elementor', 'elementor' ); ?>" /> |
| 221 |
<div class="elementor-excerpt"><?php echo esc_html__( 'Stay tuned! More awesome templates coming real soon.', 'elementor' ); ?></div> |
| 222 |
</div> |
| 223 |
<# } #> |
| 224 |
<# if ( 'cloud' === activeSource ) { #> |
| 225 |
<div id="elementor-template-library-load-more-anchor" class="elementor-visibility-hidden"><i class="eicon-loading eicon-animation-spin"></i></div> |
| 226 |
<# } #> |
| 227 |
</script> |
| 228 |
|
| 229 |
<script type="text/template" id="tmpl-elementor-template-library-navigation-container"> |
| 230 |
<button class="elementor-template-library-navigation-back-button elementor-button e-button"> |
| 231 |
<i class="eicon-chevron-left"></i> |
| 232 |
<?php echo esc_html__( 'Back', 'elementor' ); ?> |
| 233 |
</button> |
| 234 |
<span class="elementor-template-library-current-folder-title"></span> |
| 235 |
</script> |
| 236 |
|
| 237 |
<script type="text/template" id="tmpl-elementor-template-library-template-remote"> |
| 238 |
<div class="elementor-template-library-template-body"> |
| 239 |
<?php // 'lp' stands for Landing Pages Library type. ?> |
| 240 |
<# if ( 'page' === type || 'lp' === type ) { #> |
| 241 |
<div class="elementor-template-library-template-screenshot" style="background-image: url({{ thumbnail }});"></div> |
| 242 |
<# } else { #> |
| 243 |
<img src="{{ thumbnail }}" loading="lazy"> |
| 244 |
<# } #> |
| 245 |
<div class="elementor-template-library-template-preview"> |
| 246 |
<i class="eicon-zoom-in-bold" aria-hidden="true"></i> |
| 247 |
</div> |
| 248 |
</div> |
| 249 |
<div class="elementor-template-library-template-footer"> |
| 250 |
{{{ elementor.templates.layout.getTemplateActionButton( obj ) }}} |
| 251 |
<div class="elementor-template-library-template-name">{{{ title }}} - {{{ type }}}</div> |
| 252 |
<div class="elementor-template-library-favorite"> |
| 253 |
<input id="elementor-template-library-template-{{ template_id }}-favorite-input" class="elementor-template-library-template-favorite-input" type="checkbox"{{ favorite ? " checked" : "" }}> |
| 254 |
<label for="elementor-template-library-template-{{ template_id }}-favorite-input" class="elementor-template-library-template-favorite-label"> |
| 255 |
<i class="eicon-heart-o" aria-hidden="true"></i> |
| 256 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Favorite', 'elementor' ); ?></span> |
| 257 |
</label> |
| 258 |
</div> |
| 259 |
</div> |
| 260 |
</script> |
| 261 |
|
| 262 |
<script type="text/template" id="tmpl-elementor-template-library-template-local"> |
| 263 |
<# |
| 264 |
const activeSource = elementor.templates.getFilter('source'); |
| 265 |
const view = elementor.templates.getFilter('view') ?? elementor.templates.getViewSelection() ?? 'list'; |
| 266 |
|
| 267 |
if ( ( 'cloud' === activeSource && view === 'list' ) || 'local' === activeSource ) { |
| 268 |
#> |
| 269 |
<div class="elementor-template-library-template-name elementor-template-library-local-column-1"> |
| 270 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 271 |
<input type="checkbox" class="bulk-selection-item-checkbox" data-template_id="{{ template_id }}" data-type="{{ type }}" data-status="{{ status }}"> |
| 272 |
<?php endif; ?> |
| 273 |
<# if ( 'cloud' === activeSource ) { |
| 274 |
const sourceIcon = typeof subType !== 'undefined' && 'FOLDER' === subType |
| 275 |
? '<i class="eicon-library-folder" aria-hidden="true"></i>' |
| 276 |
: 'locked' === status |
| 277 |
? '<i class="eicon-lock-outline" aria-hidden="true" title="<?php esc_attr_e( 'Upgrade to get more storage space or delete old templates to make room.', 'elementor' ); ?>"></i>' |
| 278 |
: '<i class="eicon-global-colors" aria-hidden="true"></i>'; |
| 279 |
|
| 280 |
print( sourceIcon ); |
| 281 |
} #> |
| 282 |
<span>{{ title }}</span> |
| 283 |
</div> |
| 284 |
<div class="elementor-template-library-template-meta elementor-template-library-template-type elementor-template-library-local-column-2">{{{ elementor.translate( type ) }}}</div> |
| 285 |
<div class="elementor-template-library-template-meta elementor-template-library-template-author elementor-template-library-local-column-3">{{{ author }}}</div> |
| 286 |
<div class="elementor-template-library-template-meta elementor-template-library-template-date elementor-template-library-local-column-4">{{{ human_date }}}</div> |
| 287 |
<div class="elementor-template-library-template-controls elementor-template-library-local-column-5"> |
| 288 |
<# |
| 289 |
const previewClass = typeof subType !== 'undefined' && 'FOLDER' !== subType |
| 290 |
? 'elementor-hidden' |
| 291 |
: ''; |
| 292 |
#> |
| 293 |
<div class="elementor-template-library-template-preview elementor-button e-btn-txt {{{previewClass}}}"> |
| 294 |
<# |
| 295 |
const actionText = typeof subType === 'undefined' || 'FOLDER' !== subType |
| 296 |
? '<?php echo esc_html__( 'Preview', 'elementor' ); ?>' |
| 297 |
: '<?php echo esc_html__( 'Open', 'elementor' ); ?>'; |
| 298 |
#> |
| 299 |
<i class="eicon-preview-medium" aria-hidden="true"></i> |
| 300 |
<span class="elementor-template-library-template-control-title">{{{ actionText }}}</span> |
| 301 |
</div> |
| 302 |
<# if ( typeof subType === 'undefined' || 'FOLDER' !== subType ) { #> |
| 303 |
<button class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary e-btn-txt"> |
| 304 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 305 |
<span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span> |
| 306 |
</button> |
| 307 |
<# } #> |
| 308 |
<div class="elementor-template-library-template-more-toggle"> |
| 309 |
<i class="eicon-ellipsis-h" aria-hidden="true"></i> |
| 310 |
<span class="elementor-screen-only"><?php echo esc_html__( 'More actions', 'elementor' ); ?></span> |
| 311 |
</div> |
| 312 |
<div class="elementor-template-library-template-more"> |
| 313 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 314 |
<# if ( ( typeof subType === 'undefined' || 'FOLDER' !== subType ) && elementor.templates.hasCloudLibraryQuota() && ! elementor.templates.cloudLibraryIsDeactivated() ) { #> |
| 315 |
<div class="elementor-template-library-template-move"> |
| 316 |
<i class="eicon-library-move" aria-hidden="true"></i> |
| 317 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Move to', 'elementor' ); ?></span> |
| 318 |
</div> |
| 319 |
<div class="elementor-template-library-template-copy"> |
| 320 |
<i class="eicon-library-copy" aria-hidden="true"></i> |
| 321 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Copy to', 'elementor' ); ?></span> |
| 322 |
</div> |
| 323 |
<# } #> |
| 324 |
<?php endif; ?> |
| 325 |
<div class="elementor-template-library-template-export"> |
| 326 |
<a href="{{ export_link }}"> |
| 327 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 328 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Export', 'elementor' ); ?></span> |
| 329 |
</a> |
| 330 |
</div> |
| 331 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 332 |
<div class="elementor-template-library-template-rename"> |
| 333 |
<i class="eicon-library-edit" aria-hidden="true"></i> |
| 334 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Rename', 'elementor' ); ?></span> |
| 335 |
</div> |
| 336 |
<?php endif; ?> |
| 337 |
<div class="elementor-template-library-template-delete"> |
| 338 |
<i class="eicon-library-delete" aria-hidden="true"></i> |
| 339 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Delete', 'elementor' ); ?></span> |
| 340 |
</div> |
| 341 |
</div> |
| 342 |
</div> |
| 343 |
<# } else { |
| 344 |
if ( typeof subType !== 'undefined' && 'FOLDER' === subType ) { |
| 345 |
#> |
| 346 |
<div class="elementor-template-library-template-type-icon"> |
| 347 |
<i class="eicon-library-folder-view" aria-hidden="true"></i> |
| 348 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Folder', 'elementor' ); ?></span> |
| 349 |
</div> |
| 350 |
<div class="elementor-template-library-template-name"> |
| 351 |
<span>{{ title }}</span> |
| 352 |
</div> |
| 353 |
<div class="elementor-template-library-template-more-toggle"> |
| 354 |
<i class="eicon-ellipsis-v" aria-hidden="true"></i> |
| 355 |
<span class="elementor-screen-only"><?php echo esc_html__( 'More actions', 'elementor' ); ?></span> |
| 356 |
</div> |
| 357 |
<div class="elementor-template-library-template-more" style="display: none;"> |
| 358 |
<div class="elementor-template-library-template-export"> |
| 359 |
<a href="{{ export_link }}"> |
| 360 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 361 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Export', 'elementor' ); ?></span> |
| 362 |
</a> |
| 363 |
</div> |
| 364 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 365 |
<div class="elementor-template-library-template-rename"> |
| 366 |
<i class="eicon-library-edit" aria-hidden="true"></i> |
| 367 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Rename', 'elementor' ); ?></span> |
| 368 |
</div> |
| 369 |
<?php endif; ?> |
| 370 |
<div class="elementor-template-library-template-delete"> |
| 371 |
<i class="eicon-library-delete" aria-hidden="true"></i> |
| 372 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Delete', 'elementor' ); ?></span> |
| 373 |
</div> |
| 374 |
</div> |
| 375 |
<# } else { #> |
| 376 |
<# |
| 377 |
const imageSource = preview_url || '<?php echo esc_html( ELEMENTOR_ASSETS_URL . 'images/placeholder-cloud-grid.png' ); ?>'; |
| 378 |
#> |
| 379 |
<div class="elementor-template-library-template-thumbnail"> |
| 380 |
<img src="{{{ imageSource }}}"/> |
| 381 |
<div class="elementor-template-library-template-preview"></div> |
| 382 |
</div> |
| 383 |
<div class="elementor-template-library-card-footer"> |
| 384 |
<div class="elementor-template-library-template-name"> |
| 385 |
<# if ( 'locked' === status ) { #> |
| 386 |
<i class="eicon-lock-outline" aria-hidden="true" title="<?php esc_attr_e( 'Upgrade to get more storage space or delete old templates to make room.', 'elementor' ); ?>"></i> |
| 387 |
<# } #> |
| 388 |
<span>{{ title }}</span> |
| 389 |
</div> |
| 390 |
<div class="elementor-template-library-template-card-footer-overlay"> |
| 391 |
<button class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary"> |
| 392 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 393 |
<span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span> |
| 394 |
</button> |
| 395 |
<div class="elementor-template-library-template-card-footer-overlay-info"> |
| 396 |
<div class="elementor-template-library-template-meta">{{{ author }}}</div> |
| 397 |
<div class="elementor-template-library-template-meta">{{{ human_date }}}</div> |
| 398 |
</div> |
| 399 |
</div> |
| 400 |
<div class="elementor-template-library-template-more-toggle"> |
| 401 |
<i class="eicon-ellipsis-v" aria-hidden="true"></i> |
| 402 |
<span class="elementor-screen-only"><?php echo esc_html__( 'More actions', 'elementor' ); ?></span> |
| 403 |
</div> |
| 404 |
<div class="elementor-template-library-template-more" style="display: none;"> |
| 405 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 406 |
<div class="elementor-template-library-template-move"> |
| 407 |
<i class="eicon-library-move" aria-hidden="true"></i> |
| 408 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Move to', 'elementor' ); ?></span> |
| 409 |
</div> |
| 410 |
<div class="elementor-template-library-template-copy"> |
| 411 |
<i class="eicon-library-copy" aria-hidden="true"></i> |
| 412 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Copy to', 'elementor' ); ?></span> |
| 413 |
</div> |
| 414 |
<?php endif; ?> |
| 415 |
<div class="elementor-template-library-template-export"> |
| 416 |
<a href="{{ export_link }}"> |
| 417 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 418 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Export', 'elementor' ); ?></span> |
| 419 |
</a> |
| 420 |
</div> |
| 421 |
<?php if ( Plugin::$instance->experiments->is_feature_active( 'cloud-library' ) ) : ?> |
| 422 |
<div class="elementor-template-library-template-rename"> |
| 423 |
<i class="eicon-library-edit" aria-hidden="true"></i> |
| 424 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Rename', 'elementor' ); ?></span> |
| 425 |
</div> |
| 426 |
<?php endif; ?> |
| 427 |
<div class="elementor-template-library-template-delete"> |
| 428 |
<i class="eicon-library-delete" aria-hidden="true"></i> |
| 429 |
<span class="elementor-template-library-template-control-title"><?php echo esc_html__( 'Delete', 'elementor' ); ?></span> |
| 430 |
</div> |
| 431 |
</div> |
| 432 |
</div> |
| 433 |
<# } } #> |
| 434 |
</script> |
| 435 |
|
| 436 |
<script type="text/template" id="tmpl-elementor-template-library-insert-button"> |
| 437 |
<a class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary"> |
| 438 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 439 |
<span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span> |
| 440 |
</a> |
| 441 |
</script> |
| 442 |
|
| 443 |
<script type="text/template" id="tmpl-elementor-template-library-apply-ai-button"> |
| 444 |
<a class="elementor-template-library-template-action elementor-template-library-template-apply-ai elementor-button e-primary"> |
| 445 |
<i class="eicon-file-download" aria-hidden="true"></i> |
| 446 |
<span class="elementor-button-title"><?php echo esc_html__( 'Apply', 'elementor' ); ?></span> |
| 447 |
</a> |
| 448 |
</script> |
| 449 |
|
| 450 |
<script type="text/template" id="tmpl-elementor-template-library-insert-and-ai-variations-buttons"> |
| 451 |
<a class="elementor-template-library-template-action elementor-template-library-template-insert elementor-button e-primary"> |
| 452 |
<i class="eicon-library-download" aria-hidden="true"></i> |
| 453 |
<span class="elementor-button-title"><?php echo esc_html__( 'Insert', 'elementor' ); ?></span> |
| 454 |
</a> |
| 455 |
<a class="elementor-template-library-template-action elementor-template-library-template-generate-variation elementor-button e-btn-txt e-btn-txt-border"> |
| 456 |
<i class="eicon-ai" aria-hidden="true"></i> |
| 457 |
<span class="elementor-button-title"><?php echo esc_html__( 'Generate Variations', 'elementor' ); ?></span> |
| 458 |
</a> |
| 459 |
</script> |
| 460 |
|
| 461 |
<script type="text/template" id="tmpl-elementor-template-library-upgrade-plan-button"> |
| 462 |
<a |
| 463 |
class="elementor-template-library-template-action elementor-button go-pro" |
| 464 |
href="{{{ promotionLink }}}" |
| 465 |
target="_blank" |
| 466 |
> |
| 467 |
<span class="elementor-button-title">{{{ promotionText }}}</span> |
| 468 |
</a> |
| 469 |
</script> |
| 470 |
|
| 471 |
<script type="text/template" id="tmpl-elementor-template-library-save-template"> |
| 472 |
<div class="elementor-template-library-blank-icon"> |
| 473 |
<# |
| 474 |
const templateIcon = typeof icon === 'undefined' ? '<i class="eicon-library-upload" aria-hidden="true"></i>' : icon; |
| 475 |
print( templateIcon ); |
| 476 |
#> |
| 477 |
<span class="elementor-screen-only"><?php echo esc_html__( 'Save', 'elementor' ); ?></span> |
| 478 |
</div> |
| 479 |
<div class="elementor-template-library-blank-title">{{{ title }}}</div> |
| 480 |
<div class="elementor-template-library-blank-message">{{{ description }}}</div> |
| 481 |
<form id="elementor-template-library-save-template-form"> |
| 482 |
<input type="hidden" name="post_id" value="<?php echo esc_attr( get_the_ID() ); ?>"> |
| 483 |
<# if ( typeof canSaveToCloud === 'undefined' || ! canSaveToCloud ) { #> |
| 484 |
<input id="elementor-template-library-save-template-name" name="title" placeholder="<?php echo esc_attr__( 'Enter Template Name', 'elementor' ); ?>" required> |
| 485 |
<button id="elementor-template-library-save-template-submit" class="elementor-button e-primary"> |
| 486 |
<span class="elementor-state-icon"> |
| 487 |
<i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> |
| 488 |
</span> |
| 489 |
<?php echo esc_html__( 'Save', 'elementor' ); ?> |
| 490 |
</button> |
| 491 |
<# } else { #> |
| 492 |
<div class="cloud-library-form-inputs"> |
| 493 |
<input id="elementor-template-library-save-template-name" name="title" placeholder="<?php echo esc_attr__( 'Give your template a name', 'elementor' ); ?>" required> |
| 494 |
<div class="source-selections"> |
| 495 |
<div class="cloud-folder-selection-dropdown"> |
| 496 |
<div class="cloud-folder-selection-dropdown-list"></div> |
| 497 |
</div> |
| 498 |
<div class="source-selections-input cloud"> |
| 499 |
<input type="checkbox" id="cloud" name="cloud" value="cloud"> |
| 500 |
<label for="cloud"> <?php echo esc_html__( 'Cloud Templates', 'elementor' ); ?></label> <span class="divider">/</span> <div class="ellipsis-container"><i class="eicon-ellipsis-h"></i></div> |
| 501 |
<span class="selected-folder"> |
| 502 |
<span class="selected-folder-text"></span> |
| 503 |
<i class="eicon-editor-close" aria-hidden="true"></i> |
| 504 |
</span> |
| 505 |
<# if ( elementor.config.library_connect.is_connected ) { #> |
| 506 |
<# |
| 507 |
const goLink = elementor.templates.hasCloudLibraryQuota() |
| 508 |
? 'https://go.elementor.com/go-pro-cloud-templates-save-to-100-usage-badge' |
| 509 |
: 'https://go.elementor.com/go-pro-cloud-templates-save-to-free-badge/'; |
| 510 |
#> |
| 511 |
<span class="upgrade-badge"> |
| 512 |
<a href="{{{ goLink }}}" target="_blank"> |
| 513 |
<i class="eicon-upgrade-crown"></i><?php echo esc_html__( 'Upgrade', 'elementor' ); ?> |
| 514 |
</a> |
| 515 |
</span> |
| 516 |
<i class="eicon-info upgrade-tooltip" aria-hidden="true"></i> |
| 517 |
<# } else { #> |
| 518 |
<span class="connect-badge"> |
| 519 |
<span class="connect-divider">|</span> |
| 520 |
<a id="elementor-template-library-connect__badge" href="{{{ elementorAppConfig?.[ 'cloud-library' ]?.library_connect_url }}}"> |
| 521 |
<?php echo esc_html__( 'Connect', 'elementor' ); ?> |
| 522 |
</a> |
| 523 |
</span> |
| 524 |
<# } #> |
| 525 |
</div> |
| 526 |
<div class="source-selections-input local"> |
| 527 |
<input type="checkbox" id="local" name="local" value="local"> |
| 528 |
<label for="local"> <?php echo esc_html__( 'Site Templates', 'elementor' ); ?></label><br> |
| 529 |
</div> |
| 530 |
<input type="hidden" name="parentId" id="parentId" /> |
| 531 |
</div> |
| 532 |
<div class="quota-cta"> |
| 533 |
<p> |
| 534 |
<?php echo esc_html__( 'You’ve saved 100% of the templates in your plan.', 'elementor' ); ?> |
| 535 |
<br> |
| 536 |
<?php printf( |
| 537 |
/* translators: %s is the "Upgrade now" link */ |
| 538 |
esc_html__( 'To get more space %s', 'elementor' ), |
| 539 |
'<a href="https://go.elementor.com/go-pro-cloud-templates-save-to-100-usage-notice">' . esc_html__( 'Upgrade now', 'elementor' ) . '</a>' |
| 540 |
); ?> |
| 541 |
</p> |
| 542 |
</div> |
| 543 |
<button id="elementor-template-library-save-template-submit" class="elementor-button e-primary"> |
| 544 |
<span class="elementor-state-icon"> |
| 545 |
<i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> |
| 546 |
</span> |
| 547 |
{{{ saveBtnText }}} |
| 548 |
</button> |
| 549 |
</div> |
| 550 |
<# } #> |
| 551 |
</form> |
| 552 |
<div class="elementor-template-library-blank-footer"> |
| 553 |
<?php echo esc_html__( 'Learn more about the', 'elementor' ); ?> |
| 554 |
<a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Template Library', 'elementor' ); ?></a> |
| 555 |
</div> |
| 556 |
</script> |
| 557 |
|
| 558 |
<script type="text/template" id="tmpl-elementor-template-library-import"> |
| 559 |
<form id="elementor-template-library-import-form"> |
| 560 |
<div class="elementor-template-library-blank-icon"> |
| 561 |
<i class="eicon-library-upload" aria-hidden="true"></i> |
| 562 |
</div> |
| 563 |
<div class="elementor-template-library-blank-title"><?php echo esc_html__( 'Import Template to Your Library', 'elementor' ); ?></div> |
| 564 |
<div class="elementor-template-library-blank-message"><?php echo esc_html__( 'Drag & drop your .JSON or .zip template file', 'elementor' ); ?></div> |
| 565 |
<div id="elementor-template-library-import-form-or"><?php echo esc_html__( 'or', 'elementor' ); ?></div> |
| 566 |
<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> |
| 567 |
<input id="elementor-template-library-import-form-input" type="file" name="file" accept=".json,.zip" required/> |
| 568 |
<div class="elementor-template-library-blank-footer"> |
| 569 |
<?php echo esc_html__( 'Learn more about the', 'elementor' ); ?> |
| 570 |
<a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Template Library', 'elementor' ); ?></a> |
| 571 |
</div> |
| 572 |
</form> |
| 573 |
</script> |
| 574 |
|
| 575 |
<script type="text/template" id="tmpl-elementor-template-library-templates-empty"> |
| 576 |
<div class="elementor-template-library-blank-icon"></div> |
| 577 |
<div class="elementor-template-library-blank-title"></div> |
| 578 |
<div class="elementor-template-library-blank-message"></div> |
| 579 |
|
| 580 |
<div class="elementor-template-library-cloud-empty__button"></div> |
| 581 |
|
| 582 |
<div class="elementor-template-library-blank-footer"> |
| 583 |
<?php echo esc_html__( 'Learn more about the', 'elementor' ); ?> |
| 584 |
<a class="elementor-template-library-blank-footer-link" href="https://go.elementor.com/docs-library/" target="_blank"><?php echo esc_html__( 'Template Library', 'elementor' ); ?></a> |
| 585 |
</div> |
| 586 |
</script> |
| 587 |
|
| 588 |
<script type="text/template" id="tmpl-elementor-template-library-preview"> |
| 589 |
<iframe></iframe> |
| 590 |
</script> |
| 591 |
|
| 592 |
<script type="text/template" id="tmpl-elementor-template-library-connect"> |
| 593 |
<div id="elementor-template-library-connect-logo" class="e-logo-wrapper"> |
| 594 |
<i class="eicon-elementor" aria-hidden="true"></i> |
| 595 |
</div> |
| 596 |
<div class="elementor-template-library-blank-title"> |
| 597 |
{{{ title }}} |
| 598 |
</div> |
| 599 |
<div class="elementor-template-library-blank-message"> |
| 600 |
{{{ message }}} |
| 601 |
</div> |
| 602 |
<?php |
| 603 |
$url = Plugin::$instance->common->get_component( 'connect' )->get_app( 'library' )->get_admin_url( 'authorize', [ |
| 604 |
'utm_source' => 'template-library', |
| 605 |
'utm_medium' => 'wp-dash', |
| 606 |
'utm_campaign' => 'library-connect', |
| 607 |
'utm_content' => '%%template_type%%', // will be replaced in the frontend |
| 608 |
] ); |
| 609 |
?> |
| 610 |
<a id="elementor-template-library-connect__button" class="elementor-button e-primary" href="<?php echo esc_url( $url ); ?>"> |
| 611 |
{{{ button }}} |
| 612 |
</a> |
| 613 |
<?php |
| 614 |
$base_images_url = $this->get_assets_base_url() . '/assets/images/library-connect/'; |
| 615 |
|
| 616 |
$images = [ 'left-1', 'left-2', 'right-1', 'right-2' ]; |
| 617 |
|
| 618 |
foreach ( $images as $image ) : ?> |
| 619 |
<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" /> |
| 620 |
<?php endforeach; ?> |
| 621 |
</script> |
| 622 |
|
| 623 |
<script type="text/template" id="tmpl-elementor-template-library-connect-states"> |
| 624 |
<# |
| 625 |
const activeSource = elementor.templates.getFilter( 'source' ); |
| 626 |
#> |
| 627 |
<div id="elementor-template-library-filter-toolbar-local" class="elementor-template-library-filter-toolbar" style="padding-block-end:80px;"> |
| 628 |
<div id="elementor-template-library-filter"> |
| 629 |
<div class="elementor-template-library-filter-select-source"> |
| 630 |
<div class="source-option<# if ( activeSource === 'local' ) { #> selected<# } #>" data-source="local"> |
| 631 |
<i class="eicon-header" aria-hidden="true"></i> |
| 632 |
<?php echo esc_html__( 'Site templates', 'elementor' ); ?> |
| 633 |
</div> |
| 634 |
<div class="source-option<# if ( activeSource === 'cloud' ) { #> selected<# } #>" data-source="cloud"> |
| 635 |
<i class="eicon-library-cloud-empty" aria-hidden="true"></i> |
| 636 |
<?php echo esc_html__( 'Cloud templates', 'elementor' ); ?> |
| 637 |
<# |
| 638 |
const tabIcon = elementor.templates.hasCloudLibraryQuota() |
| 639 |
? '<span class="new-badge"><?php echo esc_html__( 'New', 'elementor' ); ?></span>' |
| 640 |
: '<span class="new-badge"><i class="eicon-upgrade-crown" style="margin-inline-end: 0;"></i> <?php echo esc_html__( 'Pro', 'elementor' ); ?></span>'; |
| 641 |
|
| 642 |
print( tabIcon ); |
| 643 |
#> |
| 644 |
</div> |
| 645 |
</div> |
| 646 |
</div> |
| 647 |
</div> |
| 648 |
<div class="elementor-template-library-blank-icon"></div> |
| 649 |
<div class="elementor-template-library-blank-title"></div> |
| 650 |
<div class="elementor-template-library-blank-message"></div> |
| 651 |
|
| 652 |
<div class="elementor-template-library-cloud-empty__button"></div> |
| 653 |
</script> |
| 654 |
|