v0.7.0 - File Uploads and Post Image Submissions πππ
**
The big highlight in this release is experimental*** support for File Upload / Post Image submissions. We also added a feature that updates WordPress post meta when the corresponding Gravity Forms entry is updated.
We added some new WordPress filters, and changed the way some of our PHP classes work, to make it easier for people to add support for their own custom Gravity Forms fields.
We even gave the docs some love. We've added info about filters and using specific form field value inputs, and updated many of the example snippets. You can find the new documnetation in the repo's /docs folder.
Note: These changes did necessitate refactoring many of the plugin classes, so if you're extending any of them in your own projects, make sure to update your class methods!
***: File Uploads and Post Image submissions currently require WPGraphQL Upload to be installed and activated. Once WPGraphQL adds native support for multipart form requests, it is likely that these GraphQL input values will change.
New Features
- Added support for
FileUploadandPostImagefield value submissions. Ple - Updating Post field values in a Gravity Forms entry, now also updates the corresponding WordPress post. Not even native GF lets you do that!
- New WordPress filters:
wp_graphql_gf_type_config,wp_graphql_gf_connection_config.
Bugfixes
chainedSelectValuesinput is now only visible if the Chained Selects plugin is active.- The
EntryGraphQL type now implements thewp_graphql_gf_can_view_entriesfilter.
Under the Hood
- feat: add
altTexttoPostImagefield values. - feat: The
pageNumberfield is now available on allformFields. - dev:
AbstractEnum::set_values()has been deprecated in favor ofAbstractEnum::get_values(). - dev:
Button,LastPageButton,ConditionalLogic,ConditionalLogicRule,Entry,EntryForm,EntryUser,FieldError,Form,FormComfirmation,FormNotification,FormNotificationRouting,FormPagination,SaveAndContinue, now extend AbstractObject`. Their functions have changed accordingly. - dev: Added
GFUtils::get_gravity_forms_upload_dir()andGUtils::handle_file_upload(). - dev: Added
Utils::maybe_decode_json()andUtils::apply_filters. - dev: deprecated
wp_graphql_{$enumType}_valuesfilter, in favor ofwp_graphql_gf_{$enumType}_values. - dev: deprecated
wp_graphql_gf_field_typesfilter, as it no longer necessary to manually map GraphQL fields to GFformFields. - dev: deprecated
wp_graphql_gf_form_field_instancesandwp_graphql_gf_field_value_instancesfilters in favor ofwp_graphql_gf_instances. - dev: Deprecated the
adminOnly,allowsPrepopulatedandinputNamefields onPostImageField. - dev: Updated composer dependencies.
- dev!:
scr/connectionsnow extendAbstractConnection - dev!:
src\Types\Inputnow extendAbstractInput. Their functions have changed accordingly. - dev!: Class
AbstractFieldhas been deprecated in favor ofAbstractFormField. Its functions have changed accordingly. - dev!: Classes
AbstractProperty,AbstractFieldValuehave been deprecated in favor ofAbstractObject. Their functions have changed accordingly. - dev!: make plugin
$instancesstatic for easier access and extension. - dev!: The
Enum,InputType,ValuePropertyPHP interface has been deprecated. Please update your code. - dev!: The methods required by the
FieldValue,TypePHP interface have changed. Please update your code. - tests: Removed
testGetEnabledFieldTypesnow that we are usingstatic $instances.