File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1717 "require" : {
1818 "php" : " ^8.0" ,
1919 "stoutlogic/acf-builder" : " ^1.11" ,
20- "laravel/prompts" : " *" ,
21- "spatie/once" : " *"
20+ "laravel/prompts" : " *"
2221 },
2322 "require-dev" : {
2423 "laravel/pint" : " ^1.14" ,
Original file line number Diff line number Diff line change @@ -419,17 +419,21 @@ public function getSupportAttributes(): array
419419 /**
420420 * Retrieve the block HTML attributes.
421421 */
422- public function getSupportHtmlAttributes (): array
422+ public function getHtmlAttributes (): array
423423 {
424- return once (fn () => $ this ->preview ? [] : (WP_Block_Supports::get_instance ()?->apply_block_supports() ?? []));
424+ if ($ this ->preview ) {
425+ return [];
426+ }
427+
428+ return WP_Block_Supports::get_instance ()?->apply_block_supports() ?? [];
425429 }
426430
427431 /**
428432 * Retrieve the inline block styles.
429433 */
430434 public function getInlineStyle (): string
431435 {
432- $ supports = $ this ->getSupportHtmlAttributes ();
436+ $ supports = $ this ->getHtmlAttributes ();
433437
434438 return $ supports ['style ' ] ?? '' ;
435439 }
@@ -439,7 +443,7 @@ public function getInlineStyle(): string
439443 */
440444 public function getClasses (): string
441445 {
442- $ supports = $ this ->getSupportHtmlAttributes ();
446+ $ supports = $ this ->getHtmlAttributes ();
443447
444448 return str_replace (
445449 acf_slugify ($ this ->namespace ),
You can’t perform that action at this time.
0 commit comments