esc_html__( 'The Blog author Socials', 'adena'), ) ); } // Creating widget front-end public function widget( $args, $instance ) { // Get Data $title = apply_filters( 'widget_title', $instance['title'] ); $tw = $instance[ 'tw' ]; $fb = $instance[ 'fb' ]; $gp = $instance[ 'gp' ]; $in = $instance[ 'in' ]; $yt = $instance[ 'yt' ]; $html = ''; $html .= '
'.esc_html__('Leave blank to disable it', 'adena').'
'.esc_html__('Leave blank to disable it', 'adena').'
'.esc_html__('Leave blank to disable it', 'adena').'
'.esc_html__('Leave blank to disable it', 'adena').'
'.esc_html__('Leave blank to disable it', 'adena').'
'; un_echo( $html, 'html' ); } // Updating widget replacing old instances with new public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; $instance['tw'] = ( ! empty( $new_instance['tw'] ) ) ? strip_tags( $new_instance['tw'] ) : ''; $instance['fb'] = ( ! empty( $new_instance['fb'] ) ) ? strip_tags( $new_instance['fb'] ) : ''; $instance['gp'] = ( ! empty( $new_instance['gp'] ) ) ? strip_tags( $new_instance['gp'] ) : ''; $instance['in'] = ( ! empty( $new_instance['in'] ) ) ? strip_tags( $new_instance['in'] ) : ''; $instance['yt'] = ( ! empty( $new_instance['yt'] ) ) ? strip_tags( $new_instance['yt'] ) : ''; return $instance; } } // Class wpb_widget ends here // Register and load the widget function un_follow_me_load() { register_widget( 'un_follow_me' ); } add_action( 'widgets_init', 'un_follow_me_load' );