Lumina Theme Architecture

block-bindings.php

File: block-bindings.php Theme: Shared Block Binding Functions

Table of Contents

Functions

register_block_bindings()  : void
Registers custom WordPress block binding source for Featured Image bound to the standard Image block. This is so we or users can add lightbox functionality to it. This is used in various Template Parts.
featured_image_binding()  : string|null
Callback handler for the 'lumina/featured-image' dynamic block binding.

Functions

register_block_bindings()

Registers custom WordPress block binding source for Featured Image bound to the standard Image block. This is so we or users can add lightbox functionality to it. This is used in various Template Parts.

register_block_bindings() : void

Callback handler for the 'lumina/featured-image' dynamic block binding.

featured_image_binding(array<string, mixed> $source_args, WP_Block $block_instance[, string $attribute_name = 'url' ]) : string|null

Performs a four-tier Post ID lookup to guarantee context inside template parts, falling back to default theme assets if no post thumbnail is set.

Parameters
$source_args : array<string, mixed>

Arguments passed from the block binding definition.

$block_instance : WP_Block

The instance of the block being rendered.

$attribute_name : string = 'url'

Target attribute being requested ('url' or 'alt').

Return values
string|null —

Resolved image URL, alt text string, or null if unresolvable.

On this page

Search results