MovableTypeからWordPressに乗り換えて、予約投稿も動作するし、快適そのもの。ただ、管理ページで予約投稿している「予定されたエントリー」が4時間後とか1日後という表記なので、(インチキだが)毎日更新の実績を作りたいときに、2日後=24~48時間のどこを指すのかがよくわからない。
ということでハック。
wp-admin/index.php
の91行目付近。
91 //echo "<li>" . sprintf(__('%1$s in %2$s'), "<a href='post.php?action=edit&post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a>", human_time_diff( current_tim e('timestamp', 1), strtotime($post->post_date_gmt. ' GMT') )) . "</li>";
92 echo "<li>" . sprintf(__('%1$s in %2$s'), "<a href='post.php?action=edit&post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a>", human_time_diff( current_time( 'timestamp', 1), strtotime($post->post_date_gmt. ' GMT') )) . "[" . date( 'Y/n/j l G:i:s', strtotime($post->post_date_gmt. ' GMT')) . "]</li>";
「記事タイトル」>> 10 時間[2007/3/16 Friday 9:00:25]
のように表記されるようになりました!
※sprintfで”__”始まりの文字列をCのプリプロセッサのような置換をしているっぽかったりで、不透明な箇所があるので、細かい体裁は、この際気にしない。
No comments yet. You should be kind and add one!
By submitting a comment you grant typista a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.