PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 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 All 140 releases
← All changes | inc/curds/class-lp-question-curd.php +3 -11 4.3.7 → 4.4.9 View file →
@@ -282,14 +282,10 @@
282 282 if ( ! $id || ! in_array( learn_press_get_post_type( $id ), array( 'revision', LP_QUESTION_CPT ) ) ) {
283 283 throw new Exception( sprintf( __( 'Invalid question with ID "%d".', 'learnpress' ), $id ) );
284 284 }
285 285
286 - $question->set_data_via_methods(
287 - array(
288 - 'explanation' => get_post_meta( $id, '_lp_explanation', true ),
289 - 'hint' => get_post_meta( $id, '_lp_hint', true ),
290 - )
291 - );
286 + $question->set_explanation( get_post_meta( $id, '_lp_explanation', true ) );
287 + $question->set_hint( get_post_meta( $id, '_lp_hint', true ) );
292 288 // $this->_load_answer_options( $question );
293 289 $this->_load_meta( $question );
294 290
295 291 return true;
@@ -305,13 +301,9 @@
305 301 }
306 302 // $question->set_type( $type );
307 303
308 304 $mark = $this->_get_question_mark( $question->get_id() );
309 - $question->set_data_via_methods(
310 - array(
311 - 'mark' => $mark,
312 - )
313 - );
305 + $question->set_mark( $mark );
314 306 }
315 307
316 308 public function _get_question_mark( $question_id ) {
317 309