admin管理员组

文章数量:1332394

I want to change the referral link structure 

Currently it's:


I want to change it to:

/?pkey=username

User ID shortcode 


$user_ID = get_current_user_ID();


function mwb_wpr_create_referral_code()
    {
        
        $length = 10;
        $pkey = '';
        $alphabets = range('A','Z');
        $numbers = range('0','9');
        $final_array = array_merge($alphabets,$numbers);
        while($length--)
        {
            $key = array_rand($final_array);
            $pkey .= $final_array[$key];
        }
        
        return $pkey;
    }

本文标签: shortcodeUser name in referral URLs