• Resolved Timothy

    (@tdsnowden)


    Just a quick suggestion based on some tweaking I did for my site.
    I am setting up a multi-vendor site, and want approved vendors to be able to upload files to draft, but not publish products before they are reviewed. So …

    I dug in your docs (thanks!) and found your well-commented line (thanks again!) in “class-grfx-admin.php” in “add_plugin_admin_menu()” (about line 240) and changed the role “manage_options” to “manage_grfx”.

    Then a little lower in the same file, in “setup_uploader_admin()” I changed the role “manage_options” to “upload_grfx” on line 297.

    Finally, in “class-uploader.php” I edited the select list starting on line 278 to:

    <select id="grfx-upload-process-option" name="grfx_upload_process_option">
    				<option value="1"><?php _e('Process to Draft', 'grfx') ?></option>
    				<?php if ( current_user_can( 'manage_grfx' ) ) { ?>
    				<option value="2"><?php _e('Process to Publish', 'grfx') ?></option>
    				<?php } ?>
    				<option value="3"><?php _e('Delete Selected', 'grfx') ?></option>
    				<option value="4"><?php _e('Delete All', 'grfx') ?></option>
    			</select>

    Finally, I used Justin Tadlock’s Members plugin to control the capabilities per role.

    Hope this helps … and may I suggest this as an addition to the plugin? .. it would make updates easier for me…Thanks!

    https://wordpress.org/plugins/grfx/

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

    (@grfx)

    That would make a good option! Please use it for a while and let me know if you see any issues with it. If not I could add it as an option.

    I’m glad your liking the comments — I was hoping it would benefit people.

    I’ll leave this thread open a while if you want to update on how its going.

    Thread Starter Timothy

    (@tdsnowden)

    Sure thing. I’ll try and check back in a bit after we’ve tested it a little more.

    Plugin Author grfx

    (@grfx)

    Has it been working well? I’m going to mark this as resolved and possibly I will be able to include the changes after some testing.

    Thread Starter Timothy

    (@tdsnowden)

    So far it has been working great. Only tweak I’d make to it that I haven’t had time to figure out is how to “register” the capabilities with WordPress so that you can see the capabilities automatically in a plugin like Members – as it is, the first time I go to add them I have to type them in manually to add to a role (after that, they’re available automatically as a checkbox on any role).

    Other than that, it’s been working like I’d hoped. Admins and managers can manage the uploads and publishing, while authors/vendors (admittedly a relatively few right now) are able to upload photos as draft for admins/managers to review.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Suggestion – granular roles/capabilities for multi-vendor sites’ is closed to new replies.