'widget_text', 'description' => esc_html__( 'An widget to upload About Content and images in sidebar.', 'bloz' ), ); parent::__construct( 'widget_about', esc_html__('TO: About Us Widget','bloz'), $widget_ops ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { extract( $args , EXTR_SKIP ); $tpiw_title = ( ! empty( $instance['title'] ) ) ? ( $instance['title'] ) : ''; $tpiw_title = apply_filters( 'widget_title', $tpiw_title , $instance, $this->id_base ); $tpiw_name = ( ! empty( $instance['name'] ) ) ? ( $instance['name'] ) : ''; $tpiw_description = ( ! empty( $instance['description'] ) ) ? ( $instance['description'] ) : ''; $tpiw_image_url = ! empty( $instance['tpiw_image_url'] ) ? $instance['tpiw_image_url'] : ''; $open_link = ! empty( $instance['open_link'] ) ? true : false; $target = ( empty( $open_link ) ) ? '' : 'target="_blank"'; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3; echo $args['before_widget']; if ( ! empty( $tpiw_title ) ) { echo $args['before_title'] . esc_html( $tpiw_title ) . $args['after_title']; } ?>
'', 'name' => '', 'description' => '', 'tpiw_image_url' => '', 'tpiw_link' => '', 'number' => 3, 'open_link' => 0, ) ); $tpiw_title = htmlspecialchars( $instance['title'] ); $tpiw_name = htmlspecialchars( $instance['name'] ); $tpiw_description = htmlspecialchars( $instance['description'] ); $tpiw_image_url = isset( $instance['tpiw_image_url'] ) ? $instance['tpiw_image_url'] : ''; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3; $open_link = isset( $instance['open_link'] ) ? $instance['open_link'] : false; ?>
/>