Conversation
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().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project-specific additions built for the Pearl site. Parking this as a PR per team convention until we decide what should land on
mainvs. 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 theevent_detailsACF group.Posts endpoint: multi-term filtering, priority ordering, ID lookup
Extends
term_slugfiltering on the Posts endpoint:taxonomyparam (needed when a slug likeprice-1exists in more than one taxonomy)term_operator(IN/AND) to control how multiple slugs within a taxonomy combinepriority_term_slugto pin matching posts first, with remaining filtered posts followingincludeparam for ID-list lookups (comma-separated, order-preserving) across all exposed post typesProject Images upload endpoint
New
POST/GET /wp-json/fuxt/v1/project-imagesfor accepting externally-submitted images outside the normal authenticated media library flow:POSTrequires an API key (X-Fuxt-Api-Keyheader orAuthorization: Bearer, configurable via Settings → Project Images API or theFUXT_PROJECT_IMAGES_API_KEYconstant), rate-limited to 20 uploads/hour per IPfilesize()+getimagesize()) rather than trusting client-supplied headersGETis public, paginated, with asubmissions_onlyfilter to scope to images uploaded via this endpointAlso
.gitignorefor.DS_Store