• Resolved amrishk

    (@amrishk)


    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.

    https://www.ads-software.com/plugins/announce-from-the-dashboard/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author gqevu6bsiz

    (@gqevu6bsiz)

    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

    Thread Starter amrishk

    (@amrishk)

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

    Plugin Author gqevu6bsiz

    (@gqevu6bsiz)

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

    Thanks,
    gqevu6bsiz

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Announce from diffrent role’ is closed to new replies.