WP_Widget_Block::form( array $instance )
Outputs the Block widget settings form.
Description
See also
Parameters
- $instance
-
(array) (Required) Current instance.
Source
File: wp-includes/widgets/class-wp-widget-block.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 echo __( '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 }
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_widget_block/form