-
Notifications
You must be signed in to change notification settings - Fork 127
/
plugin.php
46 lines (40 loc) · 1.2 KB
/
plugin.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
/**
* Plugin Name: Breakdance Custom Elements
* Plugin URI: https://breakdance.com/
* Description: Boilerplate plugin to save your custom elements created with Element Studio.
* Author: Breakdance
* Author URI: https://breakdance.com/
* License: GPLv2
* Text Domain: breakdance
* Domain Path: /languages/
* Version: 0.0.1
*/
namespace BreakdanceCustomElements;
use function Breakdance\Util\getDirectoryPathRelativeToPluginFolder;
add_action('breakdance_loaded', function () {
\Breakdance\ElementStudio\registerSaveLocation(
getDirectoryPathRelativeToPluginFolder(__DIR__) . '/elements',
'BreakdanceCustomElements',
'element',
'Custom Elements',
false
);
\Breakdance\ElementStudio\registerSaveLocation(
getDirectoryPathRelativeToPluginFolder(__DIR__) . '/macros',
'BreakdanceCustomElements',
'macro',
'Custom Macros',
false,
);
\Breakdance\ElementStudio\registerSaveLocation(
getDirectoryPathRelativeToPluginFolder(__DIR__) . '/presets',
'BreakdanceCustomElements',
'preset',
'Custom Presets',
false,
);
},
// register elements before loading them
9
);