[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/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

  _register_core_block_patterns_and_categories()
  _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.

since: 5.5.0

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

since: 5.8.0
since: 5.9.0 The $current_screen argument was removed.
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.

since: 5.9.0

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

since: 6.0.0

_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)

since: 6.0.0



Generated: Tue Jun 28 01:00:03 2022 Cross-referenced by PHPXref 0.7.1