• 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)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Simple Admin Menu Editor] suggested code change’ is closed to new replies.