<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									[C] 新着情報にget_post_classを適用してほしい - 要望				            </title>
            <link>https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/</link>
            <description>Cocoon ディスカッション掲示板</description>
            <language>ja</language>
            <lastBuildDate>Thu, 18 Jun 2026 13:55:56 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE:  新着情報にget_post_classを適用してほしい</title>
                        <link>https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85230</link>
                        <pubDate>Thu, 22 May 2025 10:00:31 +0000</pubDate>
                        <description><![CDATA[ご確認いただきありがとうございます！]]></description>
                        <content:encoded><![CDATA[<p>ご確認いただきありがとうございます！</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>わいひら</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85230</guid>
                    </item>
				                    <item>
                        <title>RE:  新着情報にget_post_classを適用してほしい</title>
                        <link>https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85208</link>
                        <pubDate>Wed, 21 May 2025 11:25:44 +0000</pubDate>
                        <description><![CDATA[----------------------------------------------テーマ名：Cocoonバージョン：2.8.5.6カテゴリー数：18タグ数：122ユーザー数：1----------------------------------------------追加されていることを確認しました。本件をクローズとします。

●ご参考
WordPressの表示...]]></description>
                        <content:encoded><![CDATA[<p>----------------------------------------------<br />テーマ名：Cocoon<br />バージョン：2.8.5.6<br />カテゴリー数：18<br />タグ数：122<br />ユーザー数：1<br />----------------------------------------------<br />追加されていることを確認しました。<br />本件をクローズとします。</p>
<hr />
<p><span style="font-size: 14pt"><strong>●ご参考</strong></span></p>
<p>WordPressの表示で、パスワードを入力し表示となっても「保護中：」の表示まま。<br />このため、パスワードで解除されたか否か分からない。</p>
<p>そこで、新着記事、人気記事のタイトルから「保護中：」を削除。<br />代わりに、CSSクラスを判定してアイコンを表示させる。<br />パスワードの有効期限は標準10日なので、パスワード入力要否の状態が明確になり。</p>
<div id="wpfa-43167" class="wpforo-attached-file"><a class="wpforo-default-attachment" title="2.png" href="//wp-cocoon.com/wp-content/uploads/wpforo/default_attachments/1747826744-2.png" target="_blank" rel="noopener"><i class="fas fa-paperclip"></i> 2.png</a></div>
<div id="wpfa-43168" class="wpforo-attached-file"><a class="wpforo-default-attachment" title="1.png" href="//wp-cocoon.com/wp-content/uploads/wpforo/default_attachments/1747826752-1.png" target="_blank" rel="noopener"><i class="fas fa-paperclip"></i> 1.png</a></div>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85208</guid>
                    </item>
				                    <item>
                        <title>RE:  新着情報にget_post_classを適用してほしい</title>
                        <link>https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85204</link>
                        <pubDate>Wed, 21 May 2025 10:55:37 +0000</pubDate>
                        <description><![CDATA[ご要望いただきありがとうございます。確かにあった方がいいですね。get_post_classを適用させていただきました]]></description>
                        <content:encoded><![CDATA[<p>ご要望いただきありがとうございます。<br />確かにあった方がいいですね。<br />get_post_classを適用させていただきました。<br />https://github.com/xserver-inc/cocoon/commit/366dae71b29897213e3fd202f29a44844b7cb01e</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>わいひら</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85204</guid>
                    </item>
				                    <item>
                        <title> 新着情報にget_post_classを適用してほしい</title>
                        <link>https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85198</link>
                        <pubDate>Wed, 21 May 2025 06:23:51 +0000</pubDate>
                        <description><![CDATA[----------------------------------------------テーマ名：Cocoonバージョン：2.8.5.6カテゴリー数：18タグ数：122ユーザー数：1----------------------------------------------
●要望
新着情報（info_list）に、新着記事や人気記事と同様に、投稿記事のクラス名（get...]]></description>
                        <content:encoded><![CDATA[<p>----------------------------------------------<br />テーマ名：Cocoon<br />バージョン：2.8.5.6<br />カテゴリー数：18<br />タグ数：122<br />ユーザー数：1<br />----------------------------------------------</p>
<p><span style="font-size: 14pt"><strong>●要望</strong></span></p>
<p style="text-align: left">新着情報（info_list）に、新着記事や人気記事と同様に、投稿記事のクラス名（get_post_class）を追加したい。</p>
<hr />
<p style="text-align: left"><span style="font-size: 14pt"><strong>●目的</strong></span></p>
<p style="text-align: left">投稿がパスワード保護や非公開設定の場合でも、新着記事や人気記事ではget_post_classによってCSSクラスが反映され、状態を判別できる。<br />しかし、新着情報ではタイトルに「保護中：」と表示されるだけで、CSSで状態を判別できるクラスが付与されていない。</p>
<hr />
<p style="text-align: left"><span style="font-size: 14pt"><strong>●対策案</strong></span></p>
<p style="text-align: left">以下に変更する。</p>
<pre contenteditable="false">&lt;div &lt;?php post_class('info-list-item'); ?&gt;&gt;</pre>
<p style="text-align: left"><a href="https://github.com/xserver-inc/cocoon/blob/b9df195808c7743799019912b76c629d7d4ff0ed/lib/html-forms.php#L1938" target="_blank" rel="noopener">https://github.com/xserver-inc/cocoon/blob/b9df195808c7743799019912b76c629d7d4ff0ed/lib/html-forms.php#L1938</a><br /><br /></p>
<hr />
<p style="text-align: left"><span style="font-size: 14pt"><strong>●ご参考</strong></span></p>
<p style="text-align: left">パスワード保護された投稿タイトルの接頭辞「保護中：」を、アイコンに置き換えるカスタマイズをした。<br /><br /></p>
<pre contenteditable="false">add_filter('protected_title_format', function($prepend, $post) {
    $icon = '&lt;i class="fas fa-lock"&gt;&lt;/i&gt;';
    if (post_password_required()) {
        $icon = '&lt;i class="fas fa-unlock"&gt;&lt;/i&gt;';
    }
    return $icon . '%s';
}, 10, 2);
</pre>
<p style="text-align: left"><br />しかし、get_the_title()は内部でこのprotected_title_formatを利用しており、結果として<span style="color: #ff0000">HTMLタグを含んだタイトルが返される</span>。<br />そのため、SEO のタイトルタグやSNS シェアタイトルにHTML を含んだ<span style="color: #ff0000">不適切な出力</span>となってしまう。<br />このような場合、SEOタイトルなどで、strip_tagsする必要が生じる。</p>
<p> </p>
<p>同様に、タイトル前にNEWマークを付けるカスタマイズコードを散見する。<br /><span>その際、the_titleを用いspanタグを追加しており。<br />上記と同様なことが言える。<br /></span></p>
<p>私も大分昔に、同じことをして、フォーラムで指摘を受け（苦笑）</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/demands/">要望</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/demands/c-%e6%96%b0%e7%9d%80%e6%83%85%e5%a0%b1%e3%81%abget_post_class%e3%82%92%e9%81%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bb%e3%81%97%e3%81%84/#post-85198</guid>
                    </item>
							        </channel>
        </rss>
		