class Team_ChallengesRegisters the internal challenge post type, public REST actions, and notification handlers.
class final
- Full name
Kernowdev\Clanbite\Extensions\Teams\Team_Challenges
Constants
| Name | Value | Description |
|---|---|---|
POST_TYPE | 'clanbite_challenge' | |
STATUS_PENDING | 'pending' | |
STATUS_ACCEPTED | 'accepted' | |
STATUS_DECLINED | 'declined' | |
META_CHALLENGED_TEAM_ID | 'cp_challenge_challenged_team_id' | |
META_CHALLENGER_USER_ID | 'cp_challenge_challenger_user_id' | |
META_CHALLENGER_NAME | 'cp_challenge_challenger_name' | |
META_CHALLENGER_EMAIL | 'cp_challenge_challenger_email' | |
META_MESSAGE | 'cp_challenge_message' | |
META_PROPOSED_SCHEDULED_AT | 'cp_challenge_proposed_scheduled_at' | |
META_CHALLENGER_TEAM_ID | 'cp_challenge_challenger_team_id' | |
META_REMOTE_TEAM_URL | 'cp_challenge_remote_team_url' | |
META_REMOTE_SNAPSHOT | 'cp_challenge_remote_snapshot' | |
META_STATUS | 'cp_challenge_status' | |
META_MATCH_ID | 'cp_challenge_match_id' | |
META_EVENT_ID | 'cp_challenge_event_id' | |
META_CHALLENGER_LOGO_ATTACHMENT_ID | 'cp_challenge_challenger_logo_attachment_id' |
Methods
handle_notification_accept()Handle notification primary action: create match (+ optional event + RSVPs).handle_notification_decline()Handle decline: mark challenge declined.instance()Get singleton.register_post_type()Register the internal challenge post type (no public URLs).register_rest_routes()REST routes for challenge flow (same-origin proxy + create).register()Register WordPress hooks.rest_challenge_remote_team()Proxy: fetch discovery + public team from a remote Clanbite site (server-side).rest_create_challenge()Create a pending challenge and notify challenged team admins.rest_upload_challenge_media()Accept a small team logo image for manual (non–Clanbite-remote) challenges.
Defined in inc/extensions/teams/class-team-challenges.php
Changelog
| Version | Description |
|---|---|
| 1.3.0 | Updated. |