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'm having a problem. I have my WP with custom roles, capabilities and so on.. But i'm having a problem in displaying the context help (in top right corner). If i log in as admin-it's all right - it's there, if i login with account which doesn't have admin rights -it's not there. But i want to display help for lower level accounts too, how to do that? I think this is WP core thing..can it be overwritten without changing the core? Thanks.

my code of diplaying it:

  add_action( 'load-post.php', 'wpd_help_post' );
  function wpd_help_post() {
  $screen = get_current_screen();
//my custom post types
    if ( $screen->id == 'albumas' || $screen->id == 'edit-albumas' ) {
      $screen->add_help_tab( array(
          'id'      => 'wpd-base',
          'title'   => __('My title', 'sfc'),
          'content' => '<h3>My help text</h3>',
      ));
    }
  }

Well i was stupid this time, everything is working. and no matter of user. I forgot to add action for creating new entry and only added for editing. that's why i was unable to see it.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The contextual help code doesn't make any discrimination on user-level by default. If you can see the page, the contextual help is there too.

Are you using some custom code, and hiding the help stuff behind a level check, by chance? More information than what you have provided is needed.

share|improve this answer
    
thanks for quick replay, but i search whole code and there is nothing what can hide them... :( i wrote the whole thing and i don't remember that i was hiding them.. –  Tommixoft Sep 1 '12 at 23:27
    
It may not be obvious. Like, if you have the add_help_tab function call inside a function that is only called for specific users or something... Things like that. Edit: Looked at your code. Why are you hooking to "load-post.php"? Try "admin-init" instead. –  Otto Sep 1 '12 at 23:39
    
WP codex says use load-BLABLABLA for help tabs, so i'm using it, and change to admin-init doesn't change anything -tried. Also my function is called for all users it's in functions.php file without any condition. Also i unhidded menu items-did not help, still nothing. I also looked at sourse to see maybe i used JavaScript to hide it-nope..there is no code to do that.Maybe WP shows it for regular roles not custom ones... –  Tommixoft Sep 1 '12 at 23:45
    
Okay, I guess I was confused about what you were trying to do. I tried your code on a test site, and it works fine as long as the $screen->id is set to "albumas". Are you sure that bit is correct? What happens when you var_dump the $screen->id? Are you sure you have the right ID value there? Can you post what your custom post type code looks like? –  Otto Sep 2 '12 at 1:42
    
well maybe you're right after all. i just noticed that this doesn't work if even admin is logged in. It displays help tab if i edit my entry but if i create new-there is no help tab in creating new entry. now i'm searching how to add it to create window in my post type. –  Tommixoft Sep 2 '12 at 15:49
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.