diff --git a/includes/list-table.php b/includes/list-table.php index 0ea3a4578..f3db2f5b0 100644 --- a/includes/list-table.php +++ b/includes/list-table.php @@ -213,15 +213,9 @@ function column_default( $item, $column_name ) { break; case 'connector': - $out = $this->column_link( WP_Stream_Connectors::$term_labels['stream_connector'][$item->connector], 'connector', $item->connector ); - break; - case 'context': case 'action': - $display_col = isset( WP_Stream_Connectors::$term_labels['stream_'.$column_name][$item->{$column_name}] ) - ? WP_Stream_Connectors::$term_labels['stream_'.$column_name][$item->{$column_name}] - : $item->{$column_name}; - $out = $this->column_link( $display_col, $column_name, $item->{$column_name} ); + $out = $this->column_link( $this->get_term_title( $item->{$column_name}, $column_name ), $column_name, $item->{$column_name} ); break; case 'ip': @@ -359,6 +353,14 @@ function column_link( $display, $key, $value = null, $title = null ) { ); } + public function get_term_title( $term, $type ) { + if ( isset( WP_Stream_Connectors::$term_labels[ "stream_$type" ][ $term ] ) ) { + return WP_Stream_Connectors::$term_labels[ "stream_$type" ][ $term ]; + } else { + return $term; + } + } + /** * Assembles records for display in search filters *