[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Blocks API: WP_Block_Patterns_Registry class

File Size: 168 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()
  unregister_block_pattern()

Functions
Functions that are not part of a class:

register( $pattern_name, $pattern_properties )   X-Ref
Registers a pattern.

param: string $pattern_name       Pattern name including namespace.
param: array  $pattern_properties Array containing the properties of the pattern: title,
return: bool True if the pattern was registered with success and false otherwise.

unregister( $pattern_name )   X-Ref
Unregisters a pattern.

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

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

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

get_all_registered()   X-Ref
Retrieves all registered patterns.

return: array Array of arrays containing the registered patterns properties,

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

param: string $pattern_name Pattern name including namespace.
return: bool True if the pattern 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_Patterns_Registry The main instance.

register_block_pattern( $pattern_name, $pattern_properties )   X-Ref
Registers a new pattern.

param: string $pattern_name       Pattern name including namespace.
param: array  $pattern_properties Array containing the properties of the pattern.
return: bool True if the pattern was registered with success and false otherwise.

unregister_block_pattern( $pattern_name )   X-Ref
Unregisters a pattern.

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



Generated : Wed Oct 28 08:20:01 2020 Cross-referenced by PHPXref