[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





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

Register the block patterns and block patterns categories

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

Defines 5 functions


Functions that are not part of a class:

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

_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. Each pattern is defined as a PHP file and defines
its metadata using plugin-style headers. The minimum required definition is:

* Title: My Pattern
* Slug: my-theme/my-pattern

The output of the PHP source corresponds to the content of the pattern, e.g.:

<main><p><?php echo "Hello"; ?></p></main>

If applicable, this will collect from both parent and child theme.

Other settable fields include:

- Description
- Viewport Width
- Categories       (comma-separated values)
- Keywords         (comma-separated values)
- Block Types      (comma-separated values)
- Inserter         (yes/no)

Generated : Sun May 29 08:20:01 2022 Cross-referenced by PHPXref