Skip to content

Ignition Platform Mode — Developer Reference

The Ignition Platform Mode add-on registers the campaign creator role, confines creators to the frontend, and adds the campaign roster and moderation surfaces. It builds almost entirely on core’s own extension points (the campaign form and detail seams, the submission-status filters, the add-on settings framework, and the email registry — see the Actions and Filters references). It exposes the following filters and service methods of its own.

Hook Parameters Description
igcf_dashboard_campaign_actions $actions, $campaign_id, $status The per-campaign action buttons shown on a card in the frontend creator roster. Return a modified $actions array to add or change buttons. This is the seam a companion add-on uses to add lifecycle controls (for example, pause / resume / end) to a creator’s own campaigns.
igcf_platform_is_creator_only_user $is_creator_only, $user Whether the given user counts as “creator-only” — holding the campaign creator role but not igcf_staff (the capability administrators and operators share). Staff are never creator-only, even when they also hold the creator role. This is the gate behind frontend confinement, the media-library scope, the campaign REST-write block, and the upload-type restriction. Filter it to include or exclude a user from those restrictions.
igcf_platform_creator_allowed_upload_mimes $allowed, $user_id The map of allowed upload file types (extension → MIME type) for a creator-only user. Defaults to JPEG, PNG, GIF, and WebP images. Filter it to widen or narrow what creators may upload.
igcf_platform_creator_list_columns $columns The columns on the wp-admin Creators list table. Return a modified $columns map (id → label) to add operator-facing columns — the seam a gateway add-on (e.g. igcf-paypal) uses to surface per-creator connection status.
igcf_platform_creator_list_column_content $content, $column_name, $user_id The rendered cell content for a custom Creators-list column, for the creator identified by $user_id. Return a string for your own $column_name; the default is empty.
igcf_platform_creator_detail_sections $sections, $user_id The sections rendered on a creator’s wp-admin detail view (for $user_id). Return a modified $sections array to add operator-facing panels.
igcf_platform_creator_stat_tiles $tiles, $aggregates, $user_id, $mode The ordered money tiles on a creator’s wp-admin detail view — Total Pledged, Total Received, Refunded, Canceled. An add-on that owns its own per-creator money dimension appends tiles here so they sit beside the gross figures. Each tile uses the same shape as core’s: scalar text fields plus a numeric amount. Contributions are shape-checked and anything that does not match is skipped, and a filter returning a non-array falls back to the unfiltered tiles — so a misbehaving listener costs you its own tile, not the page. $mode is the resolved Live/Test view mode; $aggregates is already scoped to it — see below.
igcf_platform_pre_creator_access $takeover, $context, $args Take over the backer→creator grant. $context is registration (at signup) or self_upgrade (from the dashboard). $args is { user_id, email }, with user_id of 0 at signup because the user does not exist yet. Return a URL to take over — no role is granted, and from the dashboard the person is redirected there instead; return null to let the add-on proceed. This is the seam for a verification, application, or identity-check add-on.

$mode tells you which side of the Live/Test divide the screen is showing. Scope your own figure to it, or your tile will disagree with the ones beside it.

Receiving it is opt-in — register with accepted_args of 4. Give the parameter a default anyway, since WordPress calls a filter with however many arguments the caller passed:

add_filter( 'igcf_platform_creator_stat_tiles', 'my_addon_tiles', 10, 4 );
function my_addon_tiles( $tiles, $aggregates, $user_id, $mode = '' ) {
$scope = Igcf_Test_Campaign::is_valid_scope( $mode ) ? $mode : Igcf_View_Mode::LIVE;
// ... compute your figure under $scope, append a tile ...
return $tiles;
}

One judgement call worth copying: in Live view, omit a tile whose value is zero, so a creator with none of your dimension renders exactly as they would without your add-on installed. In Test view, render the zero tile — the partial captions it, and “no test commission yet” reading as “add-on not installed” is the worse failure.

The add-on exposes no actions of its own.

Platform Mode is where the site-wide “who gets the money” question is settled, so several of core’s money seams get their answers here rather than in core.

Core seam What Platform Mode does with it
igcf_pledges_go_to_creator Answers it from the Who Receives Pledges setting. That is what makes the routing choice site-wide instead of per payment method.
igcf_payment_attempt_operator_custody Answers true for the offline payment method when pledges route to the platform, and returns every other method’s answer untouched. It matches core’s own default rather than diverging from it — its job is to mark offline as the method this add-on owns, the way a gateway add-on owns its own. Core stamps the answer once, when the payment attempt is created, and never re-derives it, so a later change to the routing setting does not rewrite payments already taken.
igcf_gateway_unavailable_reasons Adds the reason creator_offline_instructions_missing for the offline gateway when the campaign’s creator has written no offline payment instructions. Its message names the creator. It only ever adds a reason, so it never puts Offline back. See igcf_gateway_unavailable_reasons.
igcf_operator_settings Answers it for the igcf_platform_settings option: group igcf_platform_settings_group, keys allow_public_campaign_creation and require_campaign_approval, add-on igcf-platform. Operators can change those two; Who Receives Pledges stays administrator-only. See igcf_operator_settings.
igcf_pledge_routing_consequences Consumes it. The Who Receives Pledges screen renders whatever add-ons answer, as a list under a “Choosing X will turn these off:” heading.

Warning about your own setting when routing changes

Section titled “Warning about your own setting when routing changes”

If your add-on has a setting that works under only one routing, answer igcf_pledge_routing_consequences and Platform Mode’s settings screen will list it before the operator commits to the switch.

The filter is handed the routing choice being asked about — the one the operator has not picked — so answer for that hypothetical, not for the routing in force. Build the answer with core’s igcf_pledge_routing_consequence() helper rather than appending by hand; an answerer that returns a non-array would otherwise break the next add-on’s append and take the whole screen down.

add_filter( 'igcf_pledge_routing_consequences', 'my_addon_routing_consequences', 10, 2 );
function my_addon_routing_consequences( $consequences, $to_creator ) {
if ( ! $to_creator ) {
return $consequences; // Nothing of ours is lost by collecting centrally.
}
return igcf_pledge_routing_consequence(
$consequences,
__( 'My Setting', 'my-addon' ), // Named as your own screen names it.
__( 'it needs the platform to hold the money', 'my-addon' )
);
}

Two rules the screen enforces, and one convention worth following:

  • Each answer needs a label and a reason, both scalar. Platform Mode drops an entry missing either, so a malformed answer costs you your line rather than the screen.
  • The reason is a lower-case clause, not a sentence — it is read under the “will turn these off” heading, after an em dash.
  • Only warn about something that is working on the site today. A setting the operator already switched off, or one that is dead for an unrelated reason, loses nothing when the routing changes, and naming it is noise.

Every add-on translates in its own text domain, so pass strings you have already run through your own add-on’s __().

Igcf_Platform_Creator_Service mirrors core’s backer service, and like it, every cross-campaign method takes a scope. Omitting it triggers _doing_it_wrong() and returns the empty shape.

Method Parameters Returns
query_paginated( array $args = [] ) scope (required), plus search, filter, orderby, order, per_page, page. array — [ 'rows' => stdClass[], 'total' => int, 'pages' => int ], one row per creator.
get_aggregates_for_user( array $args = [] ) scope (required), plus user_id. user_id does not narrow the scope — one creator can have campaigns on both sides. stdClass|null — The per-creator pivot behind the detail-page stat tiles. Every counted campaign falls into exactly one group, so active_campaigns, paused_campaigns, not_started_campaigns, outcome_pending_campaigns, successful_campaigns, failed_campaigns, closed_no_outcome_campaigns, test_campaigns and other_campaigns always add up to total_campaigns. other_campaigns catches any status not sorted elsewhere.