'AdFuz Ad Space', 'description' => 'Display an AdFuz Ad Space anywhere on your site.', 'category' => 'widgets', 'icon' => 'money-alt', 'keywords' => [ 'ad', 'adspace', 'ad-fuz', 'advertisement', 'banner' ], 'supports' => [ 'html' => false, 'align' => [ 'wide', 'full' ], ], 'attributes' => [ 'adspace_id' => [ 'type' => 'integer', 'default' => 0 ], ], 'render_callback' => [ static::class, 'render' ], 'editor_script' => 'adfuz-block-editor', 'editor_style' => 'adfuz-block-editor-style', 'style' => 'adfuz-block-style', ] ); } public static function render( array $attributes ): string { $id = (int) ( $attributes['adspace_id'] ?? 0 ); if ( ! $id ) { return '

Select an Ad Space in the block settings.

'; } return do_shortcode( "[ad-fuz ad_space_id=\"{$id}\"]" ); } }