sc0ttkclark / wordpress-fields-api

The 2024 Fields API proposal for WordPress Core
https://make.wordpress.org/core/tag/fields-api/
361 stars 42 forks source link

Change Object Name to Object Subtype #63

Closed lucyllewy closed 8 years ago

lucyllewy commented 8 years ago

I still think it's confusing to have object_type and object_name when the latter is determined to possibly be a post_type.

"so my name is the type, and the type is the name, but sometimes the type is the name and the name is the type? my brain hurts.."

sc0ttkclark commented 8 years ago

Post types are object names, Taxonomies are object names, open to ideas here on improving this.

lucyllewy commented 8 years ago

an object in my opinion is the individual post or term or...

so the object_type would be whatever _type fits the role of the current object be that taxonomy slug or post type slug or ...

then we need to differentiate object_types own typing to "term" or "post" so that we target the right screen, so something along the lines of meta_object_type?

that would leave us with object => the individual post or term or .. object_type => the slug of the post's cpt or the term's taxonomy meta_object_type => the type of aggregation of items of object_type such as post or term.

lucyllewy commented 8 years ago

an alternative could be rename object_type to group_type (term or post or ..) and replace object_name with object_type (slug of cpt or tax or..).

lucyllewy commented 8 years ago

there we go, how about:

object_type, and object_group

where object_type is the slug of cpt or tax, and the object_group is post or term?

sc0ttkclark commented 8 years ago

As per our discussion in Slack, we're going to go with Subtype as it's immediately apparent that is a perfect name for this type of term.

https://wordpress.slack.com/archives/core-fields/p1456777324000308

I'll work on a PR for this.

sc0ttkclark commented 8 years ago

Fixed by https://github.com/sc0ttkclark/wordpress-fields-api/pull/67 which renamed Object name to Object subtype