ta = wp_parse_args( $data, $default ); $data['data']['redirect-url'] = add_query_arg( [ 'page' => 'wpforms-builder', 'view' => 'settings', 'form_id' => $form_id, 'section' => 'quiz', ], admin_url( 'admin.php' ) ); return $data; } return wp_parse_args( [ 'data' => [ 'action' => 'upgrade', 'name' => esc_html__( 'Quiz Addon', 'wpforms-lite' ), 'utm-content' => 'Quiz Addon', 'licence' => 'pro', 'message' => esc_html__( 'We\'re sorry, Enable Quiz is part of the Quiz Addon and not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features.', 'wpforms-lite' ), ], 'class' => 'education-modal', ], $default ); } /** * Get attributes for the `Enable Quiz` field option. * * @since 1.9.9 * * @param array $addon Current addon information. * * @return array */ private function get_enable_quiz_field_attributes( array $addon ): array { $default = [ 'slug' => 'enable_quiz', 'value' => '0', 'desc' => esc_html__( 'Include in Quiz Scoring', 'wpforms-lite' ), ]; if ( $addon['plugin_allow'] ) { return $default; } return wp_parse_args( [ 'desc' => sprintf( '%1$s%2$s', esc_html__( 'Include in Quiz Scoring', 'wpforms-lite' ), Helpers::get_badge( 'Pro', 'sm', 'inline', 'slate' ) ), 'attrs' => [ 'disabled' => 'disabled', ], ], $default ); } }