Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/image-path-gform_after_submission#post-79385
- // original http://pastie.org/4927121
- add_action('gform_after_submission', 'update_form_post', 10, 2);
- function update_form_post($entry, $form) {
- if($form['id'] != 20)
- return;
- // update post image
- $postid = $entry['post_id'];
- $postimageurl = wp_get_attachment_url($postid);
- update_post_meta($postid, 'thumb', $postimageurl);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement