Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 );
Loading