Exemplo n.º 1
0
 function Widget($args, $settings)
 {
     # Load options
     $this->load_options($settings);
     unset($settings);
     # Check if the Taxonomy is alive
     if (!Taxonomy_Exists($this->Get_Option('taxonomy'))) {
         return False;
     }
     # Display Widget
     echo $args['before_widget'];
     echo $args['before_title'] . Apply_Filters('widget_title', $this->get_option('title'), $this->arr_option, $this->id_base) . $args['after_title'];
     echo '<ul>';
     WP_Tag_Cloud(array('taxonomy' => $this->Get_Option('taxonomy'), 'number' => $this->Get_Option('number'), 'order' => $this->Get_Option('order'), 'orderby' => $this->Get_Option('orderby'), 'exclude' => $this->Get_Option('exclude')));
     echo '</ul>';
     echo $args['after_widget'];
 }
 function Widget($args, $settings)
 {
     // Load options
     $this->load_options($settings);
     unset($settings);
     // Check if the Taxonomy is alive
     if (!Taxonomy_Exists($this->Get_Option('taxonomy'))) {
         return False;
     }
     // Display Widget
     echo $args['before_widget'];
     echo $args['before_title'] . Apply_Filters('widget_title', $this->get_option('title'), $settings, $this->id_base) . $args['after_title'];
     echo '<ul>';
     WP_List_Categories(array('taxonomy' => $this->Get_Option('taxonomy'), 'show_count' => $this->Get_Option('count'), 'number' => $this->Get_Option('number'), 'order' => $this->Get_Option('order'), 'orderby' => $this->Get_Option('orderby'), 'exclude' => $this->Get_Option('exclude'), 'title_li' => ''));
     echo '</ul>';
     echo $args['after_widget'];
 }
Exemplo n.º 3
0
 function Filter_The_Tags($str_tag_list, $before, $separator, $after, $post_id)
 {
     $post = Get_Post($post_id);
     if (!Is_Admin()) {
         $gallery_taxonomy = 'gallery_tag';
         $taxonomy_exists = Taxonomy_Exists($gallery_taxonomy);
         $is_gallery = $post->post_type == $this->gallery_post_type->name;
         $uses_post_tags = Is_Object_in_Taxonomy($post->post_type, 'post_tag');
         $uses_gallery_tags = Is_Object_in_Taxonomy($post->post_type, $gallery_taxonomy);
         if ($taxonomy_exists && $is_gallery && !$uses_post_tags && $uses_gallery_tags) {
             $str_tag_list = Get_The_Term_List($post_id, $gallery_taxonomy, $before, $separator, $after);
         }
     }
     return $str_tag_list;
 }