Home > Forum

Support Forum

Showing the shortcode panel to Author

Showing the shortcode panel to Author

Postby raymond » Thu Jul 19, 2012 3:27 pm

Hi All,

Good day!

I have been using Shortcoder and it's great. It's perfect for my client's requirement.

I'm having a hard time and I'm kinda lost on how to make the shortcode visible not only to admins but also Authors.

Can you please guide me and walk me through on how to do this? Ideally, I was hoping there is something I can add into my custom functions.php by simply adding some hook unto the plugins so I can change it's visiblity but I'm not really sure if this makes sense (hope it does).

Hoping for some response.


Thanks!
raymond
 
Posts: 12
Joined: Thu Jul 19, 2012 3:24 pm
Location: Philippines

Re: Showing the shortcode panel to Author

Postby vaakash » Thu Jul 19, 2012 4:47 pm

I think you need the 'Shortcoder" admin page file being available to post "Authors" of the site.

If yes, do the following.
- Open the file shortcoder/shortcoder.php
- Replace manage_options in line 29 with moderate_comments
- Save the file.

I've not tested this. But it should work.
User avatar
vaakash
Site Admin
 
Posts: 704
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Showing the shortcode panel to Author

Postby raymond » Thu Jul 19, 2012 8:24 pm

Hi Vaakash,

Good day!

Thanks for the prompt reply and the suggestion. moderate_comments is a capability of Administrator and Editor so it's still not visible for the Author, but I managed to figure out what you're trying to point out. I used "publish_posts" instead.

For anyone having this same problem, here's WP's list of Roles/Capabilities that you can manipulate on that same line that Vaakash sent:
http://codex.wordpress.org/Roles_and_Capabilities

Lastly, I am not so confident editing the plugin since I want it to be upgradeable as much as possible, so I just added the code below into my custom functions:
Code: Select all
add_action('admin_menu', 'show_shortcode');

   function show_shortcode() {
      add_menu_page('Shortcoder','Shortcoder','publish_posts','shortcoder', 'sc_admin_page', plugins_url('shortcoder/images/shortcoder-2.png'));
   }


...the only caveat though is that if I do it my way (using the custom functions), it's throwing that insufficient permission error of WP. Is there something else that I need to setup Vaakash?


Hoping for some response.


Thanks!
raymond
 
Posts: 12
Joined: Thu Jul 19, 2012 3:24 pm
Location: Philippines


 


  • Related topics
    Replies
    Views
    Last post


Return to Shortcoder


phpBB SEO