theme-compatibility
4 years ago
tinymce_translate.php
4 years ago
tutor-general-functions.php
4 years ago
tutor-template-functions.php
4 years ago
tutor-template-hook.php
4 years ago
tinymce_translate.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Add translation support for external tinyMCE button |
| 4 | * |
| 5 | * Containing all translate able strings |
| 6 | * |
| 7 | * @since 1.9.7 |
| 8 | */ |
| 9 | if ( ! defined( 'ABSPATH' ) ) |
| 10 | exit; |
| 11 | |
| 12 | if ( ! class_exists( '_WP_Editors' ) ) |
| 13 | require( ABSPATH . WPINC . '/class-wp-editor.php' ); |
| 14 | |
| 15 | function tutor_tinymce_plugin_translation() { |
| 16 | $strings = array( |
| 17 | 'tutor_shortcode' => __( 'Tutor ShortCode', 'tutor' ), |
| 18 | 'student_registration_form' => __( 'Student Registration Form', 'tutor' ), |
| 19 | 'instructor_registration_form' => __( 'Instructor Registration Form', 'tutor' ), |
| 20 | 'courses' => _x( 'Courses', 'tinyMCE button courses', 'tutor' ), |
| 21 | 'courses_shortcode' => __( 'Courses Shortcode', 'tutor' ), |
| 22 | 'courses_separate_by' => __( 'Course id, separate by (,) comma', 'tutor' ), |
| 23 | 'exclude_course_ids' => __( 'Exclude Course IDS', 'tutor' ), |
| 24 | 'category_ids' => __( 'Category IDS', 'tutor' ), |
| 25 | 'order_by' => _x( 'Order By :', 'tinyMCE button order by', 'tutor' ), |
| 26 | 'order' => __( 'Order :', 'tinyMCE button order', 'tutor' ), |
| 27 | 'count' => __( 'Count', 'tutor' ), |
| 28 | ); |
| 29 | |
| 30 | $locale = _WP_Editors::$mce_locale; |
| 31 | $translated = 'tinyMCE.addI18n("' . $locale . '.tutor_button", ' . json_encode( $strings ) . ");\n"; |
| 32 | |
| 33 | return $translated; |
| 34 | } |
| 35 | |
| 36 | $strings = tutor_tinymce_plugin_translation(); |
| 37 | |
| 38 |