A WordPress-centric search engine for devs and theme authors



register_block_core_rss ›

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

Registers the `core/rss` block on server.



Source

function register_block_core_rss() {
	register_block_type(
		'core/rss',
		array(
			'attributes'      => array(
				'align'          => array(
					'type' => 'string',
					'enum' => array( 'left', 'center', 'right', 'wide', 'full' ),
				),
				'className'      => array(
					'type' => 'string',
				),
				'columns'        => array(
					'type'    => 'number',
					'default' => 2,
				),
				'blockLayout'    => array(
					'type'    => 'string',
					'default' => 'list',
				),
				'feedURL'        => array(
					'type'    => 'string',
					'default' => '',
				),
				'itemsToShow'    => array(
					'type'    => 'number',
					'default' => 5,
				),
				'displayExcerpt' => array(
					'type'    => 'boolean',
					'default' => false,
				),
				'displayAuthor'  => array(
					'type'    => 'boolean',
					'default' => false,
				),
				'displayDate'    => array(
					'type'    => 'boolean',
					'default' => false,
				),
				'excerptLength'  => array(
					'type'    => 'number',
					'default' => 55,
				),
			),
			'render_callback' => 'render_block_core_rss',
		)
	);
}