WP_Block_Type::set_props

Advertisement

Summery Summery

Sets block type properties.

Syntax Syntax

WP_Block_Type::set_props( array|string $args )

Parameters Parameters

$args

(Required) Array or string of arguments for registering a block type.

Source Source

File: wp-includes/class-wp-block-type.php

	 */
	public function render( $attributes = array(), $content = '' ) {
		if ( ! $this->is_dynamic() ) {
			return '';
		}

		$attributes = $this->prepare_attributes_for_render( $attributes );

		return (string) call_user_func( $this->render_callback, $attributes, $content );
	}

	/**
	 * Returns true if the block type is dynamic, or false otherwise. A dynamic
	 * block is one which defers its rendering to occur on-demand at runtime.

Advertisement

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Advertisement

Leave a Reply