把Simple Tags的標籤雲變成彩色!

修改前:
把Simple Tags的標籤雲變成彩色! 1
修改後:
把Simple Tags的標籤雲變成彩色! 2

打開simple-tags.client.php

尋找

$scale_color = $scale_color / 100;
$minr = hexdec(substr($min_color, 1, 2));
$ming = hexdec(substr($min_color, 3, 2));
$minb = hexdec(substr($min_color, 5, 2));

$maxr = hexdec(substr($max_color, 1, 2));
$maxg = hexdec(substr($max_color, 3, 2));
$maxb = hexdec(substr($max_color, 5, 2));

$r = dechex(intval((($maxr - $minr) * $scale_color) + $minr));
$g = dechex(intval((($maxg - $ming) * $scale_color) + $ming));
$b = dechex(intval((($maxb - $minb) * $scale_color) + $minb));

取代為

$r = dechex(rand(0,255));
$g = dechex(rand(0,196));
$b = dechex(rand(0,255));

本教學來自:[WP] 用Simple Tags產生彩色標籤雲 | Eric’s Blog

0 0 votes
Article Rating

如果您喜歡這篇文章,歡迎您
フォロー 支持作者!

喜歡就分享吧!
  • URLをコピーしました!
訂閱追蹤
提醒
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
目錄