Inventory_Presser_Admin_Location_Meta::generate_location_uid( string $salt_string = null )

generate_location_uid


Description Description

Creates a unique ID for a phone number or set of hours.


Top ↑

Parameters Parameters

$salt_string

(string) (Optional) Any string to be combined with rand() as the value to pass to md5()

Default value: null


Top ↑

Return Return

(string) A string of 12 characters.


Top ↑

Source Source

File: includes/admin/class-admin-location-meta.php

	function generate_location_uid( $salt_string = null ) {
		return substr( md5( strval( rand() ) . $salt_string ), 0, 12 );
	}