apply_filters( 'wpml_is_rtl', mixed $empty_value )
- 类型
- filter
- 类别
- 全站语言信息
- WPML 版本
- 3.2
说明
如果当前语言为 RTL,则返回 TRUE
参数
- $empty_value
- (mixed) (必填) 这通常是过滤器将要修改的值。我们在这里不进行任何过滤,因此将其设置为 NULL。这是为了让过滤器函数实际接收完整的参数列表。
使用示例
示例
if ( apply_filters( 'wpml_is_rtl', NULL) ) {
//Link to RTL CSS stylesheet
} else {
//Link to LTR CSS stylesheet
}
// Alternatively
//Include link to LTR CSS stylesheet here
if ( apply_filters( 'wpml_is_rtl', false ) ) {
//Link to RTL CSS stylesheet
}
相关钩子
wpml_decode_custom_field, wpml_footer_language_selector, wpml_add_language_form_field, wpml_ls_exclude_in_menu, wpml_alternate_hreflang, wpml_head_langs, wpml_must_translate_canonical_url, wpml_browser_redirect_language_params, wpml_active_languages, wpml_encode_custom_field