'widget_text', 'description' => __('Arbitrary text or HTML.')); $control_ops = array('width' => 400, 'height' => 350); parent::__construct('text', __('Text'), $widget_ops, $control_ops); } /** * @param array $args * @param array $instance */ public function widget( $args, $instance ) { /** This filter is documented in wp-includes/default-widgets.php */ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); /** * Filter the content of the Text widget. * * @since 2.3.0 * * @param string $widget_text The widget content. * @param WP_Widget $instance WP_Widget instance. */ $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ?>
'', 'text' => '' ) ); $filter = isset( $instance['filter'] ) ? $instance['filter'] : 0; $title = sanitize_text_field( $instance['title'] ); ?>

/>