[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-block-pattern-categories-registry.php (summary)

Blocks API: WP_Block_Pattern_Categories_Registry class

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

Defines 8 functions

  register()
  unregister()
  get_registered()
  get_all_registered()
  is_registered()
  get_instance()
  register_block_pattern_category()
  unregister_block_pattern_category()

Functions
Functions that are not part of a class:

register( $category_name, $category_properties )   X-Ref
Registers a pattern category.

return: bool True if the pattern was registered with success and false otherwise.
param: string $category_name       Pattern category name including namespace.
param: array  $category_properties {

unregister( $category_name )   X-Ref
Unregisters a pattern category.

return: bool True if the pattern was unregistered with success and false otherwise.
param: string $category_name Pattern category name including namespace.

get_registered( $category_name )   X-Ref
Retrieves an array containing the properties of a registered pattern category.

return: array Registered pattern properties.
param: string $category_name Pattern category name including namespace.

get_all_registered( $outside_init_only = false )   X-Ref
Retrieves all registered pattern categories.

return: array[] Array of arrays containing the registered pattern categories properties.
param: bool $outside_init_only Return only categories registered outside the `init` action.

is_registered( $category_name )   X-Ref
Checks if a pattern category is registered.

return: bool True if the pattern category is registered, false otherwise.
param: string $category_name Pattern category 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.

return: WP_Block_Pattern_Categories_Registry The main instance.

register_block_pattern_category( $category_name, $category_properties )   X-Ref
Registers a new pattern category.

return: bool True if the pattern category was registered with success and false otherwise.
param: string $category_name       Pattern category name including namespace.
param: array  $category_properties List of properties for the block pattern.

unregister_block_pattern_category( $category_name )   X-Ref
Unregisters a pattern category.

return: bool True if the pattern category was unregistered with success and false otherwise.
param: string $category_name Pattern category name including namespace.



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