class Event_Post_TypeCustom post type and meta for front-end events (in-person or virtual).
class final
- Full name
Kernowdev\Clanbite\Events\Event_Post_Type
Constants
| Name | Value | Description |
|---|---|---|
POST_TYPE | 'clanbite_event' | |
SCOPE_TEAM | 'team' | |
SCOPE_GROUP | 'group' | |
SCOPE_PLAYER | 'player' | A personal event owned by a player (not a team or group). |
MODE_IN_PERSON | 'in_person' | |
MODE_VIRTUAL | 'virtual' | |
VISIBILITY_PUBLIC | 'public' | |
VISIBILITY_MEMBERS | 'members' | |
VISIBILITY_TEAM_MEMBERS | 'team_members' | |
VISIBILITY_TEAM_ADMINS | 'team_admins' | |
VISIBILITY_FRIENDS | 'friends' | Player events only: the owner's friends can see it (the owner chooses public for anyone). |
VISIBILITY_ONLY_ME | 'only_me' | Player events only: nobody but the owner can see it. |
Methods
meta_auth_edit_post()Limit meta writes in REST/editor to users who can edit the post.register_cpt()Register the event post type (no public CPT URLs; use team/group virtual routes).register_meta()Register post meta with REST exposure; editor UI can be added later.register()Register hooks.sanitize_attendees_visibility()sanitize_datetime_gmt()sanitize_mode()sanitize_scope()sanitize_visibility()
Defined in inc/events/class-event-post-type.php
Changelog
| Version | Description |
|---|---|
| 1.6.5 | Updated. |