コード例 #1
0
        function load_mce_translation()
        {
            if (!class_exists('_WP_Editors')) {
                require ABSPATH . WPINC . '/class-wp-editor.php';
            }
            ?>
		<script>var tadvTranslation = <?php 
            echo _WP_Editors::wp_mce_translation('', true);
            ?>
;</script>
		<?php 
        }
コード例 #2
0
        function load_mce_translation()
        {
            if (!class_exists('_WP_Editors')) {
                require ABSPATH . WPINC . '/class-wp-editor.php';
            }
            $strings = _WP_Editors::wp_mce_translation();
            $strings = preg_replace('/tinymce.addI18n[^{]+/', '', $strings);
            $strings = preg_replace('/[^}]*$/', '', $strings);
            if ($strings) {
                ?>
			<script type="text/javascript">var tadvTranslation = <?php 
                echo $strings;
                ?>
;</script>
			<?php 
            }
        }