oik-plugins
WordPress plugins and themes

bw_theme_field() – Theme a custom field

Description

Theme a custom field

Usage

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

Parameters

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

Returns

void

Source

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

function bw_theme_field( $key, $value, $field=null ) {
  //bw_trace2();
  $type = bw_array_get( $field, "#field_type", null );
  //
  //if ( function_exists( "bw_pre_theme_field" ) ) {
    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

    Information
    Recent plugin updates
    oik v2.4-alpha.1112 Changes for WP-a2z and oik-plugins. ...
    oik-shortcodes v1.26 Changes to improve the display of the Dynamic API Reference for WP-a2z and oik-plugins. ...
    oik-rwd v0.5 Added support for defining the breakpoint where RWD logic starts to take effect. ...
    oik-css v.07 Required for better control over Automatic paragraph creation. Now dependent on oik v2.3 or higher. ...
    oik v2.4-alpha.1012 Improvements to the [bw_fields] shortcode. ...
    oik-bob-bing-wide v1.27 Changes for oik-plugins and any other site wanting to display data from the wp_options table. ...
    oik-plugins v1.13 Tested with WordPress 4.0. Required for improved results for [bw_table]. ...
    oik-bob-bing-wide v1.26 Required for AumAbsFitnessStudios.com with multiple instances of the Responsive Pricing Table shortcode. ...
    oik-types v1.6 oik-types v1.6 adds the ability to select the post types to be displayed on the home page. So your front page really can display your most recent activity! ...
    oik v2.3 oik version 2.3, tested on WordPress 4.0 and WordPress Multisite, now delivers over 80 advanced shortcodes. ...