Viewing 1 replies (of 1 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    That won’t work, however I know how you can do this without worrying about your client screwing it all up:

    Step 1. Create two users, one for you and another for the client (both can be admins). You’ll have the username “admin” and your client can have something like “clientname” in place for his username.

    Step 2. Add this little piece of code in either functions.php file in your theme, or create a small plugin with just this code in it.

    add_action( 'admin_menu', 'my_remove_menus', 999 );
    function my_remove_menus() {
    
    	/* Use remove_menu_page() and remove_submenu_page() here. */
    
    	$current_user = wp_get_current_user();
    	if ($current_user->user_login != 'admin')
    		remove_menu_page("wck-page");
    }

    What it does, it removes the WCK menu for ALL users except your own admin account. You don’t have to mock around with roles and capabilities and works like a treat.

    Let me know if this helps you out!

Viewing 1 replies (of 1 total)
  • The topic ‘Uninstall Plugin After Creating CPT?’ is closed to new replies.