本文整理汇总了PHP中wpseo_load_textdomain函数的典型用法代码示例。如果您正苦于以下问题:PHP wpseo_load_textdomain函数的具体用法?PHP wpseo_load_textdomain怎么用?PHP wpseo_load_textdomain使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpseo_load_textdomain函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _wpseo_activate
/**
* Runs on activation of the plugin.
*/
function _wpseo_activate()
{
require_once WPSEO_PATH . 'inc/wpseo-functions.php';
wpseo_load_textdomain();
// Make sure we have our translations available for the defaults
WPSEO_Options::get_instance();
if (!is_multisite()) {
WPSEO_Options::initialize();
} else {
WPSEO_Options::maybe_set_multisite_defaults(true);
}
WPSEO_Options::ensure_options_exist();
flush_rewrite_rules();
wpseo_add_capabilities();
WPSEO_Options::schedule_yoast_tracking(null, get_option('wpseo'));
// Clear cache so the changes are obvious.
WPSEO_Options::clear_cache();
do_action('wpseo_activate');
}
示例2: _wpseo_activate
/**
* Runs on activation of the plugin.
*/
function _wpseo_activate()
{
require_once WPSEO_PATH . 'inc/wpseo-functions.php';
wpseo_load_textdomain();
// Make sure we have our translations available for the defaults.
WPSEO_Options::get_instance();
if (!is_multisite()) {
WPSEO_Options::initialize();
} else {
WPSEO_Options::maybe_set_multisite_defaults(true);
}
WPSEO_Options::ensure_options_exist();
if (is_multisite() && ms_is_switched()) {
delete_option('rewrite_rules');
} else {
add_action('shutdown', 'flush_rewrite_rules');
}
wpseo_add_capabilities();
// Clear cache so the changes are obvious.
WPSEO_Utils::clear_cache();
do_action('wpseo_activate');
}
示例3: _initialize_yoast
function _initialize_yoast()
{
wpseo_init();
wpseo_admin_init();
wpseo_load_textdomain();
$options = WPSEO_Options::get_all();
new WPSEO_Metabox();
WPSEO_Metabox::translate_meta_boxes();
if ($options['opengraph'] === true || $options['twitter'] === true || $options['googleplus'] === true) {
new WPSEO_Social_Admin();
WPSEO_Social_Admin::translate_meta_boxes();
}
}