Support » Plugin: Admin Page Framework » Is it possible to specify User capability to edit a plugin?

  • Resolved xotik

    (@xotik)


    Hi all,

    I’ve created a custom plugin with Admin Page Framework (awsome tool by the way!), but I need the editors of the site to be able to see and edit the plugin.

    I’ve searched the docs but couln´t find anything.

    Is it possible to define it on (or any other way):

    $this->setRootMenuPage(name, icon, position, capability)

    Thanks in advance!

    • This topic was modified 4 weeks ago by  xotik.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author miunosoft

    (@miunosoft)

    Hi,

    You can use the setCapability() method before calling setRootMenuPage() in your setUp() method.

    
    $this->setCapability( 'read' );
    

    Thanks @miunosoft, it worked great!

    Also thanks for the quick reply 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.