忘れないように変更したところのメモ
ヘッダー画像の高さを変更
functions.phpへ追記
add_filter('twentyten_header_image_height', 'twentyten_header_image_height');
function twentyten_header_image_height($height){
return 250;
}
デフォルトの高さ198→250に変更されます。
250の部分を使用する画像の高さへ変更してください。
横幅を変更する場合は、height の部分を width に変更してください。
アーカイブの日付を○年○月へ変更
archive.phpの32行目~を修正します。
修正前:
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'twentyten' ); ?>
<?php endif; ?>
修正後:
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php
if (ereg('^ja',$locale=get_locale())) {
printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y年F'));
}
else {
printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y'));
}
?>
<?php elseif ( is_year() ) : ?>
<?php
if (ereg('^ja',$locale=get_locale())) {
printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y年'));
}
else {
printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y'));
}
?>
<?php endif; ?>
これで、「月別アーカイブ: ○年○月」表示になります。
ビジュアルリッチエディターにボタンを追加
背景色、コピー、切り取り、貼り付け、文字の大きさ、コード整形のボタンを追加
functions.phpへ追記
function ilc_mce_buttons($buttons){
array_push($buttons, "backcolor", "copy", "cut", "paste", "fontsizeselect", "cleanup");
return $buttons;
}
add_filter("mce_buttons", "ilc_mce_buttons");
デフォルトアバターミステリーマンの変更
functions.phpへ追記
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') .'/images/guest.jpg';
$avatar_defaults[$myavatar] = "Guestsアバター";
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'newgravatar' );
デフォルトアバターの変更はダッシュボード→設定→ディスカッションでできます。
guest.jpgのサイズはTwenty Tenだと40*40推奨?
画像のUP先は/wp-content/themes/twentyten/images 以下へ。







外部サイトのリディストリビュ~ションの更新情報をTopに表示(RSSより取得)させてましたが、WP2.9.xにアップデート後、投稿日時が何故か投稿を押した時間(公開時間で取れない)で取得されるようになったので、Atomフィードから取るように変更してみました。