Event Visibility

getVisibleEvent

Determines if an event should be visible based on its visibility settings.

event
object

The event object to check visibility for

return
object|false

Returns the event object if visible, false otherwise

Google Analytics

googleAnalytics

Sends pageview data to Google Analytics.

analytics
object

The Google Analytics service object

getResults

Retrieves session data from Google Analytics for the last 7 days.

analytics
object

The Google Analytics service object

profileId
string

The Google Analytics profile ID

printResults

Prints the results from a Google Analytics query.

results
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.

return
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).

type
string

The type of items to generate filters for

items
array

The array of items to generate filters from

return
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.

name
string

The name of the cookie

val
string

The value to set for the cookie

saveCookie

Saves cookie preferences.

Email

send_internal_email

Sends an internal email using PHPMailer.

data
array

The data to be used in the email template

return
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.

email
string

The subscriber’s email address

firstname
string

The subscriber’s first name

lastname
string

The subscriber’s last name

Search Functionality

getResultSearchString

Extracts and formats a snippet of text around a search term.

item
object

The item containing the content to search

search_term
string

The term to search for

return
string

A formatted string containing the search term and surrounding context

search_save

Saves a search term, updating its count if it already exists.

tag_id
int|false
default: "false"

Optional tag ID associated with the search