Noptin_Link_Click_Trigger::is_rule_valid_for_args( $rule,  $args,  $subscriber,  $action )


Source Source

File: includes/automation-rules/triggers/class-noptin-link-click-trigger.php

    public function is_rule_valid_for_args( $rule, $args, $subscriber, $action ) {
        $settings = $rule->trigger_settings;

        // Are we filtering by campaign id?
        $campaign_id = (int) $args['campaign_id'];
        if ( ! empty( $settings['campaign_id'] ) && (int) $settings['campaign_id'] !== $campaign_id ) {
            return false;
        }

        // Are we filtering by link?
        $link = noptin_clean_url( $args['link'] );
        if ( ! empty( $settings['url'] ) && noptin_clean_url( $settings['url'] ) !== $link ) {
            return false;
        }

        return true;
    }


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation