Description
Override the profile options with parameter settings with the same nameUse this routine to override options such as: effect: fade, fold, slideInLeft, etc
Usage
$array = bw_override_options( $options, $options_field, $atts, $atts_field, $field_validation );Parameters
- $options
- ( array ) required – the options array
- $options_field
- ( string ) required – the name of the options field to override
- $atts
- ( array ) required – the overriding parameter array
- $atts_field
- ( string ) required – the name of the field containing the override
- $field_validation
- ( callback ) optional – a validation function for the overriding parameter
Returns
array the overridden options arraySource
File name: oik-nivo-slider/nivo.phpLines:
1 to 13 of 13
function bw_override_options( $options, $options_field, $atts, $atts_field, $field_validation=null ) { $value = bw_array_get( $atts, $atts_field, null ); if ( $value ) { if ( is_callable( $field_validation ) ) { $value = $field_validation( $value ); } } if ( $value !== null ) { bw_trace2( $options, "options"); $options[$options_field] = $value ; } return( $options ); }View on GitHub View on Trac
Called by
1 to 1 of 1
Invoked by
Calls
1 to 1 of 1
