wpml_must_translate_canonical_url
- หมวดหมู่
- ข้อมูลภาษาทั่วทั้งไซต์
- เวอร์ชันของ WPML
- 4.1.0
คำอธิบาย
ฟิลเตอร์นี้สามารถป้องกันไม่ให้ WPML แปล canonical URL หากฟิลเตอร์คืนค่า false WPML จะใช้ canonical URL ของ WP SEO
ตัวอย่างการใช้งาน
$should_translate_canonical_url = apply_filters( 'wpml_must_translate_canonical_url', true, $post_element );
if ( ! $should_translate_canonical_url ) {
return $canonical_url;
}
ฮุกที่เกี่ยวข้อง
wpml_decode_custom_field, wpml_footer_language_selector, wpml_add_language_form_field, wpml_ls_exclude_in_menu, wpml_is_rtl, wpml_alternate_hreflang, wpml_head_langs, wpml_browser_redirect_language_params, wpml_active_languages, wpml_encode_custom_field