esc_html__('A widget that shows about us information', 'buzzstore') )); } private function widget_fields() { $fields = array( 'buzzstore_about_title' => array( 'buzzstore_widgets_name' => 'buzzstore_about_title', 'buzzstore_widgets_title' => esc_html__( 'Heading', 'buzzstore' ), 'buzzstore_widgets_field_type' => 'text', ), 'buzzstore_about_ptitle' => array( 'buzzstore_widgets_name' => 'buzzstore_about_ptitle', 'buzzstore_widgets_title' => esc_html__( 'Title', 'buzzstore' ), 'buzzstore_widgets_field_type' => 'text', ), 'buzzstore_about_logo' => array( 'buzzstore_widgets_name' => 'buzzstore_about_logo', 'buzzstore_widgets_title' => esc_html__('Upload Logo Image', 'buzzstore'), 'buzzstore_widgets_field_type' => 'upload', ), 'buzzstore_about_short_desc' => array( 'buzzstore_widgets_name' => 'buzzstore_about_short_desc', 'buzzstore_widgets_title' => esc_html__('Short Description', 'buzzstore'), 'buzzstore_widgets_field_type' => 'textarea', 'buzzstore_widgets_row' => '3' ), 'buzzstore_facebook_url' => array( 'buzzstore_widgets_name' => 'buzzstore_facebook_url', 'buzzstore_widgets_title' => esc_html__('Facebook Url', 'buzzstore'), 'buzzstore_widgets_field_type' => 'url', ), 'buzzstore_twitter_url' => array( 'buzzstore_widgets_name' => 'buzzstore_twitter_url', 'buzzstore_widgets_title' => esc_html__('Twitter Url', 'buzzstore'), 'buzzstore_widgets_field_type' => 'url', ), 'buzzstore_youtube_url' => array( 'buzzstore_widgets_name' => 'buzzstore_youtube_url', 'buzzstore_widgets_title' => esc_html__('Youtube Url', 'buzzstore'), 'buzzstore_widgets_field_type' => 'url', ), 'buzzstore_instagram_url' => array( 'buzzstore_widgets_name' => 'buzzstore_instagram_url', 'buzzstore_widgets_title' => esc_html__('Instagram Url', 'buzzstore'), 'buzzstore_widgets_field_type' => 'url', ), 'buzzstore_pinterest_url' => array( 'buzzstore_widgets_name' => 'buzzstore_pinterest_url', 'buzzstore_widgets_title' => esc_html__('Pinterest Url', 'buzzstore'), 'buzzstore_widgets_field_type' => 'url', ), ); return $fields; } public function widget($args, $instance) { extract($args); extract($instance); $buzzstore_about_title = empty( $instance['buzzstore_about_title'] ) ? '' : $instance['buzzstore_about_title']; $buzzstore_about_ptitle = empty( $instance['buzzstore_about_ptitle'] ) ? '' : $instance['buzzstore_about_ptitle']; $logo = empty( $instance['buzzstore_about_logo'] ) ? '' : $instance['buzzstore_about_logo']; $shor_desc = empty( $instance['buzzstore_about_short_desc'] ) ? '' : $instance['buzzstore_about_short_desc']; $facebook = empty( $instance['buzzstore_facebook_url'] ) ? '' : $instance['buzzstore_facebook_url']; $twitter = empty( $instance['buzzstore_twitter_url'] ) ? '' : $instance['buzzstore_twitter_url']; $googleplus = empty( $instance['buzzstore_googleplus_url'] ) ? '' : $instance['buzzstore_googleplus_url']; $youtube = empty( $instance['buzzstore_youtube_url'] ) ? '' : $instance['buzzstore_youtube_url']; $instagram = empty( $instance['buzzstore_instagram_url'] ) ? '' : $instance['buzzstore_instagram_url']; $pinterest = empty( $instance['buzzstore_pinterest_url'] ) ? '' : $instance['buzzstore_pinterest_url']; echo $before_widget; ?>
widget_fields(); foreach ($widget_fields as $widget_field) { extract($widget_field); $instance[$buzzstore_widgets_name] = buzzstore_widgets_updated_field_value($widget_field, $new_instance[$buzzstore_widgets_name]); } return $instance; } public function form($instance) { $widget_fields = $this->widget_fields(); foreach ($widget_fields as $widget_field) { extract($widget_field); $buzzstore_widgets_field_value = !empty($instance[$buzzstore_widgets_name]) ? esc_attr($instance[$buzzstore_widgets_name]) : ''; buzzstore_widgets_show_widget_field($this, $widget_field, $buzzstore_widgets_field_value); } } }