├── .editorconfig ├── CHANGELOG.md ├── LICENSE ├── README.md ├── activation.php ├── assets ├── banner-1544x500.png ├── banner-772x250.png ├── icon-128x128.png ├── icon-256x256.png └── screenshot-1.png ├── composer.json ├── deactivation.php ├── readme.txt ├── src ├── Autoloader.php ├── Connection │ ├── AbstractConnection.php │ ├── EntriesConnection.php │ ├── FormFieldsConnection.php │ └── FormsConnection.php ├── CoreSchemaFilters.php ├── Data │ ├── Connection │ │ ├── EntriesConnectionResolver.php │ │ ├── FormFieldsConnectionResolver.php │ │ └── FormsConnectionResolver.php │ ├── EntryObjectMutation.php │ ├── Factory.php │ ├── FieldValueInput │ │ ├── AbstractFieldValueInput.php │ │ ├── AddressValuesInput.php │ │ ├── CaptchaValueInput.php │ │ ├── CheckboxValuesInput.php │ │ ├── ConsentValueInput.php │ │ ├── EmailValuesInput.php │ │ ├── FileUploadValuesInput.php │ │ ├── ImageValuesInput.php │ │ ├── ListValuesInput.php │ │ ├── NameValuesInput.php │ │ ├── ProductValueInput.php │ │ ├── RadioValueInput.php │ │ ├── ValueInput.php │ │ └── ValuesInput.php │ └── Loader │ │ ├── DraftEntriesLoader.php │ │ ├── EntriesLoader.php │ │ ├── FormFieldsLoader.php │ │ └── FormsLoader.php ├── Extensions │ ├── Extensions.php │ ├── GFChainedSelects │ │ ├── Data │ │ │ └── FieldValueInput │ │ │ │ └── ChainedSelectValuesInput.php │ │ ├── GFChainedSelects.php │ │ └── Type │ │ │ ├── Enum │ │ │ └── ChainedSelectFieldAlignmentEnum.php │ │ │ ├── Input │ │ │ └── ChainedSelectFieldInput.php │ │ │ ├── WPInterface │ │ │ ├── FieldChoiceSetting │ │ │ │ └── ChoiceWithChainedChoices.php │ │ │ ├── FieldInputSetting │ │ │ │ └── InputWithChainedChoices.php │ │ │ └── FieldSetting │ │ │ │ ├── FieldWithChainedChoices.php │ │ │ │ ├── FieldWithChainedSelectsAlignment.php │ │ │ │ └── FieldWithChainedSelectsHideInactive.php │ │ │ └── WPObject │ │ │ └── FormField │ │ │ └── FieldValue │ │ │ └── ValueProperty.php │ ├── GFQuiz │ │ ├── GFQuiz.php │ │ └── Type │ │ │ ├── Enum │ │ │ ├── QuizFieldGradingTypeEnum.php │ │ │ └── QuizFieldTypeEnum.php │ │ │ ├── WPInterface │ │ │ ├── FieldChoiceSetting │ │ │ │ └── ChoiceWithQuizChoices.php │ │ │ └── FieldSetting │ │ │ │ ├── FieldWithQuizChoices.php │ │ │ │ ├── FieldWithQuizQuestion.php │ │ │ │ ├── FieldWithQuizRandomizeQuizChoices.php │ │ │ │ └── FieldWithQuizShowAnswerExplanation.php │ │ │ └── WPObject │ │ │ ├── Entry │ │ │ └── EntryQuizResults.php │ │ │ ├── Form │ │ │ ├── FormQuiz.php │ │ │ ├── FormQuizConfirmation.php │ │ │ └── FormQuizGrades.php │ │ │ └── QuizResults │ │ │ ├── QuizResults.php │ │ │ ├── QuizResultsChoiceCount.php │ │ │ ├── QuizResultsFieldCount.php │ │ │ ├── QuizResultsGradeCount.php │ │ │ └── QuizResultsScoreCount.php │ ├── GFSignature │ │ ├── Data │ │ │ └── FieldValueInput │ │ │ │ └── SignatureValuesInput.php │ │ ├── GFSignature.php │ │ └── Type │ │ │ ├── Enum │ │ │ ├── SignatureFieldBorderStyleEnum.php │ │ │ └── SignatureFieldBorderWidthEnum.php │ │ │ └── WPInterface │ │ │ └── FieldSetting │ │ │ ├── FieldWithBackgroundColor.php │ │ │ ├── FieldWithBorderColor.php │ │ │ ├── FieldWithBorderStyle.php │ │ │ ├── FieldWithBorderWidth.php │ │ │ ├── FieldWithBoxWidth.php │ │ │ ├── FieldWithPenColor.php │ │ │ └── FieldWithPenSize.php │ ├── WPGatsby │ │ ├── GravityFormsMonitor.php │ │ ├── Settings.php │ │ └── WPGatsby.php │ ├── WPGraphQLContentBlocks │ │ └── WPGraphQLContentBlocks.php │ └── WPJamstackDeployments │ │ └── WPJamstackDeployments.php ├── GF.php ├── Interfaces │ ├── Enum.php │ ├── Field.php │ ├── Hookable.php │ ├── Mutation.php │ ├── Registrable.php │ ├── TypeWithConnections.php │ ├── TypeWithDescription.php │ ├── TypeWithFields.php │ ├── TypeWithInputFields.php │ └── TypeWithInterfaces.php ├── Model │ ├── DraftEntry.php │ ├── Form.php │ ├── FormField.php │ └── SubmittedEntry.php ├── Mutation │ ├── AbstractMutation.php │ ├── DeleteDraftEntry.php │ ├── DeleteEntry.php │ ├── SubmitDraftEntry.php │ ├── SubmitForm.php │ ├── UpdateDraftEntry.php │ └── UpdateEntry.php ├── Registry │ ├── FieldChoiceRegistry.php │ ├── FieldInputRegistry.php │ ├── FormFieldRegistry.php │ └── TypeRegistry.php ├── Type │ ├── AbstractType.php │ ├── Enum │ │ ├── AbstractEnum.php │ │ ├── AddressFieldCountryEnum.php │ │ ├── AddressFieldProvinceEnum.php │ │ ├── AddressFieldStateEnum.php │ │ ├── AddressFieldTypeEnum.php │ │ ├── AmPmEnum.php │ │ ├── CaptchaFieldBadgePositionEnum.php │ │ ├── CaptchaFieldThemeEnum.php │ │ ├── CaptchaFieldTypeEnum.php │ │ ├── ConditionalLogicActionTypeEnum.php │ │ ├── ConditionalLogicLogicTypeEnum.php │ │ ├── CurrencyEnum.php │ │ ├── DateFieldFormatEnum.php │ │ ├── DateFieldTypeEnum.php │ │ ├── DraftEntryIdTypeEnum.php │ │ ├── EntryIdTypeEnum.php │ │ ├── EntryStatusEnum.php │ │ ├── EntryTypeEnum.php │ │ ├── FieldFiltersModeEnum.php │ │ ├── FieldFiltersOperatorInputEnum.php │ │ ├── FormButtonTypeEnum.php │ │ ├── FormConfirmationTypeEnum.php │ │ ├── FormCreditCardTypeEnum.php │ │ ├── FormDescriptionPlacementEnum.php │ │ ├── FormFieldCalendarIconTypeEnum.php │ │ ├── FormFieldDescriptionPlacementEnum.php │ │ ├── FormFieldLabelPlacementEnum.php │ │ ├── FormFieldRequiredIndicatorEnum.php │ │ ├── FormFieldSizeEnum.php │ │ ├── FormFieldSubLabelPlacementEnum.php │ │ ├── FormFieldTypeEnum.php │ │ ├── FormFieldVisibilityEnum.php │ │ ├── FormIdTypeEnum.php │ │ ├── FormLabelPlacementEnum.php │ │ ├── FormLimitEntriesPeriodEnum.php │ │ ├── FormNotificationToTypeEnum.php │ │ ├── FormPageProgressStyleEnum.php │ │ ├── FormPageProgressTypeEnum.php │ │ ├── FormRetentionPolicyEnum.php │ │ ├── FormRuleOperatorEnum.php │ │ ├── FormStatusEnum.php │ │ ├── FormSubLabelPlacementEnum.php │ │ ├── FormSubmitButtonLocationEnum.php │ │ ├── FormSubmitButtonWidthEnum.php │ │ ├── FormsConnectionOrderByEnum.php │ │ ├── NumberFieldFormatEnum.php │ │ ├── PasswordFieldMinStrengthEnum.php │ │ ├── PhoneFieldFormatEnum.php │ │ ├── PostFormatTypeEnum.php │ │ ├── RecaptchaTypeEnum.php │ │ ├── SubmissionConfirmationTypeEnum.php │ │ ├── SubmittedEntryIdTypeEnum.php │ │ └── TimeFieldFormatEnum.php │ ├── Input │ │ ├── AbstractInput.php │ │ ├── AddressFieldInput.php │ │ ├── CheckboxFieldInput.php │ │ ├── CreditCardFieldInput.php │ │ ├── EmailFieldInput.php │ │ ├── EntriesConnectionOrderbyInput.php │ │ ├── EntriesDateFiltersInput.php │ │ ├── EntriesFieldFiltersInput.php │ │ ├── FormFieldValuesInput.php │ │ ├── FormsConnectionOrderbyInput.php │ │ ├── ListFieldInput.php │ │ ├── NameFieldInput.php │ │ ├── PostImageFieldInput.php │ │ ├── ProductFieldInput.php │ │ ├── SubmitFormMetaInput.php │ │ ├── UpdateDraftEntryMetaInput.php │ │ └── UpdateEntryMetaInput.php │ ├── WPInterface │ │ ├── AbstractInterface.php │ │ ├── Entry.php │ │ ├── FieldChoice.php │ │ ├── FieldChoiceSetting │ │ │ ├── AbstractFieldChoiceSetting.php │ │ │ ├── ChoiceWithChoices.php │ │ │ ├── ChoiceWithColumns.php │ │ │ ├── ChoiceWithName.php │ │ │ └── ChoiceWithOtherChoice.php │ │ ├── FieldInput.php │ │ ├── FieldInputSetting │ │ │ ├── AbstractFieldInputSetting.php │ │ │ ├── InputWithAddress.php │ │ │ ├── InputWithDateFormat.php │ │ │ ├── InputWithEmailConfirmation.php │ │ │ ├── InputWithName.php │ │ │ ├── InputWithPassword.php │ │ │ ├── InputWithSelectAllChoices.php │ │ │ ├── InputWithSingleProduct.php │ │ │ └── InputWithTimeFormat.php │ │ ├── FieldSetting │ │ │ ├── AbstractFieldSetting.php │ │ │ ├── FieldWithAddIconUrl.php │ │ │ ├── FieldWithAddress.php │ │ │ ├── FieldWithAdminLabel.php │ │ │ ├── FieldWithAutocomplete.php │ │ │ ├── FieldWithBasePrice.php │ │ │ ├── FieldWithCalculation.php │ │ │ ├── FieldWithCaptchaBackground.php │ │ │ ├── FieldWithCaptchaBadge.php │ │ │ ├── FieldWithCaptchaForeground.php │ │ │ ├── FieldWithCaptchaLanguage.php │ │ │ ├── FieldWithCaptchaSize.php │ │ │ ├── FieldWithCaptchaTheme.php │ │ │ ├── FieldWithCaptchaType.php │ │ │ ├── FieldWithCheckboxLabel.php │ │ │ ├── FieldWithChoices.php │ │ │ ├── FieldWithColumns.php │ │ │ ├── FieldWithConditionalLogic.php │ │ │ ├── FieldWithContent.php │ │ │ ├── FieldWithCopyValuesOption.php │ │ │ ├── FieldWithCreditCard.php │ │ │ ├── FieldWithCssClass.php │ │ │ ├── FieldWithDateFormat.php │ │ │ ├── FieldWithDateInputType.php │ │ │ ├── FieldWithDefaultValue.php │ │ │ ├── FieldWithDeleteIconUrl.php │ │ │ ├── FieldWithDescription.php │ │ │ ├── FieldWithDisableMargins.php │ │ │ ├── FieldWithDisableQuantity.php │ │ │ ├── FieldWithDuplicates.php │ │ │ ├── FieldWithEmailConfirmation.php │ │ │ ├── FieldWithEnhancedUI.php │ │ │ ├── FieldWithErrorMessage.php │ │ │ ├── FieldWithFileExtensions.php │ │ │ ├── FieldWithFileSize.php │ │ │ ├── FieldWithForceSSLField.php │ │ │ ├── FieldWithInputMask.php │ │ │ ├── FieldWithLabel.php │ │ │ ├── FieldWithLabelPlacement.php │ │ │ ├── FieldWithMaxLength.php │ │ │ ├── FieldWithMaxRows.php │ │ │ ├── FieldWithMultipleFiles.php │ │ │ ├── FieldWithName.php │ │ │ ├── FieldWithNextButton.php │ │ │ ├── FieldWithNumberFormat.php │ │ │ ├── FieldWithOtherChoice.php │ │ │ ├── FieldWithPassword.php │ │ │ ├── FieldWithPasswordField.php │ │ │ ├── FieldWithPasswordStrength.php │ │ │ ├── FieldWithPasswordVisibility.php │ │ │ ├── FieldWithPhoneFormat.php │ │ │ ├── FieldWithPlaceholder.php │ │ │ ├── FieldWithPostCategoryCheckbox.php │ │ │ ├── FieldWithPostCategoryInitialItem.php │ │ │ ├── FieldWithPostCustomField.php │ │ │ ├── FieldWithPostImage.php │ │ │ ├── FieldWithPostImageFeaturedImage.php │ │ │ ├── FieldWithPrepopulateField.php │ │ │ ├── FieldWithPreviousButton.php │ │ │ ├── FieldWithProductField.php │ │ │ ├── FieldWithRange.php │ │ │ ├── FieldWithRichTextEditor.php │ │ │ ├── FieldWithRules.php │ │ │ ├── FieldWithSelectAllChoices.php │ │ │ ├── FieldWithSingleProductInputs.php │ │ │ ├── FieldWithSize.php │ │ │ ├── FieldWithSubLabelPlacement.php │ │ │ └── FieldWithTimeFormat.php │ │ ├── FieldValue │ │ │ ├── FieldValueWithChoice.php │ │ │ └── FieldValueWithInput.php │ │ ├── FieldWithChoices.php │ │ ├── FieldWithInputs.php │ │ ├── FieldWithPersonalData.php │ │ ├── FormField.php │ │ └── NodeWithForm.php │ └── WPObject │ │ ├── AbstractObject.php │ │ ├── Button │ │ ├── FormButton.php │ │ └── FormLastPageButton.php │ │ ├── ConditionalLogic │ │ ├── ConditionalLogic.php │ │ └── ConditionalLogicRule.php │ │ ├── Entry │ │ ├── DraftEntry.php │ │ └── SubmittedEntry.php │ │ ├── FieldError.php │ │ ├── Form │ │ ├── Form.php │ │ ├── FormConfirmation.php │ │ ├── FormDataPolicies.php │ │ ├── FormEntryDataPolicy.php │ │ ├── FormEntryLimits.php │ │ ├── FormLogin.php │ │ ├── FormNotification.php │ │ ├── FormNotificationRouting.php │ │ ├── FormPagination.php │ │ ├── FormPersonalData.php │ │ ├── FormPostCreation.php │ │ ├── FormSaveAndContinue.php │ │ ├── FormSchedule.php │ │ ├── FormScheduleDetails.php │ │ └── FormSubmitButton.php │ │ ├── FormField │ │ ├── FieldValue │ │ │ ├── FieldValues.php │ │ │ └── ValueProperty │ │ │ │ ├── AddressFieldValue.php │ │ │ │ ├── CheckboxFieldValue.php │ │ │ │ ├── FileUploadFieldValue.php │ │ │ │ ├── ImageFieldValue.php │ │ │ │ ├── ListFieldValue.php │ │ │ │ ├── NameFieldValue.php │ │ │ │ ├── ProductFieldValue.php │ │ │ │ └── TimeFieldValue.php │ │ ├── FormFieldDataPolicy.php │ │ └── FormFields.php │ │ ├── Order │ │ ├── OrderItem.php │ │ ├── OrderItemOption.php │ │ └── OrderSummary.php │ │ ├── Settings │ │ ├── Logger.php │ │ ├── Settings.php │ │ ├── SettingsLogging.php │ │ └── SettingsRecaptcha.php │ │ └── SubmissionConfirmation.php ├── UpdateChecker.php └── Utils │ ├── GFUtils.php │ └── Utils.php └── wp-graphql-gravity-forms.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | indent_size = 4 13 | tab_width = 4 14 | indent_style = tab 15 | insert_final_newline = true 16 | trim_trailing_whitespace = true 17 | 18 | [*.txt] 19 | trim_trailing_whitespace = false 20 | 21 | [*.{md,json,yml}] 22 | trim_trailing_whitespace = false 23 | indent_style = space 24 | indent_size = 2 25 | 26 | [*.json] 27 | indent_style = tab 28 | -------------------------------------------------------------------------------- /activation.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | public $value; 30 | 31 | /** 32 | * {@inheritDoc} 33 | */ 34 | protected function get_field_name(): string { 35 | return 'addressValues'; 36 | } 37 | 38 | /** 39 | * {@inheritDoc} 40 | * 41 | * @return array 42 | */ 43 | protected function prepare_value() { 44 | $value = $this->args; 45 | 46 | return [ 47 | $this->field->inputs[0]['id'] => $value['street'] ?? null, 48 | $this->field->inputs[1]['id'] => $value['lineTwo'] ?? null, 49 | $this->field->inputs[2]['id'] => $value['city'] ?? null, 50 | $this->field->inputs[3]['id'] => $value['state'] ?? null, 51 | $this->field->inputs[4]['id'] => $value['zip'] ?? null, 52 | $this->field->inputs[5]['id'] => $value['country'] ?? null, 53 | ]; 54 | } 55 | 56 | /** 57 | * {@inheritDoc} 58 | */ 59 | public function add_value_to_submission( array &$field_values ): void { 60 | $field_values += $this->value; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Data/FieldValueInput/CaptchaValueInput.php: -------------------------------------------------------------------------------- 1 | field->captchaType ?? null; 27 | if ( null === $captcha_type ) { 28 | return; 29 | } 30 | 31 | // SimpleCaptcha and Math use input_captcha_prefix. 32 | if ( 'simple_captcha' === $captcha_type || 'math' === $captcha_type ) { 33 | $_POST[ sprintf( 'input_captcha_prefix_%s', esc_attr( $this->field->id ) ) ] = $this->value; 34 | } 35 | 36 | // Recaptcha uses g-recaptcha-response. 37 | $_POST['g-recaptcha-response'] = $this->value; 38 | } 39 | 40 | /** 41 | * {@inheritDoc} 42 | */ 43 | protected function get_field_name(): string { 44 | return 'value'; 45 | } 46 | 47 | /** 48 | * {@inheritDoc} 49 | * 50 | * Recaptchas are validated using the $_POST object, not in the submission values. 51 | */ 52 | public function add_value_to_submission( array &$field_values ): void { 53 | // noop. 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Data/FieldValueInput/ConsentValueInput.php: -------------------------------------------------------------------------------- 1 | 30 | */ 31 | public $value; 32 | 33 | /** 34 | * {@inheritDoc} 35 | */ 36 | protected function get_field_name(): string { 37 | return 'value'; 38 | } 39 | 40 | /** 41 | * {@inheritDoc} 42 | * 43 | * @return array 44 | */ 45 | protected function prepare_value() { 46 | $field = $this->field; 47 | 48 | return [ 49 | $field->inputs[0]['id'] => (bool) $this->args, 50 | $field->inputs[1]['id'] => $field->checkboxLabel ?? null, 51 | $field->inputs[2]['id'] => GFFormsModel::get_latest_form_revisions_id( $this->form['id'] ), 52 | ]; 53 | } 54 | 55 | /** 56 | * {@inheritDoc} 57 | */ 58 | public function add_value_to_submission( array &$field_values ): void { 59 | $field_values += $this->value; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Data/FieldValueInput/NameValuesInput.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | public $value; 30 | 31 | /** 32 | * {@inheritDoc} 33 | */ 34 | protected function get_field_name(): string { 35 | return 'nameValues'; 36 | } 37 | 38 | /** 39 | * {@inheritDoc} 40 | * 41 | * @return array 42 | */ 43 | protected function prepare_value() { 44 | $value = $this->args; 45 | 46 | return [ 47 | $this->field->inputs[0]['id'] => $value['prefix'] ?? null, 48 | $this->field->inputs[1]['id'] => $value['first'] ?? null, 49 | $this->field->inputs[2]['id'] => $value['middle'] ?? null, 50 | $this->field->inputs[3]['id'] => $value['last'] ?? null, 51 | $this->field->inputs[4]['id'] => $value['suffix'] ?? null, 52 | ]; 53 | } 54 | 55 | /** 56 | * {@inheritDoc} 57 | */ 58 | public function add_value_to_submission( array &$field_values ): void { 59 | $field_values += $this->value; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Data/FieldValueInput/ValueInput.php: -------------------------------------------------------------------------------- 1 | field->enablePrice ) && false === strpos( $this->args, '|' ) ) { 40 | $value_key = ! empty( $this->field->enablePrice ) || ! empty( $this->field->enableChoiceValue ) ? 'value' : 'text'; 41 | $choice_key = array_search( $this->args, array_column( $this->field->choices, $value_key ), true ); 42 | $choice = $this->field->choices[ $choice_key ]; 43 | $price = rgempty( 'price', $choice ) ? 0 : GFCommon::to_number( rgar( $choice, 'price' ) ); 44 | return $this->args . '|' . $price; 45 | } 46 | 47 | if ( 'total' === $this->field->type ) { 48 | // Convert to number so draft updates dont return the currency. 49 | return (string) GFCommon::to_number( $this->args ); 50 | } 51 | 52 | return $this->args; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Data/FieldValueInput/ValuesInput.php: -------------------------------------------------------------------------------- 1 | [ 43 | 'description' => __( 'Horizontal alignment (in a row).', 'wp-graphql-gravity-forms' ), 44 | 'value' => self::HORIZONTAL, 45 | ], 46 | 'VERTICAL' => [ 47 | 'description' => __( 'Vertical alignment (in a column).', 'wp-graphql-gravity-forms' ), 48 | 'value' => self::VERTICAL, 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Extensions/GFChainedSelects/Type/Input/ChainedSelectFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => 'Float', 41 | 'description' => __( 'Input ID.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | 'value' => [ 44 | 'type' => 'String', 45 | 'description' => __( 'Input value.', 'wp-graphql-gravity-forms' ), 46 | ], 47 | ]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Extensions/GFChainedSelects/Type/WPInterface/FieldInputSetting/InputWithChainedChoices.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Assigns a name to this field so that it can be populated dynamically via this input name. Only applicable when canPrepopulate is `true`.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/GFChainedSelects/Type/WPInterface/FieldSetting/FieldWithChainedSelectsAlignment.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => ChainedSelectFieldAlignmentEnum::$type, 41 | 'description' => __( 'Alignment of the dropdown fields.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Extensions/GFChainedSelects/Type/WPInterface/FieldSetting/FieldWithChainedSelectsHideInactive.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether inactive dropdowns should be hidden.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source->chainedSelectsHideInactive ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Extensions/GFChainedSelects/Type/WPObject/FormField/FieldValue/ValueProperty.php: -------------------------------------------------------------------------------- 1 | } 25 | */ 26 | public static function chained_select_values(): array { 27 | return [ 28 | 'values' => [ 29 | 'type' => [ 'list_of' => 'String' ], 30 | 'description' => __( 'ChainedSelect field value.', 'wp-graphql-gravity-forms' ), 31 | 'resolve' => static function ( $source, array $args, AppContext $context ): ?array { 32 | if ( ! $source instanceof FormField || ! isset( $context->gfEntry ) ) { 33 | return null; 34 | } 35 | 36 | return array_map( 37 | static function ( $input ) use ( $context ) { 38 | return $context->gfEntry->entry[ $input['id'] ] ?: null; 39 | }, 40 | $source->inputs 41 | ); 42 | }, 43 | ], 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/Enum/QuizFieldGradingTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 44 | 'description' => __( 'No grading.', 'wp-graphql-gravity-forms' ), 45 | 'value' => self::NONE, 46 | ], 47 | 'PASSFAIL' => [ 48 | 'description' => __( 'Pass-fail grading system.', 'wp-graphql-gravity-forms' ), 49 | 'value' => self::PASSFAIL, 50 | ], 51 | 'LETTER' => [ 52 | 'description' => __( 'Letter grading system.', 'wp-graphql-gravity-forms' ), 53 | 'value' => self::LETTER, 54 | ], 55 | ]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/Enum/QuizFieldTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 44 | 'description' => __( 'Gravity Forms `CheckboxField`.', 'wp-graphql-gravity-forms' ), 45 | 'value' => self::CHECKBOX, 46 | ], 47 | 'RADIO' => [ 48 | 'description' => __( 'Gravity Forms `RadioField`.', 'wp-graphql-gravity-forms' ), 49 | 'value' => self::RADIO, 50 | ], 51 | 'SELECT' => [ 52 | 'description' => __( 'Gravity Forms `SelectField`.', 'wp-graphql-gravity-forms' ), 53 | 'value' => self::SELECT, 54 | ], 55 | ]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPInterface/FieldSetting/FieldWithQuizQuestion.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether to randomize the order in which the answers are displayed to the user.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ): bool => ! empty( $source->gquizEnableRandomizeQuizChoices ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPObject/Form/FormQuizConfirmation.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'type' => 'Boolean', 42 | 'description' => __( 'Whether autoformatting is enabled for the confirmation message.', 'wp-graphql-gravity-forms' ), 43 | ], 44 | 'message' => [ 45 | 'type' => 'String', 46 | 'description' => __( 'The message to display.', 'wp-graphql-gravity-forms' ), 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPObject/Form/FormQuizGrades.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'type' => 'String', 42 | 'description' => __( 'The grade label.', 'wp-graphql-gravity-forms' ), 43 | ], 44 | 'value' => [ 45 | 'type' => 'Int', 46 | 'description' => __( 'The minimum percentage score required to achieve this grade.', 'wp-graphql-gravity-forms' ), 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPObject/QuizResults/QuizResultsChoiceCount.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Int', 40 | 'description' => __( 'The number of entries with this choice provided.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'text' => [ 43 | 'type' => 'String', 44 | 'description' => __( 'The choice text.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | 'value' => [ 47 | 'type' => 'String', 48 | 'description' => __( 'The internal value used to represent the quiz choice.', 'wp-graphql-gravity-forms' ), 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPObject/QuizResults/QuizResultsGradeCount.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Int', 40 | 'description' => __( 'The number of entries that received this grade across all entries received.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'grade' => [ 43 | 'type' => 'String', 44 | 'description' => __( 'The quiz grade.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Extensions/GFQuiz/Type/WPObject/QuizResults/QuizResultsScoreCount.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Int', 40 | 'description' => __( 'The number of entries that received this score across all entries received.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'score' => [ 43 | 'type' => 'Float', 44 | 'description' => __( 'The quiz score.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithBackgroundColor.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Color to be used for the background of the signature area. Can be any valid CSS color value.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithBorderColor.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Color to be used for the border around the signature area. Can be any valid CSS color value.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithBorderStyle.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => SignatureFieldBorderStyleEnum::$type, 41 | 'description' => __( 'Border style to be used around the signature area.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithBorderWidth.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => SignatureFieldBorderWidthEnum::$type, 41 | 'description' => __( 'Width of the border around the signature area.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithBoxWidth.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Int', 40 | 'description' => __( 'Width of the signature field in pixels.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithPenColor.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Color of the pen to be used for the signature. Can be any valid CSS color value.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/GFSignature/Type/WPInterface/FieldSetting/FieldWithPenSize.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Int', 40 | 'description' => __( 'Size of the pen cursor.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Extensions/WPGatsby/WPGatsby.php: -------------------------------------------------------------------------------- 1 | $monitors . 43 | * @param \WPGatsby\ActionMonitor\ActionMonitor $action_monitor . 44 | * 45 | * @return array 46 | */ 47 | public static function register_monitors( array $monitors, \WPGatsby\ActionMonitor\ActionMonitor $action_monitor ): array { 48 | $monitors['GravityFormsMonitor'] = new GravityFormsMonitor( $action_monitor ); 49 | 50 | return $monitors; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Interfaces/Enum.php: -------------------------------------------------------------------------------- 1 | 22 | */ 23 | public static function get_values(): array; 24 | } 25 | -------------------------------------------------------------------------------- /src/Interfaces/Field.php: -------------------------------------------------------------------------------- 1 | >,description:string,defaultValue?:string}> 21 | */ 22 | public static function get_input_fields(): array; 23 | 24 | /** 25 | * Gets the fields for the type. 26 | * 27 | * @return array>,description:string,args?:array>,description:string,defaultValue?:mixed}>,resolve?:callable,deprecationReason?:string}> 28 | */ 29 | public static function get_output_fields(): array; 30 | 31 | /** 32 | * Defines the data modification closure. 33 | * 34 | * @since 0.4.0 35 | */ 36 | public static function mutate_and_get_payload(): callable; 37 | } 38 | -------------------------------------------------------------------------------- /src/Interfaces/Registrable.php: -------------------------------------------------------------------------------- 1 | >,description:string,defaultValue?:mixed}>,connectionInterfaces?:string[],oneToOne?:bool,resolve?:callable}> 21 | */ 22 | public static function get_connections(): array; 23 | } 24 | -------------------------------------------------------------------------------- /src/Interfaces/TypeWithDescription.php: -------------------------------------------------------------------------------- 1 | >,description:string,args?:array>,description:string,defaultValue?:mixed}>,resolve?:callable,deprecationReason?:string}> 21 | */ 22 | public static function get_fields(): array; 23 | } 24 | -------------------------------------------------------------------------------- /src/Interfaces/TypeWithInputFields.php: -------------------------------------------------------------------------------- 1 | >,description:string,defaultValue?:string}> 21 | */ 22 | public static function get_fields(): array; 23 | } 24 | -------------------------------------------------------------------------------- /src/Interfaces/TypeWithInterfaces.php: -------------------------------------------------------------------------------- 1 | 47 | */ 48 | abstract public static function get_type_config(): array; 49 | } 50 | -------------------------------------------------------------------------------- /src/Type/Enum/AbstractEnum.php: -------------------------------------------------------------------------------- 1 | 32 | */ 33 | abstract public static function get_values(): array; 34 | 35 | /** 36 | * {@inheritDoc} 37 | */ 38 | public static function register(): void { 39 | $config = static::get_type_config(); 40 | 41 | register_graphql_enum_type( static::$type, $config ); 42 | } 43 | 44 | /** 45 | * {@inheritDoc} 46 | */ 47 | public static function get_type_config(): array { 48 | return [ 49 | 'description' => static::get_description(), 50 | 'values' => static::get_values(), 51 | ]; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Type/Enum/AddressFieldCountryEnum.php: -------------------------------------------------------------------------------- 1 | get_default_countries(); 45 | 46 | $values = []; 47 | 48 | foreach ( $countries as $code => $name ) { 49 | $values[ WPEnumType::get_safe_name( $code ) ] = [ 50 | 'value' => $name, 51 | // translators: Country. 52 | 'description' => sprintf( __( '%s .', 'wp-graphql-gravity-forms' ), $name ), 53 | ]; 54 | } 55 | 56 | return $values; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Type/Enum/AddressFieldProvinceEnum.php: -------------------------------------------------------------------------------- 1 | get_canadian_provinces(); 45 | 46 | $values = []; 47 | 48 | foreach ( $provinces as $province ) { 49 | $values[ WPEnumType::get_safe_name( $province ) ] = [ 50 | 'value' => $province, 51 | // translators: Province. 52 | 'description' => sprintf( __( '%s .', 'wp-graphql-gravity-forms' ), $province ), 53 | ]; 54 | } 55 | 56 | return $values; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Type/Enum/AddressFieldStateEnum.php: -------------------------------------------------------------------------------- 1 | get_us_states(); 45 | 46 | $values = []; 47 | 48 | foreach ( $states as $state ) { 49 | $values[ WPEnumType::get_safe_name( $state ) ] = [ 50 | 'value' => $state, 51 | // translators: State. 52 | 'description' => sprintf( __( '%s .', 'wp-graphql-gravity-forms' ), $state ), 53 | ]; 54 | } 55 | 56 | return $values; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Type/Enum/AddressFieldTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'International address type.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::INTERNATIONAL, 44 | ], 45 | 'US' => [ 46 | 'description' => __( 'United States address type.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::US, 48 | ], 49 | 'CANADA' => [ 50 | 'description' => __( 'Canada address type.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::CANADIAN, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/AmPmEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'AM. The first 12-hour cycle of the day.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::AM, 43 | ], 44 | 'PM' => [ 45 | 'description' => __( 'PM. The second 12-hour cycle of the day.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::PM, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/CaptchaFieldBadgePositionEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Bottom-left position.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::BOTTOM_LEFT, 44 | ], 45 | 'BOTTOM_RIGHT' => [ 46 | 'description' => __( 'Bottom-right position.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::BOTTOM_RIGHT, 48 | ], 49 | 'INLINE' => [ 50 | 'description' => __( 'Inline position.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::INLINE, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/CaptchaFieldThemeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Light reCAPTCHA theme.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::LIGHT, 43 | ], 44 | 'DARK' => [ 45 | 'description' => __( 'Dark reCAPTCHA theme.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::DARK, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/CaptchaFieldTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'reCAPTCHA type.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::RECAPTCHA, 44 | ], 45 | 'SIMPLE' => [ 46 | 'description' => __( 'Simple CAPTCHA type.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::SIMPLE, 48 | ], 49 | 'MATH' => [ 50 | 'description' => __( 'Math CAPTCHA type.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::MATH, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/ConditionalLogicActionTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Image button.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::SHOW, 43 | ], 44 | 'HIDE' => [ 45 | 'description' => __( 'Text button (default).', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::HIDE, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/ConditionalLogicLogicTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Evaulate all logic rules.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ALL, 43 | ], 44 | 'ANY' => [ 45 | 'description' => __( 'Evaluate any logic rule.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::ANY, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/CurrencyEnum.php: -------------------------------------------------------------------------------- 1 | $currency ) { 43 | $values[ WPEnumType::get_safe_name( $code ) ] = [ 44 | 'value' => $currency['code'], 45 | // translators: Currency Name. 46 | 'description' => sprintf( __( '%s .', 'wp-graphql-gravity-forms' ), $currency['name'] ), 47 | ]; 48 | } 49 | 50 | return $values; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Type/Enum/DateFieldTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'A simple date field.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::FIELD, 44 | ], 45 | 'DROPDOWN' => [ 46 | 'description' => __( 'A date dropdown.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::DROPDOWN, 48 | ], 49 | 'PICKER' => [ 50 | 'description' => __( 'A datepicker.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::PICKER, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/DraftEntryIdTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Unique global ID for the object.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ID, 43 | ], 44 | 'RESUME_TOKEN' => [ 45 | 'description' => __( 'The resume token assigned by Gravity Forms. Used by draft entries.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::RESUME_TOKEN, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/EntryIdTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Unique global ID for the object.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::ID, 44 | ], 45 | 'DATABASE_ID' => [ 46 | 'description' => __( 'The database ID assigned by Gravity Forms. Used by submitted entries.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::DATABASE_ID, 48 | ], 49 | 'RESUME_TOKEN' => [ 50 | 'description' => __( 'The resume token assigned by Gravity Forms. Used by draft entries.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::RESUME_TOKEN, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/EntryStatusEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Active entries (default).', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::ACTIVE, 44 | ], 45 | 'SPAM' => [ 46 | 'description' => __( 'Spam entries.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::SPAM, 48 | ], 49 | 'TRASH' => [ 50 | 'description' => __( 'Entries in the trash.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::TRASH, 52 | ], 53 | 'ALL' => [ 54 | 'description' => __( 'All entries.', 'wp-graphql-gravity-forms' ), 55 | 'value' => null, 56 | ], 57 | ]; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Type/Enum/EntryTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'A Gravity Forms draft entry.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::DRAFT, 44 | ], 45 | 'PARTIAL' => [ 46 | 'description' => __( 'A Gravity Forms partial entry.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::PARTIAL, 48 | ], 49 | 'SUBMITTED' => [ 50 | 'description' => __( 'A submitted Gravity Forms entry.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::SUBMITTED, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FieldFiltersModeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'All field filters (default).', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ALL, 43 | ], 44 | 'ANY' => [ 45 | 'description' => __( 'Any field filters.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::ANY, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormButtonTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Image button.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::IMAGE, 43 | ], 44 | 'TEXT' => [ 45 | 'description' => __( 'Text button (default).', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::TEXT, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormConfirmationTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Use a confirmation "message".', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::MESSAGE, 44 | ], 45 | 'PAGE' => [ 46 | 'description' => __( 'Use a redirect to a different WordPress "page".', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::PAGE, 48 | ], 49 | 'REDIRECT' => [ 50 | 'description' => __( 'Use a "redirect" to a given URL.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::REDIRECT, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormCreditCardTypeEnum.php: -------------------------------------------------------------------------------- 1 | $type['slug'], 45 | // translators: Credit card name. 46 | 'description' => sprintf( __( ' A %s type credit card.', 'wp-graphql-gravity-forms' ), $type['name'] ), 47 | ]; 48 | } 49 | 50 | return $values; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Type/Enum/FormDescriptionPlacementEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'The field description is displayed above the field input (i.e. immediately after the field label).', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ABOVE, 43 | ], 44 | 'BELOW' => [ 45 | 'description' => __( 'The field description is displayed below the field input.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::BELOW, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldCalendarIconTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Default calendar icon.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::CALENDAR, 44 | ], 45 | 'CUSTOM' => [ 46 | 'description' => __( 'Custom calendar icon.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::CUSTOM, 48 | ], 49 | 'NONE' => [ 50 | 'description' => __( 'No calendar icon.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::NONE, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldRequiredIndicatorEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Asterisk (*) indicator.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::ASTERISK, 44 | ], 45 | 'CUSTOM' => [ 46 | 'description' => __( 'Custom indicator.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::CUSTOM, 48 | ], 49 | 'TEXT' => [ 50 | 'description' => __( 'Text (Required) indicator (default).', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::TEXT, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldSizeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Small field size.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::SMALL, 44 | ], 45 | 'MEDIUM' => [ 46 | 'description' => __( 'Medium field size.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::MEDIUM, 48 | ], 49 | 'LARGE' => [ 50 | 'description' => __( 'Large field size.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::LARGE, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldSubLabelPlacementEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'The sub-label is displayed above the sub-field input (i.e. immediately after the field label).', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::ABOVE, 44 | ], 45 | 'BELOW' => [ 46 | 'description' => __( 'The sub-label is displayed below the sub-field input.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::BELOW, 48 | ], 49 | 'INHERIT' => [ 50 | 'description' => __( 'Field label is inherited from the form defaults.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::INHERIT, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldTypeEnum.php: -------------------------------------------------------------------------------- 1 | $gf_type, 45 | // translators: GF Field type. 46 | 'description' => sprintf( __( 'A Gravity Forms %s field.', 'wp-graphql-gravity-forms' ), $gf_type ), 47 | ]; 48 | } 49 | 50 | return $values; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Type/Enum/FormFieldVisibilityEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'The field is "visible".', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::VISIBLE, 44 | ], 45 | 'HIDDEN' => [ 46 | 'description' => __( 'The field is "hidden".', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::HIDDEN, 48 | ], 49 | 'ADMINISTRATIVE' => [ 50 | 'description' => __( 'The field is for "administrative" use.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::ADMINISTRATIVE, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormIdTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Unique global ID for the object.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ID, 43 | ], 44 | 'DATABASE_ID' => [ 45 | 'description' => __( 'The database ID assigned by Gravity Forms.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::DATABASE_ID, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormLabelPlacementEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Field labels are displayed on top of the fields.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::TOP, 44 | ], 45 | 'LEFT' => [ 46 | 'description' => __( 'Field labels are displayed beside the fields and aligned to the left.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::LEFT, 48 | ], 49 | 'RIGHT' => [ 50 | 'description' => __( 'Field labels are displayed beside the fields and aligned to the right.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::RIGHT, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormPageProgressTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Show page progress indicator as a percentage.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::PERCENTAGE, 44 | ], 45 | 'STEPS' => [ 46 | 'description' => __( 'Show page progress indicator as steps.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::STEPS, 48 | ], 49 | 'NONE' => [ 50 | 'description' => __( "Don't show a page progress indicator.", 'wp-graphql-gravity-forms' ), 51 | 'value' => self::NONE, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormRetentionPolicyEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Entries will be deleted automatically after a specified number of days.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::DELETE, 44 | ], 45 | 'RETAIN' => [ 46 | 'description' => __( 'Entries will be retain indefinitely.', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::RETAIN, 48 | ], 49 | 'TRASH' => [ 50 | 'description' => __( 'Entries will be trashed automatically after a specified number of days.', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::TRASH, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/FormSubLabelPlacementEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'The sub-label is displayed above the sub-field input (i.e. immediately after the field label).', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ABOVE, 43 | ], 44 | 'BELOW' => [ 45 | 'description' => __( 'The sub-label is displayed below the sub-field input.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::BELOW, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormSubmitButtonLocationEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'The submit button will be placed in a new row after all fields of the form.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::BOTTOM, 43 | ], 44 | 'INLINE' => [ 45 | 'description' => __( 'The submit button will be placed on the last row of the form where it will fill the remaining space left by field columns.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::INLINE, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/FormSubmitButtonWidthEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'The width is set to match that of the button text.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::AUTO, 43 | ], 44 | 'FULL' => [ 45 | 'description' => __( 'The width is set to fill 100% of the container.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::FULL, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/NumberFieldFormatEnum.php: -------------------------------------------------------------------------------- 1 | [ 42 | 'description' => __( 'Currency format.', 'wp-graphql-gravity-forms' ), 43 | 'value' => self::CURRENCY, 44 | ], 45 | 'DECIMAL_DOT' => [ 46 | 'description' => __( 'Decimal-dot format (e.g. 9,999.99).', 'wp-graphql-gravity-forms' ), 47 | 'value' => self::DECIMAL_DOT, 48 | ], 49 | 'DECIMAL_COMMA' => [ 50 | 'description' => __( 'Decimal-comma format (e.g. 9.999,99).', 'wp-graphql-gravity-forms' ), 51 | 'value' => self::DECIMAL_COMMA, 52 | ], 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Type/Enum/PhoneFieldFormatEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Standard phone number format.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::STANDARD, 43 | ], 44 | 'INTERNATIONAL' => [ 45 | 'description' => __( 'International phone number format.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::INTERNATIONAL, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/PostFormatTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'value' => '0', 40 | 'description' => __( 'A standard post format.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | 44 | // If post formats are enabled for the site, add them as enum values. 45 | $post_formats = get_theme_support( 'post-formats' ); 46 | 47 | if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) { 48 | foreach ( $post_formats[0] as $type ) { 49 | $values[ WPEnumType::get_safe_name( $type ) ] = [ 50 | 'value' => $type, 51 | // translators: Post format. 52 | 'description' => sprintf( __( 'A %s post format.', 'wp-graphql-gravity-forms' ), $type ), 53 | ]; 54 | } 55 | } 56 | 57 | return $values; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Type/Enum/RecaptchaTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'A checkbox reCAPTCHA type.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::CHECKBOX, 43 | ], 44 | 'INVISIBLE' => [ 45 | 'description' => __( 'An invisible reCAPTCHA type.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::INVISIBLE, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/SubmissionConfirmationTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'A confirmation "message".', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::MESSAGE, 43 | ], 44 | 'REDIRECT' => [ 45 | 'description' => __( 'A "redirect" to a given URL.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::REDIRECT, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/SubmittedEntryIdTypeEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( 'Unique global ID for the object.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::ID, 43 | ], 44 | 'DATABASE_ID' => [ 45 | 'description' => __( 'The database ID assigned by Gravity Forms. Used by submitted entries.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::DATABASE_ID, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Enum/TimeFieldFormatEnum.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'description' => __( '12-hour time format.', 'wp-graphql-gravity-forms' ), 42 | 'value' => self::H12, 43 | ], 44 | 'H24' => [ 45 | 'description' => __( '24-hour time format.', 'wp-graphql-gravity-forms' ), 46 | 'value' => self::H24, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/Input/AbstractInput.php: -------------------------------------------------------------------------------- 1 | static::get_description(), 43 | 'fields' => static::get_fields(), 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Type/Input/CheckboxFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'Float', 39 | 'description' => __( 'Input ID.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'value' => [ 42 | 'type' => 'String', 43 | 'description' => __( 'Input value.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/Input/EmailFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'String', 39 | 'description' => __( 'Email input value.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'confirmationValue' => [ 42 | 'type' => 'String', 43 | 'description' => __( 'Email confirmation input value. Only used when email confirmation is enabled.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/Input/EntriesConnectionOrderbyInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'String', 39 | 'description' => __( 'The field name used to sort the results.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'order' => [ 42 | 'type' => 'OrderEnum', 43 | 'description' => __( 'The cardinality of the order of the connection.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | 'isNumeric' => [ 46 | 'type' => 'Boolean', 47 | 'description' => __( 'Whether the sorting field\'s values are numeric.', 'wp-graphql-gravity-forms' ), 48 | ], 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Type/Input/EntriesDateFiltersInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'String', 39 | 'description' => __( 'Start date in Y-m-d H:i:s format.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'endDate' => [ 42 | 'type' => 'String', 43 | 'description' => __( 'End date in Y-m-d H:i:s format.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/Input/FormsConnectionOrderbyInput.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => FormsConnectionOrderByEnum::$type, 41 | 'description' => __( 'The form column name used to sort the results.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | 'order' => [ 44 | 'type' => 'OrderEnum', 45 | 'description' => __( 'The cardinality of the order of the connection.', 'wp-graphql-gravity-forms' ), 46 | ], 47 | ]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Type/Input/ListFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => [ 'list_of' => 'String' ], 39 | 'description' => __( 'Input values for the specific listField row.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/Input/NameFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'String', 39 | 'description' => __( 'Prefix, such as Mr., Mrs. etc.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'first' => [ 42 | 'type' => 'String', 43 | 'description' => __( 'First name.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | 'middle' => [ 46 | 'type' => 'String', 47 | 'description' => __( 'Middle name.', 'wp-graphql-gravity-forms' ), 48 | ], 49 | 'last' => [ 50 | 'type' => 'String', 51 | 'description' => __( 'Last name.', 'wp-graphql-gravity-forms' ), 52 | ], 53 | 'suffix' => [ 54 | 'type' => 'String', 55 | 'description' => __( 'Suffix, such as Sr., Jr. etc.', 'wp-graphql-gravity-forms' ), 56 | ], 57 | ]; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Type/Input/ProductFieldInput.php: -------------------------------------------------------------------------------- 1 | [ 38 | 'type' => 'Float', 39 | 'description' => __( 'Product quantity.', 'wp-graphql-gravity-forms' ), 40 | ], 41 | 'price' => [ 42 | 'type' => 'Float', 43 | 'description' => __( 'Product price.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldChoiceSetting/ChoiceWithColumns.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Assigns a name to this field so that it can be populated dynamically via this input name. Only applicable when canPrepopulate is `true`.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldInputSetting/InputWithSingleProduct.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'Assigns a name to this field so that it can be populated dynamically via this input name. Only applicable when canPrepopulate is `true`.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/AbstractFieldSetting.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The URL of the image to be used for the add row button.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithAdminLabel.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'When specified, the value of this property will be used on the admin pages instead of the label. It is useful for fields with long labels.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithBasePrice.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Float', 38 | 'description' => __( 'The price of the product.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->basePrice ) ? floatval( preg_replace( '/[^\d\.]/', '', $source->basePrice ) ) : null, 40 | ], 41 | 'formattedPrice' => [ 42 | 'type' => 'String', 43 | 'description' => __( 'The price of the product, prefixed by the currency.', 'wp-graphql-gravity-forms' ), 44 | 'resolve' => static fn ( $source ) => ! empty( $source->basePrice ) ? $source->basePrice : null, 45 | ], 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaBackground.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Determines the image’s background color, in HEX format (i.e. #CCCCCC). Only applicable to simple_captcha and math captcha types.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaBadge.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => CaptchaFieldBadgePositionEnum::$type, 40 | 'description' => __( 'The language used when the captcha is displayed. This property is available when the captchaType is “captcha”, the default. The possible values are the language codes used by WordPress.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => isset( $source->captchaBadge ) ? $source->captchaBadge : 'bottomright', 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaForeground.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Determines the image’s font color, in HEX format (i.e. #CCCCCC). Only applicable to simple_captcha and math captcha types.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaLanguage.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The language used when the captcha is displayed. This property is available when the captchaType is “captcha”, the default. The possible values are the language codes used by WordPress.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaSize.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => FormFieldSizeEnum::$type, 40 | 'description' => __( 'Determines the CAPTCHA image size. Only applicable to simple_captcha and math captcha types.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaTheme.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => CaptchaFieldThemeEnum::$type, 40 | 'description' => __( 'Determines the theme to be used for the reCAPTCHA field. Only applicable to the recaptcha captcha type.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source->captchaTheme ) ? $source->captchaTheme : null, 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCaptchaType.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => CaptchaFieldTypeEnum::$type, 40 | 'description' => __( 'Determines the type of CAPTCHA field to be used.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source->captchaType ) ? $source->captchaType : 'recaptcha', 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCheckboxLabel.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Text of the consent checkbox.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithConditionalLogic.php: -------------------------------------------------------------------------------- 1 | [ 41 | 'type' => ConditionalLogic::$type, 42 | 'description' => __( 'Controls the visibility of the field based on values selected by the user.', 'wp-graphql-gravity-forms' ), 43 | ], 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithContent.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Content of an HTML block field to be displayed on the form.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCreditCard.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => [ 'list_of' => FormCreditCardTypeEnum::$type ], 40 | 'description' => __( 'The credit card type.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source->creditCards ) ? $source->creditCards : null, 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithCssClass.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'String containing the custom CSS classes to be added to the
  • tag that contains the field. Useful for applying custom formatting to specific fields.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static function ( $source ) { 40 | return $source->cssClass; 41 | }, 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDefaultValue.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Contains the default value for the field. When specified, the field\'s value will be populated with the contents of this property when the form is displayed.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDeleteIconUrl.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The URL of the image to be used for the delete row button.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDescription.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Field description.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDisableMargins.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Indicates whether the default margins are turned on to align the HTML content with other fields.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => empty( $source->disableMargins ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDisableQuantity.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Whether the field has the quantity property enabled.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => empty( $source->disableQuantity ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithDuplicates.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Determines if the field allows duplicate submissions.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => empty( $source->noDuplicates ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithEnhancedUI.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'When set to true, the "Chosen" jQuery script will be applied to this field, enabling search capabilities to Drop Down fields and a more user-friendly interface for Multi Select fields.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->enableEnhancedUI ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithErrorMessage.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Contains the message that is displayed for fields that fail validation.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithFileExtensions.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => [ 'list_of' => 'String' ], 38 | 'description' => __( 'A comma-delimited list of the file extensions which may be uploaded.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->allowedExtensions ) ? explode( ',', $source->allowedExtensions ) : null, 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithFileSize.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Int', 38 | 'description' => __( 'The maximum size (in MB) an uploaded file may be .', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static function ( $source ) { 40 | // Fall back to the WP max upload size if the field setting is not set, to mimic GF frontend behavior. 41 | return ! empty( $source->maxFileSize ) ? (int) $source->maxFileSize : ( wp_max_upload_size() / 1048576 ); 42 | }, 43 | ], 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithForceSSLField.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Determines if the field requires the user to enter a value. Fields marked as required will prevent the form from being submitted if the user has not entered a value in it.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->forceSSL ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithInputMask.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The pattern used for the input mask.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | 'hasInputMask' => [ 41 | 'type' => 'Boolean', 42 | 'description' => __( 'Whether the field has an input mask.', 'wp-graphql-gravity-forms' ), 43 | 'resolve' => static fn ( $source ) => ! empty( $source->inputMask ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithLabel.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Field label that will be displayed on the form and on the admin pages.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithMaxLength.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Int', 38 | 'description' => __( 'Specifies the maximum number of characters allowed in a text or textarea (paragraph) field.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static function ( $field ): ?int { 40 | return isset( $field->maxLength ) ? (int) $field->maxLength : null; 41 | }, 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithMaxRows.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Int', 38 | 'description' => __( 'The maximum number of rows the user can add to the field.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithMultipleFiles.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Indicates whether multiple files may be uploaded.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->multipleFiles ), 40 | ], 41 | 'maxFiles' => [ 42 | 'type' => 'Int', 43 | 'description' => __( 'When the field is set to allow multiple files to be uploaded, this property is available to set a limit on how many may be uploaded.', 'wp-graphql-gravity-forms' ), 44 | ], 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithName.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => FormButton::$type, 40 | 'description' => __( 'An array containing the the individual properties for the "Next" button.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithNumberFormat.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => NumberFieldFormatEnum::$type, 40 | 'description' => __( 'Specifies the format allowed for the number field.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPassword.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Determines if a text field input tag should be created with a "password" type.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->enablePasswordInput ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPasswordStrength.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Indicates whether the field displays the password strength indicator.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source->passwordStrengthEnabled ), 42 | ], 43 | 'minPasswordStrength' => [ 44 | 'type' => PasswordFieldMinStrengthEnum::$type, 45 | 'description' => __( 'Indicates how strong the password should be.', 'wp-graphql-gravity-forms' ), 46 | ], 47 | ]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPasswordVisibility.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Whether the Password visibility toggle should be enabled for this field.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->passwordVisibilityEnabled ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPhoneFormat.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => PhoneFieldFormatEnum::$type, 40 | 'description' => __( 'Determines the allowed format for phones. If the phone value does not conform with the specified format, the field will fail validation.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPlaceholder.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'Placeholder text to give the user a hint on how to fill out the field. This is not submitted with the form.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPostCategoryCheckbox.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Determines if all categories should be displayed on the Post Category drop down. If this property is true (display all categories), the Post Category drop down will display the categories hierarchically.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->displayAllCategories ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPostCategoryInitialItem.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The dropdown placeholder for the field.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->categoryInitialItem ) ? $source->categoryInitialItem : null, 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPostCustomField.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'String', 38 | 'description' => __( 'The post meta key to which the value should be assigned.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->postCustomFieldName ) ? $source->postCustomFieldName : null, 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPostImageFeaturedImage.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( "Whether the image field should be used to set the post's Featured Image", 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->postFeaturedImage ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithPreviousButton.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => FormButton::$type, 40 | 'description' => __( 'An array containing the the individual properties for the "Previous" button.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithRichTextEditor.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Indicates whether the field uses the rich text editor interface.', 'wp-graphql-gravity-forms' ), 39 | 'resolve' => static fn ( $source ) => ! empty( $source->useRichTextEditor ), 40 | ], 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithRules.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => 'Boolean', 38 | 'description' => __( 'Determines if the field requires the user to enter a value. Fields marked as required will prevent the form from being submitted if the user has not entered a value in it.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldSetting/FieldWithSize.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => FormFieldSizeEnum::$type, 40 | 'description' => __( 'Determines the size of the field when displayed on the page.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldValue/FieldValueWithChoice.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => FieldChoice::$type, 41 | 'description' => __( 'The selected Gravity Forms field choice object.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldValue/FieldValueWithInput.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => FieldInput::$type, 41 | 'description' => __( 'The selected Gravity Forms field input object.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldWithChoices.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => [ 'list_of' => FieldChoice::$type ], 38 | 'description' => __( 'The choices for the field.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPInterface/FieldWithInputs.php: -------------------------------------------------------------------------------- 1 | [ 37 | 'type' => [ 'list_of' => FieldInput::$type ], 38 | 'description' => __( 'The inputs for the field.', 'wp-graphql-gravity-forms' ), 39 | ], 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Type/WPObject/AbstractObject.php: -------------------------------------------------------------------------------- 1 | static::get_description(), 52 | 'fields' => static::get_fields(), 53 | 'eagerlyLoadType' => static::$should_load_eagerly, 54 | ]; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Type/WPObject/Form/FormEntryDataPolicy.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'String', 40 | 'description' => __( 'The array key for the Gravity Forms Entry.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'shouldErase' => [ 43 | 'type' => 'Boolean', 44 | 'description' => __( 'Whether this field should be included when erasing personal data.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | 'shouldExport' => [ 47 | 'type' => 'Boolean', 48 | 'description' => __( 'Whether this field should be included when exporting personal data.', 'wp-graphql-gravity-forms' ), 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Type/WPObject/Form/FormLogin.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether the form is configured to be displayed only to logged in users.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'loginRequiredMessage' => [ 43 | 'type' => 'String', 44 | 'description' => __( 'When `isLoginRequired` is set to true, this controls the message displayed when non-logged in user tries to access the form.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Type/WPObject/Form/FormSaveAndContinue.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether the Save And Continue feature is enabled.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source['enabled'] ), 42 | ], 43 | 'buttonText' => [ 44 | 'type' => 'String', 45 | 'description' => __( 'Contains the save button text.', 'wp-graphql-gravity-forms' ), 46 | 'resolve' => static fn ( $source ): string => ! empty( $source['button']['text'] ) ? $source['button']['text'] : null, 47 | ], 48 | ]; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Type/WPObject/FormField/FieldValue/ValueProperty/ListFieldValue.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => [ 'list_of' => 'String' ], 41 | 'description' => __( 'Input values.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | ]; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Type/WPObject/FormField/FieldValue/ValueProperty/ProductFieldValue.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => 'String', 41 | 'description' => __( 'The product name.', 'wp-graphql-gravity-forms' ), 42 | ], 43 | 'price' => [ 44 | 'type' => 'String', 45 | 'description' => __( 'The product price.', 'wp-graphql-gravity-forms' ), 46 | ], 47 | 'quantity' => [ 48 | 'type' => 'Float', 49 | 'description' => __( 'The product quantity.', 'wp-graphql-gravity-forms' ), 50 | ], 51 | ]; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Type/WPObject/FormField/FormFieldDataPolicy.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether this field should be included when erasing personal data.', 'wp-graphql-gravity-forms' ), 41 | ], 42 | 'shouldExport' => [ 43 | 'type' => 'Boolean', 44 | 'description' => __( 'Whether this field should be included when exporting personal data.', 'wp-graphql-gravity-forms' ), 45 | ], 46 | 'isIdentificationField' => [ 47 | 'type' => 'Boolean', 48 | 'description' => __( 'Whether this field is used to identify the user\'s personal data.', 'wp-graphql-gravity-forms' ), 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Type/WPObject/Settings/Logger.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'type' => 'Boolean', 40 | 'description' => __( 'Whether the logger is enabled.', 'wp-graphql-gravity-forms' ), 41 | 'resolve' => static fn ( $source ) => ! empty( $source['enable'] ), 42 | ], 43 | 'name' => [ 44 | 'type' => 'String', 45 | 'description' => __( 'The name of the Gravity Forms logger.', 'wp-graphql-gravity-forms' ), 46 | ], 47 | ]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Type/WPObject/Settings/SettingsRecaptcha.php: -------------------------------------------------------------------------------- 1 | [ 40 | 'type' => 'String', 41 | 'description' => __( 'The public reCAPTCHA site key.', 'wp-graphql-gravity-forms' ), 42 | 'resolve' => static fn (): ?string => get_option( 'rg_gforms_captcha_public_key', null ), 43 | ], 44 | 'type' => [ 45 | 'type' => RecaptchaTypeEnum::$type, 46 | 'description' => __( 'The type of of reCAPTCHA v2 to be used', 'wp-graphql-gravity-forms' ), 47 | 'resolve' => static fn (): string => get_option( 'rg_gforms_captcha_type', 'checkbox' ), 48 | ], 49 | ]; 50 | } 51 | } 52 | --------------------------------------------------------------------------------