WP_Block_Type::is_dynamic() WordPress Method

The is_dynamic() method for the WP_Block_Type class in Wordpress allows a block to be set as being dynamic. This means that the block will be rendered on the server and then sent to the client as an HTML string. This is useful for blocks that are not static, such as a block that contains a list of recent posts.

WP_Block_Type::is_dynamic() #

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.


Return

(bool) Whether block type is dynamic.


Top ↑

Source

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

	public function is_dynamic() {
		return is_callable( $this->render_callback );
	}


Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.