You appear to be a bot. Output may be restricted
Description
Validate the Taxonomy fields
Usage
_oik_tax_taxonomy_validate( $add_taxonomy );
Parameters
- $add_taxonomy
- ( mixed ) optional default: 1 –
Returns
voidSource
File name: oik-types/admin/oik-taxonomies.phpLines:
1 to 26 of 26
function _oik_tax_taxonomy_validate( $add_taxonomy=true ) { global $bw_taxonomy; $bw_taxonomy['args']['taxonomy'] = bw_array_get( $_REQUEST, "taxonomy", null ); $bw_taxonomy['args']['type'] = bw_array_get( $_REQUEST, "type", null ); $bw_taxonomy['args']['label'] = bw_array_get( $_REQUEST, "label", null ); ///$bw_taxonomy['args']['required'] = bw_array_get( $_REQUEST, "required", null ); $bw_taxonomy['args']['singular_name'] = bw_array_get( $_REQUEST, "singular_name", null ); $bw_taxonomy['args']['title'] = bw_array_get( $_REQUEST, "title", null ); $bw_taxonomy['args']['show_in_rest'] = bw_array_get( $_REQUEST, "show_in_rest", null ); bw_trace2( $bw_taxonomy, "bw_taxonomy" ); $ok = oik_diy_validate_taxonomy( $bw_taxonomy['args']['taxonomy'] ); // validate the taxonomies and add the taxonomy IF it's OK to add // $add_taxonomy = bw_array_get( $_REQUEST, "_oik_tax_add_oik_tax", false ); if ( $ok ) { if ( $add_taxonomy ) { $ok = _oik_tax_add_oik_tax( $bw_taxonomy ); } else { $ok = _oik_tax_update_taxonomy( $bw_taxonomy ); } } return( $ok ); }View on GitHub