WordPress.org

Ready to get started?Download WordPress

Forums

Announce from the Dashboard
[resolved] Announce from diffrent role (4 posts)

  1. amrishk
    Member
    Posted 10 months ago #

    I want to announce from all the roles.
    function admin_menu()
    {
    add_options_page( $this->Name , __( 'Announcement settings for Dashboard' , $this->ltd ), 'administrator' , $this->Slug , array( $this , 'setting' ) );
    }
    the above function is working fine but when i replace the above function with
    function admin_menu()
    {
    add_options_page( $this->Name , __( 'Announcement settings for Dashboard' , $this->ltd ), 'administrator' , $this->Slug , array( $this , 'setting' ) );
    add_options_page( $this->Name , __( 'Announcement settings for Dashboard' , $this->ltd ), 'subscriber' , $this->Slug , array( $this , 'setting' ) );
    }

    its not working it says the user don't have permission.

    What i will write in capability section or which capability i will select so that it will work for different roles.

    http://wordpress.org/plugins/announce-from-the-dashboard/

  2. gqevu6bsiz
    Member
    Plugin Author

    Posted 10 months ago #

    Hi amrishk,

    add_options_page( $this->Name , __( 'Announcement settings for Dashboard' , $this->ltd ), 'subscriber' , $this->Slug , array( $this , 'setting' ) );

    I think maybe that there is no set of option_manage the contributor.

    A solution maybe,

    add_menu_page( $this->Name , __( 'Announcement settings for Dashboard' , $this->ltd ), 'read' , $this->PageSlug , array( $this , 'setting' ) );

    Could you try is this?

    Thanks,

    gqevu6bsiz

  3. amrishk
    Member
    Posted 10 months ago #

    thanks for the reply its working i wrote add_user in place of administrator. it works fine for all users.

  4. gqevu6bsiz
    Member
    Plugin Author

    Posted 10 months ago #

    I'm happy for you.
    If you have any questions, feel free to contact me.

    Thanks,
    gqevu6bsiz

Reply

You must log in to post.

About this Plugin

About this Topic