id ) ) { return; } $extra = $this->extra; $wrapper_class = ! empty( $extra['wrapper_class'] ) ? esc_attr( $extra['wrapper_class'] ) : ''; $meta = $this->meta_value( $thepostid ); $value = ! $meta && ! empty( $this->default ) ? $this->default : $meta; $value = $extra['value'] ?? $value; $desc_tip = $extra['desc_tip'] ?? ''; printf( '
', esc_attr( $this->id . '_field ' . $wrapper_class ), esc_attr( $this->id ), wp_kses_post( $this->label ) ); wp_editor( $value, sanitize_key( $this->id ), array( 'textarea_rows' => 10, 'editor_class' => 'lp-meta-box__wp-editor__textarea', 'textarea_name' => $this->id, ) ); if ( ! empty( $this->description ) ) { echo '

'; echo '' . wp_kses_post( $this->description ) . ''; if ( ! empty( $desc_tip ) ) { learn_press_quick_tip( $desc_tip ); } echo '

'; } echo '
'; } public function save( $post_id ) { $meta_value = LP_Request::get_param( $this->id, $this->default ?? '', 'html' ); update_post_meta( $post_id, $this->id, $meta_value ); return $meta_value; } }