Actions/Filters for Developers
Impact Focus provides the hooks below for advanced developers to use when developing custom functionality that integrates with this plugin.
Important Notice – No support is provided for the use of these filters.
1) $atts = apply_filters( 'impactfocus_campaign_shortcode_atts_filter', $atts, self::CAMPAIGN_REPORTING );
if_report shortcode, with a possibility to “catch” the shortcode call/occurrence and check the parameters the shortcode received. It will be possible to filter parameters, or run a shortcode with your own custom set of parameters.
2) $variables = apply_filters( 'impactfocus_campaign_settings_variables', $variables, $post->ID ); do_action( 'impactfocus_campaign_settings_before_users', $postId );
This hook makes it possible to interfere in a Campaign. Add your own variables into Campaign Settings Page (Campaign Settings tab).
3) $questionsResult = apply_filters( 'impactfocus_question_builder_variables', $questionsResult, $postId );
This hook makes it possible to interfere in a Campaign. Add your own variables into Campaign questions (Question Builder tab).
4) $attachedUsers = apply_filters( 'impactfocus_campaign_attached_users_filter', $attachedUsers, $postId );
Add manipulation and filtering for a user within a Campaign (for users who were added manually, via Group assignment, or users that are not active yet).
5) do_action( 'impactfocus_shortcode_enqueue_scripts_action' );
Add custom styling or scripts for the page containing the if_report shortcode. Changes will also affect the same report within the /wp-admin section accordingly.
Read the rest of our Knowledge Base pages to make the most of Impact Focus.