/**
  * @brief Renders the HTML and prints it directly.
  *
  * @param string $id The HTML id attribute for the text input, this is also set as the name attribute.
  * @param string $desc Optional description, shown as label for the checkbox.
  * @return void
  */
 public static function render($id, $value = '', $desc = '', $rows = 0)
 {
     $descid = 'tagline-' . $id;
     // description id
     $aria = array('described-by' => $descid);
     $attrs = array('id' => $id, 'value' => $value, 'rows' => $rows, 'aria' => $aria, 'style' => 'width:100%', 'htmlClass' => 'large-text code');
     $textarea = new BTCFormTextarea($attrs, $value);
     if (!empty($desc)) {
         $out = '<p id="' . $descid . '" class="description">';
         $out .= $desc;
         $out .= '</p>';
         $out .= $textarea->render(false);
         echo $out;
     } else {
         $textarea->render();
     }
 }
 /**
  * Creates the meta box for the short description.
  *
  * The short description textarea box uses the post excerpt to store a short
  * description of the event.
  */
 public static function btb_event_short_desc_box($post)
 {
     $event = btb_get_event($post->ID);
     $short_desc_label = new BTCFormLabel(array('htmlClasses' => 'screen-reader-text', 'for' => 'excerpt'), esc_html__('Short description', 'bt-booking'));
     $short_desc_area = new BTCFormTextarea(array('id' => 'excerpt', 'cols' => 40, 'rows' => 1), $event->short_desc);
     $short_desc_label->render();
     $short_desc_area->render();
     echo '<p>' . esc_html__('The short description will be used for displaying events on summary pages as well as the description for the Schema.org structured data. Some themes might use it also for the meta description tag. If the short description is empty and a description page is set, BTBooking will use the excerpt of the description page if one is available.', 'bt-booking') . '</p>';
 }