WordPress.org

Ready to get started?Download WordPress

Forums

Simple Admin Menu Editor
suggested code change (2 posts)

  1. Jo Landers
    Member
    Posted 2 years ago #

    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.

  2. chrisnowak
    Member
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic