text_fields = array('em-author-info-title', 'em-author-info-subtitle', 'em-author-info-image', 'em-author-info-name', 'em-author-info-desc'); $this->url_fields = array('em-author-info-facebook', 'em-author-info-twitter', 'em-author-info-linkedin'); $widget_ops = array( 'classname' => 'elegant_magazine_author_info_widget', 'description' => __('Displays author info.', 'elegant-magazine'), 'customize_selective_refresh' => true, ); parent::__construct('elegant_magazine_author_info', __('EM Author Info', 'elegant-magazine'), $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) { echo $args['before_widget']; $title = apply_filters('widget_title', $instance['em-author-info-title'], $instance, $this->id_base); $subtitle = isset($instance['em-author-info-subtitle']) ? ($instance['em-author-info-subtitle']) : ''; $profile_image = isset($instance['em-author-info-image']) ? ($instance['em-author-info-image']) : ''; $name = isset($instance['em-author-info-name']) ? ($instance['em-author-info-name']) : ''; $desc = isset($instance['em-author-info-desc']) ? ($instance['em-author-info-desc']) : ''; $facebook = isset($instance['em-author-info-facebook']) ? ($instance['em-author-info-facebook']) : ''; $twitter = isset($instance['em-author-info-twitter']) ? ($instance['em-author-info-twitter']) : ''; $linkedin = isset($instance['em-author-info-linkedin']) ? ($instance['em-author-info-linkedin']) : ''; ?>