You appear to be a bot. Output may be restricted
Description
Add a field to post relationshipCheck if the relationship already exists. If not then add to the options using bw_update_option() then empty out the f2t field for the next one
Usage
_oik_f2t_add_oik_f2t( $bw_f2t );
Parameters
- $bw_f2t
- ( mixed ) required –
Returns
voidSource
File name: oik-types/admin/oik-f2t.phpLines:
1 to 16 of 16
function _oik_f2t_add_oik_f2t( $bw_f2t ) { $f2t = bw_array_get( $bw_f2t['args'], "f2t", null ); $f2t_exists = oik_f2t_check_relationship_exists( $f2t ); if ( $f2t_exists ) { p( "Relationship already defined, try another type or field" ); $ok = false; } else { unset( $bw_f2t['args']['f2t'] ); bw_update_option( $f2t, $bw_f2t, "bw_f2ts" ); // We don't need to add the f2t now! $bw_f2t['args']['f2t'] = ""; $ok = true; } return( $ok ); }View on GitHub