wp_strip_all_tags( __( 'Name', 'two-factor' ) ), 'added' => wp_strip_all_tags( __( 'Added', 'two-factor' ) ), 'last_used' => wp_strip_all_tags( __( 'Last Used', 'two-factor' ) ), ); } /** * Prepares the list of items for displaying. * * @since 0.1-dev */ public function prepare_items() { $columns = $this->get_columns(); $hidden = array(); $sortable = array(); $primary = 'name'; $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); } /** * Generates content for a single row of the table * * @since 0.1-dev * @access protected * * @param object $item The current item. * @param string $column_name The current column name. * @return string */ protected function column_default( $item, $column_name ) { switch ( $column_name ) { case 'name': $out = ''; $actions = array( 'rename hide-if-no-js' => Two_Factor_FIDO_U2F_Admin::rename_link( $item ), 'delete' => Two_Factor_FIDO_U2F_Admin::delete_link( $item ), ); return esc_html( $item->name ) . $out . self::row_actions( $actions ); case 'added': return gmdate( get_option( 'date_format', 'r' ), $item->added ); case 'last_used': return gmdate( get_option( 'date_format', 'r' ), $item->last_used ); default: return 'WTF^^?'; } } /** * Generates custom table navigation to prevent conflicting nonces. * * @since 0.1-dev * @access protected * * @param string $which The location of the bulk actions: 'top' or 'bottom'. */ protected function display_tablenav( $which ) { // Not used for the Security key list. } /** * Generates content for a single row of the table * * @since 0.1-dev * @access public * * @param object $item The current item. */ public function single_row( $item ) { ?> single_row_columns( $item ); ?>