Skip to content

Commit

Permalink
Add field 'column' parameter, and the concept of field value display.
Browse files Browse the repository at this point in the history
You can now set admin post-listing columns with an extra field
parameter, `'column' => true,`. If you want to dictate what position
the column is, use `'column' => array( 'position' => 2 ),`. If you
want to dictate the column title (instead of using the field `'name'`
value), use `'column' => array( 'name' => 'My Column' ),`. If you need
to specify the column display callback, set the `'display_cb'` parameter
to [a callback function](https://github.com/WebDevStudios/CMB2/wiki/Field-Parameters#render_row_cb).
  • Loading branch information
jtsternberg committed Sep 8, 2016
1 parent 336a04f commit 76b96dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/CMB2_hookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class CMB2_hookup extends CMB2_Hookup_Base {
*/
protected $columns = array();

/**
* The object type we are performing the hookup for
* @var string
* @since 2.0.9
*/
protected $object_type = 'post';

/**
* Constructor
* @since 2.0.0
Expand Down

0 comments on commit 76b96dd

Please sign in to comment.