Simple Admin Menu Editor
suggested code change (2 posts)

  1. Jo Landers
    Posted 4 years ago #

    Plugin throws Notice: Undefined index: success in .../simple-admin-menu-editor.php on line 85 - should change if($_GET['success']=='1')
    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.

  2. chrisnowak
    Plugin Author

    Posted 4 years ago #

    Thank you. Will add / change for the next update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Admin Menu Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic