Inventory_Presser_Admin_Customize_Dashboard::change_taxonomy_show_ui_attributes( array $taxonomy_data )

change_taxonomy_show_ui_attributes


Description Description

When the user flips the "Show All Taxonomies" setting switch, this method changes the taxonomy registration so they are shown.


Top ↑

Parameters Parameters

$taxonomy_data

(array) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/admin/class-admin-customize-dashboard.php

	function change_taxonomy_show_ui_attributes( $taxonomy_data ) {
		for ( $i = 0; $i < sizeof( $taxonomy_data ); $i++ ) {
			if ( ! isset( $taxonomy_data[ $i ]['args']['show_in_menu'] ) ) {
				continue;
			}

			$taxonomy_data[ $i ]['args']['show_in_menu'] = true;
			$taxonomy_data[ $i ]['args']['show_ui']      = true;
		}
		return $taxonomy_data;
	}