'widget_mfn_tag_cloud', 'description' => __( 'Your most used tags in cloud format .', 'mfn-opts' ) ); parent::__construct( 'widget_mfn_tag_cloud', __( 'Muffin Tag Cloud', 'mfn-opts' ), $widget_ops ); $this->alt_option_name = 'widget_mfn_tag_cloud'; } /* --------------------------------------------------------------------------- * Outputs the HTML for this widget. * --------------------------------------------------------------------------- */ function widget( $args, $instance ) { if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = null; extract( $args, EXTR_SKIP ); echo $before_widget; $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base); if( $title ) echo $before_title . $title . $after_title; echo '
'; $args = array( 'number' => $instance['count'], 'orderby' => $instance['orderby'], 'order' => $instance['order'], 'taxonomy' => $instance['taxonomy'] ); $tags = get_terms( $args['taxonomy'], $args ); if( $tags ){ echo ''; } echo '
'; echo $after_widget; } /* --------------------------------------------------------------------------- * Deals with the settings when they are saved by the admin. * --------------------------------------------------------------------------- */ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['count'] = (int) $new_instance['count']; $instance['taxonomy'] = strip_tags( $new_instance['taxonomy'] ); $instance['orderby'] = strip_tags( $new_instance['orderby'] ); $instance['order'] = strip_tags( $new_instance['order'] ); return $instance; } /* --------------------------------------------------------------------------- * Displays the form for this widget on the Widgets page of the WP Admin area. * --------------------------------------------------------------------------- */ function form( $instance ) { $title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : ''; $count = isset( $instance['count'] ) ? absint( $instance['count'] ) : 10; $taxonomy = isset( $instance['taxonomy']) ? esc_attr( $instance['taxonomy'] ) : 'post_tag'; $orderby = isset( $instance['orderby']) ? esc_attr( $instance['orderby'] ) : 'name'; $order = isset( $instance['order']) ? esc_attr( $instance['order'] ) : 'ASC'; ?>

[1-45]