delarge
4/16/2018 - 10:36 PM

Using own SVG icon in extended custom post types

register_extended_post_type( 'merch', array(
		//'menu_icon' => 'dashicons-cart',
		'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode( '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><path fill="#82878c" d="M13.2,0h-2.2c0,1.7-1.4,3-3,3S5,1.7,5,0H2.8L0,1.4V6c0,0.6,0.4,1,1,1h2v8c0,0.6,0.4,1,1,1h8c0.6,0,1-0.4,1-1 V7h2c0.6,0,1-0.4,1-1V1.4L13.2,0z"></path></g></svg>' ).'',
		'menu_position' => 10,
		'has_archive' => false,
		'public' => false,
		'show_ui' => true

	)