• Resolved technologyrocks

    (@technologyrocks)


    Hi

    I have created a role and assigned them the Media capability. The only option under the Media capability is to upload files.

    I cannot find the setting to allow the role to edit media attributes, such as ‘Alternative Text’.

    Any ideas how I might enable this for the role?

    Thanks very much

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @technologyrocks

    Upload files capability is the only one that Members found. You can add custom capability using this code:

    add_action( 'members_register_caps', 'cp_members_register_caps' );
    /**
     * Register a custom capability in Members.
     *
     * @return void
     */
    function cp_members_register_caps() {
    	members_register_cap( 'custom_cap', array( 'label' => 'Cap Label' ) );
    }

    but editing media attributes based on that capability would require custom code.

    Cheers

    Thread Starter technologyrocks

    (@technologyrocks)

    Fabulous! Thank you ??

    Thread Starter technologyrocks

    (@technologyrocks)

    For the benefit of anyone else needing a role to upload images and edit image attributes and to delete images:

    Add the ability to Edit and Delete Posts. This does not allow the user to add new posts (even if the Add New button shows).

    Hi @caseproof , can you please help me to know where exactly this custom code should be added?

    Thanks

    Alessandra

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Media capabaility limited to upload files; how to allow editing of attributes?’ is closed to new replies.