예제 #1
0
 public function metaboxes()
 {
     $cmb = new_cmb2_box(array('id' => $this->id . '_metabox', 'title' => __("{$this->label} Options", 'scoutwp_plugin'), 'object_types' => array($this->id)));
     $cmb->add_field(Metaboxes::date_time($this->id, 'start', array('required' => 'required')));
     $cmb->add_field(Metaboxes::date_time($this->id, 'end', array('required' => 'required')));
     $cmb->add_field(Metaboxes::price($this->id));
     $cmb->add_field(Metaboxes::address($this->id, array('required' => 'required')));
     $cmb->add_field(Metaboxes::postcode($this->id, array('required' => 'required')));
     $cmb->add_field(Metaboxes::coordinates($this->id));
 }
예제 #2
0
 public function metaboxes()
 {
     /**
      * Semi-standard CMB metabox/fields registration
      */
     $cmb = new_cmb2_box(array('id' => $this->id . '_metabox', 'title' => __("{$this->label}: General Information", 'scoutwp_plugin'), 'object_types' => array($this->id)));
     $cmb->add_field(Metaboxes::type($this->id));
     $cmb->add_field(Metaboxes::program($this->id));
     $cmb->add_field(Metaboxes::description($this->id));
     $cmb->add_field(Metaboxes::leader($this->id));
     $cmb->add_field(Metaboxes::leader_role($this->id));
     $cmb->add_field(Metaboxes::email($this->id));
     $cmb->add_field(Metaboxes::address($this->id));
     $cmb->add_field(Metaboxes::postcode($this->id));
     $cmb->add_field(Metaboxes::coordinates($this->id));
     $cmb_sm = new_cmb2_box(array('id' => $this->id . '_sm_metabox', 'title' => __("{$this->label}: Website and Social Media", 'scoutwp_plugin'), 'object_types' => array($this->id)));
     $cmb_sm->add_field(Metaboxes::website($this->id));
     $cmb_sm->add_field(Metaboxes::facebook($this->id));
     $cmb_sm->add_field(Metaboxes::twitter($this->id));
 }