WordPress at a glance
function is not described

WP_Widget_Custom_HTML::form() public WP 4.8.1

Outputs the Custom HTML widget settings form.

{} It's a method of the class: WP_Widget_Custom_HTML{}

No Hooks.

Return

null. Nothing.

Usage

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

Notes

  • See: WP_Widget_Custom_HTML::render_control_template_scripts()

Changelog

Since 4.8.1 Introduced.
Since 4.9.0 The form contains only hidden sync inputs. For the control UI, see WP_Widget_Custom_HTML::render_control_template_scripts().

Code of WP_Widget_Custom_HTML::form() WP 5.7.2

<?php
public function form( $instance ) {
	$instance = wp_parse_args( (array) $instance, $this->default_instance );
	?>
	<input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="title sync-input" type="hidden" value="<?php echo esc_attr( $instance['title'] ); ?>"/>
	<textarea id="<?php echo $this->get_field_id( 'content' ); ?>" name="<?php echo $this->get_field_name( 'content' ); ?>" class="content sync-input" hidden><?php echo esc_textarea( $instance['content'] ); ?></textarea>
	<?php
}