public function createSlug($data, array $unique = array())
    {
        $slug = sanitize_title($data);
        $next = 1;

        while (in_array($slug, $unique)) {
            $slug = sanitize_title($data . ' ' . $next++);
        }

        return $slug;
    }