-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenqueue.php
46 lines (37 loc) · 976 Bytes
/
enqueue.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Tangible\FieldsExample;
defined('ABSPATH') or die();
$plugin->enqueue = function() use($plugin, $fields) {
add_action('admin_footer', function() use($fields) {
$fields->enqueue([
'context' => [
'default',
'wp',
'elementor',
'beaver-builder'
]
]);
});
wp_enqueue_script(
'fields-example',
$plugin->assets_url . '/build/example.min.js',
);
wp_enqueue_style(
'fields-example',
$plugin->assets_url . '/build/example.min.css',
);
wp_enqueue_script(
'highlight',
// 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js',
$plugin->assets_url . '/vendor/highlight.min.js',
[],
'11.9.0'
);
wp_enqueue_style(
'highlight-theme',
// 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark-dimmed.css',
$plugin->assets_url . '/vendor/github-dark-dimmed.css',
[],
'11.9.0'
);
};