static function render_php()
 {
     $modules = BRJ_ThemeElements::get_modules();
     $post_types = $modules['brj-post-type'];
     if (!empty($post_types)) {
         require dirname(__FILE__) . '/generator/generator.php';
     }
 }
 static function register_sidebars()
 {
     $modules = BRJ_ThemeElements::get_modules();
     $modules = $modules['brj-sidebar'];
     if (!empty($modules)) {
         foreach ($modules as $module) {
             $args = self::get_args($module);
             register_sidebar($args);
         }
     }
 }
 static function register_nav_menus()
 {
     $modules = BRJ_ThemeElements::get_modules();
     $modules = $modules['brj-nav-menu-location'];
     if (!empty($modules)) {
         foreach ($modules as $module) {
             $handle = $module->settings->handle;
             $label = $module->settings->label;
             register_nav_menu($handle, $label);
         }
     }
 }
 static function filter_sizes($sizes)
 {
     $modules = BRJ_ThemeElements::get_modules();
     $modules = $modules['brj-image-size'];
     if (!empty($modules)) {
         foreach ($modules as $module) {
             $handle = $module->settings->handle;
             $name = $module->settings->name;
             $sizes[$handle] = $name;
         }
     }
     return $sizes;
 }
 /**
  * Initialize modules
  *
  * @since 0.1
  * @return void
  */
 static function init()
 {
     if (class_exists('FLBuilderModule')) {
         // Include Modules
         //require_once BB_THEME_ELEMENTS_DIR . '/modules/color-sample/color-sample.php';
         require_once BB_THEME_ELEMENTS_DIR . '/modules/brj-image-size/brj-image-size.php';
         require_once BB_THEME_ELEMENTS_DIR . '/modules/brj-post-type/brj-post-type.php';
         require_once BB_THEME_ELEMENTS_DIR . '/modules/brj-nav-menu-location/brj-nav-menu-location.php';
         require_once BB_THEME_ELEMENTS_DIR . '/modules/brj-sidebar/brj-sidebar.php';
         require_once BB_THEME_ELEMENTS_DIR . '/modules/brj-stylesheet/brj-stylesheet.php';
         // Collect all configuration modules from posts being used as component layouts.
         self::$modules = self::get_modules();
     }
 }
 /**
  * Add Workspace pages to admin bar menu.
  *
  * @since 0.2
  * @return void
  */
 static function admin_bar()
 {
     global $wp_admin_bar;
     // Top Level "Workspace Pages" Menu
     $args = array('id' => 'brj-workspaces', 'title' => __('Workspace Pages', 'fl-builder'), 'href' => admin_url('edit.php?post_type=brj-workspace'));
     $wp_admin_bar->add_menu($args);
     // Link to each published workspace
     $posts = BRJ_ThemeElements::get_posts();
     if (!empty($posts)) {
         foreach ($posts as $id) {
             $args = array('id' => 'brj-workspace-' . $id, 'parent' => 'brj-workspaces', 'title' => get_the_title($id), 'href' => get_permalink($id));
             $wp_admin_bar->add_menu($args);
         }
     }
     // "Add New" Item
     $args = array('id' => 'brj-create-workspace', 'parent' => 'brj-workspaces', 'title' => __('Add New', 'fl-builder'), 'href' => admin_url('post-new.php?post_type=brj-workspace'));
     $wp_admin_bar->add_menu($args);
     // "Export" Item
     $args = array('id' => 'brj-export-workspace', 'parent' => 'brj-workspaces', 'title' => __('Export Code', 'fl-builder'), 'href' => admin_url('edit.php?post_type=brj-workspace&page=brj-theme-elements-admin'));
     $wp_admin_bar->add_menu($args);
 }
 static function render_css()
 {
     $modules = BRJ_ThemeElements::get_modules();
     $modules = $modules['brj-stylesheet'];
     require dirname(__FILE__) . '/generator/generator.php';
 }