[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Register the block patterns and block patterns categories

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

Defines 6 functions

  _register_core_block_patterns_and_categories()
  wp_normalize_remote_block_pattern()
  _load_remote_block_patterns()
  _load_remote_featured_patterns()
  _register_remote_theme_patterns()
  _register_theme_block_patterns()

Functions
Functions that are not part of a class:

_register_core_block_patterns_and_categories()   X-Ref
Registers the core block patterns and categories.


wp_normalize_remote_block_pattern( $pattern )   X-Ref
Normalize the pattern properties to camelCase.

The API's format is snake_case, `register_block_pattern()` expects camelCase.

return: array Normalized pattern.
param: array $pattern Pattern as returned from the Pattern Directory API.

_load_remote_block_patterns( $deprecated = null )   X-Ref
Register Core's official patterns from wordpress.org/patterns.

param: WP_Screen $deprecated Unused. Formerly the screen that the current request was triggered from.

_load_remote_featured_patterns()   X-Ref
Register `Featured` (category) patterns from wordpress.org/patterns.


_register_remote_theme_patterns()   X-Ref
Registers patterns from Pattern Directory provided by a theme's
`theme.json` file.


_register_theme_block_patterns()   X-Ref
Register any patterns that the active theme may provide under its
`./patterns/` directory.




Generated : Fri Apr 26 08:20:02 2024 Cross-referenced by PHPXref