wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_just_in_time_script_localization › WordPress Function
Since2.5.0
已弃用n/a
› wp_just_in_time_script_localization ( 没有参数 )
| 定义在: |
|
| 文档: |
Loads localized data on print rather than initialization.
These localizations require information that may not be loaded even by init.源码
function wp_just_in_time_script_localization() {
wp_localize_script(
'autosave',
'autosaveL10n',
array(
'autosaveInterval' => AUTOSAVE_INTERVAL,
'blog_id' => get_current_blog_id(),
)
);
wp_localize_script(
'mce-view',
'mceViewL10n',
array(
'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array(),
)
);
wp_localize_script(
'word-count',
'wordCountL10n',
array(
'type' => wp_get_word_count_type(),
'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array(),
)
);
}