public function form($instance) { $webnus_options = new webnus_options(); extract($instance); ?> <p> <label for="<?php echo $this->get_field_id('title'); ?> ">Title:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " value="<?php if (isset($title)) { echo esc_attr($title); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('twitter_link'); ?> ">Twitter URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('twitter_link'); ?> " name="<?php echo $this->get_field_name('twitter_link'); ?> " value="<?php $twitter = $webnus_options->webnus_twitter_ID(); if (empty($twitter_link)) { echo $twitter; } else { echo esc_attr($twitter_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('facebook_link'); ?> ">Facebook URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('facebook_link'); ?> " name="<?php echo $this->get_field_name('facebook_link'); ?> " value="<?php $facebook = $webnus_options->webnus_facebook_ID(); if (empty($facebook_link)) { echo $facebook; } else { echo esc_attr($facebook_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('youtube_link'); ?> ">Youtube URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('youtube_link'); ?> " name="<?php echo $this->get_field_name('youtube_link'); ?> " value="<?php $youtube = $webnus_options->webnus_youtube_ID(); if (empty($youtube_link)) { echo $youtube; } else { echo esc_attr($youtube_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('linkedin_link'); ?> ">Linkedin URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('linkedin_link'); ?> " name="<?php echo $this->get_field_name('linkedin_link'); ?> " value="<?php $linkedin = $webnus_options->webnus_linkedin_ID(); if (empty($linkedin_link)) { echo $linkedin; } else { echo esc_attr($linkedin_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('dribbble_link'); ?> ">Dribbble URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('dribbble_link'); ?> " name="<?php echo $this->get_field_name('dribbble_link'); ?> " value="<?php $dribbble = $webnus_options->webnus_dribbble_ID(); if (empty($dribbble_link)) { echo $dribbble; } else { echo esc_attr($dribbble_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('pinterest_link'); ?> ">Pinterest URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('pinterest_link'); ?> " name="<?php echo $this->get_field_name('pinterest_link'); ?> " value="<?php $pinterest = $webnus_options->webnus_pinterest_ID(); if (empty($pinterest_link)) { echo $pinterest; } else { echo esc_attr($pinterest_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('vimeo_link'); ?> ">Vimeo URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('vimeo_link'); ?> " name="<?php echo $this->get_field_name('vimeo_link'); ?> " value="<?php $vimeo = $webnus_options->webnus_vimeo_ID(); if (empty($vimeo_link)) { echo $vimeo; } else { echo esc_attr($vimeo_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('gplus_link'); ?> ">Google Pluse URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('gplus_link'); ?> " name="<?php echo $this->get_field_name('gplus_link'); ?> " value="<?php $gplus = $webnus_options->webnus_google_ID(); if (empty($gplus_link)) { echo $gplus; } else { echo esc_attr($gplus_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('rss_link'); ?> ">Rss URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('rss_link'); ?> " name="<?php echo $this->get_field_name('rss_link'); ?> " value="<?php $rss = $webnus_options->webnus_rss_ID(); if (empty($rss_link)) { echo $rss; } else { echo esc_attr($rss_link); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('instagram_link'); ?> ">Instagram URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('instagram_link'); ?> " name="<?php echo $this->get_field_name('instagram_link'); ?> " value="<?php $instagram = $webnus_options->webnus_instagram_ID(); if (empty($instagram)) { $instagram = ''; } if (empty($instagram_link)) { echo $instagram; } else { echo esc_attr(!empty($instagram_link) ? $instagram_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('flickr_link'); ?> ">Flickr URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('flickr_link'); ?> " name="<?php echo $this->get_field_name('flickr_link'); ?> " value="<?php $flickr = $webnus_options->webnus_flickr_ID(); if (empty($flickr)) { $flickr = ''; } if (empty($flickr_link)) { echo $flickr; } else { echo esc_attr(!empty($flickr_link) ? $flickr_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('reddit_link'); ?> ">Reddit URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('reddit_link'); ?> " name="<?php echo $this->get_field_name('reddit_link'); ?> " value="<?php $reddit = $webnus_options->webnus_reddit_ID(); if (empty($reddit)) { $reddit = ''; } if (empty($reddit_link)) { echo $reddit; } else { echo esc_attr(!empty($reddit_link) ? $reddit_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('lastfm_link'); ?> ">Lastfm URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('lastfm_link'); ?> " name="<?php echo $this->get_field_name('lastfm_link'); ?> " value="<?php $lastfm = $webnus_options->webnus_lastfm_ID(); if (empty($lastfm_link)) { echo $lastfm; } else { echo esc_attr(!empty($lastfm_link) ? $lastfm_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('delicious_link'); ?> ">Delicious URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('delicious_link'); ?> " name="<?php echo $this->get_field_name('delicious_link'); ?> " value="<?php $delicious = $webnus_options->webnus_delicious_ID(); if (empty($delicious)) { $delicious = ''; } if (empty($delicious_link)) { echo $delicious; } else { echo esc_attr(!empty($delicious_link) ? $delicious_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('tumblr_link'); ?> ">Tumblr URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('tumblr_link'); ?> " name="<?php echo $this->get_field_name('tumblr_link'); ?> " value="<?php $tumblr = $webnus_options->webnus_tumblr_ID(); if (empty($tumblr_link)) { echo $tumblr; } else { echo esc_attr(!empty($tumblr_link) ? $tumblr_link : ''); } ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('skype_link'); ?> ">Skype URL:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id('skype_link'); ?> " name="<?php echo $this->get_field_name('skype_link'); ?> " value="<?php $skype = $webnus_options->webnus_skype_ID(); if (empty($skype)) { $skype = ''; } if (empty($skype_link)) { echo $skype; } else { echo esc_attr(!empty($skype_link) ? $skype_link : ''); } ?> " /> </p> <?php }