Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/1e1475a7d748c8acdb37 to your computer and use it in GitHub Desktop.
Save spivurno/1e1475a7d748c8acdb37 to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Dynamic Population: Is Post Author?
/**
* Gravity Wiz // Gravity Forms // Dynamic Population: Is Post Author?
* http://gravitywiz.com/
*/
add_filter( 'gform_field_value_is_post_author', 'gw_dyn_pop_is_post_author' );
function gw_dyn_pop_is_post_author() {
global $post;
return $post ? get_current_user_id() == $post->post_author : false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment