@@ -61,15 +61,6 @@ public function addThemeSupport(): void
61
61
*/
62
62
public function getAllAllowedBlocksList ($ allowedBlockTypes , WP_Block_Editor_Context $ blockEditorContext )
63
63
{
64
- // Allow forms to be used correctly.
65
- if (
66
- $ blockEditorContext ->post instanceof WP_Post &&
67
- !empty ($ blockEditorContext ->post ->post_type ) &&
68
- $ blockEditorContext ->post ->post_type === 'eightshift-forms '
69
- ) {
70
- return true ;
71
- }
72
-
73
64
if (\is_bool ($ allowedBlockTypes )) {
74
65
return $ allowedBlockTypes ;
75
66
}
@@ -79,15 +70,14 @@ public function getAllAllowedBlocksList($allowedBlockTypes, WP_Block_Editor_Cont
79
70
if ($ blocks ) {
80
71
$ allowedBlockTypes = \array_values (\array_merge (
81
72
\array_map (
82
- fn ($ block ) => $ block ['blockFullName ' ],
73
+ fn ($ block ) => $ block ['blockFullName ' ],
83
74
$ blocks
84
75
),
85
76
$ allowedBlockTypes ,
86
77
));
87
78
}
88
79
89
80
// Allow reusable block.
90
- $ allowedBlockTypes [] = 'eightshift-forms/forms ' ;
91
81
$ allowedBlockTypes [] = 'core/block ' ;
92
82
$ allowedBlockTypes [] = 'core/template ' ;
93
83
@@ -136,7 +126,7 @@ public function registerBlocks(): void
136
126
public function render (array $ attributes , string $ innerBlockContent ): string
137
127
{
138
128
// Get block view path.
139
- $ blockOutpout = Helpers::render (
129
+ $ blockOutput = Helpers::render (
140
130
$ attributes ['blockName ' ] ?? '' ,
141
131
$ attributes ,
142
132
'blocks ' ,
@@ -153,11 +143,11 @@ public function render(array $attributes, string $innerBlockContent): string
153
143
'wrapper ' ,
154
144
false ,
155
145
'' ,
156
- $ blockOutpout
146
+ $ blockOutput
157
147
);
158
148
}
159
149
160
- return $ blockOutpout ;
150
+ return $ blockOutput ;
161
151
}
162
152
163
153
/**
0 commit comments