source/php/Display.php
public function output($sidebar)
    {
        if (!isset($this->modules[$sidebar]) || !$this->isModularitySidebarActive($sidebar)) {
            return;
        }

        // Get modules
        $modules = $this->modules[$sidebar];

        // Get sidebar arguments
        $sidebarArgs = $this->getSidebarArgs($sidebar);

        // Loop and output modules
        foreach ($modules['modules'] as $module) {
            if (!is_preview() && $module->hidden == 'true') {
                continue;
            }

            $this->outputModule($module, $sidebarArgs, \Modularity\ModuleManager::$moduleSettings[get_post_type($module)]);
        }
    }
public function output($sidebar)
    {
        if (!isset($this->modules[$sidebar]) || !$this->isModularitySidebarActive($sidebar)) {
            return;
        }

        // Get modules
        $modules = $this->modules[$sidebar];

        // Get sidebar arguments
        $sidebarArgs = $this->getSidebarArgs($sidebar);

        // Loop and output modules
        foreach ($modules['modules'] as $module) {
            if (!is_preview() && $module->hidden == 'true') {
                continue;
            }

            $this->outputModule($module, $sidebarArgs, \Modularity\ModuleManager::$moduleSettings[get_post_type($module)]);
        }
    }
public function output ( $ sidebar ) { if ( ! isset ( $ this -> modules [ $ sidebar ] ) || ! $ this -> isModularitySidebarActive ( $ sidebar ) ) { return ; } // Get modules $ modules = $ this -> modules [ $ sidebar ] ; // Get sidebar arguments $ sidebarArgs = $ this -> getSidebarArgs ( $ sidebar ) ; // Loop and output modules foreach ( $ modules [ 'modules' ] as $ module ) { if ( ! is_preview ( ) && $ module -> hidden == 'true' ) { continue ; } $ this -> outputModule ( $ module , $ sidebarArgs , \ Modularity \ ModuleManager :: $ moduleSettings [ get_post_type ( $ module ) ] ) ; } }
Outputs the modules of a specific sidebar
@param  string $sidebar Sidebar id/slug
@return void
Outputs the modules of a specific sidebar