[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Blocks API: WP_Block_Styles_Registry class

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

Defines 7 functions

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

Functions
Functions that are not part of a class:

register( $block_name, $style_properties )   X-Ref
Registers a block style.

param: string $block_name       Block type name including namespace.
param: array  $style_properties Array containing the properties of the style name, label,
return: bool True if the block style was registered with success and false otherwise.

unregister( $block_name, $block_style_name )   X-Ref
Unregisters a block style.

param: string $block_name       Block type name including namespace.
param: string $block_style_name Block style name.
return: bool True if the block style was unregistered with success and false otherwise.

get_registered( $block_name, $block_style_name )   X-Ref
Retrieves an array containing the properties of a registered block style.

param: string $block_name       Block type name including namespace.
param: string $block_style_name Block style name.
return: array Registered block style properties.

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

return: array Array of arrays containing the registered block styles properties grouped per block,

get_registered_styles_for_block( $block_name )   X-Ref
Retrieves registered block styles for a specific block.

param: string $block_name Block type name including namespace.
return: array Array whose keys are block style names and whose value are block style properties.

is_registered( $block_name, $block_style_name )   X-Ref
Checks if a block style is registered.

param: string $block_name       Block type name including namespace.
param: string $block_style_name Block style name.
return: bool True if the block style 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.

return: WP_Block_Styles_Registry The main instance.



Generated : Sat Oct 24 08:20:01 2020 Cross-referenced by PHPXref