- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「関数リファレンス/capital P dangit」の版間の差分
提供: WordPress Codex 日本語版
< 関数リファレンス
(英語版をコピペ。) |
(英訳完了。) |
||
2行目: | 2行目: | ||
== 説明 == | == 説明 == | ||
</div> | </div> | ||
− | + | "Wordpress" という誤った表記を "WordPress" に変更します。 | |
− | + | WordPress はこれを [[Template_Tags/the_content|the content]] 、 [[Template_Tags/the_title|the title]] 、 [[Template_Tags/comment_text|comment text]] のフィルターにて用います。 | |
− | WordPress | + | |
<div id="Usage"> | <div id="Usage"> | ||
14行目: | 13行目: | ||
== パラメーター == | == パラメーター == | ||
</div> | </div> | ||
− | ; <var>text</var> : (string) | + | ; <var>text</var> : (string) フォーマットされるべきテキスト。 |
<div id="Removing"> | <div id="Removing"> | ||
== 削除 == | == 削除 == | ||
</div> | </div> | ||
− | + | これらのフィルターを使いたくない場合、以下のようにして削除します: | |
<pre> | <pre> | ||
35行目: | 34行目: | ||
== リファレンス == | == リファレンス == | ||
</div> | </div> | ||
− | * [http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit Lowercase p, dangit!] | + | * [http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit Lowercase p, dangit!] Justin Tadlock によるこのフィルターの問題点に関する良い内容です。 |
* [http://capitalp.org Capitalp.org] | * [http://capitalp.org Capitalp.org] | ||
2014年2月8日 (土) 18:23時点における版
"Wordpress" という誤った表記を "WordPress" に変更します。 WordPress はこれを the content 、 the title 、 comment text のフィルターにて用います。
使用法
<?php capital_P_dangit( $text ); ?> %%%
パラメーター
- text
- (string) フォーマットされるべきテキスト。
削除
これらのフィルターを使いたくない場合、以下のようにして削除します:
remove_filter( 'the_title', 'capital_P_dangit', 11 ); remove_filter( 'the_content', 'capital_P_dangit', 11 ); remove_filter( 'comment_text', 'capital_P_dangit', 31 );
ソースファイル
capital_P_dangit() は wp-includes/formatting.php
の 3327 行目にあります。
リファレンス
- Lowercase p, dangit! Justin Tadlock によるこのフィルターの問題点に関する良い内容です。
- Capitalp.org
最新英語版: WordPress Codex » Function Reference/capital P dangit (最新版との差分)
この記事は翻訳時に編集が必要であるとマークされていました。その為Codex原文が大きく編集されている可能性があります。内容を確認される際は原文を参照していただき、可能であれば本項目へ反映させてください。よりよいCodexを作成するためのお手伝いをお願いします。