' . __('Cancel','teachpress') . '
'; } // delete tags - part 2 if ( isset( $_GET['delete_ok'] ) ) { TP_Authors_Page::check_nonce_field(); TP_Authors::delete_authors($checkbox); get_tp_message( __('Removing successful','teachpress') ); } } /** * This function prints the page * @param string $action * @since 6.0.0 */ public static function get_page ($action) { $search = isset( $_GET['search'] ) ? htmlspecialchars($_GET['search']) : ''; $checkbox = isset( $_GET['checkbox'] ) ? $_GET['checkbox'] : array(); $filter = isset( $_GET['filter'] ) ? htmlspecialchars($_GET['filter']) : ''; $only_zero = ( $filter === 'only_zero' ) ? true : false; $page = 'teachpress/authors.php'; /** * Screen options */ // items per page $user = get_current_user_id(); $screen = get_current_screen(); $screen_option = $screen->get_option('per_page', 'option'); $per_page = get_user_meta($user, $screen_option, true); if ( empty ( $per_page) || $per_page < 1 ) { $per_page = $screen->get_option( 'per_page', 'default' ); } // sorting $option = get_user_meta($user, 'tp_authors_sorting', true); $order = 'a.sort_name ASC, a.name ASC'; if ( $option == 'firstname' ) { $order = 'a.name ASC, a.sort_name ASC'; } // Handle limits $number_messages = $per_page; if (isset($_GET['limit'])) { $curr_page = intval($_GET['limit']) ; if ( $curr_page <= 0 ) { $curr_page = 1; } $entry_limit = ( $curr_page - 1 ) * $number_messages; } else { $entry_limit = 0; $curr_page = 1; } echo '