WPML
apply_filters( 'wpml_is_rtl', mixed $empty_value )
Loại
filter
Phiên bản WPML
3.2

Miêu tả

Trả về TRUE nếu ngôn ngữ hiện tại là RTL

Đối số

$empty_value
(mixed) (Bắt buộc) Thông thường, đây là giá trị mà bộ lọc sẽ sửa đổi. Chúng ta không lọc bất cứ thứ gì ở đây, vì vậy hãy đặt giá trị này thành NULL. Điều này giúp hàm của bộ lọc thực sự nhận được danh sách đối số đầy đủ

Ví dụ sử dụng

Ví dụ
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

Tất cả 29 hook Thông tin ngôn ngữ toàn trang web →