/**
  * Get meta box title.
  *
  * @return string
  */
 protected function get_title()
 {
     $title = $this->box->title;
     if ($this->box->get_option('required')) {
         $title .= papi_required_html($this->box->properties[0], true);
     }
     return $title;
 }
 /**
  * Setup meta box.
  */
 public function setup_meta_box()
 {
     $this->options->title = papi_remove_papi($this->options->title);
     if ($this->options->_required) {
         $this->options->title .= papi_required_html($this->properties[0], true);
     }
     add_meta_box($this->options->_id, $this->options->title, [$this, 'render_meta_box'], $this->options->_post_type, $this->options->context, $this->options->priority, $this->properties);
 }
Esempio n. 3
0
 /**
  * Render label for the property.
  */
 protected function render_label_html()
 {
     $title = $this->get_option('title');
     papi_render_html_tag('label', ['for' => $this->html_id(), 'title' => trim($title . ' ' . papi_require_text($this->get_options())), $title, papi_required_html($this->get_options())]);
 }