load_script_translations

過濾鉤子
apply_filters( 'load_script_translations', $translations, $file, $handle, $domain )
引數
  • (string) $translations JSON-encoded translation data.
    Required:
  • (string) $file Path to the translation file that was loaded.
    Required:
  • (string) $handle Name of the script to register a translation domain to.
    Required:
  • (string) $domain The text domain.
    Required:
定義位置
相關勾子
pre_load_script_translationsload_script_translation_fileasync_update_translationload_script_textdomain_relative_pathwp_mce_translation
相關方法
load_script_translationswp_set_script_translationsload_script_textdomainwp_load_translations_earlylist_translation_updateswp_get_translation_updates
引入
5.0.2
棄用
-

load_script_translations: 這個函式載入一個指令碼的翻譯。它用於將指令碼中的文字字串翻譯成網站的適當語言。

過濾給定檔案、指令碼控制代碼和文字域的指令碼翻譯。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'load_script_translations', $translations, $file, $handle, $domain );
return apply_filters( 'load_script_translations', $translations, $file, $handle, $domain );
return apply_filters( 'load_script_translations', $translations, $file, $handle, $domain );

常見問題

FAQs
檢視更多 >