-
Notifications
You must be signed in to change notification settings - Fork 2
Data Structures
Byline Manager's primary content types consist of a post type (profile
) and a taxonomy (byline
).
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.
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.
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.