マルチサイト運用の場合、特権管理者→サイトで一覧できます。ただし、blog id やパスが表示されるので、一見しただけではどのブログが分かりにくい。なので、ブログ一覧に各ブログのヘッダー画像を表示するカスタマイズ(プラグイン)をしてみました。
プラグインの中身は以下のとおりです。
function post_column_image( $sites_columns) {
$sites_columns['plugins'] = '画像';
return $sites_columns;
}
add_filter('wpmu_blogs_columns', 'post_column_image');
function column_image_header($id) {
$theme = get_blog_option($id,'current_theme');
$themeheader = get_blog_option($id,'mods_'.$theme);
if($themeheader['header_image']) {
print '<img src="';
print $themeheader['header_image'];
print '" width="200" height="50" />';
}
}
add_action('wpmublogsaction', 'column_image_header');
wpmu_blogs_columnsでカラム作成し、wpmublogsactionでカラムの中身に表示するデータを指定しています。
表示する画像は、各ブログのヘッダー画像です。twentyten なら、外観→ヘッダーで設定できます。(テーマでadd_theme_support('custom-header');が設定されていることが条件です。)
