Inventory_Presser_Customize_Dashboard::add_vehicles_to_admin_bar()

add_vehicles_to_admin_bar


Description Description

Adds a Vehicle button to the Admin Bar


Top ↑

Return Return

(void)


Top ↑

Source Source

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

	function add_vehicles_to_admin_bar()
	{
		//do not do this if we are already looking at the dashboard
		if( is_admin() ) { return; }

		global $wp_admin_bar;
		$wp_admin_bar->add_node( array(
			'id'     => 'wp-admin-bar-vehicles',
			'title'  => __( 'Vehicles', 'inventory-presser' ),
			'href'   => admin_url( 'edit.php?post_type=' . INVP::POST_TYPE ),
			'parent' => 'site-name',
		) );
	}