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') . '
' . __( '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' ) . '