[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Block Bindings API: WP_Block_Bindings_Registry class. Supports overriding content in blocks by connecting them to different sources.
File Size: | 294 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
register( string $source_name, array $source_properties ) X-Ref |
Registers a new block bindings source. This is a low-level method. For most use cases, it is recommended to use the `register_block_bindings_source()` function instead. param: string $source_name The name of the source. It must be a string containing a namespace prefix, i.e. param: array $source_properties { return: WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. |
unregister( string $source_name ) X-Ref |
Unregisters a block bindings source. param: string $source_name Block bindings source name including namespace. return: WP_Block_Bindings_Source|false The unregistered block bindings source on success and `false` otherwise. |
get_all_registered() X-Ref |
Retrieves the list of all registered block bindings sources. return: WP_Block_Bindings_Source[] The array of registered sources. |
get_registered( string $source_name ) X-Ref |
Retrieves a registered block bindings source. param: string $source_name The name of the source. return: WP_Block_Bindings_Source|null The registered block bindings source, or `null` if it is not registered. |
is_registered( $source_name ) X-Ref |
Checks if a block bindings source is registered. param: string $source_name The name of the source. return: bool `true` if the block bindings source is registered, `false` otherwise. |
__wakeup() X-Ref |
Wakeup magic method. |
get_instance() X-Ref |
Utility method to retrieve the main instance of the class. The instance will be created if it does not exist yet. return: WP_Block_Bindings_Registry The main instance. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |