Skip to content

Commit 54699e7

Browse files
authored
gpml-auto-add-terms.php: Migrated.
1 parent 56e6249 commit 54699e7

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed
Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
<?php
22
/**
3-
* Gravity Perks // Media Library // Add terms to new Media Library files.
4-
* https://gravitywiz.com/documentation/gravity-forms-media-library/
3+
* We're no longer using the experimental folder for experimental snippets. 🚧
4+
* You can now find the snippet here:
5+
* https://github.com/gravitywiz/snippet-library/blob/master/gp-media-library/gpml-auto-add-terms.php
56
*/
6-
// Update "123" to your form ID and "4" to your GPML-enabled File Upload field.
7-
add_action( 'gpml_media_data_123_4', function( $gpml_media_data ) {
8-
$terms = array(
9-
'category' => array(
10-
'Red',
11-
'Green',
12-
'Blue',
13-
),
14-
'post_tag' => array(
15-
'Small',
16-
'Medium',
17-
'Large',
18-
),
19-
);
20-
$gpml_media_data['post_data']['tax_input'] = $terms;
21-
return $gpml_media_data;
22-
}, 10, 2 );

0 commit comments

Comments
 (0)