#[UseSupport]

Attribute on classes, repeatable.

use Saij\WpAppFramework\Block\Support\UseSupport;

Adds a block support declared with #[BlockSupport] to a #[Block] class. The block's template must print its root element with block_wrapper_attributes(), which adds the class names of the support.

Arguments

#[UseSupport(string $support, mixed $default = null)]
ParameterTypeDefaultDescription
supportclass-stringrequiredA class with #[BlockSupport] of the same theme or plugin.
defaultmixednullDefault of the attribute for this block, of the type of the support's value; without it, the default of the support applies.