/** * Creates random GUID that is not based on URL * * @param array $data Sanitized post data * @param array $postarr Raw post data * @return array */ function vp_generate_post_guid($data, $postarr) { if (!VersionPress::isActive()) { return $data; } if (empty($postarr['ID'])) { // it's insert not update $protocol = is_ssl() ? 'https://' : 'http://'; $data['guid'] = $protocol . IdUtil::newUuid(); } return $data; }