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
    bbboing v1.8 v1.8 has a minor change to test integration with the shortcake UI plugin. ...
    oik v2.5-alpha.0130 oik v2.5-alpha.0130 is the first drop for oik v2.5.
    This first version is primarily focussed on delivery of some prototype code to support the shortcake UI plugin.
    oik-batchmove v2.4 Now supports mass setting of post meta data. ...
    oik-squeeze v0.7 v0.7 of the oik-squeeze WordPress plugin no longer displays the squeeze page form on the WPMS sign-up page. ...
    oik-external-link-warning v0.05 v0.05 of the oik-external-link-warning plugin now supports display of tooltips over links which do not contain the title attribute. ...