Title: [Plugin: Simple Admin Menu Editor] suggested code change
Last modified: August 20, 2016

---

# [Plugin: Simple Admin Menu Editor] suggested code change

 *  [Jo Landers](https://wordpress.org/support/users/jojolanderscom/)
 * (@jojolanderscom)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-admin-menu-editor-suggested-code-change/)
 * Plugin throws Notice: Undefined index: success in …/simple-admin-menu-editor.
   php on line 85 – should change `if($_GET['success']=='1')`
    to `if ( isset($_GET['
   success'] && $_GET['success']=='1')`
 * Also, if a menu item has a custom icon before the text, using explode(‘<‘, $s[
   0]);’ to get rid of the spans containing comment counts, etc. results in getting
   rid of all text. Suggest applying a function to remove those spans instead:
 *     ```
       function some_function_name($text) {
       	$span = stripos($text, "<span");
       	if ( $span !== FALSE ) $text = substr($text, 0, $span);
       	$text = strip_tags($text);
       	$text = explode('<', $text);
       	$text = trim($text[0]);
       	return $text;
       }
       ```
   
 * Otherwise, works well, nice and simple if you don’t need to edit menus by role.

Viewing 1 replies (of 1 total)

 *  Plugin Author [chrisnowak](https://wordpress.org/support/users/chrisnowak/)
 * (@chrisnowak)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-admin-menu-editor-suggested-code-change/#post-2278071)
 * Thank you. Will add / change for the next update.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Simple Admin Menu Editor] suggested code change’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-admin-menu-editor.svg)
 * [Simple Admin Menu Editor](https://wordpress.org/plugins/simple-admin-menu-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-admin-menu-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-admin-menu-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-admin-menu-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-admin-menu-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-admin-menu-editor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [chrisnowak](https://wordpress.org/support/users/chrisnowak/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-admin-menu-editor-suggested-code-change/#post-2278071)
 * Status: not resolved