File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change 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 );
You can’t perform that action at this time.
0 commit comments