/home/techb158/public_html/wp-content/plugins/kirki/app/Models
Edit: /home/techb158/public_html/wp-content/plugins/kirki/app/Models/Collection.php (1503B)
'integer',
];
public static function query()
{
return parent::query()
->where('post_type', PostTypes::CONTENT_MANAGER)
->where_in('post_status', [
PostStatus::DRAFT,
PostStatus::PUBLISH,
PostStatus::FUTURE,
]);
}
public function meta()
{
return $this->has_many(PostMeta::class, 'post_id', 'ID');
}
public function fields()
{
return $this->has_one(PostMeta::class, 'post_id', 'ID')->where('meta_key', with_prefix('cm_fields'));
}
public function basic_fields()
{
return $this->has_one(PostMeta::class, 'post_id', 'ID')->where('meta_key', with_prefix('cm_basic_fields'));
}
public function preset_type()
{
return $this->has_one(PostMeta::class, 'post_id', 'ID')->where('meta_key', with_prefix('cm_preset_type'));
}
public function items()
{
return $this->has_many(CollectionItem::class, 'post_parent', 'ID')->where('post_type', 'like', PostTypes::CONTENT_MANAGER . '_%');
}
}