PluginProbe ʕ •ᴥ•ʔ
Advanced Editor Tools / 5.6.0
Advanced Editor Tools v5.6.0
trunk 1.0 1.0.1 2.0 2.2 3.0 3.0.1 3.1 3.2 3.2.4 3.2.7 3.3.9 3.3.9.1 3.3.9.2 3.4.2 3.4.2.1 3.4.5 3.4.5.1 3.4.9 3.5.8 3.5.9 3.5.9.1 4.0 4.0.1 4.0.2 4.1 4.1.1 4.1.7 4.1.9 4.2.3 4.2.3.1 4.2.5 4.2.8 4.3.10 4.3.10.1 4.3.8 4.4.1 4.4.3 4.5.6 4.6.3 4.6.7 4.7.11 4.8.0 4.8.1 4.8.2 5.0.0 5.0.1 5.1.0 5.2 5.2.1 5.3 5.4.0 5.5.0 5.5.1 5.6.0 5.9.0 5.9.1 5.9.2
tinymce-advanced / tadv_admin.php
tinymce-advanced Last commit date
block-editor 5 years ago mce 5 years ago plugin-assets 5 years ago readme.txt 5 years ago tadv_admin.php 5 years ago tinymce-advanced.php 5 years ago uninstall.php 5 years ago
tadv_admin.php
997 lines
1 <?php
2 /**
3 * User and admin settings UI.
4 * @package advanced-editor-tools
5 */
6
7 if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
8 exit;
9 }
10
11 // TODO
12 if ( ! current_user_can( 'manage_options' ) ) {
13 wp_die( 'Invalid request' );
14 }
15
16 $message = '';
17 $tadv_options_updated = false;
18 $settings = $admin_settings = array();
19 $images_url = plugins_url( 'plugin-assets/images', __FILE__ );
20 $form_action = esc_url( remove_query_arg( array( 'tadv-import-file-complete' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
21
22 if ( isset( $_POST['tadv-save'] ) ) {
23 check_admin_referer( 'tadv-save-buttons-order' );
24 $this->save_settings();
25 } elseif ( isset( $_POST['tadv-restore-defaults'] ) ) {
26 check_admin_referer( 'tadv-save-buttons-order' );
27
28 // TODO: only for admin || SA
29 $this->admin_settings = $this->get_default_admin_settings();
30 update_option( 'tadv_admin_settings', $this->get_default_admin_settings() );
31
32 // TODO: all users that can have settings
33 $this->user_settings = $this->get_default_user_settings();
34 update_option( 'tadv_settings', $this->get_default_user_settings() );
35
36 $message = '<div class="updated notice notice-success is-dismissible"><p>' . __( 'Default settings restored.', 'tinymce-advanced' ) . '</p></div>';
37 } elseif ( isset( $_POST['tadv-import-settings'] ) ) {
38 check_admin_referer( 'tadv-save-buttons-order' );
39
40 // TODO: all users
41 ?>
42 <div class="wrap advanced-editor-tools">
43 <h2><?php _e( 'Advanced Editor Tools Settings Import', 'tinymce-advanced' ); ?></h2>
44
45 <div class="tadv-import-export">
46 <form action="" method="post" enctype="multipart/form-data" class="import-file">
47 <p><?php _e( 'The settings are imported from a previously exported settings file.', 'tinymce-advanced' ); ?></p>
48 <p><input type="file" name="tadv-import"></p>
49 <p><input type="submit" class="button button-primary" name="tadv-import-file" value="<?php _e( 'Import settings', 'tinymce-advanced' ); ?>" /></p>
50 <?php wp_nonce_field( 'tadv-import-settings', 'tadv-import-settings-nonce', false ); ?>
51 </form>
52 <hr>
53 <form action="<?php echo $form_action; ?>" method="post">
54 <p><?php _e( 'Alternatively the settings can be imported from a JSON encoded string. Please paste the exported string in the text area below.', 'tinymce-advanced' ); ?></p>
55 <p><textarea id="tadv-import" name="tadv-import"></textarea></p>
56 <p>
57 <button type="button" class="button" id="tadv-import-verify"><?php _e( 'Verify', 'tinymce-advanced' ); ?></button>
58 <input type="submit" class="button button-primary alignright" name="tadv-import-submit" value="<?php _e( 'Import settings from string', 'tinymce-advanced' ); ?>" />
59 </p>
60 <?php wp_nonce_field( 'tadv-import-settings', 'tadv-import-settings-nonce', false ); ?>
61 <p id="tadv-import-error"></p>
62 </form>
63 <p><a href=""><?php _e( 'Back to Editor Settings', 'tinymce-advanced' ); ?></a></p>
64 </div>
65 </div>
66 <?php
67
68 return;
69 } elseif ( isset( $_POST['tadv-import-submit'] ) && ! empty( $_POST['tadv-import'] ) && is_string( $_POST['tadv-import'] ) ) {
70 check_admin_referer( 'tadv-import-settings', 'tadv-import-settings-nonce' );
71
72 // TODO: all users that can have settings
73 $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
74
75 if ( ! is_array( $import ) ) {
76 $message = '<div class="error notice is-dismissible"><p>' . __( 'Importing of settings failed.', 'tinymce-advanced' ) . '</p></div>';
77 } else {
78 $this->save_settings( $import );
79 $message = '<div class="updated notice notice-success is-dismissible"><p>' . __( 'Settings imported successfully.', 'tinymce-advanced' ) . '</p></div>';
80 }
81 } elseif ( isset( $_GET['tadv-import-file-complete'] ) ) {
82 $err = (int) $_GET['tadv-import-file-complete'];
83
84 switch( $err ) {
85 case 1:
86 $message = __( 'Importing of settings failed. Please import a valid settings file.', 'tinymce-advanced' );
87 break;
88 case 2:
89 $message = __( 'Importing of settings failed. The imported file is empty.', 'tinymce-advanced' );
90 break;
91 case 3:
92 $message = __( 'Importing of settings failed. The imported file is invalid.', 'tinymce-advanced' );
93 break;
94 }
95
96 if ( empty( $message ) ) {
97 $message = '<div class="updated notice notice-success is-dismissible"><p>' . __( 'Settings imported successfully.', 'tinymce-advanced' ) . '</p></div>';
98 } else {
99 $message = '<div class="error notice is-dismissible"><p>' . $message . '</p></div>';
100 }
101 }
102
103 $this->load_settings();
104
105 if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
106 $message = '<div class="error"><p>' . __( 'ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced' ) . '</p></div>';
107
108 $this->admin_settings = $this->get_default_admin_settings();
109 $this->user_settings = $this->get_default_user_settings();
110 $this->load_settings();
111 }
112
113 $all_buttons = $this->get_all_buttons();
114
115 ?>
116 <div class="wrap tinymce-advanced block-active<?php if ( is_rtl() ) echo ' mce-rtl'; ?>" id="contain">
117 <h2><?php _e( 'Advanced Editor Tools', 'tinymce-advanced' ); ?></h2>
118 <?php
119
120 // TODO admin || SA
121 $this->warn_if_unsupported();
122
123 // Add a notice that the plugin was renamed.
124 // Remove in the bnext version.
125 ?>
126 <div class="notice notice-warning is-dismissible"><p>
127 <?php _e( 'Please note: This plugin was renamed from "TinyMCE Advanced" to "Advanced Editor Tools". The plugin functionality remains the same.', 'tinymce-advanced' ); ?>
128 </p></div>
129 <?php
130
131 if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
132 ?><div class="updated notice notice-success is-dismissible"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
133 } else {
134 echo $message;
135 }
136
137 $dashicons_arrow = is_rtl() ? 'dashicons-arrow-left' : 'dashicons-arrow-right';
138
139 ?>
140 <form id="tadvadmin" method="post" action="<?php echo $form_action; ?>">
141
142 <div class="toggle">
143 <p class="tadv-submit tadv-submit-top">
144 <input class="button-primary button-large top-button" type="submit" name="tadv-save" value="<?php _e( 'Save Changes', 'tinymce-advanced' ); ?>" />
145 </p>
146 <h3 class="settings-toggle block" tabindex="0">
147 <span class="dashicons dashicons-arrow-down"></span>
148 <span class="dashicons arrow-open <?php echo $dashicons_arrow; ?>"></span>
149 <?php _e( 'Block Editor (Gutenberg)', 'tinymce-advanced' ); ?>
150 </h3>
151 <h3 class="settings-toggle classic" tabindex="0">
152 <span class="dashicons dashicons-arrow-down"></span>
153 <span class="dashicons arrow-open <?php echo $dashicons_arrow; ?>"></span>
154 <?php _e( 'Classic Editor (TinyMCE)', 'tinymce-advanced' ); ?>
155 </h3>
156 </div>
157
158 <div id="block-editor">
159 <h4><?php _e( 'Toolbars for the Block Editor', 'tinymce-advanced' ); ?></h4>
160 <div class="block-toolbars">
161 <?php
162 $all_block_buttons = $this->get_all_block_buttons();
163 $all_block_panels = $this->get_all_block_panels();
164
165 ?>
166
167 <div>
168 <p class="toolbar-block-title">
169 <strong><?php _e( 'Main toolbar', 'tinymce-advanced' ); ?></strong>
170 <br>
171 <span class="tma-help tadv-popout-help-toggle">
172 <span class="dashicons dashicons-editor-help"></span>
173 <?php _e( 'Limitations for the Block Editor toolbar', 'tinymce-advanced' ); ?>
174 </span>
175 </p>
176
177 <div class="tadv-popout-help hidden">
178 <span class="tadv-popout-help-close dashicons dashicons-no-alt"></span>
179 <ol>
180 <li><?php _e( 'The Align Left, Align Center, Align Right, Bold, Italic, and Link buttons cannot be moved or arranged.', 'tinymce-advanced' ); ?></li>
181 <li><?php _e( 'All other buttons are always shown in a drop-down. The users are not allowed to add any of them to the main toolbar.', 'tinymce-advanced' ); ?></li>
182 <li><?php _e( 'All buttons that are shown in the drop-down are auto-arranged by alphabetical order. The users are not allowed to arrange them.', 'tinymce-advanced' ); ?></li>
183 <li><?php _e( 'The drop-down cannot be empty and the Inline Image and Text Color items cannot be placed in the side toolbar.', 'tinymce-advanced' ); ?>
184 </ol>
185 </div>
186
187 <div class="toolbar-block-wrap toolbar-wrap">
188 <div role="toolbar" aria-orientation="horizontal" class="tma-block-toolbar-wrap editor-block-toolbar" aria-label="Block toolbar example representation">
189
190 <div class="editor-block-switcher block-editor-block-switcher">
191 <div class="components-toolbar">
192 <button type="button" class="components-button components-icon-button editor-block-switcher__toggle block-editor-block-switcher__toggle">
193 <span class="editor-block-icon block-editor-block-icon has-colors">
194 <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"></path></svg>
195 </span>
196 </button>
197 </div>
198 </div>
199
200 <div class="components-toolbar">
201 <div>
202 <button type="button" aria-label="Align text left" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
203 <span class="dashicons dashicons-editor-alignleft"></span>
204 </button>
205 </div>
206
207 <div>
208 <button type="button" aria-label="Align text center" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
209 <span class="dashicons dashicons-editor-aligncenter"></span>
210 </button>
211 </div>
212
213 <div>
214 <button type="button" aria-label="Align text right" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
215 <span class="dashicons dashicons-editor-alignright"></span>
216 </button>
217 </div>
218 </div>
219
220 <?php if ( is_rtl() ) : ?>
221 <div class="components-toolbar">
222 <div>
223 <button type="button" aria-label="Left to right" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
224 <span class="dashicons dashicons-editor-ltr"></span>
225 </button>
226 </div>
227 </div>
228 <?php endif; ?>
229
230 <div class="editor-format-toolbar block-editor-format-toolbar">
231 <div class="components-toolbar">
232 <div>
233 <button type="button" aria-label="Bold" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
234 <span class="dashicons dashicons-editor-bold"></span>
235 </button>
236 </div>
237
238 <div>
239 <button type="button" aria-label="Italic" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
240 <span class="dashicons dashicons-editor-italic"></span>
241 </button>
242 </div>
243
244 <div>
245 <button type="button" aria-label="Link" aria-pressed="false" class="components-button components-icon-button components-toolbar__control">
246 <span class="dashicons dashicons-admin-links"></span>
247 </button>
248 </div>
249
250 <div class="components-dropdown-menu">
251 <button type="button" aria-label="More Rich Text Controls" aria-haspopup="true" aria-expanded="false" class="components-button components-icon-button components-dropdown-menu__toggle has-text">
252 <span class="components-dropdown-menu__indicator"></span>
253 </button>
254 </div>
255 </div>
256 </div>
257
258 <div>
259 <div class="components-toolbar">
260 <div>
261 <button type="button" aria-label="More options" aria-expanded="false" class="components-button components-icon-button components-toolbar__control editor-block-settings-menu__toggle block-editor-block-settings-menu__toggle">
262 <svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-ellipsis" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>
263 </button>
264 </div>
265 </div>
266 </div>
267
268 </div><?php // .editor-block-toolbar end ?>
269 </div>
270 <div class="tma-block-dropdown-toolbar-wrap">
271 <div class="tma-block-dropdown-toolbar-arrow"></div>
272 <div class="tma-block-dropdown-toolbar">
273 <div class="tma-block-dropdown-toolbar-inner-wrap">
274 <ul id="toolbar_block" class="toolbar-block-dropdown container-block">
275 <?php
276
277 // Block editor limitation: only the buttons in the overflow drop-down/sub-toolbar can be moved (but not arranged).
278 $excluded_block_buttons = array(
279 'core/bold',
280 'core/italic',
281 'core/link',
282 );
283
284 foreach( $this->toolbar_block as $button_id ) {
285 if ( in_array( $button_id, $excluded_block_buttons, true ) ) {
286 continue;
287 }
288
289 if ( isset( $all_block_buttons[ $button_id ] ) ) {
290 $name = $all_block_buttons[ $button_id ]['name'];
291 $icon = $all_block_buttons[ $button_id ]['icon'];
292 unset( $all_block_buttons[ $button_id ] );
293 } else {
294 continue;
295 }
296
297 ?><li class="<?php echo str_replace( '/', '-', $button_id ); ?>">
298 <div type="button" title="<?php echo $name; ?>" aria-pressed="false" class="tma-components-icon-button">
299 <?php echo $icon; ?>
300 <span class="block-button-name"><?php echo $name; ?></span>
301 </div>
302 <input type="hidden" name="toolbar_block[]" value="<?php echo $button_id; ?>">
303 </li><?php
304 }
305
306 ?>
307 </ul>
308 </div>
309 </div>
310 </div>
311
312 <p class="toolbar-block-title">
313 <strong><?php _e( 'Alternative side toolbar', 'tinymce-advanced' ); ?></strong>
314 <?php _e( '(shown in the sidebar)', 'tinymce-advanced' ); ?>
315 </p>
316 <div class="toolbar-side-wrap toolbar-wrap">
317 <div class="panel-title">
318 <?php _e( 'Formatting', 'tinymce-advanced' ); ?>
319 <span class="dashicons dashicons-arrow-up-alt2"></span>
320 </div>
321 <ul id="toolbar_block_side" class="tma-components-toolbar block-toolbar-side container-block"><?php
322
323
324 foreach( $this->toolbar_block_side as $button_id ) {
325 if ( isset( $all_block_buttons[ $button_id ] ) ) {
326 $name = $all_block_buttons[ $button_id ]['name'];
327 $icon = $all_block_buttons[ $button_id ]['icon'];
328 unset( $all_block_buttons[ $button_id ] );
329 } else {
330 continue;
331 }
332
333 ?><li class="<?php echo str_replace( '/', '-', $button_id ); ?>">
334 <div type="button" title="<?php echo $name; ?>" aria-pressed="false" class="tma-components-icon-button">
335 <?php echo $icon; ?>
336 <span class="block-button-name"><?php echo $name; ?></span>
337 </div>
338 <input type="hidden" name="toolbar_block_side[]" value="<?php echo $button_id; ?>">
339 </li><?php
340 }
341
342 ?></ul>
343
344 </div><?php // toolbar-side-wrap end ?>
345
346 <p class="toolbar-block-title">
347 <strong><?php _e( 'Unused buttons for the blocks toolbars', 'tinymce-advanced' ); ?></strong>
348 </p>
349 <div class="toolbar-unused-wrap toolbar-wrap">
350 <ul id="toolbar_block_unused" class="tma-components-toolbar block-toolbar-unused container-block"><?php
351
352 foreach( $all_block_buttons as $button_id => $button ) {
353 $name = $button['name'];
354 $icon = $button['icon'];
355
356 ?><li class="<?php echo str_replace( '/', '-', $button_id ); ?>">
357 <div type="button" title="<?php echo $name; ?>" aria-pressed="false" class="tma-components-icon-button">
358 <?php echo $icon; ?>
359 <span class="block-button-name"><?php echo $name; ?></span>
360 </div>
361 <input type="hidden" name="toolbar_block_unused[]" value="<?php echo $button_id; ?>">
362 </li><?php
363 }
364
365 ?></ul>
366 </div><?php // toolbar-unused-wrap end ?>
367
368 <?php $colors_preview_src = is_rtl() ? $images_url . '/colors-rtl.png' : $images_url . '/colors.png' ?>
369 <div class="panel-block-colors-wrap">
370 <div class="panel-block-colors">
371 <div class="panel-title">
372 <?php _e( 'Text color', 'tinymce-advanced' ); ?>
373 <span class="dashicons dashicons-arrow-up-alt2"></span>
374 </div>
375 <div class="panel-block-text-color<?php if ( ! $this->check_user_setting( 'selected_text_color' ) ) echo ' disabled'; ?>">
376 <p><?php _e( 'Selected text color', 'tinymce-advanced' ); ?></p>
377 <img width="260" height="100" class="text-color-preview" src="<?php echo $colors_preview_src; ?>">
378 </div>
379 <div class="panel-block-background-color<?php if ( ! $this->check_user_setting( 'selected_text_background_color' ) ) echo ' disabled'; ?>">
380 <p><?php _e( 'Selected text background color', 'tinymce-advanced' ); ?></p>
381 <img width="260" height="100" class="text-color-preview" src="<?php echo $colors_preview_src; ?>">
382 </div>
383 </div>
384
385 <table class="form-table panel-block-colors-settings"><tbody>
386 <tr class="panel-block-colors-settings__text">
387 <th>
388 <?php _e( 'Enable setting of selected text color', 'tinymce-advanced' ); ?>
389 <span class="small-info"><?php _e( '(this will replace the default text color popup in WP 5.4 and newer)', 'tinymce-advanced' ); ?></span>
390 </th>
391 <td>
392 <p>
393 <input type="radio" name="selected_text_color" id="selected_text_color_yes" value="yes"<?php if ( $this->check_user_setting( 'selected_text_color' ) ) echo ' checked'; ?>>
394 <label for="selected_text_color_yes"><?php _e( 'Yes', 'tinymce-advanced' ); ?></label>
395 </p>
396 <p>
397 <input type="radio" name="selected_text_color" id="selected_text_color_no" value="no"<?php if ( ! $this->check_user_setting( 'selected_text_color' ) ) echo ' checked'; ?>>
398 <label for="selected_text_color_no"><?php _e( 'No', 'tinymce-advanced' ); ?></label>
399 </p>
400 </td>
401 </tr>
402 <tr class="panel-block-colors-settings__background">
403 <th><?php _e( 'Enable setting of selected text background color', 'tinymce-advanced' ); ?></th>
404 <td>
405 <p>
406 <input type="radio" name="selected_text_background_color" id="selected_text_background_color_yes" value="yes"<?php if ( $this->check_user_setting( 'selected_text_background_color' ) ) echo ' checked'; ?>>
407 <label for="selected_text_background_color_yes"><?php _e( 'Yes', 'tinymce-advanced' ); ?></label>
408 </p>
409 <p>
410 <input type="radio" name="selected_text_background_color" id="selected_text_background_color_no" value="no"<?php if ( ! $this->check_user_setting( 'selected_text_background_color' ) ) echo ' checked'; ?>>
411 <label for="selected_text_background_color_no"><?php _e( 'No', 'tinymce-advanced' ); ?></label>
412 </p>
413 </td>
414 </tr>
415 </tbody></table>
416 </div><?php // panel-block-colors-wrap end ?>
417 <br clear="both">
418 </div>
419
420 </div>
421
422 <h4 class="classic-blocks-title-h4"><?php _e( 'Toolbars for the Classic Paragraph and Classic blocks', 'tinymce-advanced' ); ?></h4>
423
424 <p>
425 <?php _e( 'The toolbars in the Classic Paragraph and Classic blocks are narrower and show on focus.', 'tinymce-advanced' ); ?>
426 <?php _e( 'For best results enable the menu and add only essential buttons.', 'tinymce-advanced' ); ?>
427 <?php _e( 'The buttons will wrap around depending on the width of the toolbar.', 'tinymce-advanced' ); ?>
428 </p>
429
430 <p>
431 <input type="checkbox" name="options[]" id="menubar_block" value="menubar_block" <?php if ( $this->check_user_setting( 'menubar_block' ) ) { echo ' checked'; } ?>>
432 <label for="menubar_block"><?php _e( 'Enable the editor menu (recommended).', 'tinymce-advanced' ); ?></label>
433 </p>
434
435 <div class="tadv-block-editor-toolbars-wrap">
436 <div class="tadv-mce-menu tadv-block-editor mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
437 <?php if ( $this->check_user_setting( 'menubar_block' ) ) { echo ' enabled'; } ?>">
438 <div class="mce-container-body mce-flow-layout">
439 <div class="mce-widget mce-btn mce-menubtn mce-first mce-flow-layout-item">
440 <button type="button">
441 <span class="tadv-translate">File</span>
442 <i class="mce-caret"></i>
443 </button>
444 </div>
445 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
446 <button type="button">
447 <span class="tadv-translate">Edit</span>
448 <i class="mce-caret"></i>
449 </button>
450 </div>
451 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
452 <button type="button">
453 <span class="tadv-translate">Insert</span>
454 <i class="mce-caret"></i>
455 </button>
456 </div>
457 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item mce-toolbar-item">
458 <button type="button">
459 <span class="tadv-translate">View</span>
460 <i class="mce-caret"></i>
461 </button>
462 </div>
463 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
464 <button type="button">
465 <span class="tadv-translate">Format</span>
466 <i class="mce-caret"></i>
467 </button>
468 </div>
469 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
470 <button type="button">
471 <span class="tadv-translate">Table</span>
472 <i class="mce-caret"></i>
473 </button>
474 </div>
475 <div class="mce-widget mce-btn mce-menubtn mce-last mce-flow-layout-item">
476 <button type="button">
477 <span class="tadv-translate">Tools</span>
478 <i class="mce-caret"></i>
479 </button>
480 </div>
481 </div>
482 </div>
483
484 <div class="tadvdropzone tadv-block-editor mce-toolbar">
485 <ul id="toolbar_classic_block" class="container-classic-block">
486 <?php
487
488 $mce_text_buttons = array( 'styleselect', 'formatselect', 'fontselect', 'fontsizeselect' );
489 $all_buttons_block = $all_buttons;
490
491 // Remove the toolbar-toggle
492 unset( $all_buttons_block['wp_adv'] );
493
494 foreach( $this->toolbar_classic_block as $button_id ) {
495 $name = '';
496
497 if ( strpos( $button_id, 'separator' ) !== false || in_array( $button_id, array( 'moveforward', 'movebackward', 'absolute' ) ) ) {
498 continue;
499 }
500
501 if ( isset( $all_buttons_block[ $button_id ] ) ) {
502 $name = $all_buttons_block[ $button_id ];
503 unset( $all_buttons_block[ $button_id ] );
504 } else {
505 continue;
506 }
507
508 ?>
509 <li class="tadvmodule" id="<?php echo $button_id; ?>">
510 <?php
511
512 if ( in_array( $button_id, $mce_text_buttons, true ) ) {
513 ?>
514 <div class="tadvitem mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox">
515 <div class="the-button">
516 <span class="descr"><?php echo $name; ?></span>
517 <i class="mce-caret"></i>
518 <input type="hidden" class="tadv-button" name="toolbar_classic_block[]" value="<?php echo $button_id; ?>" />
519 </div>
520 </div>
521 <?php
522 } else {
523 ?>
524 <div class="tadvitem">
525 <i class="mce-ico mce-i-<?php echo $button_id; ?>" title="<?php echo $name; ?>"></i>
526 <span class="descr"><?php echo $name; ?></span>
527 <input type="hidden" class="tadv-button" name="toolbar_classic_block[]" value="<?php echo $button_id; ?>" />
528 </div>
529 <?php
530 }
531
532 ?>
533 </li>
534 <?php
535 }
536
537 ?>
538 </ul>
539 </div>
540 </div>
541
542 <p><?php _e( 'Drop buttons in the toolbars, or drag the buttons to rearrange them.', 'tinymce-advanced' ); ?></p>
543
544 <div class="unuseddiv">
545 <p><strong><?php _e( 'Unused Buttons for the Classic Paragraph and Classic blocks toolbars', 'tinymce-advanced' ); ?></strong></p>
546 <div>
547 <ul id="unused-classic-block" class="unused container-classic-block">
548 <?php
549
550 foreach( $all_buttons_block as $button_id => $name ) {
551 if ( strpos( $button_id, 'separator' ) !== false ) {
552 continue;
553 }
554
555 ?>
556 <li class="tadvmodule" id="<?php echo $button_id; ?>">
557 <?php
558
559 if ( in_array( $button_id, $mce_text_buttons, true ) ) {
560 ?>
561 <div class="tadvitem mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox">
562 <div class="the-button">
563 <span class="descr"><?php echo $name; ?></span>
564 <i class="mce-caret"></i>
565 <input type="hidden" class="tadv-button" name="unused-classic-block[]" value="<?php echo $button_id; ?>" />
566 </div>
567 </div>
568 <?php
569 } else {
570 ?>
571 <div class="tadvitem">
572 <i class="mce-ico mce-i-<?php echo $button_id; ?>" title="<?php echo $name; ?>"></i>
573 <span class="descr"><?php echo $name; ?></span>
574 <input type="hidden" class="tadv-button" name="unused-classic-block[]" value="<?php echo $button_id; ?>" />
575 </div>
576 <?php
577 }
578
579 ?>
580 </li>
581 <?php
582 }
583
584 ?>
585 </ul>
586 </div><!-- /highlight -->
587 </div><!-- /unuseddiv -->
588 </div><!-- /block-editor -->
589
590 <div id="classic-editor">
591 <h4><?php _e( 'Toolbars for the Classic Editor', 'tinymce-advanced' ); ?></h4>
592
593 <div class="tadvzones">
594 <p>
595 <input type="checkbox" name="options[]" id="menubar" value="menubar" <?php if ( $this->check_user_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
596 <label for="menubar"><?php _e( 'Enable the editor menu.', 'tinymce-advanced' ); ?></label>
597 </p>
598
599 <div class="tadv-mce-menu tadv-classic-editor mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
600 <?php if ( $this->check_user_setting( 'menubar' ) ) { echo ' enabled'; } ?>">
601 <div class="mce-container-body mce-flow-layout">
602 <div class="mce-widget mce-btn mce-menubtn mce-first mce-flow-layout-item">
603 <button type="button">
604 <span class="tadv-translate">File</span>
605 <i class="mce-caret"></i>
606 </button>
607 </div>
608 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
609 <button type="button">
610 <span class="tadv-translate">Edit</span>
611 <i class="mce-caret"></i>
612 </button>
613 </div>
614 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
615 <button type="button">
616 <span class="tadv-translate">Insert</span>
617 <i class="mce-caret"></i>
618 </button>
619 </div>
620 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item mce-toolbar-item">
621 <button type="button">
622 <span class="tadv-translate">View</span>
623 <i class="mce-caret"></i>
624 </button>
625 </div>
626 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
627 <button type="button">
628 <span class="tadv-translate">Format</span>
629 <i class="mce-caret"></i>
630 </button>
631 </div>
632 <div class="mce-widget mce-btn mce-menubtn mce-flow-layout-item">
633 <button type="button">
634 <span class="tadv-translate">Table</span>
635 <i class="mce-caret"></i>
636 </button>
637 </div>
638 <div class="mce-widget mce-btn mce-menubtn mce-last mce-flow-layout-item">
639 <button type="button">
640 <span class="tadv-translate">Tools</span>
641 <i class="mce-caret"></i>
642 </button>
643 </div>
644 </div>
645 </div>
646
647 <?php
648
649 $all_buttons_classic = $all_buttons;
650 $button_id = '';
651
652 for ( $i = 1; $i < 5; $i++ ) {
653 $toolbar = "toolbar_$i";
654
655 ?>
656 <div class="tadvdropzone mce-toolbar">
657 <ul id="toolbar_<?php echo $i; ?>" class="container">
658 <?php
659
660 foreach( $this->$toolbar as $button_id ) {
661 if ( strpos( $button_id, 'separator' ) !== false || in_array( $button_id, array( 'moveforward', 'movebackward', 'absolute' ) ) ) {
662 continue;
663 }
664
665 if ( isset( $all_buttons_classic[ $button_id ] ) ) {
666 $name = $all_buttons_classic[ $button_id ];
667 unset( $all_buttons_classic[ $button_id ] );
668 } else {
669 continue;
670 }
671
672 ?>
673 <li class="tadvmodule" id="<?php echo $button_id; ?>">
674 <?php
675
676 if ( in_array( $button_id, $mce_text_buttons, true ) ) {
677 ?>
678 <div class="tadvitem mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox">
679 <div class="the-button">
680 <span class="descr"><?php echo $name; ?></span>
681 <i class="mce-caret"></i>
682 <input type="hidden" class="tadv-button" name="toolbar_<?php echo $i; ?>[]" value="<?php echo $button_id; ?>" />
683 </div>
684 </div>
685 <?php
686 } else {
687 ?>
688 <div class="tadvitem">
689 <i class="mce-ico mce-i-<?php echo $button_id; ?>" title="<?php echo $name; ?>"></i>
690 <span class="descr"><?php echo $name; ?></span>
691 <input type="hidden" class="tadv-button" name="toolbar_<?php echo $i; ?>[]" value="<?php echo $button_id; ?>" />
692 </div>
693 <?php
694 }
695
696 ?>
697 </li>
698 <?php
699
700 }
701
702 ?>
703 </ul></div>
704 <?php
705 }
706
707 ?>
708 </div>
709
710 <p><?php _e( 'Drop buttons in the toolbars, or drag the buttons to rearrange them.', 'tinymce-advanced' ); ?></p>
711
712 <div class="unuseddiv">
713 <h4><?php _e( 'Unused Buttons', 'tinymce-advanced' ); ?></h4>
714 <div>
715 <ul id="unused" class="unused container">
716 <?php
717
718 foreach( $all_buttons_classic as $button_id => $name ) {
719 if ( strpos( $button_id, 'separator' ) !== false ) {
720 continue;
721 }
722
723 ?>
724 <li class="tadvmodule" id="<?php echo $button_id; ?>">
725 <?php
726
727 if ( in_array( $button_id, $mce_text_buttons, true ) ) {
728 ?>
729 <div class="tadvitem mce-widget mce-btn mce-menubtn mce-fixed-width mce-listbox">
730 <div class="the-button">
731 <span class="descr"><?php echo $name; ?></span>
732 <i class="mce-caret"></i>
733 <input type="hidden" class="tadv-button" name="unused[]" value="<?php echo $button_id; ?>" />
734 </div>
735 </div>
736 <?php
737 } else {
738 ?>
739 <div class="tadvitem">
740 <i class="mce-ico mce-i-<?php echo $button_id; ?>" title="<?php echo $name; ?>"></i>
741 <span class="descr"><?php echo $name; ?></span>
742 <input type="hidden" class="tadv-button" name="unused[]" value="<?php echo $button_id; ?>" />
743 </div>
744 <?php
745 }
746
747 ?>
748 </li>
749 <?php
750 }
751
752 ?>
753 </ul>
754 </div><!-- /highlighted -->
755 </div>
756 </div><!-- /classic-editor -->
757
758 <div class="advanced-options">
759 <h3><?php _e( 'Options', 'tinymce-advanced' ); ?></h3>
760
761 <div>
762 <input type="checkbox" name="options[]" value="merge_toolbars" id="merge_toolbars" <?php if ( $this->check_user_setting( 'merge_toolbars' ) ) echo ' checked'; ?> />
763 <label for="merge_toolbars"><?php _e( 'Append all buttons to the top toolbar in the Classic Paragraph and Classic blocks.', 'tinymce-advanced' ); ?></label>
764 <p><?php _e( 'This affects buttons that are added by other plugins. These buttons will be appended to the top toolbar row instead of forming second, third, and forth rows.', 'tinymce-advanced' ); ?></p>
765 </div>
766
767 <div>
768 <input type="checkbox" name="options[]" value="advlist" id="advlist" <?php if ( $this->check_user_setting('advlist') ) echo ' checked'; ?> />
769 <label for="advlist"><?php _e( 'List Style Options', 'tinymce-advanced' ); ?></label>
770 <p>
771 <?php _e( 'Enable more list options: upper or lower case letters for ordered lists, disk or square for unordered lists, etc.', 'tinymce-advanced' ); ?>
772 </p>
773 </div>
774
775 <div>
776 <input type="checkbox" name="options[]" value="contextmenu" id="contextmenu" <?php if ( $this->check_user_setting('contextmenu') ) echo ' checked'; ?> />
777 <label for="contextmenu"><?php _e( 'Context Menu', 'tinymce-advanced' ); ?></label>
778 <p><?php _e( 'Replace the browser context (right-click) menu.', 'tinymce-advanced' ); ?></p>
779 </div>
780
781 <div>
782 <input type="checkbox" name="options[]" value="advlink" id="advlink" <?php if ( $this->check_user_setting('advlink') ) echo ' checked'; ?> />
783 <label for="advlink"><?php _e( 'Alternative link dialog', 'tinymce-advanced' ); ?></label>
784 <p><?php _e( 'Open the TinyMCE link dialog when using the link button on the toolbar or the link menu item.', 'tinymce-advanced' ); ?></p>
785 </div>
786
787 <div>
788 <input type="checkbox" name="options[]" value="fontsize_formats" id="fontsize_formats" <?php if ( $this->check_user_setting( 'fontsize_formats' ) ) echo ' checked="checked"'; ?> />
789 <label for="fontsize_formats"><?php _e( 'Font sizes', 'tinymce-advanced' ); ?></label>
790 <p><?php printf( __( 'Replace the size setting available for fonts with: %s.', 'tinymce-advanced' ), $this->fontsize_formats ); ?></p>
791 </div>
792 </div>
793 <?php
794
795 if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
796 ?>
797 <div class="advanced-options">
798 <h3><?php _e( 'Advanced Options', 'tinymce-advanced' ); ?></h3>
799 <div>
800 <input type="checkbox" name="admin_options[]" value="classic_paragraph_block" id="classic_paragraph_block" <?php if ( $this->check_admin_setting( 'classic_paragraph_block' ) ) echo ' checked'; ?> />
801 <label for="classic_paragraph_block"><?php _e( 'Add Classic Paragraph block', 'tinymce-advanced' ); ?></label>
802 <p>
803 <?php _e( 'The Classic Paragraph block includes the familiar TinyMCE editor and is an extended and enhanced Classic block.', 'tinymce-advanced' ); ?>
804 <?php _e( 'You can add multiple paragraphs, tables, galleries, embed video, set fonts and colors, and generally use everything that is available in the Classic Editor.', 'tinymce-advanced' ); ?>
805 <?php _e( 'Also, like the Classic block, most existing TinyMCE plugins and add-ons will continue to work.', 'tinymce-advanced' ); ?>
806 <?php _e( 'This makes the Block Editor more familiar, easier to use, easier to get used to, and more compatible with your existing workflow.', 'tinymce-advanced' ); ?>
807 </p>
808 <p>
809 <?php _e( 'In addition most default blocks can be transformed into classic paragraphs, and a Classic Paragraph can be converted to multiple blocks.', 'tinymce-advanced' ); ?>
810 <?php _e( 'It can be used everywhere instead of the Paragraph block including in columns, when creating reusable blocks, etc.', 'tinymce-advanced' ); ?>
811 </p>
812 </div>
813
814 <div>
815 <input type="checkbox" name="admin_options[]" value="hybrid_mode" id="hybrid_mode" <?php if ( $this->check_admin_setting( 'hybrid_mode' ) ) echo ' checked'; ?> />
816 <label for="hybrid_mode"><?php _e( 'Make the Classic Paragraph or Classic block the default block (hybrid mode)', 'tinymce-advanced' ); ?></label>
817 <p>
818 <?php _e( 'The default block is inserted on pressing Enter in the title, or clicking under the last block.', 'tinymce-advanced' ); ?>
819 <?php _e( 'Selecting this option also adds some improvements and fixes for the Classic block.', 'tinymce-advanced' ); ?>
820 </p>
821 </div>
822
823 <div>
824 <?php
825
826 if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
827
828 ?>
829 <input type="checkbox" name="admin_options[]" value="replace_block_editor" id="replace_block_editor" <?php if ( $this->check_admin_setting( 'replace_block_editor' ) ) echo ' checked'; ?> />
830 <label for="replace_block_editor"><?php _e( 'Replace the Block Editor with the Classic Editor', 'tinymce-advanced' ); ?></label>
831 <p>
832 <?php _e( 'Selecting this option will restore the previous (&#8220;classic&#8221;) editor and the previous Edit Post screen.', 'tinymce-advanced' ); ?>
833 <?php _e( 'It will allow you to use other plugins that enhance that editor, add old-style Meta Boxes, or in some way depend on the previous Edit Post screen.', 'tinymce-advanced' ); ?>
834 </p>
835 <p>
836 <?php
837
838 $text = __( 'If you prefer to use both editors side by side, do not enable this option. It is better to install the %1$sClassic Editor plugin%2$s.', 'tinymce-advanced' );
839 /* translators: URL to (localised) Classic Editor plugin. */
840 $url = __( 'https://wordpress.org/plugins/classic-editor/', 'tinymce-advanced' );
841 printf( $text, '<a href="' . esc_url( $url ) . '">', '</a>' );
842
843 ?>
844 </p>
845 <?php
846 }
847
848 ?>
849 </div>
850 <div>
851 <input type="checkbox" name="admin_options[]" value="no_autop" id="no_autop" <?php if ( $this->check_admin_setting( 'no_autop' ) ) echo ' checked'; ?> />
852 <label for="no_autop"><?php _e( 'Keep paragraph tags in the Classic block and the Classic Editor', 'tinymce-advanced' ); ?></label>
853 <p>
854 <?php _e( 'Stop removing &lt;p&gt; and &lt;br&gt; tags in the Classic Editor and show them in the Text tab.', 'tinymce-advanced' ); ?>
855 <?php _e( 'This will make it possible to use more advanced coding in the Text tab without the back-end filtering affecting it much.', 'tinymce-advanced' ); ?>
856 <?php _e( 'However it may behave unexpectedly in rare cases, so test it thoroughly before enabling it permanently.', 'tinymce-advanced' ); ?>
857 <?php _e( 'Line breaks in the Text tab in the Classic Editor would still affect the output, in particular do not use empty lines, line breaks inside HTML tags or multiple &lt;br&gt; tags.', 'tinymce-advanced' ); ?>
858 </p>
859 </div>
860 <?php
861
862 $has_editor_style = $this->has_editor_style();
863 $disabled = ' disabled';
864
865 if ( $has_editor_style === false ) {
866 add_editor_style();
867 $has_editor_style = $this->has_editor_style();
868 }
869
870 if ( $has_editor_style ) {
871 $disabled = '';
872 }
873
874 ?>
875 <div>
876 <input type="checkbox" name="admin_options[]" value="importcss" id="importcss" <?php if ( ! $disabled && $this->check_admin_setting( 'importcss' ) ) echo ' checked'; echo $disabled; ?> />
877 <label for="importcss"><?php _e( 'Create CSS classes menu', 'tinymce-advanced' ); ?></label>
878 <p>
879 <?php _e( 'Load the CSS classes used in editor-style.css and replace the Formats menu.', 'tinymce-advanced' ); ?>
880 </p>
881 <?php
882
883 if ( $disabled ) {
884 ?>
885 <p>
886 <span class="tadv-error"><?php _e( 'Disabled:', 'tinymce-advanced' ); ?></span>
887 <?php _e( 'A stylesheet file named editor-style.css was not added by your theme.', 'tinymce-advanced' ); ?>
888 <br>
889 <?php
890 }
891
892 ?>
893 </p>
894 </div>
895 <div class="advanced-table-options">
896 <h4><?php _e( 'Advanced options for tables', 'tinymce-advanced' ); ?></h4>
897 <div>
898 <input type="checkbox" name="admin_options[]" value="table_resize_bars" id="table_resize_bars" <?php if ( $this->check_admin_setting( 'table_resize_bars' ) ) echo ' checked'; ?> />
899 <label for="table_resize_bars"><?php _e( 'Enable resizing of tables, rows, and columns by dragging with the mouse', 'tinymce-advanced' ); ?></label>
900 <p>
901 <?php _e( 'When enabled the whole table, rows, and columns can be resized by dragging but the sizes are set with inline CSS styles.', 'tinymce-advanced' ); ?>
902 <?php _e( 'This may override some styles that are set by your theme and usually makes the table non-responsive when viewed on a small screen like a smartphone.', 'tinymce-advanced' ); ?>
903 <?php _e( 'When a row or a column is resized the inline styles are updated on all table rows and cells.', 'tinymce-advanced' ); ?>
904 </p>
905 <p>
906 <?php _e( 'Disabling this option will stop the editor from adding inline CSS styles and will produce cleaner HTML code.', 'tinymce-advanced' ); ?>
907 <?php _e( 'Then the table, the rows and the cells can be resized by typing the size values in the advanced options tabs.', 'tinymce-advanced' ); ?>
908 </p>
909 <p>
910 <span class="dashicons dashicons-info"></span>
911 <?php _e( 'This option does not affect inline styles on tables in existing posts. To reset table size or remove all formatting for the whole table please see the two buttons at the bottom of the Format menu.', 'tinymce-advanced' ); ?>
912 </p>
913 </div>
914 <div>
915 <input type="checkbox" name="admin_options[]" value="table_default_attributes" id="table_default_attributes" <?php if ( $this->check_admin_setting( 'table_default_attributes' ) ) echo ' checked'; ?> />
916 <label for="table_default_attributes"><?php _e( 'When inserting a table set the HTML border attribute to 1', 'tinymce-advanced' ); ?></label>
917 <p>
918 <?php _e( 'This will add a border around the table unless it is overriden by your theme.', 'tinymce-advanced' ); ?>
919 </p>
920 </div>
921 <div>
922 <input type="checkbox" name="admin_options[]" value="table_grid" id="table_grid" <?php if ( $this->check_admin_setting( 'table_grid' ) ) echo ' checked'; ?> />
923 <label for="table_grid"><?php _e( 'When inserting a table show a grid where the number of rows and columns can be selected by dragging with the mouse', 'tinymce-advanced' ); ?></label>
924 <p>
925 <?php _e( 'If the grid is disabled the number of rows and columns can be typed in the Insert Table dialog.', 'tinymce-advanced' ); ?>
926 </p>
927 </div>
928 <div>
929 <input type="checkbox" name="admin_options[]" value="table_tab_navigation" id="table_tab_navigation" <?php if ( $this->check_admin_setting( 'table_tab_navigation' ) ) echo ' checked'; ?> />
930 <label for="table_tab_navigation"><?php _e( 'Jump to the next cell when pressing the tab key while editing a table', 'tinymce-advanced' ); ?></label>
931 <p>
932 <?php _e( 'When disabled, pressing the tab key will jump outside the editor area.', 'tinymce-advanced' ); ?>
933 </p>
934 </div>
935 <div>
936 <input type="checkbox" name="admin_options[]" value="table_advtab" id="table_advtab" <?php if ( $this->check_admin_setting( 'table_advtab' ) ) echo ' checked'; ?> />
937 <label for="table_advtab"><?php _e( 'Show the advanced tabs in the table properties dialogs', 'tinymce-advanced' ); ?></label>
938 <p>
939 <?php _e( 'The advanced tabs allow setting of inline CSS styles on the table, each row, and each cell. They have fields for easier setting of border, border color and background color styles.', 'tinymce-advanced' ); ?>
940 </p>
941 <p>
942 <span class="dashicons dashicons-warning"></span>
943 <?php _e( 'To keep the table more responsive please use percentage values when setting widths.', 'tinymce-advanced' ); ?>
944 </p>
945 </div>
946 </div>
947 </div>
948
949 <div class="advanced-options">
950 <h3><?php _e( 'Administration', 'tinymce-advanced' ); ?></h3>
951 <div>
952 <h4><?php _e( 'Settings import and export', 'tinymce-advanced' ); ?></h4>
953 <p>
954 <?php _e( 'The settings are exported as a JSON encoded file.', 'tinymce-advanced' ); ?>
955 <?php _e( 'It is important that the exported file is not edited in any way.', 'tinymce-advanced' ); ?>
956 </p>
957 <p>
958 <?php wp_nonce_field( 'tadv-export-settings', 'tadv-export-settings-nonce', false ); ?>
959 <input type="submit" class="button" name="tadv-export-settings" value="<?php _e( 'Export Settings', 'tinymce-advanced' ); ?>" /> &nbsp;
960 <input type="submit" class="button" name="tadv-import-settings" value="<?php _e( 'Import Settings', 'tinymce-advanced' ); ?>" />
961 </p>
962 </div>
963 <div>
964 <h4><?php _e( 'Enable the editor enhancements for:', 'tinymce-advanced' ); ?></h4>
965 <p>
966 <input type="checkbox" id="tadv_enable_1" name="tadv_enable_at[]" value="edit_post_screen" <?php if ( $this->check_admin_setting( 'enable_edit_post_screen' ) ) echo ' checked'; ?> />
967 <label for="tadv_enable_1"><?php _e( 'The Classic Editor (Add New and Edit posts and pages)', 'tinymce-advanced' ); ?></label>
968 </p>
969 <p>
970 <input type="checkbox" id="tadv_enable_2" name="tadv_enable_at[]" value="rest_of_wpadmin" <?php if ( $this->check_admin_setting( 'enable_rest_of_wpadmin' ) ) echo ' checked'; ?> />
971 <label for="tadv_enable_2"><?php _e( 'Other instances of the Classic (TinyMCE) editor in wp-admin', 'tinymce-advanced' ); ?></label>
972 </p>
973 <p>
974 <input type="checkbox" id="tadv_enable_3" name="tadv_enable_at[]" value="on_front_end" <?php if ( $this->check_admin_setting( 'enable_on_front_end' ) ) echo ' checked'; ?> />
975 <label for="tadv_enable_3"><?php _e( 'Instances of the Classic editor on the front end of the site', 'tinymce-advanced' ); ?></label>
976 </p>
977 </div>
978 </div>
979 <?php
980
981 }
982 ?>
983
984 <hr>
985
986 <p class="tadv-submit">
987 <?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
988 <input class="button" type="submit" name="tadv-restore-defaults" value="<?php _e( 'Restore Default Settings', 'tinymce-advanced' ); ?>" />
989 <input class="button-primary button-large" type="submit" name="tadv-save" value="<?php _e( 'Save Changes', 'tinymce-advanced' ); ?>" />
990 </p>
991 </form>
992
993 <div id="wp-adv-error-message" class="tadv-error">
994 <?php _e( 'The [Toolbar toggle] button shows or hides the second, third, and forth button rows. It will only work when it is in the first row and there are buttons in the second row.', 'tinymce-advanced' ); ?>
995 </div>
996 </div><?php // .wrap.tinymce-advanced end ?>
997