justintadlock / content-type-standards

WordPress community-curated standards for common post types, taxonomies, and metadata.
304 stars 26 forks source link

Staff post type? #26

Open photocurio opened 9 years ago

photocurio commented 9 years ago

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.

AlchemyUnited commented 9 years ago

gut reaction == ditto

on second thought == perhaps this is a subset of a person(s) standard?

kraftner commented 9 years ago

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.

kraftner commented 9 years ago

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.

Post Types

Taxonomies

Metadata

Person Image

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.

Mail

Telephone

Twitter

Facebook

LinkedIn

Xing

Other data

Name

The post title should serve as the name of the person. (Note: filter the enter_title_here hook.)

Person Description

Plugins should use the standard post content field (post_content) for storing any description of a person.


Issues

Role

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.

justintadlock commented 9 years ago

Re: Roles: Keeping it simple. Roles are a way to group people. The taxonomy system in WP is for grouping.

AlchemyUnited commented 9 years ago

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?

benhuson commented 9 years ago

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?

benhuson commented 9 years ago

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

kraftner commented 9 years ago

@benhuson Underscore of course. Was a typo -> fixed

kraftner commented 9 years ago

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...

franz-josef-kaiser commented 8 years ago

@kraftner Adding here: Portable Contacts Standard. Nodejs Passport for e.g. relies on this one, meaning it's highly adopted already.