Noptin_New_Subscriber_Trigger::get_subscription_methods()
Returns an array of available subscription methods.
Source Source
File: includes/automation-rules/triggers/class-noptin-new-subscriber-trigger.php
public function get_subscription_methods() { $args = array( 'numberposts' => -1, 'post_type' => 'noptin-form', 'post_status' => array( 'draft', 'publish' ), 'orderby' => 'post_title', 'order' => 'ASC', ); $forms = get_posts( $args ); $return = array(); foreach ( $forms as $form ){ $return[ $form->ID ] = get_the_title( $form ); } $return['import'] = __( 'Imported', 'newsletter-optin-box' ); $return['manual'] = __( 'Manually Added', 'newsletter-optin-box' ); return apply_filters( 'noptin-subscription-methods', $return ); }
Expand full source code Collapse full source code View on GitHub