You appear to be a bot. Output may be restricted
Description
Return the value from a fields #args array, setting the default if not defined
Usage
$mixed = bw_get_field_data_arg( $field, $key, $default );
Parameters
- $field
- ( string ) required – the field name – which is expected to be defined in $bw_fields
- $key
- ( string ) required – the key to the #args array. e.g. #theme
- $default
- ( mixed ) optional default: 1 – the default value
Returns
mixed the value found/defaulted or false if the field is not definedSource
File name: oik-fields/oik-fields.phpLines:
1 to 8 of 8
function bw_get_field_data_arg( $field, $key, $default=true ) { global $bw_fields; $value = bw_array_get( $bw_fields, $field, false ); if ( $value ) { $value = bw_array_get( $value["#args"], $key, $default ); } return( $value ); }View on GitHub