__( 'Social Widget', 'apoc' ), ) ); } /** * 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 ) { $title = apply_filters( 'widget_title', $instance['title'] ); $email = is_email( $instance['email'] ); $facebook = esc_url( $instance['facebook'] ); $twitter = esc_url( $instance['twitter'] ); $instagram = esc_url( $instance['instagram'] ); $google_plus = esc_url( $instance['google_plus'] ); $youtube = esc_url( $instance['youtube'] ); $foursquare = esc_url( $instance['foursquare'] ); $flickr = esc_url( $instance['flickr'] ); $pinterest = esc_url( $instance['pinterest'] ); $github = esc_url( $instance['github'] ); $rss = esc_url( $instance['rss'] ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } echo '
'; echo $args['after_widget']; } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; $email = isset( $instance[ 'email' ] ) ? $instance[ 'email' ] : ''; $facebook = isset( $instance[ 'facebook' ] ) ? $instance[ 'facebook' ] : ''; $twitter = isset( $instance[ 'twitter' ] ) ? $instance[ 'twitter' ] : ''; $instagram = isset( $instance[ 'instagram' ] ) ? $instance[ 'instagram' ] : ''; $google_plus = isset( $instance[ 'google_plus' ] ) ? $instance[ 'google_plus' ] : ''; $youtube = isset( $instance[ 'youtube' ] ) ? $instance[ 'youtube' ] : ''; $foursquare = isset( $instance[ 'foursquare' ] ) ? $instance[ 'foursquare' ] : ''; $flickr = isset( $instance[ 'flickr' ] ) ? $instance[ 'flickr' ] : ''; $pinterest = isset( $instance[ 'pinterest' ] ) ? $instance[ 'pinterest' ] : ''; $github = isset( $instance[ 'github' ] ) ? $instance[ 'github' ] : ''; $rss = isset( $instance[ 'rss' ] ) ? $instance[ 'rss' ] : ''; ?>