I have made a simple code that will only save to a simple database.
I have this code:

register_activation_hook(samplePath, 'sample_install');
add_action('admin_menu', 'main');
add_action('user_admin_menu', 'main');

and a function like this :

function main(){

<?php if (current_user_can('smessage')) { 
echo("other user");


and this the sample_install function from another php file :

    $a = get_role('administrator');
    $s = get_role('author');

I can see the code if I login as an adminstrator but using other roles like author, subscriber, I couldn't see the plugin any more...can someone help me with this? I'm new in using wordpress...

Thank you in advance.

Have you checked user priviledges for the plugin?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.