0

I am following this page on designing options menus: http://codex.wordpress.org/Administration_Menus

What is the significance of the menu_slug ?

I ask because when I change this value, the options page changes to

You do not have sufficient permissions to access this page.

If I change it back to what it was, it's fine.

---EDIT---15/8/2011

This is the code I was changing:

function highlighter_menu_() {
    add_options_page('Highlighter pen options', 'Highlighter Pen', 'manage_options', 'my-unique-identifier', 'highlighter_plugin_options');
}

and changed it to

function highlighter_menu_() {
    add_options_page('Highlighter pen options', 'Highlighter Pen', 'manage_options', 'a-unique-identifier', 'highlighter_plugin_options');
}
3
  • 1
    The menu slug also refers to the query var used in the URL to view your given page, when you change the slug - the page you are viewing is no longer to a valid URL(because you've essentially changed it when setting a new menu slug).
    – t31os
    Aug 9, 2011 at 13:08
  • also are you sure you are changing the menu slug and not the $capability?
    – Bainternet
    Aug 9, 2011 at 13:18
  • Oh yes good point, i could possibly be wrong with my comment. If you are changing the capability requirement by mistake that would indeed be the root of the problem.
    – t31os
    Aug 9, 2011 at 13:28

1 Answer 1

0

I have found the issue. I was making changes to the plug-in code and transferring it directly (via ftp). I forgot to deactivate and activate the plug-in. Doh!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.