Support » Plugin: YOP Poll » Allow only Admin & Editor to Create New Polls

  • Resolved nit233

    (@nit233)



    Hi,

    Thanks for the great plugin, but I am facing 1 issue.
    How should I restrict Authors and Contributors from creating new polls.

    I allow them to write on my blog but I don’t want them to create polls or edit them, infact the YopPolls option should not be visible to them.

    Is there a way to do it.

    Regards
    Nitin

    https://wordpress.org/plugins/yop-poll/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hi Nitin,

    Please tell us what version of our plugin you use so we may assist.

    Best wishes,

    YOP Team

    Hi,

    I am using the latest version 4.9.3, I checked the contributor does not have the rights but yes the author can create new polls.
    Is there a way to disable it.

    Also if I don’t want the YOP Poll button on the Add New Post, is there a way to do it (since a contributor can add the YOP Poll shortcode there).

    I have to admit that YOP Poll is the best Poll plugin that I have installed.

    Regards
    Nitin

    Plugin Author YOP

    (@yourownprogrammer)

    Hey Nitin,

    Edit yop-poll/inc/admin.php and in manage_pages function, after this line

    global $page, $action; add

    if(is_admin()){

    and after

    default :
         $this->view_all_polls();<code>add</code>}

    to close the accolade.

    Let us know if you need more help.

    Best wishes,

    Regards,

    YOP Team

    newbie2015

    (@newbie2015)

    Dear YOP Team,

    I’ve just downloaded YOP poll version 5.3.
    I’m trying to disable YOP poll menu for all other users(contributors,authors, except for admin).
    How can i achieve this?
    I’ve looked into yop-poll/inc/admin.php, but couldnt figure out a way. I’ve checked current_user_can function, but don’t know what need to be changed there.

    Can you please help?

    Many thanks.
    Jerry

    newbie2015

    (@newbie2015)

    Hi

    Anybody able to help with my query?

    Thanks.
    Jerry

    Plugin Author YOP

    (@yourownprogrammer)

    Hello

    You will need to edit admin.php under inc folder.

    After $pollAdminObj = YOP_POLL_Poll_Admin::get_instance();

    add the line below

    if(current_user_can('manage_options'))

    Please note that updating the plugin to a newer version will overwrite these changes.

    Best
    YOP Team

    newbie2015

    (@newbie2015)

    Thanks so much YOP Team. Worked like a treat!

    Thumb Up for the great plugin!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Allow only Admin & Editor to Create New Polls’ is closed to new replies.