WP_Block_Type::render
Renders the block type output for given attributes.
Метод класса: WP_Block_Type{}
Хуков нет.
Возвращает
string. Rendered block type output.
Использование
$WP_Block_Type = new WP_Block_Type(); $WP_Block_Type->render( $attributes, $content );
- $attributes(массив)
- Block attributes.
По умолчанию:empty array - $content(строка)
- Block content.
По умолчанию:empty string
Список изменений
| С версии 5.0.0 | Введена. |
Код WP_Block_Type::render() WP Block Type::render WP 7.1.4
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 );
}