Inventory_Presser_Taxonomies::change_taxonomy_show_in_menu_attribute( array $taxonomy_data )
Users can show and hide the taxonomies in the dashboard menu.
On This Page
Parameters Parameters
- $taxonomy_data
-
(array) (Required)
Return Return
(array)
Source Source
File: includes/class-taxonomies.php
public function change_taxonomy_show_in_menu_attribute( $taxonomy_data ) { $settings = INVP::settings(); if ( empty( $settings['taxonomies'] ) ) { return $taxonomy_data; } $count = count( $taxonomy_data ); for ( $i = 0; $i < $count; $i++ ) { // Should this taxonomy be shown in the dashboard menu under Vehicles? $taxonomy_data[ $i ]['args']['show_in_menu'] = $settings['taxonomies'][ $taxonomy_data[ $i ]['args']['query_var'] ]['admin_menu'] ?? false; } return $taxonomy_data; }
Expand full source codeCollapse full source codeView on Github