Exemple #1
0
    public static function backend_js()
    {
        if (!self::is_options_page()) {
            return;
        }
        $config = ['vars' => ['locale' => str_replace('-', '_', theme_cache::get_bloginfo('language')), 'theme_js' => theme_features::get_theme_js(), 'theme_css' => theme_features::get_theme_css(), 'theme_images' => theme_features::get_theme_images_url(), 'process_url' => theme_features::get_process_url(), 'timestamp' => theme_file_timestamp::get_timestamp()], 'lang' => ['M01' => ___('Loading, please wait...'), 'E01' => ___('Sorry, server is busy now, can not respond your request, please try again later.')]];
        /** Hook 'backend_js_config' */
        ?>
		<script>
		window.THEME_CONFIG = <?php 
        echo json_encode(apply_filters('backend_js_config', (array) $config));
        ?>
;
		</script>
		<?php 
    }