Skip to content

Data Structures

Matthew Boynes edited this page Aug 23, 2018 · 1 revision

Byline Manager's primary content types consist of a post type (profile) and a taxonomy (byline).

Content Types

Profile Post Type

The profile post type contains profiles for the people that make up a site's bylines. Profiles can be associated with user accounts, but for the purposes of user-facing content, profiles replace user accounts.

Byline Taxonomy

The byline taxonomy is a hidden taxonomy which represents the relationship between profiles and other pieces of content (e.g. posts and pages). This taxonomy maintains parity with profiles behind-the-scenes, so there is a byline taxonomy term for every profile post. The byline terms allow us to query for posts by profile as performantly as possible.

Byline terms are stored using the name profile-{$profile_post_id}, which expedites direct lookups of byline terms for a given profile post.

Post Meta and Relationships

A post's byline is primarily stored as post meta, under the byline meta key. This contains an ordered array of data useful for generating the byline (including both the profile post ID and the byline term ID). In addition, posts store a taxonomy relationship to the byline taxonomy, whose terms link to profile posts.

Clone this wiki locally