Noptin_Link_Click_Trigger::get_settings()


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' ),
            )

        );

    }

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