PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.5.2
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.5.2
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Core/Admin.php +18 -106 3.7.33.5.2 View file →
@@ -103,9 +103,9 @@
103 103 */
104 104 public function scripts( $hook = '' ) {
105 105 $allowed_hooks = apply_filters(
106 106 'templately_admin_enqueue_allowed_hooks',
107 - [ 'index.php', 'edit.php', 'plugins.php', 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings' ],
107 + [ 'index.php', 'edit.php', 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings' ],
108 108 $hook
109 109 );
110 110
111 111 if ( !empty($hook) && ! in_array( $hook, $allowed_hooks, true ) ) {
@@ -165,24 +165,8 @@
165 165 }
166 166 return;
167 167 }
168 168
169 - if ( 'plugins.php' === $hook ) {
170 - templately()->assets->enqueue(
171 - 'templately-inter',
172 - set_url_scheme( '//fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap' )
173 - );
174 - templately()->assets->enqueue( 'templately-tailwind', 'css/tailwind.css', [ 'templately-inter' ] );
175 - templately()->assets->enqueue( 'templately-deactivate-survey', 'css/deactivate-survey-style.css', [ 'templately-tailwind' ] );
176 - templately()->assets->enqueue( 'templately', 'js/deactivate-survey.js', [ 'regenerator-runtime' ], true );
177 - templately()->assets->localize( 'templately', 'templatelyDeactivateSurvey', [
178 - 'nonce' => wp_create_nonce( 'templately_nonce' ),
179 - 'pluginBasename' => TEMPLATELY_PLUGIN_BASENAME,
180 - 'reasons' => DeactivationSurvey::get_reasons_for_js(),
181 - ] );
182 - return;
183 - }
184 -
185 169 $templately = [];
186 170
187 171 if ( 'edit.php' === $hook ) {
188 172 global $current_screen;
@@ -218,45 +202,23 @@
218 202 $_localize_handle = 'templately-' . $hook;
219 203 $script_dependencies[] = $_localize_handle;
220 204 }
221 205
222 - if ( 'templately_page_templately_settings' === $hook ) {
223 - templately()->assets->register( 'settings-vendor', 'js/chunks/settings-vendor.js', [], true );
224 - $script_dependencies[] = 'settings-vendor';
225 - }
226 -
227 206 if ( $hook === 'toplevel_page_templately' || $hook == 'edit.php' || 'templately_page_templately_settings' === $hook ) {
228 207 templately()->assets->enqueue( 'templately-admin', 'css/admin.css', [ 'templately' ] );
229 208 }
230 209
231 - // Google Fonts Enqueueing
232 - // DM Sans - Used in general UI
210 + // Google Font Enqueueing
233 211 templately()->assets->enqueue(
234 212 'templately-dmsans',
235 213 set_url_scheme( '//fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap' )
236 214 );
237 215
238 - // Inter - Used in Tailwind components and various UI elements
239 - templately()->assets->enqueue(
240 - 'templately-inter',
241 - set_url_scheme( '//fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap' )
242 - );
243 -
244 - // DM Mono - Used in settings and code-related UI
245 - templately()->assets->enqueue(
246 - 'templately-dmmono',
247 - set_url_scheme( '//fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap' )
248 - );
249 -
250 216 wp_enqueue_style('wp-components');
251 217
252 218 wp_enqueue_media();
253 219 templately()->assets->enqueue( 'templately', 'js/templately.js', $script_dependencies, true );
254 - templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans', 'templately-inter'] );
255 - $tailwind_hooks = apply_filters( 'templately_tailwind_hooks', [ 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings', 'edit.php' ] );
256 - if ( in_array( $hook, $tailwind_hooks, true ) ) {
257 - templately()->assets->enqueue( 'templately-tailwind', 'css/tailwind.css', ['templately', 'templately-inter'] );
258 - }
220 + templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans'] );
259 221
260 222 /**
261 223 * @var Elementor|Gutenberg $platform
262 224 */
@@ -286,19 +248,13 @@
286 248 'not_found' => templately()->assets->icon( 'no-item-found.png' ),
287 249 'no_items' => templately()->assets->icon( 'no-items.png' ),
288 250 'loadingImage' => templately()->assets->icon( 'logos/loading-logo.gif' ),
289 251 'current_url' => admin_url( 'admin.php?page=templately' ),
290 - 'wp_dashboard_url' => admin_url( 'index.php' ),
291 - 'templately_library_url' => admin_url( 'edit.php?post_type=templately_library' ),
292 252 'is_signed' => Login::is_signed(),
293 253 'is_globally_signed' => Login::is_globally_signed(),
294 254 'signed_as_global' => Login::signed_as_global(),
295 255 'current_screen' => $_current_screen,
296 256 'can_fsi' => current_user_can('install_plugins') && current_user_can('install_themes'),
297 - // Account-level administration: the Subscription screen. Mirrors the
298 - // subscription branch of `Checkout::checkout()`, so the sidebar can hide
299 - // it for non-admins rather than route them to a 403.
300 - 'can_manage_account' => current_user_can( 'manage_options' ),
301 257 'post_type' => get_post_type(),
302 258 'has_elementor' => rest_sanitize_boolean( is_plugin_active( 'elementor/elementor.php' ) ),
303 259 'has_elementor_pro' => rest_sanitize_boolean( is_plugin_active( 'elementor-pro/elementor-pro.php' ) ),
304 260 'theme' => $_current_screen == 'templately' ? 'light' : $platform->ui_theme(),
@@ -308,16 +264,8 @@
308 264 'wp_user_avatar' => get_avatar_url( get_current_user_id(), [ 'size' => 96 ] ),
309 265 'allowed_mime_types' => get_allowed_mime_types(),
310 266 'is_free_user' => $global_user === false || isset( $global_user['plan'] ) && $global_user['plan'] == 'free',
311 267 'is_disconnected' => ! empty( $global_user['is_disconnected'] ),
312 - 'tour_status' => Options::get_instance()->get( 'tour_status', [] ),
313 - // Which Templately site the plugin talks to. `templatelyDeveloper.dev_api`
314 - // carries the same flag, but only when developer mode is on and only from
315 - // its own script handle — so anything rendered before that handle runs (the
316 - // footer CTA, for one) linked to the live site while the plugin was pointed
317 - // at dev. Kept here, on the main localized object, `webURL()` is right from
318 - // the first paint. See `react-src/utils/helper.js#webURL`.
319 - 'dev_api' => Helper::is_dev_api(),
320 268 ], $templately );
321 269
322 270 // Apply filter to allow network admin modifications
323 271 $templately = apply_filters( 'templately_admin_localized_data', $templately );
@@ -395,9 +343,9 @@
395 343 'class' => 'dismiss-btn'
396 344 ]
397 345 ],
398 346 'support' => [
399 - 'link' => Helper::web_url( '', [ 'support' => 'open' ] ),
347 + 'link' => 'https://wpdeveloper.com/support',
400 348 'attributes' => [
401 349 'target' => '_blank'
402 350 ],
403 351 'label' => __( 'I need help', 'templately' ),
@@ -451,39 +399,38 @@
451 399 // 'nav-menus'
452 400 // ]
453 401 // ] );
454 402
455 - // spring_savings_2026 notice
456 - $_notice_text_spring_savings_2026 = '<p style="margin-top: 0; margin-bottom: 0px;">🌸 Spring Savings: Design Website Quickly With 6,500+ Elementor & Gutenberg Templates, Including AI-Powered Features ⚡️ – Now <strong>Flat 50% OFF!</strong></p>';
403 + $notice_text = '<p style="margin-top: 0; margin-bottom: 0px;">Smarter & Faster Web Design With 6,500+ AI-Powered Elementor & Gutenberg Templates – Now <strong>Up To 50% OFF!</strong> 🎁</p>';
457 404
458 - $_spring_savings_2026 = [
405 + $_black_friday = [
459 406 'thumbnail' => templately()->assets->icon( 'logos/logo-full.svg' ),
460 - 'html' => $_notice_text_spring_savings_2026,
407 + 'html' => $notice_text,
461 408 'links' => [
462 - 'later' => [
463 - 'link' => Helper::web_url() . '#pricing',
409 + 'later' => [
410 + 'link' => 'https://templately.com/#pricing',
464 411 'target' => '_blank',
465 - 'label' => __( 'Upgrade To Pro Now', 'templately' ),
412 + 'label' => __( 'Upgrade To PRO', 'templately' ),
466 413 'attributes' => [
467 414 'class' => 'button button-primary',
468 415 ]
469 416 ],
470 417 'never_show_again' => [
471 - 'label' => __( 'Maybe Later', 'templately' ),
418 + 'label' => __( 'I’ll Grab It Later', 'templately' ),
472 419 'attributes' => [
473 420 'data-dismiss' => true,
474 421 'class' => 'button button-link dismiss-btn',
475 422 ]
476 - ],
423 + ]
477 424 ],
478 425 ];
479 426
480 - $notices->add( 'spring_savings_2026', $_spring_savings_2026, [
481 - 'start' => $notices->strtotime('00:00:01AM 8th April, 2026'),
427 + $notices->add( 'holiday_2026_feb', $_black_friday, [
428 + 'start' => $notices->strtotime('00:00:01AM 10th February, 2026'),
482 429 'recurrence' => false,
483 430 'dismissible' => true,
484 431 'refresh' => TEMPLATELY_VERSION,
485 - "expire" => strtotime( '11:59:59pm 10th May, 2026' ),
432 + "expire" => strtotime( '11:59:59pm 8th March, 2026' ),
486 433 'display_if' => !wp_is_mobile(),
487 434 'screens' => [
488 435 'dashboard',
489 436 ],
@@ -499,13 +446,13 @@
499 446 $holiday_text .= "<div class='wpnotice-button-wrapper'>";
500 447 $holiday_text .= sprintf(
501 448 '<a class="button button-primary" target="_blank" href="%2$s">%1$s</a>',
502 449 $crown . __('GET PRO Lifetime Access', 'templately'),
503 - Helper::web_url() . '#pricing'
450 + 'https://templately.com/#pricing'
504 451 );
505 452 $holiday_text .= sprintf(
506 453 '<button class="button button-link dismiss-btn" data-dismiss="true">%1$s</button>',
507 - __('No, I\'ll Pay Full Price Later', 'templately'),
454 + __('No, I’ll Pay Full Price Later', 'templately'),
508 455 );
509 456 $holiday_text .= "</div>";
510 457
511 458
@@ -554,44 +501,9 @@
554 501 // ], '58.7' );
555 502 }
556 503
557 504 public function display() {
558 - Helper::views( 'template-library', [
559 - 'show_grid_skeleton' => $this->is_template_library_path(),
560 - ] );
561 - }
562 -
563 - /**
564 - * Whether the current `?path=` targets the template-library grid
565 - * (`TemplatesTypeLayout`, e.g. `elementor/packs`) — the only route the
566 - * pre-mount skeleton's card grid actually matches. Every other route
567 - * (`clouds/*`, `downloads`, `favourites`, `subscription`,
568 - * `purchased-items`, `ai-sites`, `settings/*`, item-detail pages, and
569 - * Saved Templates) gets a generic shell instead, so a hard reload doesn't
570 - * flash the wrong page shape before React mounts. See
571 - * views/template-library.php.
572 - *
573 - * @return bool
574 - */
575 - private function is_template_library_path() {
576 - $path = isset( $_GET['path'] ) ? sanitize_text_field( wp_unslash( $_GET['path'] ) ) : '';
577 -
578 - if ( $path === '' ) {
579 - return true;
580 - }
581 -
582 - $segments = array_values( array_filter( explode( '/', trim( $path, '/' ) ) ) );
583 -
584 - $non_library_prefixes = [ 'clouds', 'downloads', 'favourites', 'subscription', 'purchased-items', 'ai-sites', 'settings' ];
585 -
586 - if ( in_array( $segments[0] ?? '', $non_library_prefixes, true ) ) {
587 - return false;
588 - }
589 -
590 - // `/:platform/:type` (the grid) vs `/:platform/:type/:slug` (item
591 - // detail, its own skeleton shape) or `/:platform/templates` (Saved
592 - // Templates, a table) — only the 2-segment form matches the grid.
593 - return count( $segments ) === 2 && $segments[1] !== 'templates';
505 + Helper::views( 'template-library' );
594 506 }
595 507
596 508 /**
597 509 * If Elementor doesn't exists.