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 -120 3.7.53.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,34 +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 - /**
175 - * plugins.php is not our screen, so the survey gets the scoped Tailwind
176 - * build rather than css/tailwind.css. The unscoped bundle is compiled
177 - * with `important: true` and no layer, so its utilities outranked
178 - * wp-admin's own rules — `.inline` beat `.notice.inline` and `.hidden`,
179 - * which collapsed the update notices in every plugin row into coloured
180 - * slivers and revealed the hidden auto-update error placeholders.
181 - * css/tailwind-survey.css carries the same rules prefixed with
182 - * `.templately-scope`, the container the modal mounts into.
183 - */
184 - templately()->assets->enqueue( 'templately-tailwind-survey', 'css/tailwind-survey.css', [ 'templately-inter' ] );
185 - templately()->assets->enqueue( 'templately-deactivate-survey', 'css/deactivate-survey-style.css', [ 'templately-tailwind-survey' ] );
186 - templately()->assets->enqueue( 'templately', 'js/deactivate-survey.js', [ 'regenerator-runtime' ], true );
187 - templately()->assets->localize( 'templately', 'templatelyDeactivateSurvey', [
188 - 'nonce' => wp_create_nonce( 'templately_nonce' ),
189 - 'pluginBasename' => TEMPLATELY_PLUGIN_BASENAME,
190 - 'reasons' => DeactivationSurvey::get_reasons_for_js(),
191 - ] );
192 - return;
193 - }
194 -
195 169 $templately = [];
196 170
197 171 if ( 'edit.php' === $hook ) {
198 172 global $current_screen;
@@ -228,45 +202,23 @@
228 202 $_localize_handle = 'templately-' . $hook;
229 203 $script_dependencies[] = $_localize_handle;
230 204 }
231 205
232 - if ( 'templately_page_templately_settings' === $hook ) {
233 - templately()->assets->register( 'settings-vendor', 'js/chunks/settings-vendor.js', [], true );
234 - $script_dependencies[] = 'settings-vendor';
235 - }
236 -
237 206 if ( $hook === 'toplevel_page_templately' || $hook == 'edit.php' || 'templately_page_templately_settings' === $hook ) {
238 207 templately()->assets->enqueue( 'templately-admin', 'css/admin.css', [ 'templately' ] );
239 208 }
240 209
241 - // Google Fonts Enqueueing
242 - // DM Sans - Used in general UI
210 + // Google Font Enqueueing
243 211 templately()->assets->enqueue(
244 212 'templately-dmsans',
245 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' )
246 214 );
247 215
248 - // Inter - Used in Tailwind components and various UI elements
249 - templately()->assets->enqueue(
250 - 'templately-inter',
251 - set_url_scheme( '//fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap' )
252 - );
253 -
254 - // DM Mono - Used in settings and code-related UI
255 - templately()->assets->enqueue(
256 - 'templately-dmmono',
257 - 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' )
258 - );
259 -
260 216 wp_enqueue_style('wp-components');
261 217
262 218 wp_enqueue_media();
263 219 templately()->assets->enqueue( 'templately', 'js/templately.js', $script_dependencies, true );
264 - templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans', 'templately-inter'] );
265 - $tailwind_hooks = apply_filters( 'templately_tailwind_hooks', [ 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings', 'edit.php' ] );
266 - if ( in_array( $hook, $tailwind_hooks, true ) ) {
267 - templately()->assets->enqueue( 'templately-tailwind', 'css/tailwind.css', ['templately', 'templately-inter'] );
268 - }
220 + templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans'] );
269 221
270 222 /**
271 223 * @var Elementor|Gutenberg $platform
272 224 */
@@ -296,19 +248,13 @@
296 248 'not_found' => templately()->assets->icon( 'no-item-found.png' ),
297 249 'no_items' => templately()->assets->icon( 'no-items.png' ),
298 250 'loadingImage' => templately()->assets->icon( 'logos/loading-logo.gif' ),
299 251 'current_url' => admin_url( 'admin.php?page=templately' ),
300 - 'wp_dashboard_url' => admin_url( 'index.php' ),
301 - 'templately_library_url' => admin_url( 'edit.php?post_type=templately_library' ),
302 252 'is_signed' => Login::is_signed(),
303 253 'is_globally_signed' => Login::is_globally_signed(),
304 254 'signed_as_global' => Login::signed_as_global(),
305 255 'current_screen' => $_current_screen,
306 256 'can_fsi' => current_user_can('install_plugins') && current_user_can('install_themes'),
307 - // Account-level administration: the Subscription screen. Mirrors the
308 - // subscription branch of `Checkout::checkout()`, so the sidebar can hide
309 - // it for non-admins rather than route them to a 403.
310 - 'can_manage_account' => current_user_can( 'manage_options' ),
311 257 'post_type' => get_post_type(),
312 258 'has_elementor' => rest_sanitize_boolean( is_plugin_active( 'elementor/elementor.php' ) ),
313 259 'has_elementor_pro' => rest_sanitize_boolean( is_plugin_active( 'elementor-pro/elementor-pro.php' ) ),
314 260 'theme' => $_current_screen == 'templately' ? 'light' : $platform->ui_theme(),
@@ -317,17 +263,8 @@
317 263 'settings' => $templately_settings,
318 264 'wp_user_avatar' => get_avatar_url( get_current_user_id(), [ 'size' => 96 ] ),
319 265 'allowed_mime_types' => get_allowed_mime_types(),
320 266 'is_free_user' => $global_user === false || isset( $global_user['plan'] ) && $global_user['plan'] == 'free',
321 - 'is_disconnected' => ! empty( $global_user['is_disconnected'] ),
322 - 'tour_status' => Options::get_instance()->get( 'tour_status', [] ),
323 - // Which Templately site the plugin talks to. `templatelyDeveloper.dev_api`
324 - // carries the same flag, but only when developer mode is on and only from
325 - // its own script handle — so anything rendered before that handle runs (the
326 - // footer CTA, for one) linked to the live site while the plugin was pointed
327 - // at dev. Kept here, on the main localized object, `webURL()` is right from
328 - // the first paint. See `react-src/utils/helper.js#webURL`.
329 - 'dev_api' => Helper::is_dev_api(),
330 267 ], $templately );
331 268
332 269 // Apply filter to allow network admin modifications
333 270 $templately = apply_filters( 'templately_admin_localized_data', $templately );
@@ -332,10 +269,8 @@
332 269 // Apply filter to allow network admin modifications
333 270 $templately = apply_filters( 'templately_admin_localized_data', $templately );
334 271
335 272 templately()->assets->localize( $_localize_handle, 'templately', $templately );
336 -
337 - do_action( 'templately_admin_scripts', $hook );
338 273 }
339 274
340 275 /**
341 276 * Check the status of a plugin.
@@ -360,9 +295,9 @@
360 295 * @since 2.0.0
361 296 */
362 297 public function notices() {
363 298 $notices = new Notices( [
364 - // 'dev_mode' => true, // also need to clear templately_notices from option/site meta table.
299 + // 'dev_mode' => true,
365 300 'id' => 'templately',
366 301 'storage_key' => 'notices',
367 302 'lifetime' => 3,
368 303 'stylesheet_url' => TEMPLATELY_ASSETS . 'css/notices.css',
@@ -405,9 +340,9 @@
405 340 'class' => 'dismiss-btn'
406 341 ]
407 342 ],
408 343 'support' => [
409 - 'link' => Helper::web_url( '', [ 'support' => 'open' ] ),
344 + 'link' => 'https://wpdeveloper.com/support',
410 345 'attributes' => [
411 346 'target' => '_blank'
412 347 ],
413 348 'label' => __( 'I need help', 'templately' ),
@@ -461,39 +396,38 @@
461 396 // 'nav-menus'
462 397 // ]
463 398 // ] );
464 399
465 - // spring_savings_2026 notice
466 - $_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>';
467 401
468 - $_spring_savings_2026 = [
402 + $_black_friday = [
469 403 'thumbnail' => templately()->assets->icon( 'logos/logo-full.svg' ),
470 - 'html' => $_notice_text_spring_savings_2026,
404 + 'html' => $notice_text,
471 405 'links' => [
472 - 'later' => [
473 - 'link' => Helper::web_url() . '#pricing',
406 + 'later' => [
407 + 'link' => 'https://templately.com/#pricing',
474 408 'target' => '_blank',
475 - 'label' => __( 'Upgrade To Pro Now', 'templately' ),
409 + 'label' => __( 'Upgrade To PRO', 'templately' ),
476 410 'attributes' => [
477 411 'class' => 'button button-primary',
478 412 ]
479 413 ],
480 414 'never_show_again' => [
481 - 'label' => __( 'Maybe Later', 'templately' ),
415 + 'label' => __( 'I’ll Grab It Later', 'templately' ),
482 416 'attributes' => [
483 417 'data-dismiss' => true,
484 418 'class' => 'button button-link dismiss-btn',
485 419 ]
486 - ],
420 + ]
487 421 ],
488 422 ];
489 423
490 - $notices->add( 'spring_savings_2026', $_spring_savings_2026, [
491 - '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'),
492 426 'recurrence' => false,
493 427 'dismissible' => true,
494 428 'refresh' => TEMPLATELY_VERSION,
495 - "expire" => strtotime( '11:59:59pm 10th May, 2026' ),
429 + "expire" => strtotime( '11:59:59pm 7th January, 2026' ),
496 430 'display_if' => !wp_is_mobile(),
497 431 'screens' => [
498 432 'dashboard',
499 433 ],
@@ -509,13 +443,13 @@
509 443 $holiday_text .= "<div class='wpnotice-button-wrapper'>";
510 444 $holiday_text .= sprintf(
511 445 '<a class="button button-primary" target="_blank" href="%2$s">%1$s</a>',
512 446 $crown . __('GET PRO Lifetime Access', 'templately'),
513 - Helper::web_url() . '#pricing'
447 + 'https://templately.com/#pricing'
514 448 );
515 449 $holiday_text .= sprintf(
516 450 '<button class="button button-link dismiss-btn" data-dismiss="true">%1$s</button>',
517 - __('No, I\'ll Pay Full Price Later', 'templately'),
451 + __('No, I’ll Pay Full Price Later', 'templately'),
518 452 );
519 453 $holiday_text .= "</div>";
520 454
521 455
@@ -564,44 +498,9 @@
564 498 // ], '58.7' );
565 499 }
566 500
567 501 public function display() {
568 - Helper::views( 'template-library', [
569 - 'show_grid_skeleton' => $this->is_template_library_path(),
570 - ] );
571 - }
572 -
573 - /**
574 - * Whether the current `?path=` targets the template-library grid
575 - * (`TemplatesTypeLayout`, e.g. `elementor/packs`) — the only route the
576 - * pre-mount skeleton's card grid actually matches. Every other route
577 - * (`clouds/*`, `downloads`, `favourites`, `subscription`,
578 - * `purchased-items`, `ai-sites`, `settings/*`, item-detail pages, and
579 - * Saved Templates) gets a generic shell instead, so a hard reload doesn't
580 - * flash the wrong page shape before React mounts. See
581 - * views/template-library.php.
582 - *
583 - * @return bool
584 - */
585 - private function is_template_library_path() {
586 - $path = isset( $_GET['path'] ) ? sanitize_text_field( wp_unslash( $_GET['path'] ) ) : '';
587 -
588 - if ( $path === '' ) {
589 - return true;
590 - }
591 -
592 - $segments = array_values( array_filter( explode( '/', trim( $path, '/' ) ) ) );
593 -
594 - $non_library_prefixes = [ 'clouds', 'downloads', 'favourites', 'subscription', 'purchased-items', 'ai-sites', 'settings' ];
595 -
596 - if ( in_array( $segments[0] ?? '', $non_library_prefixes, true ) ) {
597 - return false;
598 - }
599 -
600 - // `/:platform/:type` (the grid) vs `/:platform/:type/:slug` (item
601 - // detail, its own skeleton shape) or `/:platform/templates` (Saved
602 - // Templates, a table) — only the 2-segment form matches the grid.
603 - return count( $segments ) === 2 && $segments[1] !== 'templates';
502 + Helper::views( 'template-library' );
604 503 }
605 504
606 505 /**
607 506 * If Elementor doesn't exists.