generated from Pierre-Lannoy/wp-plugin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.php
77 lines (71 loc) · 1.85 KB
/
init.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Initialization of globals.
*
* @package Bootstrap
* @author Pierre Lannoy <https://pierre.lannoy.fr/>.
* @since 1.0.0
*/
define( 'VIBES_PRODUCT_NAME', 'Vibes' );
define( 'VIBES_PRODUCT_URL', 'https://github.com/Pierre-Lannoy/wp-vibes' );
define( 'VIBES_PRODUCT_SHORTNAME', 'Vibes' );
define( 'VIBES_PRODUCT_ABBREVIATION', 'vibes' );
define( 'VIBES_SLUG', 'vibes' );
define( 'VIBES_VERSION', '2.0.0' );
define( 'VIBES_API_VERSION', '1' );
define( 'VIBES_CODENAME', '"-"' );
define( 'VIBES_CDN_AVAILABLE', true );
if ( ! defined( 'PERFOO_ALLOWED_HTML_FOR_DASHBOARD' ) ) {
global $allowedposttags;
$allowed = $allowedposttags;
$allowed['img'] = array_merge(
$allowed['img'],
[
'style' => true,
]
);
$extra = [
'script' => [],
'option' => [
'class' => true,
'style' => true,
'name' => true,
'id' => true,
'value' => true,
'selected' => true,
'disabled' => true,
],
'select' => [
'class' => true,
'style' => true,
'name' => true,
'id' => true,
'data' => true,
'placeholder' => true,
'disabled' => true,
],
'input' => [
'class' => true,
'style' => true,
'name' => true,
'id' => true,
'value' => true,
'data' => true,
'placeholder' => true,
'disabled' => true,
'type' => true,
'checked' => true,
'step' => true,
'min' => true,
'max' => true,
],
];
add_filter( 'safe_style_css',
function( $allowed ) {
return array_merge( $allowed, [ 'opacity' ] );
});
define( 'PERFOO_ALLOWED_HTML_FOR_DASHBOARD', array_merge( $allowed, $extra ) );
}
if ( ! defined( 'PERFOO_ALLOWED_PROTOCOLS_FOR_DASHBOARD' ) ) {
define( 'PERFOO_ALLOWED_PROTOCOLS_FOR_DASHBOARD', array_merge( wp_allowed_protocols(), [ 'data' ] ) );
}