LLMS_Admin_Reviews::save_review_meta_boxes()
This function handles the logic to save the information that is contained in the custom metabox. It looks at each of the values, then makes sure that there are proper default values so that the program doesn’t go crashy crashy (nobody likes crashy crashy)
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.reviews.php
public function save_review_meta_boxes() { $enabled = (isset( $_POST['_llms_reviews_enabled'] )) ? $_POST['_llms_reviews_enabled'] : ''; $display = (isset( $_POST['_llms_display_reviews'] )) ? $_POST['_llms_display_reviews'] : ''; $num = (isset( $_POST['_llms_num_reviews'] )) ? $_POST['_llms_num_reviews'] : 0; $multiple = (isset( $_POST['_llms_multiple_reviews_disabled'] )) ? $_POST['_llms_multiple_reviews_disabled'] : ''; if ( isset( $_POST['post_ID'] ) ) { update_post_meta( $_POST['post_ID'], '_llms_reviews_enabled', $enabled ); } if ( isset( $_POST['post_ID'] ) ) { update_post_meta( $_POST['post_ID'], '_llms_display_reviews', $display ); } if ( isset( $_POST['post_ID'] ) ) { update_post_meta( $_POST['post_ID'], '_llms_num_reviews', $num ); } if ( isset( $_POST['post_ID'] ) ) { update_post_meta( $_POST['post_ID'], '_llms_multiple_reviews_disabled', $multiple ); } }
Expand full source code Collapse full source code View on GitHub