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)


Top ↑

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 );
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.