ID ) { $args['id'] = $post->ID; } // set `form_id` for backward compatibility because many legacy filters and functions are using it. $args['form_id'] = $args['id']; /** * Fire the filter * Note: we will deprecated this filter soon. Use give_get_default_form_shortcode_args instead * * @deprecated 2.4.1 */ $args = apply_filters( 'give_form_args_defaults', $args ); $form = new Give_Donate_Form( $args['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', [ '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