首页 WordPress函数大全 load_plugin_textdomain()

load_plugin_textdomain()

2020-05-02 / 4438阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

load_plugin_textdomain( string $domain, string|false $deprecated = false, string|false $plugin_rel_path = false )

加载插件的翻译字符串。

描述

如果未给出路径,则它将是插件目录的根目录。

.mo文件应基于>

参数

$domain

(string)
(Required)
Unique identifier for retrieving translated strings

$deprecated

(string|false)
(Optional)
Deprecated. Use the $plugin_rel_path parameter instead.

Default value: false

$plugin_rel_path

(string|false)
(Optional)
Relative path to WP_PLUGIN_DIR where the .mo file resides.

Default value: false

返回

(bool) True when textdomain is successfully loaded, false otherwise.

大家谈论
    我的见解