Carbon_Fields\Helper\Helper::maybe_old_relationship_field PHP Method

maybe_old_relationship_field() public static method

If so, parse them to the new way of storing the data.
public static maybe_old_relationship_field ( mixed $value ) : mixed
$value mixed Old field value.
return mixed New field value.
    public static function maybe_old_relationship_field($value)
    {
        if (is_array($value) && !empty($value)) {
            if (preg_match('~^\\w+:\\w+:\\d+$~', $value[0])) {
                $new_value = array();
                foreach ($value as $value_entry) {
                    $pieces = explode(':', $value_entry);
                    $new_value[] = $pieces[2];
                }
                $value = $new_value;
            }
        }
        return $value;
    }