Inventory_Presser_Taxonomies::add_location_fields_javascript()

add_location_fields_javascript


Description Description

Outputs inline JavaScript that populates the slug while a user adds a location term.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-taxonomies.php

	function add_location_fields_javascript()
	{
		?><script type="text/javascript"><!--
		jQuery('#tag-name').on('input', function(){
			jQuery('#tag-slug').val( jQuery(this).val().replace(' ', '-').replace(/[^a-z\-0-9]/gi,'').toLowerCase());
		});
		//-->
		</script><?php
	}