set_paths(); $imgpath = TADV_URL . 'images/'; $tadv_options_updated = false; $settings = $admin_settings = array(); if ( isset( $_POST['tadv-save'] ) ) { check_admin_referer( 'tadv-save-buttons-order' ); $this->save_settings(); } elseif ( isset( $_POST['tadv-restore-defaults'] ) ) { check_admin_referer( 'tadv-save-buttons-order' ); // TODO: only for admin || SA $this->admin_settings = $this->get_default_admin_settings(); update_option( 'tadv_admin_settings', $this->get_default_admin_settings() ); // TODO: all users that can have settings $this->user_settings = $this->get_default_user_settings(); update_option( 'tadv_settings', $this->get_default_user_settings() ); $message = '

' . __('Default settings restored.', 'tinymce-advanced') . '

'; } elseif ( isset( $_POST['tadv-export-settings'] ) ) { check_admin_referer( 'tadv-save-buttons-order' ); $this->load_settings(); $output = array( 'settings' => $this->user_settings ); // TODO: only admin || SA $output['admin_settings'] = $this->admin_settings; ?>

text (.txt) file, using a plain text editor like Notepad.', 'tinymce-advanced' ); ?>

' . __( 'Importing of settings failed.', 'tinymce-advanced' ) . '

'; } else { $this->save_settings( $import ); } } if ( empty( $_POST ) ) { $this->check_plugin_version(); } $this->load_settings(); if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) { $message = '

' . __( 'ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced' ) . '

'; $this->admin_settings = $this->get_default_admin_settings(); $this->user_settings = $this->get_default_user_settings(); $this->load_settings(); } $all_buttons = $this->get_all_buttons(); ?>

warn_if_unsupported(); if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) { ?>

    $toolbar as $button ) { if ( strpos( $button, 'separator' ) !== false || in_array( $button, array( 'moveforward', 'movebackward', 'absolute' ) ) ) { continue; } if ( isset( $all_buttons[$button] ) ) { $name = $all_buttons[$button]; unset( $all_buttons[$button] ); } else { // error?.. continue; } ?>

    $name ) { if ( strpos( $button, 'separator' ) !== false ) { continue; } ?>

fontsize_formats ); ?>

has_editor_style(); $disabled = ' disabled'; if ( $has_editor_style === 'not-supporetd' || $has_editor_style === 'not-present' ) { add_editor_style(); } if ( $this->has_editor_style() === 'present' ) { $disabled = ''; $has_editor_style = 'present'; } ?>