サイドバーに表示している、投稿した時刻のグラフ画像を作ってくれるプラグインです。ダウンロードはここから。blogtimes.phpを以下のように修正。
<?php
if (!$saveFile) $saveFile = ABSPATH . 'wp-images/blogtimes.png';
// added by MKT
$last_x_days = 60;
$width = 190;
$height = 65;
$saveFile = ABSPATH . 'wp-includes/images/blogtimes.png';
//...//
$border_color = $black;
// added by MKT
$mkt_blue = ImageColorAllocate ($im, 22,106,202);
$mkt_pink = ImageColorAllocate ($im, 218,16,116);
$mkt_gray = ImageColorAllocate ($im, 240,240,240);
$box_color = $mkt_gray;
$line_color = $mkt_blue;
$tick_color = $mkt_pink;
$border_color = $mkt_gray;
//...//
//for ($i = 0; $i <= 23; $i=$i+1) modified by MKT
for ($i = 0; $i <= 24; $i=$i+1)
//...//
//ImageString($im, 2, $right - 5, $bottom, 0, $text_color); commented by MKT
//...//
//add_action('edit_post', 'updateBlogTimePNG'); use for test added by MKT
add_action('publish_post', 'updateBlogTimePNG');
?>
コンソールで以下を実行。
$ touch wp-includes/images/blogtimes.png
$ chown www-data:www-data wp-includes/images/blogtimes.png

0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment