Open photocurio opened 9 years ago
gut reaction == ditto
on second thought == perhaps this is a subset of a person(s) standard?
It already is on the list of ideas: https://github.com/justintadlock/content-type-standards/issues/13
So what we need now is a concrete proposal.
Okay as I'll probably need this soon let's kick this off with a first draft. I have not used CPT prefixes here as discussed in #29.
person_category
(This may be e.g. a department or user-level)The primary method for getting the person's image is to use their email address to display their avatar/Gravatar via the get_avatar() function.
The secondary method of getting a person's image is to use the standard featured image functionality. Some plugins may opt to only use this method rather than checking for an avatar. This method should use core WP's featured image functionality.
_thumbnail_id
100
(image attachment ID)email
test@test.com
phone
+1234567
(Just a string, I wouldn't enforce anything here as people use spaces, slashes, letters for numbers and so on)twitter
WordPress
(just the handle without the @)facebook
WordPress
linkedin
matt-m
xing
username
The post title should serve as the name of the person. (Note: filter the enter_title_here hook.)
Plugins should use the standard post content field (post_content) for storing any description of a person.
One thing I am not sure about is how to assign something like a role, e.g. "CEO". It makes sense as a taxonomy for roles that many people have, but when these are very unique we might have a couple of terms with only one person assigned. So maybe meta makes more sense. Input appreciated.
Re: Roles: Keeping it simple. Roles are a way to group people. The taxonomy system in WP is for grouping.
most of the contacts look like a "many" with an identifier. e.g.,
id = home phone + # id = cell phone + #
or for social
id = facebook + url id = twitter + url
or is this observation premature?
Also note, we should probably use underscores instead of hyphens for post type/taxonomy names (i.e. person_category
) to follow the same methodology as core?
Also regarding the "many" issue mentioned by @AlchemyUnited, in the hcard and vcard specs this is referred to as "type" if we wanted to use that naming convention for consistency.
For more information see: http://microformats.org/wiki/hcard#type_subproperty_values https://tools.ietf.org/html/rfc6350#section-6.4.1
@benhuson Underscore of course. Was a typo -> fixed
Concerning the "many" issue - I haven't thought about that to be honest as I am coming more from the direction of staff and less of a generic person. And in that case you usually only want a single way of contact (per medium at least)
For phone I think it works anyway. As I wouldn't enforce any format for the phone number and just let it be a string you could just make it work: + 1234567
anyway and add multiple phone
.
Not sure if this approach works for social though...
@kraftner Adding here: Portable Contacts Standard. Nodejs Passport for e.g. relies on this one, meaning it's highly adopted already.
The most common custom post type I create is a 'staff' post type, so companies can keep track of employees. Maybe this should be a standard.