You appear to be a bot. Output may be restricted
Description
Implement default display of the checkbox fieldWe asssume that we're displaying things of a certain post_type {@TODO although this information could be stored in $_args or singular/plural} And we also assume the ID can be used to uniquely identify the thing we're dealing with
Usage
$string = BW_List_Table::column_cb( $item );
Parameters
- $item
- ( array ) required – the fields for the current row
Returns
string the HTML to displaySource
File name: oik/admin/class-bw-list-table.phpLines:
1 to 14 of 14
public function column_cb( $item ) { $name = bw_array_get( $item, "post_type", $this->_args['singular'] ); $name .= "[]"; $value = bw_array_get( $item, "ID", null ); $it = "<input "; $it .= kv( "type", "checkbox" ); $it .= kv( "name", $name ); $it .= kv( "value", $value ); $it .= "/>"; //bw_trace2(); //die( 'function BW_List_Table::column_cb() must be over-ridden in a sub-class.' ); return( $it ); }View on GitHub View on Trac