[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-block-bindings-source.php (summary)

Block Bindings API: WP_Block_Bindings_Source class.

File Size: 109 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  __construct()
  get_value()
  __wakeup()

Functions
Functions that are not part of a class:

__construct( string $name, array $source_properties )   X-Ref
Constructor.

Do not use this constructor directly. Instead, use the
`WP_Block_Bindings_Registry::register` method or the `register_block_bindings_source` function.

param: string $name              The name of the source.
param: array  $source_properties The properties of the source.

get_value( array $source_args, $block_instance, string $attribute_name )   X-Ref
Calls the callback function specified in the `$get_value_callback` property
with the given arguments and returns the result. It can be modified with
`block_bindings_source_value` filter.

return: mixed The value of the source.
param: array    $source_args    Array containing source arguments used to look up the override value, i.e. {"key": "foo"}.
param: WP_Block $block_instance The block instance.
param: string   $attribute_name The name of the target attribute.

__wakeup()   X-Ref
Wakeup magic method.




Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref