LLMS_Reviews::process_review()
This function adds the review to the database. It is called by the AJAX handler when the submit review button is pressed. This function gathers the data from $_POST and then adds the review with the appropriate content.
Description Description
Return Return
(void)
Source Source
File: includes/class.llms.review.php
public function process_review() { $post = array( 'post_content' => $_POST['review_text'], // The full text of the post. 'post_name' => $_POST['review_title'], // The name (slug) for your post 'post_title' => $_POST['review_title'], // The title of your post. 'post_status' => 'publish', 'post_type' => 'llms_review', 'post_parent' => $_POST['pageID'], // Sets the parent of the new post, if any. Default 0. 'post_excerpt' => $_POST['review_title'], ); $result = wp_insert_post( $post, true ); }
Expand full source code Collapse full source code View on GitHub