[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
  • Shortcodes
  • APIs
    • ALL action and filter hooks
  • Support
  • Blog

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/libs/bw_fields.php
Lines: 1 to 26 of 26

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 );
  }
} 
 

 View on GitHub View on Trac

Called by

1 to 4 of 4

  • bw_format_custom_column() – format a custom column on the admin page IF the column is defined in bw_fields
  • bw_format_field() – Theme an array of custom fields
  • bw_format_table_row() – Format a table row
  • bw_theme_object_property() – If the field type is not defined then it’s probably a post object’s property

Invoked by

    Calls

    1 to 5 of 5

    • bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
    • bw_funcname() – Return the function name of the function to invoke built from parms
    • bw_pre_theme_field() – Request plugins to load their field theming functions
    • bw_trace2() – Trace $value to the trace log file if tracing is active
    • _bw_theme_field_default() – Default theming of metadata based on field name ( $key ) or content? ( $value )

    Call hooks

    Function name: bw_theme_field
    Plugin ref: oik – oik information kit
    Version: 3.2.3
    Sourcefile: libs/bw_fields.php
    File ref: libs/bw_fields.php
    Deprecated?: No
    API Letters: B,F,T

    Share this:

    • Click to share on Facebook (Opens in new window)
    • Click to share on Twitter (Opens in new window)
    • Click to share on LinkedIn (Opens in new window)
    • Click to share on Google+ (Opens in new window)
    • Click to share on Pinterest (Opens in new window)
    • Click to email this to a friend (Opens in new window)

    Published: February 2, 2018 | Last updated: February 2, 2018

    Plugins

    • All Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins

    Themes

    • FREE themes
    • Bespoke themes
    • Premium themes

    Documentation

    • Shortcodes
    • Examples
    • Tutorials
    • APIs

    Support

    • Contact
    • Get API key
    • Privacy
    • Request support
    • Sitemap
    • Stay informed
    • Terms and Conditions
    oik-plugins
    Email: herb@bobbingwide.com

    Site:  www.oik-plugins.com
    © Copyright oik-plugins 2011-2018. All rights reserved.


    Website designed and developed by Herb Miller of Bobbing Wide
    Proudly powered by WordPress and oik-plugins
    WordPress 4.9. PHP: 7.0.29. Memory limit: 512M

    loading Cancel
    Post was not sent - check your email addresses!
    Email check failed, please try again
    Sorry, your blog cannot share posts by email.