TEST

Forum breadcrumbs - You are here:FORUM

FORUM

FanArtLast post
DiscussionLet's talk about FanArt!92 Topics · 102 PostsLast post: Inside the Anticipation: Everythin … · 5 days ago · MaryBrock
SiteLast post
ChangesWhat to add or change on TibiaFanart?8 Topics · 9 PostsLast post: Tim Connelly, Trajan Langdon, Denn … · 3 weeks ago · Verdugos
HelpAny questions about TibiaFanart? Ask here!0 Topics · 0 PostsNo topics yet!
No topics yet!
ContestsLast post

 

Function My_TagCloud($params=array()){

Extract(shortcode_atts(array(

‘orderby’=>’name’

‘order’ => ‘ASC’,

‘number’=>’’,

‘wrapper’ => ‘’,

‘sizeclass’ => ‘tagged’,

‘sizemin’ => 1,

‘sizemax’=> 5

), $params));

Now, initialize the HTML returns.

//initialize

$ret = ‘’;

$min = 9999999; $max = 0;

Now, the get_tag() function is started to return the array of subject;

//fetch all wordpress tags

$tags = get_tags(array(‘orderby’ =>$orderby, ‘order’ => $order, ‘number’ => $number))

To know the minimum and maximum number of tags used:

//get minimum and maximum number tags

Foreach ($tags as $tag) {

$min = min($min, $tag->count);

$max = max($max, $tag->count);

}

To generate the tag list:

Foreach ($tags as $tag) {

$url=get_tag_link($tag->term_id);

$title = $tag->count. ‘article’. ($tag->count == 1? ‘’:’s’);

With all these codes, the HTML tag and end of loop can be created:

$ret.=

($wrapper ?<”wrapper”> ;”

<’a href=\”$url\” class=\”title=\”$title\”>{$tag->name}”.

($wrapper? “” : “);

error: Content is protected !!