PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/blocks/player/attributes.php +137 -0 2.7.4 → 2.14.0 View file →
@@ -1,0 +1,137 @@
1 +<?php
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +use ABlocks\Controls\Range;
7 +
8 +$attributes = [
9 + 'block_id' => [
10 + 'type' => 'string',
11 + 'default' => '',
12 + ],
13 + 'blockVersion' => array(
14 + 'type' => 'number',
15 + 'default' => 2,
16 + ),
17 + 'videoSource' => [
18 + 'type' => 'string',
19 + 'default' => 'youtube',
20 + ],
21 + 'youtubeUrl' => [
22 + 'type' => 'string',
23 + 'default' => 'https://www.youtube.com/watch?v=Yu0HH5S-8RY&t=1s',
24 + ],
25 + 'selfHostedUrl' => [
26 + 'type' => 'string',
27 + 'default' => '',
28 + ],
29 + 'videoUrl' => [
30 + 'type' => 'string',
31 + 'default' => ''
32 + ],
33 + 'audioUrl' => [
34 + 'type' => 'string',
35 + 'default' => ''
36 + ],
37 + 'vimeoUrl' => [
38 + 'type' => 'string',
39 + 'default' => 'https://vimeo.com/889428749'
40 + ],
41 + 'videoStartTime' => [
42 + 'type' => 'string',
43 + 'default' => ''
44 + ],
45 + 'videoEndTime' => [
46 + 'type' => 'string',
47 + 'default' => ''
48 + ],
49 + 'youtubeUiColor' => [
50 + 'type' => 'string',
51 + 'default' => ''
52 + ],
53 + 'youtubeProgressColor' => [
54 + 'type' => 'string',
55 + 'default' => ''
56 + ],
57 + 'playerbgColor' => [
58 + 'type' => 'string',
59 + 'default' => '#0077CC'
60 + ],
61 + 'selfVideoUiColor' => [
62 + 'type' => 'string',
63 + 'default' => ''
64 + ],
65 + 'selfVideoProgressUiColor' => [
66 + 'type' => 'string',
67 + 'default' => ''
68 + ],
69 + 'selfVideobgColor' => [
70 + 'type' => 'string',
71 + 'default' => ''
72 + ],
73 + 'vimeoUiColor' => [
74 + 'type' => 'string',
75 + 'default' => ''
76 + ],
77 + 'vimeoProgressUiColor' => [
78 + 'type' => 'string',
79 + 'default' => ''
80 + ],
81 + 'vimeobgColor' => [
82 + 'type' => 'string',
83 + 'default' => ''
84 + ],
85 + 'posterImage' => [
86 + 'type' => 'string',
87 + 'default' => ''
88 + ],
89 + 'autoplay' => [
90 + 'type' => 'boolean',
91 + 'default' => false,
92 + ],
93 + 'mute' => [
94 + 'type' => 'boolean',
95 + 'default' => false,
96 + ],
97 + 'loop' => [
98 + 'type' => 'boolean',
99 + 'default' => false,
100 + ],
101 +
102 +];
103 +$attributes = array_merge(
104 + $attributes,
105 + Range::get_attribute([
106 + 'attributeName' => 'youtubeIconSize',
107 + 'isResponsive' => false,
108 + 'defaultValue' => 20,
109 + ]),
110 + Range::get_attribute([
111 + 'attributeName' => 'youtubePlayPauseIconSize',
112 + 'isResponsive' => false,
113 + 'defaultValue' => 20,
114 + ]),
115 + Range::get_attribute([
116 + 'attributeName' => 'selfHostedIconSize',
117 + 'isResponsive' => false,
118 + 'defaultValue' => 20,
119 + ]),
120 + Range::get_attribute([
121 + 'attributeName' => 'selfHostedPlayIconSize',
122 + 'isResponsive' => false,
123 + 'defaultValue' => 20,
124 + ]),
125 + Range::get_attribute([
126 + 'attributeName' => 'vimeoIconSize',
127 + 'isResponsive' => false,
128 + 'defaultValue' => 20,
129 + ]),
130 + Range::get_attribute([
131 + 'attributeName' => 'vimeoPlayIconSize',
132 + 'isResponsive' => false,
133 + 'defaultValue' => 20,
134 + ]),
135 +);
136 +
137 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );