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.
Return Return
(void)
Source Source
File: includes/class.llms.review.php
public function process_review() { $post = array( 'post_content' => llms_filter_input_sanitize_string( INPUT_POST, 'review_text' ), // The full text of the post. 'post_name' => llms_filter_input_sanitize_string( INPUT_POST, 'review_title' ), // The name (slug) for your post. 'post_title' => llms_filter_input_sanitize_string( INPUT_POST, 'review_title' ), // The title of your post. 'post_status' => 'publish', 'post_type' => 'llms_review', 'post_parent' => llms_filter_input_sanitize_string( INPUT_POST, 'pageID' ), // Sets the parent of the new post, if any. Default 0. 'post_excerpt' => llms_filter_input_sanitize_string( INPUT_POST, 'review_title' ), ); $result = wp_insert_post( $post, true ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |