Developer Reference

This article is for developers extending Panels. Everything here is the published, supported surface as of v1.9.56; anything not listed is internal and may change without notice.

Filters

ig_translation_payload_data

Filter the translation payload before it is embedded in the confirmation page, e.g. to strip values a site considers sensitive.

apply_filters( 'ig_translation_payload_data', $payload, $entry, $form, $publication_id );
  • $payload (array) — the full payload, including translatableLayers, translatableFieldIds, translatableFieldValues, nonTranslatableFieldValues, and templateData.

  • $entry (array) — the Gravity Forms entry.

  • $form (array) — the Gravity Forms form.

  • $publication_id (int) — the Panel post ID.

BREAKING CHANGE in v1.9.53: the payload keys restUrl and restNonce were removed and esSaveNonce was added when the Spanish save moved from REST to admin-ajax. Any filter consumer reading the removed keys must update.

ig_register_translation_providers

Register an additional translation provider class alongside DeepL.

apply_filters( 'ig_register_translation_providers', $providers );
  • $providers (array) — map of provider slug → class name. Classes must implement the plugin's translation-provider interface.

ig_image_retention_days

Retention window for generated images before the daily cleanup reaps them. Default 90.

add_filter( 'ig_image_retention_days', fn() => 180 );

ig_cleanup_batch_size

How many records the daily cleanup processes per run. Default 50.

apply_filters( 'ig_cleanup_batch_size', $batch_size );

Retention applies to images Panels generated. Files uploaded through Gravity Forms File Upload fields belong to Gravity Forms and are governed by its own retention/personal-data tooling — Panels never deletes them.

Actions

ig_before_translate / ig_after_translate

Fire around every provider translation call.

do_action( 'ig_before_translate', $to_translate, $target_lang, $source_lang, $options );
do_action( 'ig_after_translate', $results, $target_lang, $source_lang, $options );

crftd_panels_translation_saved

Fires after a Spanish sidecar image is successfully saved.

do_action( 'crftd_panels_translation_saved', $es_post_id, $en_post_id, $en_entry_id, $translation_group );
  • $translation_group (string) — the UUID linking the English and Spanish panel_image posts (stored as _panels_translation_group meta on both).

REST API

GET /wp-json/crftd-panels/v1/user-images

Returns the current user's generated images. Authentication required (401 otherwise); rate-limited to 60 requests per user per minute (429 over limit).

Param

Default

Notes

per_page

12

1–100

page

1

user_id

current user

Another user's ID requires theedit_others_posts capability (403 otherwise)

Response: { images: [ { id, title, url, date, date_human, form_id, entry_id } ], total, total_pages, page, per_page }.

The plugin's admin-ajax actions (image save and translation) are internal transport, not a public API — they are nonce- and token-protected and their contracts may change between versions. Build on the REST route, the hooks above, or the PHP helper below.

PHP helper

Crftd_Panels_User_Images::get_user_images( $user_id = 0, $per_page = 12, $page = 1, $args = [] );

Returns [ 'images' => [...], 'total' => int, 'total_pages' => int ] with the same privilege rules as the REST route (non-privileged callers are locked to their own images). Intended for theme developers and page-builder custom modules.

Compatibility notes

  • Retained for back-compat: the Crftd_Panels_Translation_REST class and its REST_NAMESPACE constant remain public API even though the Spanish save no longer travels over REST.

  • Server requirement worth verifying at deploy: uploads-directory script-execution blocking. Gravity Forms ships an Apache .htaccess rule for its upload directory; on nginx, confirm the server config denies PHP execution under wp-content/uploads/ yourself.