You appear to be a bot. Output may be restricted
Description
Determine the columns for the tableFinds the field names of the columns for the table, determines the table title for each field and creates a table heading
Usage
$bool = bw_query_table_columns( $atts, $post_type );
Parameters
- $atts
- ( array ) optional – shortcode parameters including "fields="
- $post_type
- ( string ) optional – the post type being displayed
Returns
bool true if one of the columns is "excerpt"Source
File name: oik/shortcodes/oik-table.phpLines:
1 to 26 of 26
function bw_query_table_columns( $atts=null, $post_type=null ) { global $field_arr, $title_arr; $field_arr = array(); $title_arr = array(); $fields = bw_array_get( $atts, "fields", null ); if ( $fields ) { $field_arr = explode( ",", $fields ); $field_arr = bw_assoc( $field_arr ); } else { $field_arr = apply_filters( "oik_table_fields_${post_type}", $field_arr, $post_type ); if ( empty( $field_arr ) ) { $field_arr['title'] = 'title'; $field_arr['excerpt'] = 'excerpt'; } } bw_trace2( $field_arr, "field_arr", false ); $title_arr = bw_default_title_arr( $field_arr ); $title_arr = apply_filters( "oik_table_titles_${post_type}", $title_arr, $post_type, $field_arr ); bw_table_header( $title_arr ); $excerpts = in_array( "excerpt", $field_arr); return( $excerpts ); }View on GitHub View on Trac