Customizer::getNavView PHP Method

getNavView() public method

public getNavView ( )
    public function getNavView()
    {
        if (isset($this->sections) and is_array($this->sections)) {
            $nav_row = 1;
            $nav_items = $this->_styles['nav'][0];
            foreach ($this->sections as $key => $section) {
                if (isset($section['title'])) {
                    $nav_items .= $nav_row === 1 ? $this->_styles['nav_active_item'][0] : $this->_styles['nav_item'][0];
                    $nav_items .= str_replace('{id}', $key, $this->_styles['nav_link'][0]);
                    if (isset($section['icon'])) {
                        $nav_items .= str_replace('{class}', $section['icon'], $this->_styles['nav_icon'][0]) . $this->_styles['nav_icon'][1];
                    }
                    $nav_items .= $section['title'] . $this->_styles['nav_link'][1] . $this->_styles['nav_active_item'][1];
                    $nav_row++;
                }
            }
            $nav_items .= $this->_styles['nav'][1];
            return $nav_items;
        }
    }