setRootMenuPage( 'Settings' ); $this->addSubMenuItem( array( 'title' => __( 'Admin Top-Menu', 'dencodes_atp' ), 'page_slug' => 'dcs_admin_top_menu' ) ); } public function content( $sHTML ) { return '

'.__('"Settings / Admin Top-Menu" - is the location of this page.', 'dencodes_atp').'

' . $sHTML; } public function load_dcs_admin_top_menu( $oAdminPage ) { $this->addSettingSections( array( 'section_id' => 'dcs_atp_section', 'page_slug' => 'dcs_admin_top_menu', ) ); $attr = array(); $default = array(); $label = array(); $topmenu = DencodesAdminTopMenu::getObj(); foreach ($topmenu->menu AS $key=>$data) { if ($data[0]) { //echo '
'; print_r($data); echo '
'; $label[md5($data[2])] = ''.$data[0].''; } } $this->addSettingFields( array( 'field_id' => 'admin_top_label', 'title' => __('Top-Menu Name', 'dencodes_atp'), 'type' => 'text', 'default' => __('Top Menu', 'dencodes_atp'), ), array( 'field_id' => 'admin_top_items', 'title' => __('Move to the Top-Menu', 'dencodes_atp'), 'type' => 'checkbox', 'label' => $label, 'default' => $default, 'attributes' => $attr, 'after_label' => '
', ), array( 'field_id' => 'submit', 'type' => 'submit', 'redirect_url' => $_SERVER['REQUEST_URI'], ) ); } } new DencodesAdminTopMenuSettings;