You appear to be a bot. Output may be restricted
Description
Lazy implementation for "oik-taxonomies"oik-taxonomies options page Processing depends on the button that was pressed. There should only be one!
Selection | Validate? | Perform action | Display preview | Display add | Display edit | Display select list |
---|---|---|---|---|---|---|
preview_taxonomy | No | n/a | Yes | – | – | - |
delete_taxonomy | No | delete selected taxonomy | – | – | – | Yes |
edit_taxonomy | No | n/a | – | – | Yes | Yes |
_oik_tax_edit_taxonomy | Yes | update selected taxonomy | – | – | Yes | Yes |
Usage
oiktax_lazy_taxonomies_do_page();
Parameters
Returns
voidSource
File name: oik-types/admin/oik-taxonomies.phpLines:
1 to 56 of 56
function oiktax_lazy_taxonomies_do_page() { BW_::oik_menu_header( __( "taxonomies", "oik-types" ), "w100pc" ); $validated = false; $preview_taxonomy = bw_array_get( $_REQUEST, "preview_taxonomy", null ); $delete_taxonomy = bw_array_get( $_REQUEST, "delete_taxonomy", null ); $edit_taxonomy = bw_array_get( $_REQUEST, "edit_taxonomy", null ); /** These codes override the ones from the list... but why do we need to do it? * Do we have to receive the others in the $_REQUEST **?** * */ $oik_tax_edit_taxonomy = bw_array_get( $_REQUEST, "_oik_tax_edit_taxonomy", null ); $oik_tax_add_oik_tax = bw_array_get( $_REQUEST, "_oik_tax_add_oik_tax", null ); $oik_tax_add_taxonomy = bw_array_get( $_REQUEST, "_oik_tax_add_taxonomy", null ); if ( $oik_tax_add_taxonomy || $oik_tax_add_oik_tax ) { $preview_taxonomy = null; $delete_taxonomy = null; $edit_taxonomy = null; } if ( $preview_taxonomy ) { oik_box( NULL, NULL, "Preview", "oik_tax_preview" ); } if ( $delete_taxonomy ) { _oik_tax_delete_taxonomy( $delete_taxonomy ); } if ( $edit_taxonomy ) { global $bw_taxonomy; $bw_taxonomies = get_option( "bw_taxonomies" ); $bw_taxonomy = bw_array_get( $bw_taxonomies, $edit_taxonomy, null ); $bw_taxonomy['args']['taxonomy'] = $edit_taxonomy; bw_trace2( $bw_taxonomy ); } if ( $oik_tax_edit_taxonomy ) { $validated = _oik_tax_taxonomy_validate( false ); } if ( $oik_tax_add_oik_tax ) { $validated = _oik_tax_taxonomy_validate( true ); } if ( $oik_tax_add_taxonomy || ( $oik_tax_add_oik_tax && !$validated ) ) { oik_box( NULL, NULL, "Add new", "oik_tax_add_oik_tax" ); } if ( $edit_taxonomy || $oik_tax_edit_taxonomy || $validated ) { BW_::oik_box( null, null, __( "Edit taxonomy", "oik-types" ), "oik_tax_edit_taxonomy" ); } BW_::oik_box( NULL, NULL, __( "taxonomies", "oik-types" ), "oik_tax_taxonomies" ); oik_menu_footer(); bw_flush(); }View on GitHub