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