PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/admin/views/meta-boxes/fields/extra-faq.php +4 -3 4.2.04.4.8 View file →
@@ -28,10 +28,11 @@
28 28
29 29 <div class="form-field lp_course_faq_meta_box">
30 30 <label for="_lp_key_features"><?php echo wp_kses_post( $this->label ); ?></label>
31 31 <div class="lp_course_faq_meta_box__content">
32 + <input type="hidden" name="<?php echo esc_attr( $this->id ) ?>" value="">
32 33 <div class="lp_course_faq_meta_box__fields">
33 - <?php if ( ! empty( $faqs[0][0] ) ) : ?>
34 + <?php if ( is_array( $faqs ) && ! empty( $faqs[0][0] ) ) : ?>
34 35 <?php foreach ( $faqs as $key => $faq ) : ?>
35 36 <div class="lp_course_faq_meta_box__field">
36 37 <label>
37 38 <span><?php esc_attr_e( 'Title', 'learnpress' ); ?></span>
@@ -74,10 +75,10 @@
74 75 <?php
75 76 }
76 77
77 78 public function save( $post_id ) {
78 - $faqs_question = isset( $_POST['_lp_faqs_question'] ) ? LP_Helper::sanitize_params_submitted( $_POST['_lp_faqs_question'], 'html' ) : array();
79 - $faqs_answer = isset( $_POST['_lp_faqs_answer'] ) ? LP_Helper::sanitize_params_submitted( $_POST['_lp_faqs_answer'], 'html' ) : array();
79 + $faqs_question = LP_Request::get_param( '_lp_faqs_question', [], 'html' );
80 + $faqs_answer = LP_Request::get_param( '_lp_faqs_answer', [], 'html' );
80 81
81 82 $faqs = array();
82 83 if ( ! empty( $faqs_question ) ) {
83 84 $faqs_question_size = count( $faqs_question );