Noptin_Open_Email_Trigger::get_settings()
Contents
Source Source
File: includes/automation-rules/triggers/class-noptin-open-email-trigger.php
public function get_settings() { $args = array( 'numberposts' => -1, 'post_type' => 'noptin-campaign', 'post_status' => array( 'publish', 'draft', 'pending' ), 'meta_query' => array( array( 'key' => 'campaign_type', 'value' => array( 'automation', 'newsletter' ), 'meta_compare' => 'IN', ), ) ); $posts = get_posts( $args ); $campaigns = wp_list_pluck( $posts, 'post_title', 'ID' ); return array( 'campaign_id' => array( 'el' => 'select', 'label' => __( 'Campaign', 'newsletter-optin-box' ), 'placeholder' => __( 'Fire for all campaigns', 'newsletter-optin-box' ), 'options' => $campaigns, 'description' => __( 'Select a campaign above if you want to watch for a specific campaign.', 'newsletter-optin-box' ), ), ); }
Expand full source code Collapse full source code View on GitHub