[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Blocks API: WP_Block_Type_Registry class

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

Defines 6 functions

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

Functions
Functions that are not part of a class:

register( $name, $args = array()   X-Ref
Registers a block type.

since: 5.0.0
param: string|WP_Block_Type $name Block type name including namespace, or alternatively a
param: array                $args {
return: WP_Block_Type|false The registered block type on success, or false on failure.

unregister( $name )   X-Ref
Unregisters a block type.

since: 5.0.0
param: string|WP_Block_Type $name Block type name including namespace, or alternatively a
return: WP_Block_Type|false The unregistered block type on success, or false on failure.

get_registered( $name )   X-Ref
Retrieves a registered block type.

since: 5.0.0
param: string $name Block type name including namespace.
return: WP_Block_Type|null The registered block type, or null if it is not registered.

get_all_registered()   X-Ref
Retrieves all registered block types.

since: 5.0.0
return: WP_Block_Type[] Associative array of `$block_type_name => $block_type` pairs.

is_registered( $name )   X-Ref
Checks if a block type is registered.

since: 5.0.0
param: string $name Block type name including namespace.
return: bool True if the block type is registered, false otherwise.

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.0.0
return: WP_Block_Type_Registry The main instance.



Generated: Wed Jul 24 01:00:02 2019 Cross-referenced by PHPXref 0.7.1