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