function display_cloud_tag() { //echo '<script src="jquery.js" type="text/javascript">; $options['cloud_tag_width'] = get_option('cloud_tag_width'); $options['tag_cloud_height'] = get_option('tag_cloud_height'); $options['tag_cloud_background_color'] = get_option('tag_cloud_background_color'); if (isset($options['cloud_tag_width']) && $options['cloud_tag_width'] != "") { $options['cloud_tag_width'] = $options['cloud_tag_width']; } else { $options['cloud_tag_width'] = 300; } if (isset($options['tag_cloud_height']) && $options['tag_cloud_height'] != "") { $options['tag_cloud_height'] = $options['tag_cloud_height']; } else { $options['tag_cloud_height'] = 300; } if (isset($options['tag_cloud_background_color']) && $options['tag_cloud_background_color'] != "") { $options['tag_cloud_background_color'] = '#' . $options['tag_cloud_background_color']; } else { $options['tag_cloud_background_color'] = '#000'; } echo '<div id="div_tag_cloud" style="width:' . $options['cloud_tag_width'] . 'px;height:' . $options['tag_cloud_height'] . 'px; word-wrap: break-word;">'; echo '<canvas width="' . $options['cloud_tag_width'] . 'px" height="' . $options['tag_cloud_height'] . 'px" id="myCanvas" style="background-color:' . $options['tag_cloud_background_color'] . ';">'; //wp_tag_cloud( $args = array('format'=> 'flat') ); $tag = wp_tag_cloud('smallest=14&largest=30&number=50&orderby=count&format=array'); foreach ($tag as $tags) { echo "{$tags} "; } echo '</canvas>'; echo '</div>'; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $taxonomy = $instance['taxonomy']; $format = $instance['format']; $order = $instance['order']; $orderby = $instance['orderby']; $unit = $instance['unit']; $largest = (int) $instance['largest']; $smallest = (int) $instance['smallest']; $number = (int) $instance['number']; $exclude = $instance['exclude']; $include = $instance['include']; $link = $instance['link']; if (!$largest) { $largest = 22; } if (!$smallest) { $smallest = 8; } $tags = array('taxonomy' => $taxonomy, 'smallest' => $smallest, 'largest' => $largest, 'unit' => $unit, 'number' => $number, 'format' => $format, 'orderby' => $orderby, 'order' => $order, 'exclude' => $exclude, 'include' => $include, 'link' => $link, 'echo' => 0); echo "\n\t\t\t" . $before_widget; if ($title) { echo "\n\t\t\t\t" . $before_title . $title . $after_title; } if ($format == 'flat') { echo "\n\t\t\t\t" . '<p class="tag-cloud">'; echo "\n\t\t\t\t\t" . str_replace(array("\r", "\n", "\t"), ' ', wp_tag_cloud($tags)); echo "\n\t\t\t\t" . '</p><!-- .tag-cloud -->'; } else { echo "\n\t\t\t\t" . str_replace(array("\r", "\n", "\t"), '', wp_tag_cloud($tags)); } echo "\n\t\t\t" . $after_widget; }
function widget($args, $instance) { //get theme options if (isset($instance['title'])) { $title = $instance['title']; } else { $title = __('Tags', 'dfd'); } if (isset($instance['number'])) { $number = $instance['number']; } extract($args); /* show the widget content without any headers or wrappers */ echo $before_widget; if ($title) { echo $before_title; echo $title; echo $after_title; } ?> <div class="tags-widget clearfix"> <?php wp_tag_cloud('smallest=10&largest=20&number=' . $number); ?> </div> <?php echo $after_widget; }
/** * Outputs the widget based on the arguments input through the widget controls. * @since 0.6 */ function widget($args, $instance) { extract($args); /* Set up the arguments for wp_tag_cloud(). */ $args = array('taxonomy' => $instance['taxonomy'], 'largest' => !empty($instance['largest']) ? absint($instance['largest']) : 22, 'smallest' => !empty($instance['smallest']) ? absint($instance['smallest']) : 8, 'number' => intval($instance['number']), 'child_of' => intval($instance['child_of']), 'parent' => !empty($instance['parent']) ? intval($instance['parent']) : '', 'separator' => !empty($instance['separator']) ? $instance['separator'] : "\n", 'pad_counts' => !empty($instance['pad_counts']) ? true : false, 'hide_empty' => !empty($instance['hide_empty']) ? true : false, 'unit' => $instance['unit'], 'format' => $instance['format'], 'include' => !empty($instance['include']) ? join(', ', $instance['include']) : '', 'exclude' => !empty($instance['exclude']) ? join(', ', $instance['exclude']) : '', 'order' => $instance['order'], 'orderby' => $instance['orderby'], 'link' => $instance['link'], 'search' => $instance['search'], 'name__like' => $instance['name__like'], 'echo' => false); if (!empty($instance['topic_count_text_callback']) && function_exists($instance['topic_count_text_callback'])) { $args['topic_count_text_callback'] = $instance['topic_count_text_callback']; } if (!empty($instance['topic_count_scale_callback']) && function_exists($instance['topic_count_scale_callback'])) { $args['topic_count_scale_callback'] = $instance['topic_count_scale_callback']; } /* Output the theme's $before_widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if (!empty($instance['title'])) { echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title; } /* Get the tag cloud. */ $tags = str_replace(array("\r", "\n", "\t"), ' ', wp_tag_cloud($args)); /* If $format should be flat, wrap it in the <p> element. */ if ('flat' == $instance['format']) { $tags = '<p class="' . $instance['taxonomy'] . '-cloud term-cloud">' . $tags . '</p>'; } /* Output the tag cloud. */ echo $tags; /* Close the theme's widget wrapper. */ echo $after_widget; }
/** * Outputs the widget based on the arguments input through the widget controls. * * @since 0.6.0 */ function widget($sidebar, $instance) { extract($sidebar); /* Set the $args for wp_tag_cloud() to the $instance array. */ $args = $instance; /* Make sure empty callbacks aren't passed for custom functions. */ $args['topic_count_text_callback'] = !empty($args['topic_count_text_callback']) ? $args['topic_count_text_callback'] : 'default_topic_count_text'; $args['topic_count_scale_callback'] = !empty($args['topic_count_scale_callback']) ? $args['topic_count_scale_callback'] : 'default_topic_count_scale'; /* If the separator is empty, set it to the default new line. */ $args['separator'] = !empty($args['separator']) ? $args['separator'] : "\n"; /* Overwrite the echo argument. */ $args['echo'] = false; /* Output the theme's $before_widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if (!empty($instance['title'])) { echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title; } /* Get the tag cloud. */ $tags = str_replace(array("\r", "\n", "\t"), ' ', wp_tag_cloud($args)); /* If $format should be flat, wrap it in the <p> element. */ if ('flat' == $instance['format']) { $classes = array('term-cloud'); foreach ($instance['taxonomy'] as $tax) { $classes[] = sanitize_html_class("{$tax}-cloud"); } $tags = '<p class="' . join($classes, ' ') . '">' . $tags . '</p>'; } /* Output the tag cloud. */ echo $tags; /* Close the theme's widget wrapper. */ echo $after_widget; }
function widget($args, $instance) { $before_widget = $before_title = $after_title = $after_widget = ''; extract($args); $current_taxonomy = $this->_get_current_taxonomy($instance); if (!empty($instance['title'])) { $title = $instance['title']; } else { if ('post_tag' == $current_taxonomy) { $title = __('Tags', 'zn_framework'); } else { $tax = get_taxonomy($current_taxonomy); $title = $tax->labels->name; } } $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo '<div class="tagcloud">'; wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy, 'smallest' => '75', 'largest' => '200', 'unit' => '%'))); echo "</div>\n"; echo $after_widget; }
function tag_cloud_block($options) { $mydirname = empty($options[0]) ? 'xpress' : $options[0]; $this_template = empty($options[1]) ? 'db:' . $mydirname . '_block_meta.html' : trim($options[1]); $smallest = !is_numeric($options[2]) ? 8 : $options[2]; $largest = !is_numeric($options[3]) ? 22 : $options[3]; $unit = empty($options[4]) ? 'pt' : $options[4]; $number = !is_numeric($options[5]) ? 45 : $options[5]; $format = empty($options[6]) ? 'flat' : $options[6]; $orderby = empty($options[7]) ? 'name' : $options[7]; $order = empty($options[8]) ? 'ASC' : $options[8]; $exclude = is_null($options[9]) ? '' : $options[9]; $wp_include = is_null($options[10]) ? '' : $options[10]; $param = array('smallest' => $smallest, 'largest' => $largest, 'unit' => $unit, 'number' => $number, 'format' => $format, 'orderby' => $orderby, 'order' => $order, 'exclude' => $exclude, 'include' => $wp_include); if (function_exists('wp_tag_cloud')) { ob_start(); wp_tag_cloud($param); $output = ob_get_contents(); ob_end_clean(); } else { $output = 'not function wp_tag_cloud()'; } $block['tag_cloud'] = $output; return $block; }
/** * @param array $args * @param array $instance */ public function widget($args, $instance) { $current_taxonomy = $this->_get_current_taxonomy($instance); if (!empty($instance['title'])) { $title = $instance['title']; } else { if ('post_tag' == $current_taxonomy) { $title = __('Tags'); } else { $tax = get_taxonomy($current_taxonomy); $title = $tax->labels->name; } } /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $args['before_widget']; if ($title) { echo $args['before_title'] . $title . $args['after_title']; } echo '<div class="tagcloud">'; /** * Filter the taxonomy used in the Tag Cloud widget. * * @since 2.8.0 * @since 3.0.0 Added taxonomy drop-down. * * @see wp_tag_cloud() * * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'. */ wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy))); echo "</div>\n"; echo $args['after_widget']; }
function widget($args, $widgetData) { extract($args); //=======> Our variables from the widget settings. $kbe_widget_tag_title = $widgetData['txtKbeTagsHeading']; $kbe_widget_tag_count = $widgetData['txtKbeTagsCount']; $kbe_widget_tag_style = $widgetData['txtKbeTagsStyle']; //=======> widget body echo $before_widget; echo '<div class="kbe_widget kbe_widget_article">'; if ($kbe_widget_tag_title) { echo '<h2>' . $kbe_widget_tag_title . '</h2>'; } ?> <div class="kbe_tags_widget"> <?php $args = array('smallest' => 12, 'largest' => 30, 'unit' => 'px', 'number' => $kbe_widget_tag_count, 'format' => $kbe_widget_tag_style, 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC', 'exclude' => null, 'include' => null, 'topic_count_text_callback' => default_topic_count_text, 'link' => 'view', 'taxonomy' => KBE_POST_TAGS, 'echo' => true); wp_tag_cloud($args); wp_reset_query(); ?> </div> <?php echo "</div>"; echo $after_widget; }
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); /* Our variables from the widget settings. */ $title = apply_filters('widget_title', $instance['title']); $number = $instance['number']; /* Before widget (defined by themes). */ echo $before_widget; /* Display the widget title if one was input (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } ?> <div class="tag-cloud"> <?php wp_tag_cloud(array('smallest' => 12, 'largest' => 12, 'unit' => 'px', 'number' => $number, 'orderby' => 'count', 'order' => 'DESC')); ?> </div> <?php /* After widget (defined by themes). */ echo $after_widget; }
/** * How to display the widget on the screen. */ function widget($args, $instance) { extract($args); /* Our variables from the widget settings. */ $title = apply_filters('widget_title', $instance['title']); /* Before widget (defined by themes). */ echo $before_widget; /* Display the widget title if one was input (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } ?> <div class="tag-cloud"> <?php wp_tag_cloud('smallest=12&largest=12&unit=px&number=40&orderby=count&order=DESC'); ?> </div> <?php /* After widget (defined by themes). */ echo $after_widget; }
public function widget($args, $instance) { extract($args); $current_taxonomy = $this->_get_current_taxonomy($instance); if (!empty($instance['title'])) { $title = $instance['title']; } else { if ('post_tag' == $current_taxonomy) { $title = 'Tags'; } else { $tax = get_taxonomy($current_taxonomy); $title = $tax->labels->name; } } $title = apply_filters('widget_title', $title, $instance, $this->id_base); $before_widget = '<div class="widget-container kk_widget_tag_cloud">'; $after_widget = '</div>'; $before_title = '<h1 class="widget-title">'; $after_title = '</h1>'; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo '<div class="kk_tagcloud">'; wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy))); echo "</div>\n"; echo $after_widget; }
/** * Widget * Display the widget in the sidebar * * @param array sidebar arguments * @param array instance */ public function widget($args, $instance) { // Get the widget cache from the transient $cache = get_transient('fflcommerce_widget_cache'); // If this tag cloud widget instance is cached, get from the cache if (isset($cache[$this->id])) { echo $cache[$this->id]; return false; } // Otherwise Start buffering and output the Widget ob_start(); // Extract the widget arguments extract($args); // Set the widget title $title = !empty($instance['title']) ? $instance['title'] : __('Product Tags', 'fflcommerce'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); // Print the widget wrapper & title echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } // Print tag cloud with wrapper echo '<div class="tagcloud">'; wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => 'product_tag'))); echo "</div>\n"; // Print closing widget wrapper echo $after_widget; // Flush output buffer and save to transient cache $result = ob_get_flush(); $cache[$this->id] = $result; set_transient('fflcommerce_widget_cache', $cache, 3600 * 3); // 3 hours ahead }
function widget($args, $instance) { extract($args); $current_taxonomy = $this->_get_current_taxonomy($instance); if (!empty($instance['title'])) { $title = $instance['title']; } else { if ('post_tag' == $current_taxonomy) { $title = __('Tags', 'tfuse'); } else { $tax = get_taxonomy($current_taxonomy); $title = $tax->labels->name; } } $title = apply_filters('widget_title', $title, $instance, $this->id_base); $before_widget = '<div id="tag_cloud-' . $args['widget_id'] . '" class="widget-container widget_tag_cloud">'; $after_widget = '</div>'; $before_title = '<h3 class="widget-title">'; $after_title = '</h3>'; echo $before_widget; $title = tfuse_qtranslate($title); if ($title) { echo $before_title . $title . $after_title; } echo '<div class="tagcloud">'; wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy))); echo "</div>\n"; echo $after_widget; }
/** * load widget * * @name widget * @author Cleber Santos <*****@*****.**> * @since 2014-10-27 * @updated 2014-10-27 * @param array $args - widget structure * @param array $instance - widget data * @return void */ function widget($args, $instance) { global $wpdb, $post; $blog_id = !empty($instance['blog']) ? $instance['blog'] : 1; if (function_exists('switch_to_blog')) { switch_to_blog($blog_id); } // pega o link do blog $blog_url = get_bloginfo('url'); print $args['before_widget']; if (!empty($instance['title'])) { print $args['before_head']; print "<a href='{$blog_url}' title='click para ver todas as tags'>" . $args['before_title'] . $instance['title'] . $args['after_title'] . "</a>"; print $args['after_head']; } print $args['before_body']; if (function_exists('wp_tag_cloud')) { $tags = wp_tag_cloud('format=array&smallest=8&largest=25'); // remove /blog/ do link foreach ($tags as $tag) { $tag = str_replace('/blog/', '/', $tag); echo $tag; } } print $args['after_body']; print $args['after_widget']; if (function_exists('restore_current_blog')) { restore_current_blog(); } }
public function widget($args, $instance) { $cache = wp_cache_get('widget_custom_post_type_tag_cloud', '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(); $title = apply_filters('widget_title', empty($instance['title']) ? __('Tags', 'custom-post-type-widgets') : $instance['title'], $instance, $this->id_base); $taxonomy = $instance['taxonomy']; echo $args['before_widget']; if ($title) { echo $args['before_title'] . $title . $args['after_title']; } echo '<div class="tagcloud">'; wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $taxonomy))); echo '</div>'; echo $args['after_widget']; }
echo get_post()->comment_count . ' '; } ?> </div> <div class="content-item-tab"> <a title="<?php the_title(); ?>
function widget_om_tags() { ?> <li id="tagCloud"><h2>Tag Cloud</h2><div class="pad"><?php wp_tag_cloud('smallest=8&largest=18&number=20'); ?> </div></li> <?php }
function widget($args, $instance) { ?> <div class="widget" id="tabbed-widget"> <div class="widget-container"> <div class="widget-top"> <ul class="tabs posts-taps"> <li class="tabs"><a href="#tab1"><?php _e('Popular', 'tie'); ?> </a></li> <li class="tabs"><a href="#tab2"><?php _e('Recent', 'tie'); ?> </a></li> <li class="tabs"><a href="#tab3"><?php _e('Comments', 'tie'); ?> </a></li> <li class="tabs" style="margin-left:0"><a href="#tab4"><?php _e('Tags', 'tie'); ?> </a></li> </ul> </div> <div id="tab1" class="tabs-wrap"> <ul> <?php tie_popular_posts(); ?> </ul> </div> <div id="tab2" class="tabs-wrap"> <ul> <?php tie_last_posts(); ?> </ul> </div> <div id="tab3" class="tabs-wrap"> <ul> <?php tie_most_commented(); ?> </ul> </div> <div id="tab4" class="tabs-wrap tagcloud"> <?php wp_tag_cloud($args = array('largest' => 8, 'number' => 25, 'orderby' => 'count', 'order' => 'DESC')); ?> </div> </div> </div><!-- .widget /--> <?php }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $socials = apply_filters('mars_social_profile_link', null); $tag_cloud = array('smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 20, 'format' => 'flat', 'separator' => ' ', 'orderby' => 'name', 'order' => 'ASC', 'exclude' => null, 'include' => null, 'link' => 'view', 'taxonomy' => array('post_tag', 'video_tag'), 'echo' => false); print $before_widget; print $before_title . $title . $after_title; print wp_tag_cloud($tag_cloud); print $after_widget; }
function results($instance) { $instance["echo"] = false; $args = array(); foreach ($instance as $name => $value) { if ($name != "title" && $name != "display_css") { $args[] = $name . "=" . $value; } } return wp_tag_cloud(join("&", $args)); }
Version : 1.0 Contact : metinsaylan (at) gmail (dot) com */ /** [tags] : outputs tag cloud */ function stf_tags_shortcode($args) { global $post; $defaults = array('echo' => false, 'number' => 7); $args = wp_parse_args($args, $defaults);
/** * Display product tag cloud. * * The text size is set by the 'smallest' and 'largest' arguments, which will * use the 'unit' argument value for the CSS text size unit. The 'format' * argument can be 'flat' (default), 'list', or 'array'. The flat value for the * 'format' argument will separate tags with spaces. The list value for the * 'format' argument will format the tags in a UL HTML list. The array value for * the 'format' argument will return in PHP array type format. * * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC'. * * The 'number' argument is how many tags to return. By default, the limit will * be to return the top 45 tags in the tag cloud list. * * The 'topic_count_text_callback' argument is a function, which, given the count * of the posts with that tag, returns a text for the tooltip of the tag link. * * The 'exclude' and 'include' arguments are used for the {@link get_tags()} * function. Only one should be used, because only one will be used and the * other ignored, if they are both set. * * @param bool $echo Optional. Whether or not to echo. * @param array|string $args Optional. Override default arguments. */ function mp_tag_cloud($echo = true, $args = array()) { $args['echo'] = false; $args['taxonomy'] = 'product_tag'; $cloud = '<div id="mp_tag_cloud">' . wp_tag_cloud($args) . '</div>'; if ($echo) { echo $cloud; } else { return $cloud; } }
/** Displays the Widget in the front-end. * * $args Display arguments including before_title, after_title, before_widget, and after_widget. * $instance The settings for the particular instance of the widget */ function widget($args, $instance) { extract($args); extract($instance); $title = empty($instance['title']) ? 'Tags' : $instance['title']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } wp_tag_cloud('smallest=13&largest=13px&unit=px'); echo $after_widget; }
/** * widget function. * * @see WP_Widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { $current_taxonomy = $this->_get_current_taxonomy($instance); if (empty($instance['title'])) { $taxonomy = get_taxonomy($current_taxonomy); $instance['title'] = $taxonomy->labels->name; } $this->widget_start($args, $instance); echo '<div class="tagcloud">'; wp_tag_cloud(apply_filters('woocommerce_product_tag_cloud_widget_args', array('taxonomy' => $current_taxonomy))); echo '</div>'; $this->widget_end($args); }
function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = apply_filters('widget_title', $instance['title']); if (!empty($title)) { echo $before_title . $title . $after_title; } //********************************* wp_tag_cloud('taxonomy=products_category&number=0&format=list&smallest=12&largest=12&unit=px'); //********************************* echo $after_widget; }
function get_HotTags($HotTags) { echo '<section class="aside-tags"> <ul class="aside-tags__list cf"> <li>'; $args = array('number' => $HotTags, 'smallest' => 16, 'largest' => 16, 'unit' => 'px', 'separator' => "</li><li>", 'orderby' => 'count', 'order' => 'DESC', 'exclude' => null, 'include' => null, 'topic_count_text_callback' => default_topic_count_text, 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true, 'child_of' => null); wp_tag_cloud($args); echo ' </li> </ul> </section>'; }
public function widget($p_args, $p_instance) { extract($p_args, EXTR_PREFIX_ALL, 'l_args'); if (!empty($p_instance['title'])) { $l_title = $p_instance['title']; } else { $l_current_tax = get_taxonomy($this->_get_current_taxonomy($p_instance)); $l_title = __('Tags', 'cool-tag-cloud'); $l_title = $l_current_tax->labels->name; } $l_title = apply_filters('widget_title', $l_title); echo $l_args_before_widget; echo $l_args_before_title . $l_title . $l_args_after_title; $l_tag_params = wp_parse_args($p_instance, $this->m_defaults); $l_tag_params["echo"] = 0; if ($l_tag_params["tooltip"] == 'No') { add_filter('wp_tag_cloud', 'ctc_remove_title_attributes'); } if ($l_tag_params["nofollow"] == 'Yes') { add_filter('wp_tag_cloud', 'ctc_nofollow_tag_cloud'); } $l_tag_cloud_text = wp_tag_cloud(apply_filters('widget_tag_cloud_args', $l_tag_params)); if ($l_tag_params["tooltip"] == 'No') { remove_filter('wp_tag_cloud', 'ctc_remove_title_attributes'); } if ($l_tag_params["nofollow"] == 'Yes') { remove_filter('wp_tag_cloud', 'ctc_nofollow_tag_cloud'); } echo '<div class="cool-tag-cloud">'; if ($l_tag_params["font-weight"] == "Bold") { echo '<div class="cloudbold">'; } if ($l_tag_params["animation"] == "Yes") { echo '<div class="animation">'; } echo '<div class="' . $l_tag_params["imagestyle"] . '">'; echo '<div class="' . $l_tag_params["imagealign"] . '">'; echo '<div class="' . $l_tag_params["font-family"] . '" style="text-transform:' . $l_tag_params["texttransform"] . '!important;">'; echo $l_tag_cloud_text; echo '</div>'; echo '</div>'; echo '</div>'; if ($l_tag_params["animation"] == "Yes") { echo '</div>'; } if ($l_tag_params["font-weight"] == "Bold") { echo '</div>'; } echo '</div>'; echo $l_args_after_widget; }
function widget_mytheme_tags() { ?> <h4>Popular Tags</h4> <div class="taggage"> <?php wp_tag_cloud('smallest=8&largest=22'); ?> </div> <?php }
function pbosfc_product_dropdown_tags() { $args = array('unit' => 'pt', 'number' => 0, 'format' => 'array', 'orderby' => 'name', 'order' => 'ASC', 'exclude' => null, 'include' => null, 'link' => 'view', 'taxonomy' => 'product_tag', 'echo' => false, 'child_of' => null); $tags = wp_tag_cloud($args); wc_enqueue_js("jQuery( '.dropdown_product_tag' ).change(\n\t\t\tfunction() {\n\t\t\t\tif ( jQuery(this).val() != '' ) {\n\t\t\t\t var this_page = '';\n\t\t\t\t var home_url = '" . esc_js(home_url('/')) . "';\n\t\t\t\t if ( home_url.indexOf( '?' ) > 0 ) {\n\t\t\t\t this_page = home_url + '&product_tag=' + jQuery(this).val();\n\t\t\t\t } else {\n\t\t\t\t this_page = home_url + '?product_tag=' + jQuery(this).val();\n\t\t\t\t }\n\t\t\t\t location.href = this_page;\n\t\t\t\t}\n\t\t\t}\n\t\t);"); $html = '<option value="">' . wp_kses_post(apply_filters('pbosfc_product_dropdown_tags_title', __('Select a tag', 'pbosfc'))) . '</option>'; foreach ($tags as $k => $v) { $slug = str_replace('tag=', '', strstr(strstr($v, 'tag='), "'", true)); $count = str_replace("title='", '', strstr(strstr($v, 'title='), " ", true)); $html = $html . '<option value="' . esc_attr($slug) . '">' . $v . ' (' . (int) $count . ')</option>'; } $html = '<select name="product_tag" class="dropdown_product_tag">' . $html . '</select>'; echo $html; }