gpml_supported_field_types
Description
Filter the supported field types by GP Media Library.
Important note! Adding fields with this filter does not guarantee compatibility. GP Media Library expects the values to match the format that the native File Upload field uses.
Usage
Add field type to be handled by GP Media Library.
add_filter( 'gpml_supported_field_types', 'my_custom_function' );
Parameters
supported_field_types array
Field types that GP Media Library will show the “Upload to Media Library” option for.
Examples
This example adds an additional field type to be processed by GP Media Library.
<?php
/**
* Gravity Perks // GP Media Library // Filter Supported Field Types
* https://gravitywiz.com/documentation/gravity-forms-media-library/
*/
add_filter( 'gpml_supported_field_types', function( $supported_field_types ) {
$supported_field_types[] = 'example_field_type';
return $supported_field_types;
} );
Since
This filter is available since GP Media Library 1.2.12.