| @@ -1,5 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 3 | +/** | |
| 4 | + * @deprecated since 4.2.9 | |
| 5 | + */ | |
| 2 | 6 | class LP_Meta_Box_Question extends LP_Meta_Box { |
| 3 | 7 | |
| 4 | 8 | private static $_instance = null; |
| 5 | 9 | |
| @@ -27,14 +31,14 @@ | ||
| 27 | 31 | ) |
| 28 | 32 | ), |
| 29 | 33 | '_lp_hint' => new LP_Meta_Box_Textarea_Field( |
| 30 | 34 | esc_html__( 'Hint', 'learnpress' ), |
| 31 | - esc_html__( 'Instruction for user to select the right answer. The text will be shown when users click the \'Hint\' button.', 'learnpress' ), | |
| 35 | + esc_html__( 'The instructions for the user to select the right answer. The text will be shown when users click the \'Hint\' button.', 'learnpress' ), | |
| 32 | 36 | '' |
| 33 | 37 | ), |
| 34 | 38 | '_lp_explanation' => new LP_Meta_Box_Textarea_Field( |
| 35 | 39 | esc_html__( 'Explanation', 'learnpress' ), |
| 36 | - esc_html__( 'Explanation will be displayed when students click button "Check Answer".', 'learnpress' ), | |
| 40 | + esc_html__( 'The explanation will be displayed when students click the "Check Answer" button.', 'learnpress' ), | |
| 37 | 41 | '' |
| 38 | 42 | ), |
| 39 | 43 | ) |
| 40 | 44 | ); |
| @@ -53,9 +57,12 @@ | ||
| 53 | 57 | |
| 54 | 58 | foreach ( $this->metabox( $post->ID ) as $key => $object ) { |
| 55 | 59 | if ( is_a( $object, 'LP_Meta_Box_Field' ) ) { |
| 56 | 60 | $object->id = $key; |
| 57 | - echo wp_kses_post( $object->output( $post->ID ) ); | |
| 61 | + $output = $object->output( $post->ID ); | |
| 62 | + if ( ! empty( $output ) ) { | |
| 63 | + echo wp_kses_post( $object->output( $post->ID ) ); | |
| 64 | + } | |
| 58 | 65 | } elseif ( is_array( $object ) ) { |
| 59 | 66 | $is_old = true; |
| 60 | 67 | } |
| 61 | 68 | } |