Description
Add a Taxonomy name
Usage
oik_tax_add_oik_tax();Parameters
Returns
voidSource
File name: oik-types/admin/oik-taxonomies.phpLines:
1 to 23 of 23
function oik_tax_add_oik_tax( ) { global $bw_taxonomy; if ( null === $bw_taxonomy ) { _oik_tax_taxonomy_validate( false ); } bw_form(); stag( "table", "wide-fat" ); BW_::bw_textfield( "taxonomy", 32, __( "Name", "oik-types" ), $bw_taxonomy['args']['taxonomy'] ); bw_textfield( "label", 32, "Label", $bw_taxonomy['args']['label'] ); $singular_name = bw_return_singular_name( $bw_taxonomy['args'] ); bw_textfield( "singular_name", 32, "Singular label", $singular_name ); // $taxonomy_types = apply_filters( "oik_query_taxonomy_types", array() ); $taxonomy_types = oik_tax_query_taxonomy_types(); bw_trace2( $taxonomy_types, "taxonomy_types" ); bw_select( "type", "Type", null, array( "#options" => $taxonomy_types ) ); bw_textfield( "title", 100, "Title", stripslashes( $bw_taxonomy['args']['title'] ) ); bw_checkbox( "show_in_rest", "Show in REST", $bw_taxonomy['args']['show_in_rest'] ); etag( "table" ); p( isubmit( "_oik_tax_add_oik_tax", "Add new taxonomy", null, "button-primary" ) ); etag( "form" ); }View on GitHub
Called by
Invoked by
Calls
1 to 9 of 9
- bw_form() – Start a form
- bw_select() – Create a select field for a form-table
- bw_textfield() – Form a text field
- bw_trace2() – Trace $value to the trace log file if tracing is active
- etag() – Output an end tag
- isubmit() – Create a submit button
- oik_tax_query_taxonomy_types() – Return the different choices for Taxonomy type
- p() – Output a paragraph of translatable text
- stag() – Output an HTML opening tag
