Skip to content

Commit

Permalink
gpml-auto-add-terms.php: Migrated.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbassah authored Jan 7, 2025
1 parent 56e6249 commit 54699e7
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions experimental/gpml-auto-add-terms.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
<?php
/**
* Gravity Perks // Media Library // Add terms to new Media Library files.
* https://gravitywiz.com/documentation/gravity-forms-media-library/
* We're no longer using the experimental folder for experimental snippets. 🚧
* You can now find the snippet here:
* https://github.com/gravitywiz/snippet-library/blob/master/gp-media-library/gpml-auto-add-terms.php
*/
// Update "123" to your form ID and "4" to your GPML-enabled File Upload field.
add_action( 'gpml_media_data_123_4', function( $gpml_media_data ) {
$terms = array(
'category' => array(
'Red',
'Green',
'Blue',
),
'post_tag' => array(
'Small',
'Medium',
'Large',
),
);
$gpml_media_data['post_data']['tax_input'] = $terms;
return $gpml_media_data;
}, 10, 2 );

0 comments on commit 54699e7

Please sign in to comment.