Noptin_Link_Click_Trigger::get_settings()
Contents
Source Source
File: includes/automation-rules/triggers/class-noptin-link-click-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' => __( 'Watch for clicks on all campaigns', 'newsletter-optin-box' ), 'options' => $campaigns, 'description' => __( 'Select the campaign that you would like to watch for clicks.', 'newsletter-optin-box' ), ), 'url' => array( 'el' => 'input', 'label' => __( 'URL', 'newsletter-optin-box' ), 'description' => __( 'Enter the URL to watch for clicks or leave empty to watch for all URLs.', 'newsletter-optin-box' ), ) ); }
Expand full source code Collapse full source code View on GitHub