Guest User

functions.php

a guest
Aug 27th, 2012
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter("gform_tabindex_1", create_function("", "return 4;"));
  2.  
  3.  
  4. add_filter('gform_field_value_author_email', 'populate_post_author_email');
  5. function populate_post_author_email($value){
  6. global $post;
  7.  
  8. $author_email = get_the_author_meta('email', $post->post_author);
  9.  
  10. return $author_email;
  11. }
  12.  
  13. add_filter('gform_field_value_titel', 'gform_prepopulate_titel');
  14. function gform_prepopulate_titel($value)
  15. {
  16. global $post;
  17. return get_post_meta($post->ID, 'title', true);
  18. } // end gform_prepopulate_titel
  19.  
  20.  
  21. add_filter('gform_field_value_auteur', 'gform_prepopulate_auteur');
  22. function gform_prepopulate_auteur($value)
  23. {
  24. global $post;
  25. return get_post_meta($post->ID, 'author', true);
  26. } // end gform_prepopulate_auteur
  27.  
  28. add_filter('gform_field_value_isbn', 'gform_prepopulate_isbn');
  29. function gform_prepopulate_isbn($value)
  30. {
  31. global $post;
  32. return get_post_meta($post->ID, 'isbn', true);
  33. } // end gform_prepopulate_isbn
  34.  
  35. add_filter('gform_field_value_format', 'gform_prepopulate_format');
  36. function gform_prepopulate_format($value)
  37. {
  38. global $post;
  39. return get_post_meta($post->ID, 'format', true);
  40. } // end gform_prepopulate_format
RAW Paste Data