/** * Types_Field_Group_Term constructor. * * @param WP_Post $field_group_post Post object representing a term field group. * @throws InvalidArgumentException */ public function __construct($field_group_post) { parent::__construct($field_group_post); if (self::POST_TYPE != $field_group_post->post_type) { throw new InvalidArgumentException('incorrect post type'); } }