enqueue.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | if(!defined('ABSPATH')) |
| 4 | exit; |
| 5 | |
| 6 | /** |
| 7 | * Enqueue |
| 8 | */ |
| 9 | add_action('admin_enqueue_scripts', 'acfe_enqueue_admin'); |
| 10 | function acfe_enqueue_admin(){ |
| 11 | if(!acf_is_screen(array('edit-acf-field-group', 'acf-field-group'))) |
| 12 | return; |
| 13 | |
| 14 | // CSS |
| 15 | wp_enqueue_style('acf-input'); |
| 16 | wp_enqueue_style('wp-jquery-ui-dialog'); |
| 17 | wp_enqueue_style('acfe-css', plugins_url('assets/admin.css', ACFE_FILE), false, null); |
| 18 | |
| 19 | // JS |
| 20 | wp_enqueue_script('acf-input'); |
| 21 | wp_enqueue_script('jquery-ui-core'); |
| 22 | wp_enqueue_script('jquery-ui-dialog'); |
| 23 | wp_enqueue_script('acfe-js', plugins_url('assets/admin.js', ACFE_FILE), array('jquery'), null); |
| 24 | } |