Skip to content

Commit

Permalink
Adding Hide options for document table view proudcity/wp-proudcity#584
Browse files Browse the repository at this point in the history
  • Loading branch information
jlyon committed Oct 4, 2016
1 parent 8c6a3ac commit be46bcc
Showing 1 changed file with 28 additions and 2 deletions.
Expand Up @@ -17,7 +17,7 @@ function __construct( ) {

$this->post_type = 'post';
$this->display_featured = true;
$this->display_modes = [ 'list', 'media', 'mini', 'card' ];
$this->display_modes = [ 'list', 'media', 'mini', 'cards' ];
}
}

Expand Down Expand Up @@ -48,7 +48,33 @@ function __construct( ) {
);

$this->post_type = 'document';
$this->display_modes = [ 'list', 'card', 'table' ];
$this->display_modes = [ 'list', 'cards', 'table' ];
}

function initialize() {
parent::initialize();
$this->settings += [
'proud_teaser_hide' => [
'#title' => __('Hide Columns', 'proud-teaser'),
'#description' => __('Select columns that you would not like to appear in your table', 'proud-teaser'),
'#type' => 'checkboxes',
'#default_value' => [],
'#options' => [
'category' => __( 'Category', 'proud-teaser' ),
'date' => __( 'Date', 'proud-teaser' ),
'download' => __( 'Document type and size download link', 'proud-teaser' ),
],
'#states' => [
'hidden' => [
'proud_teaser_display' => [
'operator' => '!=',
'value' => ['table'],
'glue' => '||'
],
],
],
],
];
}
}

Expand Down

0 comments on commit be46bcc

Please sign in to comment.