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