Skip to content

Pearl - Events iCal, Posts filtering, Project Images#119

Open
dChiamp wants to merge 5 commits into
mainfrom
pearl
Open

Pearl - Events iCal, Posts filtering, Project Images#119
dChiamp wants to merge 5 commits into
mainfrom
pearl

Conversation

@dChiamp

@dChiamp dChiamp commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Project-specific additions built for the Pearl site. Parking this as a PR per team convention until we decide what should land on main vs. stay Pearl-only.

Events iCal feed

Adds GET /wp-json/fuxt/v1/events.ics, serving the Events CPT as an RFC 5545 iCalendar feed for the frontend calendar (FullCalendar's icalendar plugin), Google Calendar, or any webcal-compatible app. Reads start/end/venue from the event_details ACF group.

Posts endpoint: multi-term filtering, priority ordering, ID lookup

Extends term_slug filtering on the Posts endpoint:

  • Comma-separated multi-slug lookups, scoped to specific taxonomies via a new taxonomy param (needed when a slug like price-1 exists in more than one taxonomy)
  • term_operator (IN/AND) to control how multiple slugs within a taxonomy combine
  • priority_term_slug to pin matching posts first, with remaining filtered posts following
  • include param for ID-list lookups (comma-separated, order-preserving) across all exposed post types

Project Images upload endpoint

New POST/GET /wp-json/fuxt/v1/project-images for accepting externally-submitted images outside the normal authenticated media library flow:

  • POST requires an API key (X-Fuxt-Api-Key header or Authorization: Bearer, configurable via Settings → Project Images API or the FUXT_PROJECT_IMAGES_API_KEY constant), rate-limited to 20 uploads/hour per IP
  • Validates real file size and image content server-side (filesize() + getimagesize()) rather than trusting client-supplied headers
  • GET is public, paginated, with a submissions_only filter to scope to images uploaded via this endpoint

Also

  • Adds .gitignore for .DS_Store

dChiamp added 5 commits July 21, 2026 10:48
Serves GET /wp-json/fuxt/v1/events.ics for the frontend calendar (section-events-calendar.vue) to subscribe to via FullCalendar's icalendar plugin, Google Calendar, or any webcal-compatible app.
…ordering, include-by-ID

Adds taxonomy-scoped term_slug lookups (comma-separated, IN/AND via term_operator), priority_term_slug for pinning matching posts first, and an include param for ID-list lookups across all exposed post types.
POST /wp-json/fuxt/v1/project-images accepts a single image (API-key auth via X-Fuxt-Api-Key or Bearer token, rate-limited per IP), tagging it for the submissions_only filter. GET lists recent images, paginated, public read.
Client-supplied $file['size'] and $file['type'] can be spoofed. Now checks filesize() on disk against the 5MB cap, and getimagesize() to confirm the upload is actually a decodable image of an allowed type before handing it to media_handle_upload().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant