<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webnist（うぇぶにすと) Blog</title>
	<atom:link href="http://webnist.net/wp-content/plugins/oni-daiko/oni_daiko_feed.php" rel="self" type="application/rss+xml" />
	<link>http://webnist.net</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 15 Jun 2011 07:29:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
			<title>スライド表示用投稿を作ってみる</title>
			<link>http://sauce.webnist.net/2011/06/05/%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e8%a1%a8%e7%a4%ba%e7%94%a8%e6%8a%95%e7%a8%bf%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b</link>
			<comments>#comments</comments>
			<pubDate>2011/06/05</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[ども、WPer 界で上位に食い込む位いい声の Webnist です。

ネタが尽きてきた中で頭を絞って出てきた、一滴を今回書いていこうかと思います。
その内容は、最近？流行りのスライドで写真等を表示する事をWordPressで簡単にやってしまおうということです。

今回、準備頂く物は以下になります。
<ol>
	<li>WordPress (動くまでが WordPress です)</li>
	<li>くじけぬ心</li>
	<li>向上心</li>
	<li>スライド表示用のカスタム投稿タイプ(Custom Post Type)</li>
	<li>jQuery の Orbit ライブラリー (<a title="Orbit ライブラリー" href="http://www.zurb.com/playground/orbit-jquery-image-slider" target="_blank">http://www.zurb.com/playground/orbit-jquery-image-slider</a>)</li>
	<li>今回使用するテーマは<a title="め組テーマ" href="http://www.10press.net" target="_blank">め組</a>さんの<a title="め組：膳テーマ" href="http://www.10press.net/theme/3284" target="_blank">膳テーマ</a>を使用しています。</li>
</ol>
に掲げた5項目です。

1〜3については、飛ばしまーす。
<h2>スライド表示用カスタム投稿タイプについて</h2>
これについては、検索すると色々なところで解説されているので詳しく書かないですが、
おでさんの『<a title="カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]" href="http://www.odysseygate.com/archives/1624" target="_blank">カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]</a>』を読めば理解できると思いますよ。

ソースコードで追加していくのは、ちょっと面倒なので僕は楽をして、プラグインを使います。
僕が使っているプラグインは 『<a title="GD Custom Posts And Taxonomies Tools" href="http://wordpress.org/extend/plugins/gd-taxonomies-tools/" target="_blank">GD Custom Posts And Taxonomies Tools</a>』 というですね、理由は特にありませんが... ただ、このプラグイン日本語化されていないのです。。。
僕は英語がわからないので、誰か日本語化してくれないかなっと期待しています。

今回はスライド用なので分かりやすく 『slide』というカスタム投稿タイプを作成します。

[caption id="attachment_74" align="alignleft" width="201" caption="GD CPT Tools の設定画面"]<a href="http://sauce.webnist.net/files/GD_CPT_Tools.png"><img class="size-medium wp-image-74 " title="GD_CPT_Tools" src="http://sauce.webnist.net/files/GD_CPT_Tools-201x300.png" alt="" width="201" height="300" /></a>[/caption]

Name のところでカスタム投稿タイプの名前を入力します。（日本語は避けといたほうが安全です。）

Labels のところでカスタム投稿タイプのラベルを入力します。(日本語でも大丈夫です。)
Auto fill rest をクリックすると他の部分は勝手に記入してくれます。が、日本語化されていないので英語で入ってきます。

Settings のところでカスタム投稿タイプの投稿画面に表示する項目を選択できます。
今回は、スライド表示用なのでデフォルトに Excerpts と Post Thumbnails を追加しています。

とりあえず上記を設定して、Save Custom Post を押して保存します。

&nbsp;

[caption id="attachment_107" align="alignleft" width="149" caption="カスタム投稿メニュ"]<a title="カスタム投稿メニュ" href="http://sauce.webnist.net/files/カスタム投稿メニュ.png"><img class="size-full wp-image-107" title="カスタム投稿メニュ" src="http://sauce.webnist.net/files/カスタム投稿メニュ.png" alt="カスタム投稿メニュ" width="149" height="120" /></a>[/caption]

保存したら画像のようなメニューが追加されます。
<h2>jQuery の Orbit ライブラリーの追加</h2>
<a title="Orbit ライブラリー" href="http://www.zurb.com/playground/orbit-jquery-image-slider" target="_blank">http://www.zurb.com/playground/orbit-jquery-image-slider</a> ここからファイルをダウンロードしてきます。

使用しているテーマに slide というフォルダを作ってその中に解凍してできた、orbit-1.2.3(記事を書いている時のバージョンは1.2.3です) 内の jquery.orbit-1.2.3.min.js, orbit-1.2.3.css, orbit をコピーします。

コピーしたら、テーマの functions.php を編集します。
以下のソースで js を読み込みます。
[php]
add_action( 'wp_print_scripts', 'add_slide_js' );
function add_slide_js() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'orbit-script', get_stylesheet_directory_uri() . '/slide/jquery.orbit-1.2.3.min.js' );
}
[/php]

以下のソースで CSS を読み込みます。
[php]
add_action( 'wp_print_styles', 'add_slide_style' ) ;
function add_slide_style() {
wp_enqueue_style( 'orbit-style', get_stylesheet_directory_uri() . '/slide/orbit-1.2.3.css' );
}
[/php]

以下でスライド用のスクリプトを有効化します。
[php]
add_action( 'wp_head', 'add_slide_script' );
function add_slide_script() { ?&gt;
<script type="text/javascript">// <![CDATA[
 		jQuery(document).ready(function($){ 			$('#slide_box').orbit(); 		});
// ]]></script>
<?php } ?>
[/php]

[javascript]
$('#slide_box').orbit();
[/javascript]

上記で、#slide_box と指定しましたので、orbit-1.2.3.css を編集します。

デフォルトでは、#featured となっている部分を、 #slide_box に変更しましょう。

これで、スライドの下準備は完了です。
次に WordPress 側で、カスタム投稿タイプでスライド表示に進みます。
<h2>カスタム投稿タイプでスライド表示</h2>
さて、いよいよ大詰めにきました。
ここで、一息入れてお菓子を食べるも、一気に進んでいくのもありです。

WordPress 側で、カスタム投稿タイプを表示する設定をしていきます。
functions.php にまず以下を追加します。

[php]
add_image_size( 'slide-thumb', 970, 99999 );
[/php]

これで、アイキャッチに追加したときの画像の大きさを追加します。
大きさは、テーマによっては違うのでそれに合わせてください。

次に、カスタム投稿タイプを表示するために、以下を追加します。
[php]
function slide_post_list() {
global $post, $post_type;
$args = array(
'numberposts' =&gt; 5,
'post_type' =&gt; 'slide',
);
$get_posts = get_posts( $args );
if ( $get_posts ) {
$output = '
<div id="slide_area">' . "\n";
$output .= '
<div id="slide_box">' . "\n";
foreach( $get_posts as $post ) {
setup_postdata( $post );
$attachment_id = get_post_thumbnail_id();
$attachment_src = wp_get_attachment_image_src( $attachment_id, 'slide-thumb' );
$output .= '<a title="' . get_the_title() . '" href="' . get_permalink() . '" data-caption="#slide_' . $post->ID . '"><img src="' . $attachment_src[0] . '" alt="' . get_the_title() . '" width="' . $attachment_src[1] .'" height="' . $attachment_src[2] .'" /></a>' . "\n";
}
$output .= '</div>
' . "\n";
foreach( $get_posts as $post ) {
setup_postdata( $post );
$excerpt = $post-&gt;post_excerpt;
$output .= '<span id="slide_' . $post->ID . '" class="orbit-caption">' . $excerpt . '</span>' . "\n";
}
$output .= '

</div>
' . "\n";
echo $output;
}
}
[/php]

上記を追加し保存したら、テーマの表示したい部分につかします。
今回は、ヘッダーのメイン画像を置き換えて使用するために header.php に記述します。

[php]
<?php slide_post_list(); ?>
[/php]

画像

以上で、スライド表示用投稿を作ってみるの紹介を終わりにします。
あっそうそう、もちろん IE6 はサポート外ですよ。。。

外部サイトにリンクするという説明はまた別の話で。]]></description>
			<content:encoded><![CDATA[ども、WPer 界で上位に食い込む位いい声の Webnist です。

ネタが尽きてきた中で頭を絞って出てきた、一滴を今回書いていこうかと思います。
その内容は、最近？流行りのスライドで写真等を表示する事をWordPressで簡単にやってしまおうということです。

今回、準備頂く物は以下になります。
<ol>
	<li>WordPress (動くまでが WordPress です)</li>
	<li>くじけぬ心</li>
	<li>向上心</li>
	<li>スライド表示用のカスタム投稿タイプ(Custom Post Type)</li>
	<li>jQuery の Orbit ライブラリー (<a title="Orbit ライブラリー" href="http://www.zurb.com/playground/orbit-jquery-image-slider" target="_blank">http://www.zurb.com/playground/orbit-jquery-image-slider</a>)</li>
	<li>今回使用するテーマは<a title="め組テーマ" href="http://www.10press.net" target="_blank">め組</a>さんの<a title="め組：膳テーマ" href="http://www.10press.net/theme/3284" target="_blank">膳テーマ</a>を使用しています。</li>
</ol>
に掲げた5項目です。

1〜3については、飛ばしまーす。
<h2>スライド表示用カスタム投稿タイプについて</h2>
これについては、検索すると色々なところで解説されているので詳しく書かないですが、
おでさんの『<a title="カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]" href="http://www.odysseygate.com/archives/1624" target="_blank">カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]</a>』を読めば理解できると思いますよ。

ソースコードで追加していくのは、ちょっと面倒なので僕は楽をして、プラグインを使います。
僕が使っているプラグインは 『<a title="GD Custom Posts And Taxonomies Tools" href="http://wordpress.org/extend/plugins/gd-taxonomies-tools/" target="_blank">GD Custom Posts And Taxonomies Tools</a>』 というですね、理由は特にありませんが... ただ、このプラグイン日本語化されていないのです。。。
僕は英語がわからないので、誰か日本語化してくれないかなっと期待しています。

今回はスライド用なので分かりやすく 『slide』というカスタム投稿タイプを作成します。

[caption id="attachment_74" align="alignleft" width="201" caption="GD CPT Tools の設定画面"]<a href="http://sauce.webnist.net/files/GD_CPT_Tools.png"><img class="size-medium wp-image-74 " title="GD_CPT_Tools" src="http://sauce.webnist.net/files/GD_CPT_Tools-201x300.png" alt="" width="201" height="300" /></a>[/caption]

Name のところでカスタム投稿タイプの名前を入力します。（日本語は避けといたほうが安全です。）

Labels のところでカスタム投稿タイプのラベルを入力します。(日本語でも大丈夫です。)
Auto fill rest をクリックすると他の部分は勝手に記入してくれます。が、日本語化されていないので英語で入ってきます。

Settings のところでカスタム投稿タイプの投稿画面に表示する項目を選択できます。
今回は、スライド表示用なのでデフォルトに Excerpts と Post Thumbnails を追加しています。

とりあえず上記を設定して、Save Custom Post を押して保存します。

&nbsp;

[caption id="attachment_107" align="alignleft" width="149" caption="カスタム投稿メニュ"]<a title="カスタム投稿メニュ" href="http://sauce.webnist.net/files/カスタム投稿メニュ.png"><img class="size-full wp-image-107" title="カスタム投稿メニュ" src="http://sauce.webnist.net/files/カスタム投稿メニュ.png" alt="カスタム投稿メニュ" width="149" height="120" /></a>[/caption]

保存したら画像のようなメニューが追加されます。
<h2>jQuery の Orbit ライブラリーの追加</h2>
<a title="Orbit ライブラリー" href="http://www.zurb.com/playground/orbit-jquery-image-slider" target="_blank">http://www.zurb.com/playground/orbit-jquery-image-slider</a> ここからファイルをダウンロードしてきます。

使用しているテーマに slide というフォルダを作ってその中に解凍してできた、orbit-1.2.3(記事を書いている時のバージョンは1.2.3です) 内の jquery.orbit-1.2.3.min.js, orbit-1.2.3.css, orbit をコピーします。

コピーしたら、テーマの functions.php を編集します。
以下のソースで js を読み込みます。
[php]
add_action( 'wp_print_scripts', 'add_slide_js' );
function add_slide_js() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'orbit-script', get_stylesheet_directory_uri() . '/slide/jquery.orbit-1.2.3.min.js' );
}
[/php]

以下のソースで CSS を読み込みます。
[php]
add_action( 'wp_print_styles', 'add_slide_style' ) ;
function add_slide_style() {
wp_enqueue_style( 'orbit-style', get_stylesheet_directory_uri() . '/slide/orbit-1.2.3.css' );
}
[/php]

以下でスライド用のスクリプトを有効化します。
[php]
add_action( 'wp_head', 'add_slide_script' );
function add_slide_script() { ?&gt;
<script type="text/javascript">// <![CDATA[
 		jQuery(document).ready(function($){ 			$('#slide_box').orbit(); 		});
// ]]></script>
<?php } ?>
[/php]

[javascript]
$('#slide_box').orbit();
[/javascript]

上記で、#slide_box と指定しましたので、orbit-1.2.3.css を編集します。

デフォルトでは、#featured となっている部分を、 #slide_box に変更しましょう。

これで、スライドの下準備は完了です。
次に WordPress 側で、カスタム投稿タイプでスライド表示に進みます。
<h2>カスタム投稿タイプでスライド表示</h2>
さて、いよいよ大詰めにきました。
ここで、一息入れてお菓子を食べるも、一気に進んでいくのもありです。

WordPress 側で、カスタム投稿タイプを表示する設定をしていきます。
functions.php にまず以下を追加します。

[php]
add_image_size( 'slide-thumb', 970, 99999 );
[/php]

これで、アイキャッチに追加したときの画像の大きさを追加します。
大きさは、テーマによっては違うのでそれに合わせてください。

次に、カスタム投稿タイプを表示するために、以下を追加します。
[php]
function slide_post_list() {
global $post, $post_type;
$args = array(
'numberposts' =&gt; 5,
'post_type' =&gt; 'slide',
);
$get_posts = get_posts( $args );
if ( $get_posts ) {
$output = '
<div id="slide_area">' . "\n";
$output .= '
<div id="slide_box">' . "\n";
foreach( $get_posts as $post ) {
setup_postdata( $post );
$attachment_id = get_post_thumbnail_id();
$attachment_src = wp_get_attachment_image_src( $attachment_id, 'slide-thumb' );
$output .= '<a title="' . get_the_title() . '" href="' . get_permalink() . '" data-caption="#slide_' . $post->ID . '"><img src="' . $attachment_src[0] . '" alt="' . get_the_title() . '" width="' . $attachment_src[1] .'" height="' . $attachment_src[2] .'" /></a>' . "\n";
}
$output .= '</div>
' . "\n";
foreach( $get_posts as $post ) {
setup_postdata( $post );
$excerpt = $post-&gt;post_excerpt;
$output .= '<span id="slide_' . $post->ID . '" class="orbit-caption">' . $excerpt . '</span>' . "\n";
}
$output .= '

</div>
' . "\n";
echo $output;
}
}
[/php]

上記を追加し保存したら、テーマの表示したい部分につかします。
今回は、ヘッダーのメイン画像を置き換えて使用するために header.php に記述します。

[php]
<?php slide_post_list(); ?>
[/php]

画像

以上で、スライド表示用投稿を作ってみるの紹介を終わりにします。
あっそうそう、もちろん IE6 はサポート外ですよ。。。

外部サイトにリンクするという説明はまた別の話で。]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>Welcome to Webnist（うぇぶにすと Blog Sites This is your...</title>
			<link>http://live.webnist.net/2011/05/10/hello-world</link>
			<comments>#comments</comments>
			<pubDate>2011/05/10</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[Welcome to <a href="http://webnist.net/">Webnist（うぇぶにすと) Blog Sites</a>. This is your first post. Edit or delete it, then start blogging!
<iframe width="468" scrolling="no" height="586" frameborder="0" style="border: 0px none transparent;" src="http://www.ustream.tv/socialstream/2885613"></iframe>]]></description>
			<content:encoded><![CDATA[Welcome to <a href="http://webnist.net/">Webnist（うぇぶにすと) Blog Sites</a>. This is your first post. Edit or delete it, then start blogging!
<iframe width="468" scrolling="no" height="586" frameborder="0" style="border: 0px none transparent;" src="http://www.ustream.tv/socialstream/2885613"></iframe>]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>test</title>
			<link>http://labo.webnist.net/2011/04/15/test</link>
			<comments>#comments</comments>
			<pubDate>2011/04/15</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[test]]></description>
			<content:encoded><![CDATA[test]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>コメントの項目足してみるパン</title>
			<link>http://sauce.webnist.net/2010/12/24/%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%81%ae%e9%a0%85%e7%9b%ae%e8%b6%b3%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b%e3%83%91%e3%83%b3</link>
			<comments>#comments</comments>
			<pubDate>2010/12/24</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[WordPress のコメントの部分に項目を足すことは、サイトを検索すると引っかかりますが、
保存するところまでは説明されていませんでした。。。

そこで、データベースを見ていたら、commentmeta というテーブルがあるではないですか！
っということで、commentmetaを利用し、追加した項目を保存してみましょう。

とりあえず、テーマファイルの function.php に以下のソースを追加します。
[php]
// Comment Customize
add_action( 'comment_form_field_comment', 'add_comment_field' );
function add_comment_field( $defaults ) {
	$defaults = '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;twitter&quot; name=&quot;twitter&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;';
	$defaults .= '&lt;p class=&quot;comment-form-comment&quot;&gt;&lt;label for=&quot;comment&quot;&gt;' . _x( 'Comment', 'noun' ) . '&lt;/label&gt;&lt;textarea id=&quot;comment&quot; name=&quot;comment&quot; cols=&quot;45&quot; rows=&quot;8&quot; aria-required=&quot;true&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;';
	return $defaults;
}

add_action( 'comment_post', 'save_comment_field' );
add_action( 'edit_comment', 'save_comment_field' );
function save_comment_field( $comment_id ) {
	if ( !$comment = get_comment( $comment_id ) )
		return false;
	do_action('comment_form', $post-&gt;ID);
	$custom_key_twitter  = 'twitter';
    $get_comment_twitter = esc_attr( $_POST[$custom_key_twitter] );
    if ( &quot;&quot; == get_comment_meta( $comment_id, $custom_key_twitter )) {
        add_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter, true ) ;
    } else if ( $get_comment_twitter != get_comment_meta( $comment_id, $custom_key_twitter )) {
        update_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter ) ;
    } else if ( &quot;&quot; == $get_comment_twitter ) {
        delete_comment_meta( $comment_id, $custom_key_twitter ) ;
    }
	return false;
}

add_action( 'add_meta_boxes_comment', 'add_comment_field_box' );
function add_comment_field_box() {
    global $comment;
	$comment_ID = $comment-&gt;comment_ID;
    $custom_key         = 'post_reviews_date' ;
    $custom_key_twitter = 'twitter' ;
    $noncename          = $custom_key . '_noncename' ;
    $get_twitter        = esc_attr( get_comment_meta( $comment_ID, $custom_key_twitter, true ) );
    echo '&lt;input type=&quot;hidden&quot; name=&quot;' . $noncename . '&quot; id=&quot;' . $noncename . '&quot; value=&quot;' . wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&gt;' . &quot;\n&quot;;
	echo '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;' . $custom_key_twitter . '&quot; name=&quot;' . $custom_key_twitter . '&quot; type=&quot;text&quot; value=&quot;' . $get_twitter . '&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;' . &quot;\n&quot;;
}
[/php]


add_comment_field でコメントの項目を足しています。
[php]
$defaults .= '&lt;p class=&quot;comment-form-comment&quot;&gt;&lt;label for=&quot;comment&quot;&gt;' . _x( 'Comment', 'noun' ) . '&lt;/label&gt;&lt;textarea id=&quot;comment&quot; name=&quot;comment&quot; cols=&quot;45&quot; rows=&quot;8&quot; aria-required=&quot;true&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;';
[/php]
上記は必ず入れてください。
入れないとコメントのテキストエリアが表示されません。

[php]
function add_comment_field( $fields ) {
	$fields['twitter'] = '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;twitter&quot; name=&quot;twitter&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;';
	return $fields;
}
add_filter('comment_form_default_fields','add_comment_field');
[/php]
もありますが、ログインした際は表示されないので目的に合わせて変更してください。
<a href="http://sauce.webnist.net/files/comment.gif"><img src="http://sauce.webnist.net/files/comment-300x278.gif" alt="" title="comment" width="300" height="278" class="aligncenter size-medium wp-image-58" /></a>

[php]
add_action( 'comment_post', 'save_comment_field' );
add_action( 'edit_comment', 'save_comment_field' );
function save_comment_field( $comment_id ) {
	if ( !$comment = get_comment( $comment_id ) )
		return false;
	do_action('comment_form', $post-&gt;ID);
	$custom_key_twitter  = 'twitter';
    $get_comment_twitter = esc_attr( $_POST[$custom_key_twitter] );
    if ( &quot;&quot; == get_comment_meta( $comment_id, $custom_key_twitter )) {
        add_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter, true ) ;
    } else if ( $get_comment_twitter != get_comment_meta( $comment_id, $custom_key_twitter )) {
        update_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter ) ;
    } else if ( &quot;&quot; == $get_comment_twitter ) {
        delete_comment_meta( $comment_id, $custom_key_twitter ) ;
    }
	return false;
}
[/php]
で commentmeta に保存します。

[php]
add_action( 'add_meta_boxes_comment', 'add_comment_field_box' );
function add_comment_field_box() {
    global $comment;
	$comment_ID = $comment-&gt;comment_ID;
    $custom_key         = 'post_reviews_date' ;
    $custom_key_twitter = 'twitter' ;
    $noncename          = $custom_key . '_noncename' ;
    $get_twitter        = esc_attr( get_comment_meta( $comment_ID, $custom_key_twitter, true ) );
    echo '&lt;input type=&quot;hidden&quot; name=&quot;' . $noncename . '&quot; id=&quot;' . $noncename . '&quot; value=&quot;' . wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&gt;' . &quot;\n&quot;;
	echo '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;' . $custom_key_twitter . '&quot; name=&quot;' . $custom_key_twitter . '&quot; type=&quot;text&quot; value=&quot;' . $get_twitter . '&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;' . &quot;\n&quot;;
}
[/php]
で管理画面からのコメント編集の際にコメントに追加したボックスが表示されます。
<a href="http://sauce.webnist.net/files/commentadmin.gif"><img src="http://sauce.webnist.net/files/commentadmin-264x300.gif" alt="" title="commentadmin" width="264" height="300" class="aligncenter size-medium wp-image-59" /></a>

コメントに表示するときは comment.php 内に
[php]
wp_list_comments();
[/php]
があると思うのでそれを
[php]
wp_list_comments( array( 'callback' =&gt; 'mytheme_comment' ) );
[/php]
などにして、mytheme_comment の関数を読み込みます。

mytheme_comment の関数は
[php]
function mytheme_comment($comment, $args, $depth) {
   $GLOBALS['comment'] = $comment;
   $comment_ID = $comment-&gt;comment_ID;
   $get_twitter        = esc_attr( get_comment_meta( $comment-&gt;comment_ID, 'twitter', true ) ); ?&gt;
   &lt;li &lt;?php comment_class(); ?&gt; id=&quot;li-comment-&lt;?php comment_ID() ?&gt;&quot;&gt;
     &lt;div id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
      &lt;div class=&quot;comment-author vcard&quot;&gt;
         &lt;?php echo get_avatar($comment,$size='48',$default='&lt;path_to_url&gt;' ); ?&gt;

         &lt;?php printf(__('&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt; &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt;'), get_comment_author_link()) ?&gt;
         &lt;?php printf(__('Twitter ID %s'), $get_twitter) ?&gt;
      &lt;/div&gt;
      &lt;?php if ($comment-&gt;comment_approved == '0') : ?&gt;
         &lt;em&gt;&lt;?php _e('Your comment is awaiting moderation.') ?&gt;&lt;/em&gt;
         &lt;br /&gt;
      &lt;?php endif; ?&gt;

      &lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;&lt;?php echo htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ?&gt;&quot;&gt;&lt;?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?&gt;&lt;/a&gt;&lt;?php edit_comment_link(__('(Edit)'),'  ','') ?&gt;&lt;/div&gt;

      &lt;?php comment_text() ?&gt;

      &lt;div class=&quot;reply&quot;&gt;
         &lt;?php comment_reply_link(array_merge( $args, array('depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth']))) ?&gt;
      &lt;/div&gt;
     &lt;/div&gt;
&lt;?php
}
[/php]
等にして function.php に記入します。
今回保存した項目の読み出しは
[php]
get_comment_meta( $comment-&gt;comment_ID, 'twitter', true )
[/php]
で読みだしています。
get_comment_meta は get_post_meta と同じような感じです。


<a href="http://sauce.webnist.net/files/display_comment.gif"><img src="http://sauce.webnist.net/files/display_comment-300x75.gif" alt="" title="display_comment" width="300" height="75" class="aligncenter size-medium wp-image-61" /></a>

以上、文章がおかしいですが大体の流れが分かって頂ければと思います。

]]></description>
			<content:encoded><![CDATA[WordPress のコメントの部分に項目を足すことは、サイトを検索すると引っかかりますが、
保存するところまでは説明されていませんでした。。。

そこで、データベースを見ていたら、commentmeta というテーブルがあるではないですか！
っということで、commentmetaを利用し、追加した項目を保存してみましょう。

とりあえず、テーマファイルの function.php に以下のソースを追加します。
[php]
// Comment Customize
add_action( 'comment_form_field_comment', 'add_comment_field' );
function add_comment_field( $defaults ) {
	$defaults = '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;twitter&quot; name=&quot;twitter&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;';
	$defaults .= '&lt;p class=&quot;comment-form-comment&quot;&gt;&lt;label for=&quot;comment&quot;&gt;' . _x( 'Comment', 'noun' ) . '&lt;/label&gt;&lt;textarea id=&quot;comment&quot; name=&quot;comment&quot; cols=&quot;45&quot; rows=&quot;8&quot; aria-required=&quot;true&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;';
	return $defaults;
}

add_action( 'comment_post', 'save_comment_field' );
add_action( 'edit_comment', 'save_comment_field' );
function save_comment_field( $comment_id ) {
	if ( !$comment = get_comment( $comment_id ) )
		return false;
	do_action('comment_form', $post-&gt;ID);
	$custom_key_twitter  = 'twitter';
    $get_comment_twitter = esc_attr( $_POST[$custom_key_twitter] );
    if ( &quot;&quot; == get_comment_meta( $comment_id, $custom_key_twitter )) {
        add_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter, true ) ;
    } else if ( $get_comment_twitter != get_comment_meta( $comment_id, $custom_key_twitter )) {
        update_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter ) ;
    } else if ( &quot;&quot; == $get_comment_twitter ) {
        delete_comment_meta( $comment_id, $custom_key_twitter ) ;
    }
	return false;
}

add_action( 'add_meta_boxes_comment', 'add_comment_field_box' );
function add_comment_field_box() {
    global $comment;
	$comment_ID = $comment-&gt;comment_ID;
    $custom_key         = 'post_reviews_date' ;
    $custom_key_twitter = 'twitter' ;
    $noncename          = $custom_key . '_noncename' ;
    $get_twitter        = esc_attr( get_comment_meta( $comment_ID, $custom_key_twitter, true ) );
    echo '&lt;input type=&quot;hidden&quot; name=&quot;' . $noncename . '&quot; id=&quot;' . $noncename . '&quot; value=&quot;' . wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&gt;' . &quot;\n&quot;;
	echo '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;' . $custom_key_twitter . '&quot; name=&quot;' . $custom_key_twitter . '&quot; type=&quot;text&quot; value=&quot;' . $get_twitter . '&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;' . &quot;\n&quot;;
}
[/php]


add_comment_field でコメントの項目を足しています。
[php]
$defaults .= '&lt;p class=&quot;comment-form-comment&quot;&gt;&lt;label for=&quot;comment&quot;&gt;' . _x( 'Comment', 'noun' ) . '&lt;/label&gt;&lt;textarea id=&quot;comment&quot; name=&quot;comment&quot; cols=&quot;45&quot; rows=&quot;8&quot; aria-required=&quot;true&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;';
[/php]
上記は必ず入れてください。
入れないとコメントのテキストエリアが表示されません。

[php]
function add_comment_field( $fields ) {
	$fields['twitter'] = '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;twitter&quot; name=&quot;twitter&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;';
	return $fields;
}
add_filter('comment_form_default_fields','add_comment_field');
[/php]
もありますが、ログインした際は表示されないので目的に合わせて変更してください。
<a href="http://sauce.webnist.net/files/comment.gif"><img src="http://sauce.webnist.net/files/comment-300x278.gif" alt="" title="comment" width="300" height="278" class="aligncenter size-medium wp-image-58" /></a>

[php]
add_action( 'comment_post', 'save_comment_field' );
add_action( 'edit_comment', 'save_comment_field' );
function save_comment_field( $comment_id ) {
	if ( !$comment = get_comment( $comment_id ) )
		return false;
	do_action('comment_form', $post-&gt;ID);
	$custom_key_twitter  = 'twitter';
    $get_comment_twitter = esc_attr( $_POST[$custom_key_twitter] );
    if ( &quot;&quot; == get_comment_meta( $comment_id, $custom_key_twitter )) {
        add_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter, true ) ;
    } else if ( $get_comment_twitter != get_comment_meta( $comment_id, $custom_key_twitter )) {
        update_comment_meta( $comment_id, $custom_key_twitter, $get_comment_twitter ) ;
    } else if ( &quot;&quot; == $get_comment_twitter ) {
        delete_comment_meta( $comment_id, $custom_key_twitter ) ;
    }
	return false;
}
[/php]
で commentmeta に保存します。

[php]
add_action( 'add_meta_boxes_comment', 'add_comment_field_box' );
function add_comment_field_box() {
    global $comment;
	$comment_ID = $comment-&gt;comment_ID;
    $custom_key         = 'post_reviews_date' ;
    $custom_key_twitter = 'twitter' ;
    $noncename          = $custom_key . '_noncename' ;
    $get_twitter        = esc_attr( get_comment_meta( $comment_ID, $custom_key_twitter, true ) );
    echo '&lt;input type=&quot;hidden&quot; name=&quot;' . $noncename . '&quot; id=&quot;' . $noncename . '&quot; value=&quot;' . wp_create_nonce( plugin_basename(__FILE__) ) . '&quot; /&gt;' . &quot;\n&quot;;
	echo '&lt;p class=&quot;comment-form-twitter&quot;&gt;&lt;label for=&quot;twitter&quot;&gt;twitter@&lt;/label&gt;&lt;input id=&quot;' . $custom_key_twitter . '&quot; name=&quot;' . $custom_key_twitter . '&quot; type=&quot;text&quot; value=&quot;' . $get_twitter . '&quot; size=&quot;15&quot; /&gt;&lt;/p&gt;' . &quot;\n&quot;;
}
[/php]
で管理画面からのコメント編集の際にコメントに追加したボックスが表示されます。
<a href="http://sauce.webnist.net/files/commentadmin.gif"><img src="http://sauce.webnist.net/files/commentadmin-264x300.gif" alt="" title="commentadmin" width="264" height="300" class="aligncenter size-medium wp-image-59" /></a>

コメントに表示するときは comment.php 内に
[php]
wp_list_comments();
[/php]
があると思うのでそれを
[php]
wp_list_comments( array( 'callback' =&gt; 'mytheme_comment' ) );
[/php]
などにして、mytheme_comment の関数を読み込みます。

mytheme_comment の関数は
[php]
function mytheme_comment($comment, $args, $depth) {
   $GLOBALS['comment'] = $comment;
   $comment_ID = $comment-&gt;comment_ID;
   $get_twitter        = esc_attr( get_comment_meta( $comment-&gt;comment_ID, 'twitter', true ) ); ?&gt;
   &lt;li &lt;?php comment_class(); ?&gt; id=&quot;li-comment-&lt;?php comment_ID() ?&gt;&quot;&gt;
     &lt;div id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
      &lt;div class=&quot;comment-author vcard&quot;&gt;
         &lt;?php echo get_avatar($comment,$size='48',$default='&lt;path_to_url&gt;' ); ?&gt;

         &lt;?php printf(__('&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt; &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt;'), get_comment_author_link()) ?&gt;
         &lt;?php printf(__('Twitter ID %s'), $get_twitter) ?&gt;
      &lt;/div&gt;
      &lt;?php if ($comment-&gt;comment_approved == '0') : ?&gt;
         &lt;em&gt;&lt;?php _e('Your comment is awaiting moderation.') ?&gt;&lt;/em&gt;
         &lt;br /&gt;
      &lt;?php endif; ?&gt;

      &lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;&lt;?php echo htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ?&gt;&quot;&gt;&lt;?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?&gt;&lt;/a&gt;&lt;?php edit_comment_link(__('(Edit)'),'  ','') ?&gt;&lt;/div&gt;

      &lt;?php comment_text() ?&gt;

      &lt;div class=&quot;reply&quot;&gt;
         &lt;?php comment_reply_link(array_merge( $args, array('depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth']))) ?&gt;
      &lt;/div&gt;
     &lt;/div&gt;
&lt;?php
}
[/php]
等にして function.php に記入します。
今回保存した項目の読み出しは
[php]
get_comment_meta( $comment-&gt;comment_ID, 'twitter', true )
[/php]
で読みだしています。
get_comment_meta は get_post_meta と同じような感じです。


<a href="http://sauce.webnist.net/files/display_comment.gif"><img src="http://sauce.webnist.net/files/display_comment-300x75.gif" alt="" title="display_comment" width="300" height="75" class="aligncenter size-medium wp-image-61" /></a>

以上、文章がおかしいですが大体の流れが分かって頂ければと思います。

]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>jpg のアップロードの画質変えちゃろ</title>
			<link>http://sauce.webnist.net/2010/12/24/jpg-%e3%81%ae%e3%82%a2%e3%83%83%e3%83%97%e3%83%ad%e3%83%bc%e3%83%89%e3%81%ae%e5%9c%a7%e7%b8%ae%e7%8e%87%e5%a4%89%e3%81%88%e3%81%a1%e3%82%83%e3%82%8d</link>
			<comments>#comments</comments>
			<pubDate>2010/12/24</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[ｊpg のサムネール画像アップロード時する際画質のデフォルトの値は90になっています。jpg の画質を変える事を検索してみたら、コアファイルをいじる記事が多かったので、コアファイルをいじらずに変更できるコードを紹介します。

[php]
add_filter( 'jpeg_quality', 'child_jpeg_quality' );
function child_jpeg_quality( $jpeg_quality ) {
    $jpeg_quality = 100;
    return $jpeg_quality;
}
[/php]
上記の $jpeg_quality の値を変更する事でワザと劣化させて表示させる事も可能です。

例：画質100
<a href="http://sauce.webnist.net/files/Koala1.jpg"><img src="http://sauce.webnist.net/files/Koala1-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-32" /></a>
<a href="http://sauce.webnist.net/files/Koala1.jpg"><img src="http://sauce.webnist.net/files/Koala1-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-32" /></a>

例：画質50
<a href="http://sauce.webnist.net/files/Koala2.jpg"><img src="http://sauce.webnist.net/files/Koala2-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-34" /></a>
<a href="http://sauce.webnist.net/files/Koala2.jpg"><img src="http://sauce.webnist.net/files/Koala2-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-34" /></a>

例：画質10
<a href="http://sauce.webnist.net/files/Koala3.jpg"><img src="http://sauce.webnist.net/files/Koala3-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-37" /></a>
<a href="http://sauce.webnist.net/files/Koala3.jpg"><img src="http://sauce.webnist.net/files/Koala3-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-37" /></a>]]></description>
			<content:encoded><![CDATA[ｊpg のサムネール画像アップロード時する際画質のデフォルトの値は90になっています。jpg の画質を変える事を検索してみたら、コアファイルをいじる記事が多かったので、コアファイルをいじらずに変更できるコードを紹介します。

[php]
add_filter( 'jpeg_quality', 'child_jpeg_quality' );
function child_jpeg_quality( $jpeg_quality ) {
    $jpeg_quality = 100;
    return $jpeg_quality;
}
[/php]
上記の $jpeg_quality の値を変更する事でワザと劣化させて表示させる事も可能です。

例：画質100
<a href="http://sauce.webnist.net/files/Koala1.jpg"><img src="http://sauce.webnist.net/files/Koala1-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-32" /></a>
<a href="http://sauce.webnist.net/files/Koala1.jpg"><img src="http://sauce.webnist.net/files/Koala1-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-32" /></a>

例：画質50
<a href="http://sauce.webnist.net/files/Koala2.jpg"><img src="http://sauce.webnist.net/files/Koala2-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-34" /></a>
<a href="http://sauce.webnist.net/files/Koala2.jpg"><img src="http://sauce.webnist.net/files/Koala2-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-34" /></a>

例：画質10
<a href="http://sauce.webnist.net/files/Koala3.jpg"><img src="http://sauce.webnist.net/files/Koala3-150x150.jpg" alt="" title="Koala" width="150" height="150" class="alignnone size-thumbnail wp-image-37" /></a>
<a href="http://sauce.webnist.net/files/Koala3.jpg"><img src="http://sauce.webnist.net/files/Koala3-300x225.jpg" alt="" title="Koala" width="300" height="225" class="alignnone size-medium wp-image-37" /></a>]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>カスタムメニューを画像にする</title>
			<link>http://sauce.webnist.net/2010/11/25/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%a1%e3%83%8b%e3%83%a5%e3%83%bc%e3%82%92%e7%94%bb%e5%83%8f%e3%81%ab%e3%81%99%e3%82%8b</link>
			<comments>#comments</comments>
			<pubDate>2010/11/25</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[以下をテーマ内のfunction.phpに挿入してください。

[php]
add_filter( 'the_title', 'img_nav_menu_title' );
function img_nav_menu_title($title) {
	if( preg_match( &quot;/\[\[(.*)\]\]/&quot;, $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( &quot;/\[\[(.*)\]\]/&quot;, '', $title );
			$title = '&lt;img src=&quot;' . $get_img_url . '&quot; alt=&quot;' . $get_alt . '&quot; /&gt;';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]


ナビゲーションラベルに
ラベル名[[画像のURL]]
を入力すると画像が表示されます。
ラベル名[[none]]
とするとタイトルは表示されません。
※<a title="ウィジェットタイトルに画像を入れる" href="http://sauce.webnist.net/2010/11/25/%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ab%e7%94%bb%e5%83%8f%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b/">前回のウィジェットタイトルに画像を入れる</a>をしている場合は、
[php]
add_filter( 'the_title', 'img_widget_title' );
[/php]
を追加してもらえれば使用できます。

後はCSSを調整して終了です。]]></description>
			<content:encoded><![CDATA[以下をテーマ内のfunction.phpに挿入してください。

[php]
add_filter( 'the_title', 'img_nav_menu_title' );
function img_nav_menu_title($title) {
	if( preg_match( &quot;/\[\[(.*)\]\]/&quot;, $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( &quot;/\[\[(.*)\]\]/&quot;, '', $title );
			$title = '&lt;img src=&quot;' . $get_img_url . '&quot; alt=&quot;' . $get_alt . '&quot; /&gt;';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]


ナビゲーションラベルに
ラベル名[[画像のURL]]
を入力すると画像が表示されます。
ラベル名[[none]]
とするとタイトルは表示されません。
※<a title="ウィジェットタイトルに画像を入れる" href="http://sauce.webnist.net/2010/11/25/%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ab%e7%94%bb%e5%83%8f%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b/">前回のウィジェットタイトルに画像を入れる</a>をしている場合は、
[php]
add_filter( 'the_title', 'img_widget_title' );
[/php]
を追加してもらえれば使用できます。

後はCSSを調整して終了です。]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>ウィジェットタイトルに画像を入れる</title>
			<link>http://sauce.webnist.net/2010/11/25/%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ab%e7%94%bb%e5%83%8f%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b</link>
			<comments>#comments</comments>
			<pubDate>2010/11/25</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[以下をテーマ内のfunction.phpに挿入してください。
[php]
add_filter( 'widget_title', 'img_widget_title' );
function img_widget_title($title) {
	if( preg_match( &quot;/\[\[(.*)\]\]/&quot;, $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( &quot;/\[\[(.*)\]\]/&quot;, '', $title );
			$title = '&lt;img src=&quot;' . $get_img_url . '&quot; alt=&quot;' . $get_alt . '&quot; ' . $get_size[3] . ' /&gt;';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]
ウィジェットのタイトルに
タイトル[[画像のURL]]
を入力すると画像が表示されます。
タイトル[[none]]
とするとタイトルは表示されません。
]]></description>
			<content:encoded><![CDATA[以下をテーマ内のfunction.phpに挿入してください。
[php]
add_filter( 'widget_title', 'img_widget_title' );
function img_widget_title($title) {
	if( preg_match( &quot;/\[\[(.*)\]\]/&quot;, $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( &quot;/\[\[(.*)\]\]/&quot;, '', $title );
			$title = '&lt;img src=&quot;' . $get_img_url . '&quot; alt=&quot;' . $get_alt . '&quot; ' . $get_size[3] . ' /&gt;';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]
ウィジェットのタイトルに
タイトル[[画像のURL]]
を入力すると画像が表示されます。
タイトル[[none]]
とするとタイトルは表示されません。
]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>ウィジェットタイトルに画像を入れる</title>
			<link>http://themes.webnist.net/2010/09/09/%e3%82%a6%e3%82%a3%e3%82%b8%e3%82%a7%e3%83%83%e3%83%88%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%ab%e7%94%bb%e5%83%8f%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b</link>
			<comments>#comments</comments>
			<pubDate>2010/09/09</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[以下をテーマ内のfunction.phpに挿入してください。
[php]
add_filter( 'widget_title', 'img_widget_title' );
function img_widget_title($title) {
	if( preg_match( "/\[\[(.*)\]\]/", $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( "/\[\[(.*)\]\]/", '', $title );
			$title = '<img src="' . $get_img_url . '" alt="' . $get_alt . '" ' . $get_size[3] . ' />';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]
ウィジェットのタイトルに
タイトル[[画像のURL]]
を入力すると画像が表示されます。
タイトル[[none]]
とするとタイトルは表示されません。
]]></description>
			<content:encoded><![CDATA[以下をテーマ内のfunction.phpに挿入してください。
[php]
add_filter( 'widget_title', 'img_widget_title' );
function img_widget_title($title) {
	if( preg_match( "/\[\[(.*)\]\]/", $title, $match ) ) {
		$get_title = $match[1];
		$get_img_url = clean_url($get_title);
		if($get_title == 'none') {
			$title = '';
		} else {
			$get_img_dir = str_replace( get_option('home') . '/', ABSPATH, $get_img_url );
			$get_size    = getimagesize( $get_img_dir );
			$get_alt     = preg_replace( "/\[\[(.*)\]\]/", '', $title );
			$title = '<img src="' . $get_img_url . '" alt="' . $get_alt . '" ' . $get_size[3] . ' />';
		}
		return $title;
	} else {
		return $title;
	}
}
[/php]
ウィジェットのタイトルに
タイトル[[画像のURL]]
を入力すると画像が表示されます。
タイトル[[none]]
とするとタイトルは表示されません。
]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>雨宿り</title>
			<link>http://photo.webnist.net/2010/09/09/%e9%9b%a8%e5%ae%bf%e3%82%8a</link>
			<comments>#comments</comments>
			<pubDate>2010/09/09</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[大きめな傘で]]></description>
			<content:encoded><![CDATA[大きめな傘で]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
<item>
			<title>次期テーマ作成中</title>
			<link>http://themes.webnist.net/2010/08/09/%e6%ac%a1%e6%9c%9f%e3%83%86%e3%83%bc%e3%83%9e%e4%bd%9c%e6%88%90%e4%b8%ad</link>
			<comments>#comments</comments>
			<pubDate>2010/08/09</pubDate>
			<dc:creator></dc:creator>
			<guid isPermaLink="false"></guid>
			<description><![CDATA[今、テーマを作成しています。
主な機能としては
<ul>
	<li> 投稿数によってレベルを持たせる。</li>
	<li>最終投稿日によって画面の色を変化</li>
</ul>
基礎的な部分は作成されています。
公開は近日]]></description>
			<content:encoded><![CDATA[今、テーマを作成しています。
主な機能としては
<ul>
	<li> 投稿数によってレベルを持たせる。</li>
	<li>最終投稿日によって画面の色を変化</li>
</ul>
基礎的な部分は作成されています。
公開は近日]]></content:encoded>
			<wfw:commentRss>feed/</wfw:commentRss>
			<slash:comments></slash:comments>
			</item>
</channel>
</rss>

