PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.9
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 +19 -110 3.7.33.4.9 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(),
@@ -307,17 +263,8 @@
307 263 'settings' => $templately_settings,
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 - '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 267 ], $templately );
321 268
322 269 // Apply filter to allow network admin modifications
323 270 $templately = apply_filters( 'templately_admin_localized_data', $templately );
@@ -322,10 +269,8 @@
322 269 // Apply filter to allow network admin modifications
323 270 $templately = apply_filters( 'templately_admin_localized_data', $templately );
324 271
325 272 templately()->assets->localize( $_localize_handle, 'templately', $templately );
326 -
327 - do_action( 'templately_admin_scripts', $hook );
328 273 }
329 274
330 275 /**
331 276 * Check the status of a plugin.
@@ -350,9 +295,9 @@
350 295 * @since 2.0.0
351 296 */
352 297 public function notices() {
353 298 $notices = new Notices( [
354 - // 'dev_mode' => true, // also need to clear templately_notices from option/site meta table.
299 + // 'dev_mode' => true,
355 300 'id' => 'templately',
356 301 'storage_key' => 'notices',
357 302 'lifetime' => 3,
358 303 'stylesheet_url' => TEMPLATELY_ASSETS . 'css/notices.css',
@@ -395,9 +340,9 @@
395 340 'class' => 'dismiss-btn'
396 341 ]
397 342 ],
398 343 'support' => [
399 - 'link' => Helper::web_url( '', [ 'support' => 'open' ] ),
344 + 'link' => 'https://wpdeveloper.com/support',
400 345 'attributes' => [
401 346 'target' => '_blank'
402 347 ],
403 348 'label' => __( 'I need help', 'templately' ),
@@ -451,39 +396,38 @@
451 396 // 'nav-menus'
452 397 // ]
453 398 // ] );
454 399
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>';
400 + $notice_text = '<p style="margin-top: 0; margin-bottom: 0px; text-transform: capitalize;"><strong>Season’s Best Deal:</strong> Smarter & faster web design with 6,500+ AI-powered Elementor & Gutenberg templates – now <strong>up to 60% OFF!</strong> ⚡</p>';
457 401
458 - $_spring_savings_2026 = [
402 + $_black_friday = [
459 403 'thumbnail' => templately()->assets->icon( 'logos/logo-full.svg' ),
460 - 'html' => $_notice_text_spring_savings_2026,
404 + 'html' => $notice_text,
461 405 'links' => [
462 - 'later' => [
463 - 'link' => Helper::web_url() . '#pricing',
406 + 'later' => [
407 + 'link' => 'https://templately.com/#pricing',
464 408 'target' => '_blank',
465 - 'label' => __( 'Upgrade To Pro Now', 'templately' ),
409 + 'label' => __( 'Upgrade To PRO', 'templately' ),
466 410 'attributes' => [
467 411 'class' => 'button button-primary',
468 412 ]
469 413 ],
470 414 'never_show_again' => [
471 - 'label' => __( 'Maybe Later', 'templately' ),
415 + 'label' => __( 'I’ll Grab It Later', 'templately' ),
472 416 'attributes' => [
473 417 'data-dismiss' => true,
474 418 'class' => 'button button-link dismiss-btn',
475 419 ]
476 - ],
420 + ]
477 421 ],
478 422 ];
479 423
480 - $notices->add( 'spring_savings_2026', $_spring_savings_2026, [
481 - 'start' => $notices->strtotime('00:00:01AM 8th April, 2026'),
424 + $notices->add( 'holiday_2025', $_black_friday, [
425 + 'start' => $notices->strtotime('00:00:01AM 15th December, 2025'),
482 426 'recurrence' => false,
483 427 'dismissible' => true,
484 428 'refresh' => TEMPLATELY_VERSION,
485 - "expire" => strtotime( '11:59:59pm 10th May, 2026' ),
429 + "expire" => strtotime( '11:59:59pm 7th January, 2026' ),
486 430 'display_if' => !wp_is_mobile(),
487 431 'screens' => [
488 432 'dashboard',
489 433 ],
@@ -499,13 +443,13 @@
499 443 $holiday_text .= "<div class='wpnotice-button-wrapper'>";
500 444 $holiday_text .= sprintf(
501 445 '<a class="button button-primary" target="_blank" href="%2$s">%1$s</a>',
502 446 $crown . __('GET PRO Lifetime Access', 'templately'),
503 - Helper::web_url() . '#pricing'
447 + 'https://templately.com/#pricing'
504 448 );
505 449 $holiday_text .= sprintf(
506 450 '<button class="button button-link dismiss-btn" data-dismiss="true">%1$s</button>',
507 - __('No, I\'ll Pay Full Price Later', 'templately'),
451 + __('No, I’ll Pay Full Price Later', 'templately'),
508 452 );
509 453 $holiday_text .= "</div>";
510 454
511 455
@@ -554,44 +498,9 @@
554 498 // ], '58.7' );
555 499 }
556 500
557 501 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';
502 + Helper::views( 'template-library' );
594 503 }
595 504
596 505 /**
597 506 * If Elementor doesn't exists.