You appear to be a bot. Output may be restricted
Description
Default theming of metadata based on field name ( $key ) or content? ( $value )Rather than using an action to determine the function to invoke this routine looks for a function called _bw_theme_field_default_$key If found it calls it passing the $key and $value else it performs some very basic default processing
Usage
_bw_theme_field_default( $key, $value );
Parameters
- $key
- ( string ) required – the field name e.g. _type_field
- $value
- ( string ) required – the field value Note: The '_' prefix to the meta data field name ensures the field is NOT displayed by the Custom fields meta box
Returns
voidSource
File name: oik/libs/bw_fields.phpLines:
1 to 19 of 19
function _bw_theme_field_default( $key, $value ) { $funcname = "_bw_theme_field_default_" . $key; if ( function_exists( $funcname ) ) { $funcname( $key, $value ); } else { // this could be a function called _bw_theme_field_default__unknown_key //span( "metadata $key" ); //span( $key ); //e( $key ); //epan( $key ); span( "value $key" ); // e( $value ); if ( !empty( $value ) ) { e( bw_array_get( $value, 0, $value ) ); } epan( "value" ); //epan( "metadata $key" ); } }View on GitHub View on Trac