wpseek.com
A WordPress-centric search engine for devs and theme authors



register_block_core_gallery › WordPress Function

Sincen/a
Deprecatedn/a
register_block_core_gallery ( No parameters )
Defined at:
Codex:

Registers the `core/gallery` block on server.

This render callback needs to be here so that the gallery styles are loaded in block-based themes.


Source

function register_block_core_gallery() {
	register_block_type_from_metadata(
		__DIR__ . '/gallery',
		array(
			'render_callback' => function ( $attributes, $content ) {
				return $content;
			},
		)
	);
}