WordPress.org

Ready to get started?Download WordPress

Forums

"Add Media" button not showing ONLY when editing a page? (1 post)

  1. tsdexter
    Member
    Posted 1 year ago #

    I am aware that this is very likely caused by either the 'Role Scoper' or 'Revisionary' plugin on my installation however I need both plugins so telling me to deactivate them won't really help.

    Anyway, I need my revisors to be able to upload media to the pages/posts. I've added the following code to give them upload permission:

    if ( current_user_can('revisor') && !current_user_can('upload_files') )
        add_action('admin_init', 'allow_revisor_uploads');
    function allow_revisor_uploads() {
        $revisor = get_role('revisor');
        $revisor->add_cap('upload_files');
    }

    Now, when the revisor logs in and goes to 'Add New' (page or post) they get the 'Add Media' button above the editor, however, if they attempt to edit a current page or post the button does not show...

    Can you point me to where (action/hook/core code) it decides whether or not to show/hide the 'add media' button so I can modify it to make it display on editing pages as well.

    Thanks
    Thomas

Topic Closed

This topic has been closed to new replies.

About this Topic