public function getOnePageModules() : array
    {
        $modules = array();

        if (is_front_page() && is_plugin_active('modularity-onepage/modularity-onepage.php')) {
            $postStatus = array('publish');
            if (is_user_logged_in()) {
                $postStatus[] = 'private';
            }

            $sections = get_posts(array(
                'post_type' => 'onepage',
                'post_status' => $postStatus,
                'orderby' => 'menu_order',
                'order' => 'asc',
                'posts_per_page'   => -1
            ));

            foreach ($sections as $section) {
                $section_modules = \Modularity\Editor::getPostModules($section->ID);

                if (!isset($section_modules['onepage-sidebar'])) {
                    continue;
                }

                $section_modules = $section_modules['onepage-sidebar']['modules'];
                if (is_array($section_modules) && !empty($section_modules)) {
                    foreach ($section_modules as $module) {
                        if (!$module->hidden) {
                            $modules[] = $module;
                        }
                    }
                }
            }
        }

        return $modules;
    }