WP_Widget_Block::form()publicWP 5.8.0

Outputs the Block widget settings form.

Method of the class: WP_Widget_Block{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Widget_Block = new WP_Widget_Block();
$WP_Widget_Block->form( $instance );
$instance(array) (required)
Current instance.

Notes

Changelog

Since 5.8.0 Introduced.

WP_Widget_Block::form() code WP 6.5.3

<?php
public function form( $instance ) {
	$instance = wp_parse_args( (array) $instance, $this->default_instance );
	?>
	<p>
		<label for="<?php echo $this->get_field_id( 'content' ); ?>">
			<?php
			/* translators: HTML code of the block, not an option that blocks HTML. */
			_e( 'Block HTML:' );
			?>
		</label>
		<textarea id="<?php echo $this->get_field_id( 'content' ); ?>" name="<?php echo $this->get_field_name( 'content' ); ?>" rows="6" cols="50" class="widefat code"><?php echo esc_textarea( $instance['content'] ); ?></textarea>
	</p>
	<?php
}