WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin:Availability Calendar] Editing code to alter permissions (3 posts)

  1. furiousfoggy
    Member
    Posted 3 years ago #

    Hi, I've installed the availability calendar to a website without problem. I would like to modify the code slightly to allow users ranked as either 'administrator' or 'editor' to have access to the calendar booking admin panel. I'm no good at PHP, so a little advice would be appreciated.

    Simply swapping 'administrator' in this code for 'editor' allows editor access. How do I change this code to display the menu for both users?

    function admin_menu()
    		{
    			add_submenu_page(
    				'edit-pages.php',
    				'Manage '.$this->name,
    				$this->name,
    				'administrator',
    				$this->tag,
    				array(&$this, 'manage')
    			);
    		}

    Site here; http://stayincostaesuri.com.

    Many thanks

  2. furiousfoggy
    Member
    Posted 3 years ago #

    Actually, editing this part of the code doesn't fully solve the situation. An editor doesn't have permission to actually edit the dates. Will continue to play around. Any advice still appreciated. (and the answer to the question above would still be useful)

    Actually, the plugin doesn't work at all any more. Trying to update dates shows
    You do not have sufficient permissions to access this page.

  3. fizzyfozzy
    Member
    Posted 3 years ago #

    Hi, Did you ever find the answer to this one? I too would like an editor to be able to edit the dates. Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic