public function __construct() { parent::__construct(); // Widgets foreach (Widgets::getDinamicSidebarActive() as $sidebarActive) { ob_start(); dynamic_sidebar($sidebarActive); $this->widgets[$sidebarActive] = ob_get_clean(); } // Menus foreach (Menu::getMenusActive() as $menuActive) { $this->menus[$menuActive] = wp_nav_menu(['echo' => false, 'theme_location' => $menuActive, 'menu_class' => 'nav navbar-nav menu ' . str_replace('_', '-', $menuActive), 'walker' => new WalkerNavMenu()]); } }
// URL ENVEROMENTS define('URL_PRO', isset($env['pro']) ? $env['pro'] : $siteUrl); define('URL_DEV', isset($env['dev']) ? $env['dev'] : $siteUrl); define('URL_LOC', isset($env['loc']) ? $env['loc'] : $siteUrl); // SOME DIRECTORIES define('PUBLIC_DIR', get_template_directory_uri() . '/public'); define('COMPONENTS_DIR', get_template_directory_uri() . '/vendor/components'); // BLOG_INFO function getBlogTitle() { if (is_home()) { return get_bloginfo('name'); } else { return wp_title("-", false, "right") . " " . get_bloginfo('name'); } } define('BLOG_TITLE', getBlogTitle()); define('ADMIN_EMAIL', get_bloginfo('admin_email')); // -------------------------------------------------------------- // Actions // -------------------------------------------------------------- Actions::setup(); // -------------------------------------------------------------- // Filters // -------------------------------------------------------------- Filters::setup(); // -------------------------------------------------------------- // WidgetController // -------------------------------------------------------------- Widgets::setup(); @(include_once 'test.php');