WordPress plugins and themes

bw_theme_field() – Theme a custom field


Theme a custom field


bw_theme_field( $key, $value, $field );


( string ) required - field name e.g. _txn_amount
( mixed ) required - post metadata value
( array ) optional - the field structure if defined using bw_register_field()




File name: oik/includes/bw_fields.inc
Lines: 1 to 25 of 25

function bw_theme_field( $key, $value, $field=null ) {
  $type = bw_array_get( $field, "#field_type", null );
  //if ( function_exists( "bw_pre_theme_field" ) ) {
  // Try for a theming function named "bw_theme_field_$type_$key 
  $funcname = bw_funcname( "bw_theme_field_${type}", $key );
  // If there isn't a generic one for the type 
  // nor a specific one just try for the field
  if ( $funcname == "bw_theme_field_" && $type ) { 
    $funcname = bw_funcname( "bw_theme_field_", $key );
  if ( is_callable( $funcname ) ) {
    //bw_trace2( $funcname, "funcname chosen", false );
    call_user_func( $funcname,  $key, $value, $field );
  } else {
    bw_trace2( $funcname, "funcname chosen not callable, using default _bw_theme_field_default", false );
    _bw_theme_field_default( $key, $value, $field );

Invoked by

    Call hooks

    Recent plugin updates
    oik-clone v0.8 oik-clone v0.8 adds support for mapping of informal relationships in post content.  ...
    oik-bob-bing-wide v1.30 oik-bob-bing-wide v1.30 introduces pagination to the [bw_csv] shortcode, with the posts_per_page= parameter. Also, using the uo= parameter you can choose how the CSV data is displayed; as a table, ordered list, unordered list or definition list. ...
    oik v2.5-beta.0409 oik v2.5-beta.0409 primarily contains a workaround to a problem with paginated shortcodes in WordPress 4.1.1  ...
    oik-bob-bing-wide v1.29 oik-bob-bing-wide v1.29 fixes a long standing bug in the [bw_plug] shortcode. ...
    bbboing v1.8 v1.8 has a minor change to test integration with the shortcake UI plugin. ...