1 | <?php |
||
21 | final class Black_Studio_TinyMCE_Compatibility_WordPress { |
||
22 | |||
23 | /** |
||
24 | * The single instance of the class |
||
25 | * |
||
26 | * @var object |
||
27 | * @since 2.0.0 |
||
28 | */ |
||
29 | protected static $_instance = null; |
||
30 | |||
31 | /** |
||
32 | * Return the single class instance |
||
33 | * |
||
34 | * @return object |
||
35 | * @since 2.0.0 |
||
36 | */ |
||
37 | public static function instance() { |
||
43 | |||
44 | /** |
||
45 | * Class constructor |
||
46 | * |
||
47 | * @uses get_bloginfo() |
||
48 | * @uses add_action() |
||
49 | * |
||
50 | * @since 2.0.0 |
||
51 | */ |
||
52 | protected function __construct() { |
||
61 | |||
62 | /** |
||
63 | * Prevent the class from being cloned |
||
64 | * |
||
65 | * @return void |
||
66 | * @since 2.0.0 |
||
67 | */ |
||
68 | protected function __clone() { |
||
71 | |||
72 | /** |
||
73 | * Compatibility for WordPress prior to 3.5 |
||
74 | * |
||
75 | * @uses add_filter() |
||
76 | * @uses Black_Studio_TinyMCE_Admin::enabled() |
||
77 | * |
||
78 | * @return void |
||
79 | * @since 2.0.0 |
||
80 | */ |
||
81 | public function wp_pre_35() { |
||
86 | |||
87 | /** |
||
88 | * Enable full media options in upload dialog for WordPress prior to 3.5 |
||
89 | * (this is done excluding post_id parameter in Thickbox iframe url) |
||
90 | * |
||
91 | * @global string $pagenow |
||
92 | * @param string $upload_iframe_src Source of the iframe for the upload dialog. |
||
93 | * @return string |
||
94 | * @since 2.0.0 |
||
95 | */ |
||
96 | public function wp_pre_35_upload_iframe_src( $upload_iframe_src ) { |
||
103 | |||
104 | /** |
||
105 | * Compatibility for WordPress prior to 3.9 |
||
106 | * |
||
107 | * @uses add_action() |
||
108 | * @uses remove_action() |
||
109 | * @uses add_filter() |
||
110 | * @uses get_bloginfo() |
||
111 | * @uses Black_Studio_TinyMCE_Admin::enabled() |
||
112 | * |
||
113 | * @return void |
||
114 | * @since 2.0.0 |
||
115 | */ |
||
116 | public function wp_pre_39() { |
||
133 | |||
134 | /** |
||
135 | * Filter to enqueue style / script for WordPress prior to 3.9 |
||
136 | * |
||
137 | * @return string |
||
138 | * @since 2.0.0 |
||
139 | */ |
||
140 | public function wp_pre_39_handle() { |
||
143 | |||
144 | /** |
||
145 | * TinyMCE initialization for WordPress prior to 3.9 |
||
146 | * |
||
147 | * @param mixed[] $settings Array of settings. |
||
148 | * @return mixed[] |
||
149 | * @since 2.0.0 |
||
150 | */ |
||
151 | public function wp_pre_39_tiny_mce_before_init( $settings ) { |
||
164 | |||
165 | /** |
||
166 | * Enqueue footer scripts for WordPress prior to 3.9 |
||
167 | * |
||
168 | * @uses wp_editor() |
||
169 | * |
||
170 | * @return void |
||
171 | * @since 2.0.0 |
||
172 | */ |
||
173 | public function wp_pre_39_admin_print_footer_scripts() { |
||
178 | |||
179 | /** |
||
180 | * Output the visual editor code for WordPress prior to 3.9 |
||
181 | * |
||
182 | * @uses esc_attr() |
||
183 | * @uses esc_textarea() |
||
184 | * @uses do_action() |
||
185 | * |
||
186 | * @param string $text Widget text. |
||
187 | * @param string $id Widget ID. |
||
188 | * @param string $name Widget name. |
||
189 | * @param string $type Widget type. |
||
190 | * @return void |
||
191 | * @since 2.0.0 |
||
192 | */ |
||
193 | public function wp_pre_39_editor( $text, $id, $name = '', $type = 'visual' ) { |
||
212 | |||
213 | } // END class Black_Studio_TinyMCE_Compatibility_Wordpress |
||
214 | |||
216 |