Repository navigation
Expand file tree
/
Copy pathplugin.php
More file actions
67 lines (58 loc) · 2.22 KB
/
Copy pathplugin.php
File metadata and controls
67 lines (58 loc) · 2.22 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* Plugin Name: Brighter BD Elements
* Plugin URI: https://brighterwebsites.com.au/
* Description: Custom Breakdance elements.
* Author: Brighter Websites
* Author URI: https://brighterwebsites.com.au/
* License: GPLv2
* Text Domain: breakdance
* Domain Path: /languages/
* Version: 1.2.1
*/
namespace BreakdanceCustomElements;
// Release version. Must match the Version header above; CI fails the PR if not.
// Bump both on every PR into master that touches plugin.php, elements/ or includes/
// (see docs/CHANGELOG.md).
const BDE_VERSION = '1.2.1';
use function Breakdance\Util\getDirectoryPathRelativeToPluginFolder;
require_once __DIR__ . '/includes/class-faq-picker-options.php';
require_once __DIR__ . '/includes/class-review-picker-options.php';
require_once __DIR__ . '/includes/class-platform-picker-options.php';
require_once __DIR__ . '/includes/class-faq-providers.php';
require_once __DIR__ . '/includes/class-builder-context.php';
// The CPT Form Submission action and its admin settings page were removed from
// this plugin — they are untracked local-only files (see .gitignore). Their
// require_once calls lived here; leaving them would fatal once the files are
// absent from a deploy. The stored option `brighter_cpt_submission_configs`
// is left in the database as a harmless orphan.
add_filter('breakdance_element_categories', function (array $categories) {
$categories['site_essentials'] = 'Site Essentials';
return $categories;
});
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
);