looking to create a string like on pastebin for the entries.
whats the best way to go about this?
current way im doing is using uniqid with some other jazz
Code:
function short_name( $post_name ) {
global $wpdb, $post;
if ( !is_object( $post ) )
return $post_name;
$num = (int) $post->ID;
$pasteid = md5(uniqid($num, true));
$slug = dechex(crc32($pasteid));
return $slug;
}