- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「関数リファレンス/is rtl」の版間の差分
(英語版をコピペ。) |
(和訳完了。) |
||
1行目: | 1行目: | ||
− | = | + | <div id="Description"> |
+ | == 説明 == | ||
+ | </div> | ||
+ | 現状のロケールが RTL (Right To Left writing: アラビア語やヘブライ語のように右から左へ記述する言語) であるか否かをチェックする関数です。 | ||
− | + | <div id="Usage"> | |
+ | == 使用法 == | ||
+ | </div> | ||
+ | <?php is_rtl() ?> | ||
− | == | + | <div id="Parameters"> |
+ | == パラメーター == | ||
+ | </div> | ||
+ | この関数はパラメーターを受け付けません。 | ||
− | + | <div id="Return Values"> | |
− | + | == 戻り値 == | |
− | == | + | </div> |
− | + | ; <tt>(boolean)</tt> : RTLである場合は <tt>True</tt>。LTR (Left To Right writing) の場合は <tt>False</tt>。 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | ; <tt>(boolean)</tt> : True | + | |
− | + | ||
− | + | ||
+ | <div id="Example"> | ||
+ | == 使用例 == | ||
+ | </div> | ||
if ( is_rtl() ) { | if ( is_rtl() ) { | ||
wp_enqueue_style( 'style-rtl', plugins_url('/css/style-rtl.css', __FILE__) ); | wp_enqueue_style( 'style-rtl', plugins_url('/css/style-rtl.css', __FILE__) ); | ||
22行目: | 27行目: | ||
} | } | ||
− | = | + | <div id="Notes"> |
+ | == 注 == | ||
+ | </div> | ||
+ | * [[Version 3.0]] にて <tt>[[Function Reference/bloginfo#Parameters|get_bloginfo('text_direction')]]</tt> の代わりに <tt>is_rtl()</tt> が推奨されることになりました。 | ||
− | * | + | <div id="Change Log"> |
+ | == 改訂履歴 == | ||
+ | </div> | ||
+ | * [[Version 3.0|3.0]]にて導入されました。 | ||
− | == | + | <div id="Source File"> |
+ | == ソースファイル == | ||
+ | </div> | ||
+ | <tt>is_rtl()</tt> は {{Trac|wp-includes/locale.php}} にあります。 | ||
− | + | <div id="Related"> | |
+ | == 関連項目 == | ||
+ | </div> | ||
+ | {{Conditional Tags}} | ||
− | + | {{原文| Function Reference/is rtl|136150}}<!-- 22:22, September 23, 2013 Djkaz 版 --> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
{{Tag Footer}} | {{Tag Footer}} |
2013年9月23日 (月) 22:36時点における版
現状のロケールが RTL (Right To Left writing: アラビア語やヘブライ語のように右から左へ記述する言語) であるか否かをチェックする関数です。
使用法
<?php is_rtl() ?>
パラメーター
この関数はパラメーターを受け付けません。
戻り値
- (boolean)
- RTLである場合は True。LTR (Left To Right writing) の場合は False。
使用例
if ( is_rtl() ) { wp_enqueue_style( 'style-rtl', plugins_url('/css/style-rtl.css', __FILE__) ); wp_enqueue_script( 'script-rtl', plugins_url('/js/script-rtl.js', __FILE__) ); }
注
- Version 3.0 にて get_bloginfo('text_direction') の代わりに is_rtl() が推奨されることになりました。
改訂履歴
- 3.0にて導入されました。
ソースファイル
is_rtl() は wp-includes/locale.php
にあります。
関連項目
条件分岐タグ: is_404(), is_admin(), is_admin_bar_showing(), is_archive(), is_attachment(), is_author(), is_category(), is_comments_popup(), is_date(), is_day(), is_feed(), is_front_page(), is_home(), is_local_attachment(), is_main_query, /is_multi_author, is_month(), is_new_day(), is_page(), is_page_template(), is_paged(), is_plugin_active(), is_plugin_active_for_network() /en, is_plugin_inactive() /en, is_plugin_page() /en, is_post_type_archive(), is_preview() /en, is_search(), is_single(), is_singular(), is_sticky(), is_tag(), is_tax(), is_taxonomy_hierarchical(), is_time(), is_trackback(), is_year(), in_category(), in_the_loop(), is_active_sidebar(), is_active_widget(), is_blog_installed() /en, is_rtl(), is_dynamic_sidebar(), is_user_logged_in(), has_excerpt(), has_post_thumbnail(), has_tag(), pings_open(), email_exists(), post_type_exists(), taxonomy_exists(), term_exists(), username_exists() /en, wp_attachment_is_image(), wp_script_is()
最新英語版: WordPress Codex » Function Reference/is rtl (最新版との差分)