ID : 0; if ( isset( $args['id'] ) ) { $form_id = $args['id']; } $defaults = apply_filters( 'give_form_args_defaults', array( 'form_id' => $form_id, ) ); $args = wp_parse_args( $args, $defaults ); $form = new Give_Donate_Form( $args['form_id'] ); // Bail out, if no form ID. if ( empty( $form->ID ) ) { return false; } $args['id_prefix'] = "{$form_id}-{$count}"; $payment_mode = give_get_chosen_gateway( $form->ID ); $form_action = add_query_arg( apply_filters( 'give_form_action_args', array( 'payment-mode' => $payment_mode, ) ), give_get_current_page_url() ); // Sanity Check: Donation form not published or user doesn't have permission to view drafts. if ( ( 'publish' !== $form->post_status && ! current_user_can( 'edit_give_forms', $form->ID ) ) || ( 'trash' === $form->post_status ) ) { return false; } // Get the form wrap CSS classes. $form_wrap_classes = $form->get_form_wrap_classes( $args ); // Get the