Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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');
}
share|improve this question
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 '11 at 13:08
    
also are you sure you are changing the menu slug and not the $capability? –  Bainternet Aug 9 '11 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 '11 at 13:28
add comment

1 Answer 1

up vote 0 down vote accepted

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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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