'; $site = 'options-general.php?page=teachpress/settings.php'; // Tab selector $tab_list = ['general', 'publication_data', 'publication_templates', 'db_status' ]; $tab_input = isset( $_GET['tab'] ) ? htmlspecialchars($_GET['tab']) : 'general'; $tab = ( in_array($tab_input, $tab_list) ) ? $tab_input : ''; // update dababase if ( isset($_GET['up']) ) { TP_Settings_Page::update_database($site); } // sync database if ( isset($_GET['sync']) ) { $sync = intval($_GET['sync']); if ( $sync === 1 ) { tp_db_sync('authors'); TP_Settings_Page::update_database($site, false); } if ( $sync === 2 ) { tp_db_sync('stud_meta'); } } // install database if ( isset($_GET['ins']) ) { tp_install(); } // delete database if ( isset( $_GET['drop_tp'] ) || isset( $_POST['drop_tp_ok'] ) ) { TP_Settings_Page::delete_database(); } // change general options if ( isset( $_POST['einstellungen'] ) ) { self::check_nonce_field(); TP_Settings_Page::change_general_options(); } // delete settings if ( isset( $_GET['delete'] ) ) { self::check_nonce_url(); TP_Options::delete_option($_GET['delete']); get_tp_message(esc_html__('Deleted', 'teachpress')); } // Delete data field if ( isset( $_GET['delete_field'] ) || isset( $_GET['delete_field_ok'] ) ) { self::check_nonce_url(); TP_Settings_Page::delete_meta_fields($tab); } // add meta field options if ( isset($_POST['add_field']) ) { self::check_nonce_field(); $table = 'teachpress_pub'; TP_Settings_Page::add_meta_fields($table); } // test if database is installed TP_Admin::database_test(); TP_HTML::line( '

' . esc_html__('teachPress settings','teachpress') . '

' ); // Site menu $set_menu_1 = ( $tab === 'general' || $tab === '' ) ? 'nav-tab nav-tab-active' : 'nav-tab'; $set_menu_6 = ( $tab === 'publication_data' ) ? 'nav-tab nav-tab-active' : 'nav-tab'; $set_menu_7 = ( $tab === 'publication_templates' ) ? 'nav-tab nav-tab-active' : 'nav-tab'; TP_HTML::line(''); TP_HTML::line('
'); wp_nonce_field( 'verify_teachpress_settings', 'tp_nonce', true, true ); TP_HTML::line(''); TP_HTML::line(''); /* General */ if ($tab === '' || $tab === 'general') { self::get_general_tab($site); } /* Meta data */ if ( $tab === 'publication_data' ) { self::get_meta_tab($tab); } /* Templates */ if ( $tab === 'publication_templates' ) { self::get_template_tab(); } /* DB Status Tab */ if ( $tab === 'db_status' ) { self::get_db_status_tab(); } TP_HTML::line( '
' ); TP_HTML::line( '' ); } /** * Gets the about dialog for the general tab * @since 5.0.0 * @access private */ private static function get_about_dialog () { // img source: https://unsplash.com/photos/uG1jwfpCRhg TP_HTML::line( '

' . get_tp_option('db-version') . ' "Lemon Tart"

Website | teachPress on GitHub | Dokumentation | Changelog

©2008-2025 by Michael Winkler | License: GPLv2 or later

' ); } /** * Returns the select form for rel_page option * @param string $type rel_page_publications or rel_page_courses * @access private * @since 5.0.0 */ private static function get_rel_page_form ($type) { $title = ( $type === 'rel_page_publications' ) ? esc_html__('For publications','teachpress') : esc_html__('For courses','teachpress'); $value = get_tp_option($type); TP_HTML::line( '

'; TP_HTML::line( '

' ); } /** * Returns the select for for user role field * @param string $type * @access private * @since 5.0.0 */ private static function get_user_role_form ($type){ $title = ( $type === 'userrole_publications' ) ? esc_html__('Backend access for publication module','teachpress') : esc_html__('Backend access for course module','teachpress'); $cap = ( $type === 'userrole_publications' ) ? 'use_teachpress' : 'use_teachpress_courses'; TP_HTML::line( '' ); TP_HTML::line( '' ); TP_HTML::line( '' ); TP_HTML::line( '' ); TP_HTML::line( '' ); TP_HTML::line( '' . esc_html__('Select which userrole your users must have to use the teachPress backend.','teachpress') . '
' . esc_html__('use <Ctrl> key to select multiple roles','teachpress') . '' ); TP_HTML::line( '' ); } /** * Shows the tab for general options * @param sting $site * @access private * @since 5.0.0 */ private static function get_general_tab($site) { echo ''; echo ''; // Version echo ''; echo ''; TP_HTML::line( '' ); echo ''; echo ''; echo ''; // Frontend styles echo ''; echo ''; echo ''; echo ''; echo ''; // User roles TP_Settings_Page::get_user_role_form('userrole_publications'); // Related content echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; // Import/Export echo ''; echo ''; echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; // RSS echo ''; echo ''; echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; // Bibliography style echo ''; echo ''; echo ''; echo ''; echo ''; TP_HTML::line( '' ); echo ''; // Misc echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
' . esc_html__('teachPress version','teachpress') . '' . get_tp_option('db-version') . '
'; echo ''; echo '' . esc_html__('Select which style sheet you will use. teachpress_front.css is the teachPress default style. If you have created your own style in the default style sheet of your theme, you can activate this here.','teachpress') . '

' . esc_html__('Related content','teachpress') . '

' . esc_html__('Type','teachpress') . ''; TP_Settings_Page::get_rel_page_form('rel_page_publications'); echo '' . esc_html__('If you create a publication you can define a link to related content. It is kind of a "more information link", which helps you to connect a course/publication with a page. If you want to use custom post types instead of pages, so you can set it here.','teachpress') . '
' . esc_html__('Default category for related content','teachpress') . ''; wp_dropdown_categories( [ 'hide_empty' => 0, 'name' => 'rel_content_category', 'orderby' => 'name', 'selected' => get_tp_option('rel_content_category'), 'hierarchical' => true, 'show_option_none' => esc_html__('none','teachpress') ] ); echo '' . esc_html__('Used if the related content type for publicaitons is set on','teachpress') . ': ' . esc_html__('Posts') . '
' . esc_html__('Automatic related content','teachpress') . '' . TP_Admin::get_checkbox('rel_content_auto', esc_html__('Create an automatic related content with every new publication','teachpress'), get_tp_option('rel_content_auto')) . '
' . esc_html__('Template for related content','teachpress') . '

' . esc_html__('Import / Export','teachpress') . '

' . esc_html__('BibTeX special chars','teachpress') . '' . TP_Admin::get_checkbox('convert_bibtex', esc_html__('Try to convert utf-8 chars into BibTeX compatible ASCII strings','teachpress'), get_tp_option('convert_bibtex')) . '
' . esc_html__('Update existing publications','teachpress') . '' . TP_Admin::get_checkbox('import_overwrite', esc_html__('Allow optional updating for publication import','teachpress'), get_tp_option('import_overwrite')) . '

' . esc_html__('RSS','teachpress') . '

' . esc_html__('RSS feed addresses','teachpress') . '

' . esc_html__('For all publications:','teachpress') . '
' . home_url() . '?feed=tp_pub_rss » ' . esc_html__('Show','teachpress') . '

' . esc_html__('Example for publications of a single user (id = WordPress user-ID):','teachpress') . '
' . home_url() . '?feed=tp_pub_rss&id=1 » ' . esc_html__('Show','teachpress') . '

' . esc_html__('Example for publications of a single tag (tag = tag-id):','teachpress') . '
' . home_url() . '?feed=tp_pub_rss&tag=1 » ' . esc_html__('Show','teachpress') . '

' . esc_html__('Bibliography style','teachpress') . '

' . esc_html__('Repeated citations','teachpress') . '' . TP_Admin::get_checkbox('ref_grouped', esc_html__('Cite every reference only once','teachpress'), get_tp_option('ref_grouped')) . '

' . esc_html__('Misc','teachpress') . '

' . esc_html__('Database','teachpress') . ''; TP_HTML::line( '' . esc_html__('Index status','teachpress') . '' ); echo '
' . esc_html__('Uninstalling','teachpress') . ''; TP_HTML::line( '' . esc_html__('Remove teachPress from database','teachpress') . '' ); echo '
'; echo '

'; TP_HTML::line( '' ); self::get_about_dialog(); } /** * Shows the student settings tab * @param string $tab student_data, publication_data or course_data * @access private * @since 5.0.0 */ private static function get_meta_tab($tab) { // Select right table name if ( $tab === 'student_data' ) { $table = 'teachpress_stud'; } else if ( $tab === 'publication_data' ) { $table = 'teachpress_pub'; } else { $table = 'teachpress_courses'; } $select_fields = array(); echo '
'; echo '
'; echo '

' . esc_html__('Meta data fields','teachpress') . '

'; echo ''; // Table Head echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; // Table Body echo ''; // Default fields $class_alternate = true; $fields = get_tp_options($table,'`variable` ASC'); foreach ($fields as $field) { $data = TP_DB_Helpers::extract_column_data($field->value); if ( $data['type'] === 'SELECT' || $data['type'] === 'CHECKBOX' || $data['type'] === 'RADIO' ) { array_push($select_fields, $field->variable); // search for select options and add it if ( isset( $_POST['add_' . $field->variable] ) && $_POST['new_' . $field->variable] != esc_html__('Add element','teachpress') ) { TP_Options::add_option($_POST['new_' . $field->variable], $_POST['new_' . $field->variable], $field->variable); } } // Switch class style per row if ( $class_alternate === true ) { $tr_class = 'class="alternate"'; $class_alternate = false; } else { $tr_class = ''; $class_alternate = true; } $del_url_nonce = wp_nonce_url('options-general.php?page=teachpress/settings.php&delete_field=' . $field->setting_id . '&tab=' . $tab, 'verify_teachpress_settings', 'tp_nonce'); TP_HTML::line( ''; echo ''; } // Table Footer echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
' . esc_html__('Field name','teachpress') . '' . esc_html__('Properties','teachpress') . '
' . $field->variable . ' ' ); if ( isset( $data['title'] ) ) { TP_HTML::line( 'Label: ' . stripslashes($data['title']) . '
' ); } if ( isset( $data['type'] ) ) { TP_HTML::line( 'Type: ' . stripslashes($data['type']) . '
' );} if ( isset( $data['visibility'] ) ) { TP_HTML::line( 'Visibility: ' . stripslashes($data['visibility']) . '
' ); } if ( isset( $data['min'] ) ) { TP_HTML::line( 'Min: ' . stripslashes($data['min']) . '
' ); } if ( isset( $data['max'] ) ) { TP_HTML::line( 'Max: ' . stripslashes($data['max']) . '
' ); } if ( isset( $data['step'] ) ) { TP_HTML::line( 'Step: ' . stripslashes($data['step']) . '
' ); } if ( isset( $data['required'] ) ) { TP_HTML::line( 'Required: ' . stripslashes($data['required']) . '' ); } echo '
'; TP_HTML::line( '' . esc_html__('Add new','teachpress') . '' ); echo '
'; echo '
'; echo '
'; foreach ( $select_fields as $elem ) { $args1 = [ 'element_title' => esc_html__('Name','teachpress'), 'count_title' => esc_html__('Number of students','teachpress'), 'delete_title' => esc_html__('Delete element','teachpress'), 'add_title' => esc_html__('Add element','teachpress'), 'tab' => $tab ]; TP_Admin::get_course_option_box($elem, $elem, $args1); } echo '
'; ?> ' . esc_html__('Available templates for publication lists','teachpress') . ''; // Begin change directory message echo '
' . esc_html__('Please note','teachpress') . ': ' . esc_html__('Changes in the templates will be overwritten by updates of the plugin.','teachpress') . ' ' . esc_html__('But you can change the directory for the templates.','teachpress') . '
'; echo ''; // End change directory message echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; TP_HTML::line( self::list_templates() ); echo '
' . esc_html__('Name') . '' . esc_html__('Key') . '' . esc_html__('Description') . '
'; } /** * Creates the list of publication templates * @return string * @access private * @since 6.0.0 */ private static function list_templates () { $templates = tp_detect_templates(); $s = ''; $class_alternate = true; foreach ($templates as $key => $value) { // alternate row style if ( $class_alternate === true ) { $tr_class = 'class="alternate"'; $class_alternate = false; } else { $tr_class = ''; $class_alternate = true; } // load template include_once $templates[$key]; $template = new $key(); $settings = TP_HTML_Publication_Template::load_settings($template); $s .= ''; $s .= '' . esc_html($settings['name']) . ''; $s .= '' . esc_html($key) . ''; $s .= '' . esc_html($settings['description']) . '

' . esc_html__('Version', 'teachpress') . ' ' . esc_html($settings['version']) . ' | ' . esc_html__('by', 'teachpress') . ' ' . esc_html($settings['author']) . '

'; $s .= ''; } $s .= ''; return $s; } /** * Shows the db status tab * @access private * @since 7.0.0 */ private static function get_db_status_tab () { self::list_db_table_index(TEACHPRESS_AUTHORS); self::list_db_table_index(TEACHPRESS_PUB); self::list_db_table_index(TEACHPRESS_PUB_CAPABILITIES); self::list_db_table_index(TEACHPRESS_PUB_DOCUMENTS); self::list_db_table_index(TEACHPRESS_PUB_IMPORTS); self::list_db_table_index(TEACHPRESS_PUB_META); self::list_db_table_index(TEACHPRESS_RELATION); self::list_db_table_index(TEACHPRESS_REL_PUB_AUTH); self::list_db_table_index(TEACHPRESS_SETTINGS); self::list_db_table_index(TEACHPRESS_TAGS); self::list_db_table_index(TEACHPRESS_USER); self::list_db_table_index(TEACHPRESS_MONITORED_SOURCES); } /** * Returns the list of table indexes for the given database table * @param $db_name * @return string * @access private * @since 7.0.0 */ private static function list_db_table_index ($db_name) { echo '

' . esc_html($db_name) . '

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $result = TP_DB_Helpers::get_db_index($db_name); foreach ($result as $row) { // For unique field $unique = ( $row['Non_unique'] === '0' ) ? esc_html__('No') : esc_html__('Yes'); // For NULL field if ( $row['Null'] === 'YES' ) { $n = esc_html__('Yes'); } else if ( $row['Null'] === 'NO' ) { $n = esc_html__('No'); } else { $n = $row['Null']; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
' . esc_html__('Key_name','teachpress') . '' . esc_html__('Type','teachpress') . '' . esc_html__('Unique','teachpress') . '' . esc_html__('Packed','teachpress') . '' . esc_html__('Column','teachpress') . '' . esc_html__('Cardinality','teachpress') . '' . esc_html__('Collation','teachpress') . 'NULL' . esc_html__('Seq index','teachpress') . '
' . esc_html($row['Key_name']) . '' . esc_html($row['Index_type']) . '' . esc_html($unique) . '' . esc_html($row['Packed']) . '' . esc_html($row['Column_name']) . '' . esc_html($row['Cardinality']) . '' . esc_html($row['Collation']) . '' . esc_html($n) . ''; echo '' . esc_html($row['Seq_in_index']) . '
'; } /** * Adds new term and new types for courses * @access private * @since 5.0.0 */ private static function add_course_options () { $new_term = isset( $_POST['new_term'] ) ? htmlspecialchars($_POST['new_term']) : ''; $new_type = isset( $_POST['new_type'] ) ? htmlspecialchars($_POST['new_type']) : ''; if (isset( $_POST['add_type'] ) && $new_type != esc_html__('Add type','teachpress')) { TP_Options::add_option($new_type, $new_type, 'course_type'); get_tp_message(esc_html__('Saved')); } if (isset( $_POST['add_term'] ) && $new_term != esc_html__('Add term','teachpress')) { TP_Options::add_option($new_term, $new_term, 'semester'); get_tp_message(esc_html__('Saved')); } } /** * Handles adding of new meta data fields * @param string $table The table name (teachpress_stud, teachpress_courses or teachpress_pub) * @access private * @since 5.0.0 */ private static function add_meta_fields ($table) { if ( !isset( $_POST['field_name'] ) ) { return; } // Generate field name $field_name = self::generate_meta_field_name($_POST['field_name'], $table); // Field values $data['title'] = isset( $_POST['field_label'] ) ? htmlspecialchars($_POST['field_label']) : ''; $data['type'] = isset( $_POST['field_type'] ) ? htmlspecialchars($_POST['field_type']) : ''; $data['visibility'] = isset( $_POST['visibility'] ) ? htmlspecialchars($_POST['visibility']) : ''; $data['min'] = isset( $_POST['number_min'] ) ? intval($_POST['number_min']) : 'false'; $data['max'] = isset( $_POST['number_max'] ) ? intval($_POST['number_max']) : 'false'; $data['step'] = isset( $_POST['number_step'] ) ? intval($_POST['number_step']) : 'false'; $data['required'] = isset( $_POST['is_required'] ) ? 'true' : 'false'; $data['field_edit'] = isset( $_POST['field_edit'] ) ? intval($_POST['field_edit']) : 0 ; // Generate an array of forbidden field names $forbidden_names = array('system', 'course_type', 'semester', esc_html__('Field name','teachpress')); $options = get_tp_options($table); foreach ( $options as $row) { if ( $data['field_edit'] !== intval($row->setting_id) ) { array_push( $forbidden_names, $row->variable ); } } if ( !in_array($field_name, $forbidden_names) && $data['title'] != esc_html__('Label', 'teachpress') && preg_match("#^[_A-Za-z0-9]+$#", $field_name) ) { // Delete old settings if needed if ( $data['field_edit'] > 0 ) { TP_Options::delete_option($data['field_edit']); } TP_DB_Helpers::register_column($table, $field_name, $data); get_tp_message( esc_html__('Field added','teachpress') ); } else { get_tp_message( esc_html__('Warning: This field name is not possible.','teachpress'), 'red' ); } } /** * Generates and returns a name for meta data fields * @param string $fieldname The field name * @param string $table The table name (used to define a prefix) * @access private * @since 5.0.0 */ private static function generate_meta_field_name($fieldname, $table) { $name = str_replace( array("'", '"', ' '), array("", "", '_'), $fieldname); if ( $table === 'teachpress_courses' ) { $prefix = 'tp_meta_courses_'; } elseif ( $table === 'teachpress_pub' ) { $prefix = 'tp_meta_pub_'; } elseif ( $table === 'teachpress_stud' ) { $prefix = 'tp_meta_stud_'; } else { $prefix = 'tp_meta_'; } // Check if the prefix is already part of the field name if ( stristr($fieldname, $prefix) === false ) { return $prefix . esc_attr($name); } return esc_attr($name); } /** * Deletes student data fields * @param string $tab The name of the tab (used for return link) * @access private * @since 5.0.0 */ private static function delete_meta_fields ($tab) { // Just for administrators if ( !current_user_can( 'manage_options' ) ) { return; } if ( isset($_GET['delete_field']) ) { $message = '

' . esc_html__('Do you really want to delete the selected meta field?','teachpress') . '

' . ''. esc_html__('OK') . ' '. esc_html__('Cancel') . ''; get_tp_message($message,'orange'); } if ( isset($_GET['delete_field_ok']) ) { $option = TP_Options::get_option_by_id($_GET['delete_field_ok']); $options = get_tp_options($option['variable'], "`setting_id` DESC", ARRAY_A); foreach ( $options as $row ) { TP_Options::delete_option($row['setting_id']); } TP_Options::delete_option($_GET['delete_field_ok']); get_tp_message( esc_html__('Field deleted','teachpress') ); } } /** * Handles changing of general options * @access private * @since 5.0.0 */ private static function change_general_options () { // Just for administrators if ( !current_user_can( 'manage_options' ) ) { return; } $option_semester = isset( $_POST['semester'] ) ? htmlspecialchars($_POST['semester']) : ''; $option_rel_page_publications = isset( $_POST['rel_page_publications'] ) ? htmlspecialchars($_POST['rel_page_publications']) : ''; $option_stylesheet = isset( $_POST['stylesheet'] ) ? intval($_POST['stylesheet']) : ''; $option_userrole_publications = isset( $_POST['userrole_publications'] ) ? $_POST['userrole_publications'] : ''; $checkbox_convert_bibtex = isset( $_POST['convert_bibtex'] ) ? 1 : ''; $checkbox_import_overwrite = isset( $_POST['import_overwrite'] ) ? 1 : ''; $checkbox_rel_content_auto = isset( $_POST['rel_content_auto'] ) ? 1 : ''; $checkbox_ref_grouped = isset( $_POST['ref_grouped'] ) ? 1 : ''; TP_Options::change_option('sem', $option_semester); TP_Options::change_option('rel_page_publications', $option_rel_page_publications); TP_Options::change_option('stylesheet', $option_stylesheet); TP_Options::change_option('convert_bibtex', $checkbox_convert_bibtex, 'checkbox'); TP_Options::change_option('import_overwrite', $checkbox_import_overwrite, 'checkbox'); TP_Options::change_option('rel_content_auto', $checkbox_rel_content_auto, 'checkbox'); TP_Options::change_option('rel_content_template', $_POST['rel_content_template']); TP_Options::change_option('rel_content_category', $_POST['rel_content_category']); tp_update_userrole($option_userrole_publications, 'use_teachpress'); TP_Options::change_option('ref_grouped', $checkbox_ref_grouped, 'checkbox'); get_tp_message( esc_html__('Settings are changed. Please note that access changes are visible, until you have reloaded this page a second time.','teachpress') ); } /** * Handles start of database updates * @param string $site The current URL * @param boolean $with_structure_change Update database structure (true) or not (false), Default is true * @access private * @since 5.0.0 */ private static function update_database ($site, $with_structure_change = true) { if ( $with_structure_change === true ) { tp_db_update(); } $check_stud_meta = TP_Update::check_table_stud_meta(); $check_authors = TP_Update::check_table_authors(); if ( $check_authors === false && $check_stud_meta === false ) { return; } $sync = ( $check_authors === true ) ? 1 : 2; $table = ( $check_authors === true ) ? 'teachpress_authors' : 'teachpress_stud_meta'; $message = 'TABLE ' . $table . ': ' . esc_html__('teachPress wants to fill up the new database. This can take some time.','teachpress') . ' ' . esc_html__('Continue','teachpress') . ''; get_tp_message($message, 'orange'); } /** * Handles database deletion * @access private * @since 5.0.0 */ private static function delete_database () { // Just for administrators if ( !current_user_can( 'manage_options' ) ) { return; } // Form for delete database question if ( isset($_GET['drop_tp']) && ! isset($_POST['drop_tp_ok']) ) { echo '
'; wp_nonce_field( 'verify_teachpress_del_db', 'tp_nonce_del_db', true, true ); $message = '

' . esc_html__('Do you really want to delete all teachpress database tables?','teachpress') . '

' . ' '. esc_html__('Cancel') . ''; get_tp_message($message,'orange'); echo '
'; } // Delete if wp_nonce is ok if ( isset($_POST['drop_tp_ok']) ) { if ( ! wp_verify_nonce( $_POST['tp_nonce_del_db'], 'verify_teachpress_del_db' ) ) { wp_die('teachPress error: This request could not be verified!'); exit; } tp_uninstall(); get_tp_message( esc_html__('Database uninstalled','teachpress') ); } } /** * Checks the nonce field of the form. If the check fails wp_die() will be executed */ private static function check_nonce_field () { if ( ! isset( $_POST['tp_nonce'] ) || ! wp_verify_nonce( $_POST['tp_nonce'], 'verify_teachpress_settings' ) ) { wp_die('teachPress error: This request could not be verified!'); exit; } } /** * Checks the nonce field of an url. If the check fails wp_die() will be executed */ private static function check_nonce_url () { if ( ! isset( $_GET['tp_nonce'] ) || ! wp_verify_nonce( $_GET['tp_nonce'], 'verify_teachpress_settings' ) ) { wp_die('teachPress error: This request could not be verified!'); exit; } } }