WP_Block_Type::render( array $attributes = array(), string $content = '' )
Renders the block type output for given attributes.
Description Description
Parameters Parameters
- $attributes
-
(array) (Optional) Block attributes.
Default value: array()
- $content
-
(string) (Optional) Block content.
Default value: ''
Return Return
(string) Rendered block type output.
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 ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |