You appear to be a bot. Output may be restricted
Description
Format a table row
Usage
bw_format_table_row( $post, $atts, $csv_totals );
Parameters
- $post
- ( post ) required – the current post object
- $atts
- ( array ) required – shortcode parameters
- $csv_totals
- ( mixed ) required –
Returns
voidSource
File name: oik/shortcodes/oik-table.phpLines:
1 to 32 of 32
function bw_format_table_row( $post, $atts, $csv_totals ) { global $field_arr; $atts['post'] = $post; $index = 0; bw_trace2( $field_arr, "field_arr", false ); stag( "tr" ); foreach ( $field_arr as $key => $value ) { //bw_trace2( $key, "key", false ); //bw_trace2( $value, "value", false ); stag( "td", $value, $key ); if ( property_exists( $post, $value ) ) { $field_value = $post->$value ; bw_theme_field( $value, $field_value, $atts ); } elseif ( property_exists( $post, "post_$value" ) ) { $field_name = "post_" . $value; $field_value = $post->$field_name; bw_theme_field( $field_name, $field_value, $atts ); } else { bw_trace2( $value, 'value', false, BW_TRACE_VERBOSE ); $field_value = bw_custom_column( $value, $post->ID ); } if ( $csv_totals) { $csv_totals->column( $index, $field_value ); } etag( "td" ); $index++; } etag( "tr"); }View on GitHub View on Trac