PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.1.3
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.1.3
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 +24 -4 3.0.73.1.3 View file →
@@ -34,8 +34,10 @@
34 34 } catch ( Exception $e ) {
35 35 unset( $e );
36 36 }
37 37
38 + add_filter( 'plugin_action_links_' . TEMPLATELY_PLUGIN_BASENAME, [$this, 'handleActionLinks'], 10, 2 );
39 +
38 40 // Remove OLD notice from 1.0.0 (if other WPDeveloper plugin has notice)
39 41 NoticeRemover::get_instance( '1.0.0' );
40 42 }
41 43
@@ -122,16 +124,16 @@
122 124 'types' => $types
123 125 ];
124 126 }
125 127
126 - $script_dependencies = [];
128 + $script_dependencies = ['regenerator-runtime'];
127 129 $_localize_handle = 'templately';
128 130 $_current_screen = 'templately';
129 131
130 132 if ( $hook === 'elementor' || $hook === 'gutenberg' ) {
131 - $_current_screen = $hook;
132 - $_localize_handle = 'templately-' . $hook;
133 - $script_dependencies = [$_localize_handle];
133 + $_current_screen = $hook;
134 + $_localize_handle = 'templately-' . $hook;
135 + $script_dependencies[] = $_localize_handle;
134 136 }
135 137
136 138 if ( $hook === 'toplevel_page_templately' || $hook == 'edit.php' ) {
137 139 templately()->assets->enqueue( 'templately-admin', 'css/admin.css', [ 'templately' ] );
@@ -142,8 +144,9 @@
142 144 'templately-dmsans',
143 145 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' )
144 146 );
145 147
148 + wp_enqueue_media();
146 149 templately()->assets->enqueue( 'templately', 'js/templately.js', $script_dependencies, true );
147 150 templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans'] );
148 151
149 152 /**
@@ -368,6 +371,23 @@
368 371 }
369 372
370 373 public function header() {
371 374 Helper::views( 'header' );
375 + }
376 +
377 + /**
378 + * Handle links displayed below the plugin name in the WordPress Installed Plugins page.
379 + *
380 + * @return array
381 + * @since 3.1.2
382 + * @static
383 + *
384 + */
385 + public static function handleActionLinks($links, $file)
386 + {
387 + $settingsLink = '<a href="' . admin_url('admin.php?page=templately') . '" aria-label="' . __('Open settings page',
388 + 'templately') . '">' . __('Templates Library', 'templately') . '</a>';
389 +
390 + $links[] = $settingsLink;
391 + return $links;
372 392 }
373 393 }