Noptin_Automation_Rules::admin_delete_automation_rule()

Deletes a rule


Return Return

(void)


Top ↑

Source Source

File: includes/automation-rules/class-noptin-automation-rules.php

	public function admin_delete_automation_rule() {

        if ( ! current_user_can( get_noptin_capability() ) || empty( $_GET['_wpnonce'] ) ) {
			return;
		}

		if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'noptin-automation-rule' ) ) {
			return;
        }
        
        $this->delete_rule( intval( $_GET['delete'] ) );

        noptin()->admin->show_info( __( 'The automation rule has been deleted.', 'newsletter-optin-box' ) );

        wp_redirect(
            add_query_arg(
                array(
                    '_wpnonce'            => false,
                    'delete'              => false,
                    'noptin_admin_action' => false,
                )
            )
        );
        exit;

    }


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.3.0Introduced.

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