Help needed
In Classipress 3.5 in classipress - includes - functions at a point comes up:
/**
* Generates unique ID for ads and memberships
* @since 3.3.1
*
* @param string $type
*
* @return string
*/
function cp_generate_id( $type = 'ad' ) {
$id = uniqid( rand( 10, 1000 ), false );
if ( $type == 'ad' ) {
if ( cp_get_listing_by_ref( $id ) ) {
return cp_generate_id();
}
}
return $id;
}
I want ads posted to have an id between 10000 and 100000, but if I change the values to
$id = uniqid( rand( 10000, 100000 ), false );
nothing happens differently. Any new ad still gets an ID with a number below 10000.
Can anyone shed some light on this?
I need this change for two reasons. First of all with a randomly selected value between 10 and 1000 only 990 ads can get a unique ID. Besides that I need the larger ID numbers because I need a six figure code to publish below each ad.
That bring me to the following question I have:
Below each ad on a Classipress website is a sixteen digit code, created by a separate class. Instead of this number I want the ad-ID to show up in that place.
In Classipress – includes – actions is the <div class="note">. So instead of the sixteen digit code which is here normally I want the actual ad-ID to be shown.
Can anyone please help me out here?
Thanks,
Frank