Created
March 19, 2014 22:12
-
-
Save DarrylErentzen/9652556 to your computer and use it in GitHub Desktop.
get ID of post created by Formidable Pro "Create Posts" using 'frm_after_create_entry' hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function process_form($entry_id, $form_id) { | |
global $frmdb, $wpdb; | |
$created_post_id = $wpdb->get_var("SELECT post_id FROM $frmdb->entries WHERE id=".$entry_id.""); | |
// whatever else this function is supposed to do | |
} | |
add_action('frm_after_create_entry', 'process_form', 50, 2); | |
// low priority to ensure that the post has actually been created - careful not to fire too soon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment