[ Index ]

PHP Cross Reference of WordPress

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.

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

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

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

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

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

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

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

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

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

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

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

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.
since: 5.3.0



Generated: Sat Apr 10 01:00:03 2021 Cross-referenced by PHPXref 0.7.1