[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Blocks API: WP_Block_Patterns_Registry class
File Size: | 209 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
register( $pattern_name, $pattern_properties ) X-Ref |
Registers a block pattern. since: 5.5.0 since: 5.8.0 Added support for the `blockTypes` property. return: bool True if the pattern was registered with success and false otherwise. param: string $pattern_name Block pattern name including namespace. param: array $pattern_properties { |
unregister( $pattern_name ) X-Ref |
Unregisters a block pattern. since: 5.5.0 return: bool True if the pattern was unregistered with success and false otherwise. param: string $pattern_name Block pattern name including namespace. |
get_registered( $pattern_name ) X-Ref |
Retrieves an array containing the properties of a registered block pattern. since: 5.5.0 return: array Registered pattern properties. param: string $pattern_name Block pattern name including namespace. |
get_all_registered() X-Ref |
Retrieves all registered block patterns. since: 5.5.0 return: array[] Array of arrays containing the registered block patterns properties, |
is_registered( $pattern_name ) X-Ref |
Checks if a block pattern is registered. since: 5.5.0 return: bool True if the pattern is registered, false otherwise. param: string $pattern_name Block pattern name including namespace. |
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. since: 5.5.0 return: WP_Block_Patterns_Registry The main instance. |
register_block_pattern( $pattern_name, $pattern_properties ) X-Ref |
Registers a new block pattern. since: 5.5.0 return: bool True if the pattern was registered with success and false otherwise. param: string $pattern_name Block pattern name including namespace. param: array $pattern_properties List of properties for the block pattern. |
unregister_block_pattern( $pattern_name ) X-Ref |
Unregisters a block pattern. since: 5.5.0 return: bool True if the pattern was unregistered with success and false otherwise. param: string $pattern_name Block pattern name including namespace. |
Generated: Sat Feb 22 01:00:03 2025 | Cross-referenced by PHPXref 0.7.1 |