Esempio n. 1
0
 /**
  * Add new section to customizer interface
  *
  * @param \SilverWp\Customizer\Section\SectionInterface $section
  *
  * @access public
  * @return $this
  */
 public function addSection($section)
 {
     if ($section instanceof SectionInterface) {
         $this->sections[$section->getName()] = $section;
     } elseif ($section instanceof PanelInterface) {
         $this->sections[$section->getPanelId()] = $section;
     }
     return $this;
 }
Esempio n. 2
0
 /**
  *
  * Add section to panel container
  *
  * @param \SilverWp\Customizer\Section\SectionInterface $section
  *
  * @access public
  */
 public function addSection(SectionInterface $section)
 {
     $section->setPanelId($this->getPanelId());
     $this->sections[] = $section;
 }