plugin_dir = $adminPress->plugin_dir; $this->plugin_url = $adminPress->plugin_url; $this->version = $adminPress->version; $this->options = $adminPress->options; } add_filter( 'adminpress_form', array( $this, 'MenuManagement_style_form' ), 14 ); add_action( 'admin_menu', array( $this, 'rename_plugin_menu' ) ); add_filter( 'custom_menu_order', array( $this, 'custom_menu_order' ), 1001 ); add_filter( 'menu_order', array( $this, 'custom_menu_order' ), 1001 ); } public function rename_plugin_menu() { global $menu; if( isset( $this->options['menu_rename'] ) ) { $ren = $this->options['menu_rename']; foreach ( $menu as $n => $item ){ foreach( $ren as $k => $v ){ if( $item[2] == $k && $v != '' ){ $menu[$n][0] = $v; } } } } $this->menus = $menu; foreach( $this->menus as $m ){ if( isset( $this->options['hide_menu'][$m[2]] ) && $this->options['hide_menu'][$m[2]] == 'on' ){ remove_menu_page( $m[2] ); } } } public function custom_menu_order( $menu_ord ) { if (!$menu_ord) return true; return isset( $this->options['menu_order'] ) ? $this->options['menu_order'] : $menu_ord; } public function MenuManagement_style_form( $form ) { ob_start(); ?>

    menus as $menuItem ){ ?>