is_rtl

函式
is_rtl ( No parameters )
返回值
  • (bool) Whether locale is RTL.
定義位置
相關方法
is_robotsis_tagis_sslis_taxesc_url
引入
3.0.0
棄用
-

is_rtl – 這個函式檢查當前語言是否是從右到左的語言。如果語言是從右到左的,它返回真,否則返回假。

確定當前的語言環境是否為從右到左(RTL)。

關於這個和類似的主題函式的更多資訊,請檢視《主題開發者手冊》中的{@link Conditional Tags}文章。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function is_rtl() {
global $wp_locale;
if ( ! ( $wp_locale instanceof WP_Locale ) ) {
return false;
}
return $wp_locale->is_rtl();
}
function is_rtl() { global $wp_locale; if ( ! ( $wp_locale instanceof WP_Locale ) ) { return false; } return $wp_locale->is_rtl(); }
function is_rtl() {
	global $wp_locale;
	if ( ! ( $wp_locale instanceof WP_Locale ) ) {
		return false;
	}
	return $wp_locale->is_rtl();
}

常見問題

FAQs
檢視更多 >