You appear to be a bot. Output may be restricted
Description
Check if it already exists as a fieldIf not then add to the options using bw_update_option() then empty out the field field for the next one
Usage
_oik_fie_add_oik_fie( $bw_field );
Parameters
- $bw_field
- ( mixed ) required –
Returns
voidSource
File name: oik-types/admin/oik-fields.phpLines:
1 to 16 of 16
function _oik_fie_add_oik_fie( $bw_field ) { $field = bw_array_get( $bw_field['args'], "field", null ); $field_exists = _oik_fie_check_field_exists( $field ); if ( $field_exists ) { p( "field $field already defined, try another field" ); $ok = false; } else { unset( $bw_field['args']['field'] ); bw_update_option( $field, $bw_field, "bw_fields" ); // We don't need to add the field now! $bw_field['args']['field'] = ""; $ok = true; } return( $ok ); }View on GitHub