Skip to main content

Event Visibility

getVisibleEvent

Determines if an event should be visible based on its visibility settings.
object
The event object to check visibility for
object|false
Returns the event object if visible, false otherwise

Google Analytics

googleAnalytics

Sends pageview data to Google Analytics.
object
The Google Analytics service object

getResults

Retrieves session data from Google Analytics for the last 7 days.
object
The Google Analytics service object
string
The Google Analytics profile ID

printResults

Prints the results from a Google Analytics query.
object
The results object from a Google Analytics query

Event Management

get_events_with_js_return

Retrieves events for a specific date and returns them as JSON.
json
JSON object containing the formatted date and event items

Filtering

js_filter

Prepares data for JavaScript-based filtering of webinars.

get_filter

Prepares data for filtering artworks.

get_filters_for

Generates filter options for different types of items (case studies, projects, news, shop).
string
The type of items to generate filters for
array
The array of items to generate filters from
array
An array of filter options

Image Handling

getArtworkZoom

Retrieves zoom images for an artwork.

upload_image

Handles image upload and resizing.

replace_img

Replaces an existing image. Sets a cookie with the given name and value.
string
The name of the cookie
string
The value to set for the cookie

saveCookie

Saves cookie preferences.

Email

send_internal_email

Sends an internal email using PHPMailer.
array
The data to be used in the email template
string
Returns ‘ok’ on success, or an error message on failure

Mailchimp Integration

add_to_mailchimp

Adds an email address to a Mailchimp list.

addToMailchimp

Adds a subscriber to a Mailchimp list with additional details.
string
The subscriber’s email address
string
The subscriber’s first name
string
The subscriber’s last name

Search Functionality

getResultSearchString

Extracts and formats a snippet of text around a search term.
object
The item containing the content to search
string
The term to search for
string
A formatted string containing the search term and surrounding context

search_save

Saves a search term, updating its count if it already exists.
int|false
default:"false"
Optional tag ID associated with the search