Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions includes/list-table.php
Original file line number Diff line number Diff line change
@@ -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
*

0 comments on commit 24779e1

Please sign in to comment.