Skip to content

Largo Top Term does not handle case where saved top term does not match this post's terms. #1866

@benlk

Description

@benlk

The top term metabox does not handle this case; it does not check if the saved term ID is in the IDs of the terms on the post or display the assigned top term if that term is not in the list of the post's terms.

https://github.com/INN/largo/blob/590181982d22a5444eb3c5ccca58ea8b56db12f7/inc/post-metaboxes.php#L284-L325

Similarly, the largo_top_term() output function does not check whether the saved term ID is one that applies to the post; we've been assuming that it is.

Initially reported in INN/umbrella-sfpublicpress#109 (comment), where a post had a saved top_term ID that was a term that did not match any of the terms that were assigned to the post.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions