'blogexpress_author_widget', 'description' => esc_html__('Displays authors details in post.', 'blogexpress'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'blogexpress'), 'type' => 'text', 'class' => 'widefat', ), 'image_bg_url' => array( 'label' => esc_html__('Widget Background Image:', 'blogexpress'), 'type' => 'image', ), 'author-name' => array( 'label' => esc_html__('Name:', 'blogexpress'), 'type' => 'text', 'class' => 'widefat', ), 'description' => array( 'label' => esc_html__('Description:', 'blogexpress'), 'type' => 'textarea', 'class' => 'widget-content widefat' ), 'image_url' => array( 'label' => esc_html__('Author Image:', 'blogexpress'), 'type' => 'image', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'blogexpress'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'blogexpress'), 'type' => 'url', 'class' => 'widefat', ), 'url-lt' => array( 'label' => esc_html__('Linkedin URL:', 'blogexpress'), 'type' => 'url', 'class' => 'widefat', ), 'url-ig' => array( 'label' => esc_html__('Instagram URL:', 'blogexpress'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('blogexpress-author-layout', esc_html__('BlogExpress: Author Widget', 'blogexpress'), $opts, array(), $fields); } /** * Outputs the content for the current widget instance. * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. * @since 1.0.0 * */ function widget($args, $instance) { $params = $this->get_params($instance); echo $args['before_widget']; if( !empty( $params['title'] ) ){ echo $args['before_title'] . esc_html( $params['title'] ) . $args['after_title']; } ?>
">