| @@ -6,8 +6,9 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | namespace WPFunnels\TemplateLibrary; |
| 8 | 8 | |
| 9 | 9 | use WPFunnels\Wpfnl; |
| 10 | +use WPFunnels\Wpfnl_functions; | |
| 10 | 11 | |
| 11 | 12 | class Manager |
| 12 | 13 | { |
| 13 | 14 | |
| @@ -100,20 +101,14 @@ | ||
| 100 | 101 | add_action('admin_footer', [$this, 'add_default_view']); |
| 101 | 102 | add_action('admin_enqueue_scripts', [$this, 'enqueue_scripts']); |
| 102 | 103 | } |
| 103 | 104 | |
| 105 | + | |
| 104 | 106 | public function enqueue_scripts($hook) |
| 105 | 107 | { |
| 106 | - if (in_array($hook, ['wpfunnels_page_wp_funnels', 'wpfunnels_page_wpf_templates', 'wpfunnels_page_store_checkout'])) { | |
| 107 | - $funnel_id = 0; | |
| 108 | - if (isset($_GET['page'])) { | |
| 109 | - if ($_GET['page'] === 'edit_funnel') { | |
| 110 | - if (isset($_GET['id'])) { | |
| 111 | - $funnel_id = sanitize_text_field($_GET['id']); | |
| 112 | - } | |
| 113 | - } | |
| 114 | - } | |
| 108 | + if (in_array($hook, ['wpfunnels_page_store_checkout'], true)) { | |
| 115 | 109 | wp_enqueue_script('funnel-template-library', WPFNL_URL . 'admin/assets/dist/js/template-library.min.js', ['jquery', 'wp-util'], WPFNL_VERSION, true); |
| 110 | + Wpfnl_functions::enqueue_bundle_style( 'template-library', 'funnel-template-library-bundle' ); | |
| 116 | 111 | } |
| 117 | 112 | } |
| 118 | 113 | |
| 119 | 114 | |