'anderson_social_icons', 'description' => __('Displays your Social Icons', 'anderson-lite') ); $this->WP_Widget('anderson_social_icons', 'Social Icons (Anderson)', $widget_ops); } function widget($args, $instance) { $cache = wp_cache_get('widget_anderson_social_icons', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo $cache[ $args['widget_id'] ]; return; } ob_start(); extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); // Output echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>
flush_widget_cache(); return $instance; } function flush_widget_cache() { wp_cache_delete('widget_anderson_social_icons', 'widget'); } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; ?>