function SetupMenuItems()
 {
     RWLogger::LogEnterence("SetupMenuItems");
     $submenu = array();
     // Basic settings.
     $submenu[] = array('menu_title' => __rw('settings'), 'function' => 'SettingsPage', 'slug' => '');
     // Append registered setting menu items.
     foreach ($this->_extensions as $extension) {
         if ($extension->HasSettingsMenu()) {
             $submenu[] = $extension->GetSettingsMenuItem();
         }
     }
     if ($this->IsBuddyPressInstalled()) {
         // BuddyPress settings.
         $submenu[] = array('menu_title' => 'BuddyPress', 'function' => 'SettingsPage');
     }
     if ($this->fs->is__premium_only()) {
         if ($this->IsBBPressInstalled()) {
             // bbPress settings.
             $submenu[] = array('menu_title' => 'bbPress', 'function' => 'SettingsPage');
         }
     }
     if (false === is_active_widget(false, false, strtolower('RatingWidgetPlugin_TopRatedWidget'), true)) {
         // Top-Rated Promotion Page.
         $submenu[] = array('menu_title' => __rw('top-rated-widget'), 'function' => 'TopRatedSettingsPageRender', 'load_function' => 'TopRatedSettingsPageLoad', 'slug' => 'toprated');
     }
     // Reports.
     $submenu[] = array('menu_title' => __rw('reports'), 'function' => 'ReportsPageRender');
     // Advanced settings.
     $submenu[] = array('menu_title' => __rw('advanced'), 'function' => 'AdvancedSettingsPageRender');
     // Affiliation application page.
     $submenu[] = array('menu_title' => __rw('affiliation'), 'function' => 'affiliation_settings_page_render');
     /*
     // Add Ons page
     $submenu[] = array(
     	'menu_title' => __rw('add-ons'),
     	'function' => 'addons_settings_page_render',
     	'slug' => 'addons'
     );
     */
     $submenu = apply_filters('ratingwidget_dashboard_submenus', $submenu);
     foreach ($submenu as $item) {
         $this->fs->add_submenu_item($item['menu_title'], is_array($item['function']) ? $item['function'] : array(&$this, $item['function']), __rw('ratings') . '–' . $item['menu_title'], 'edit_posts', isset($item['slug']) ? $item['slug'] : false, isset($item['load_function']) && !empty($item['load_function']) ? is_array($item['load_function']) ? $item['load_function'] : array(&$this, $item['load_function']) : false);
     }
 }