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