Change Suggestion – granular roles/capabilities for multi-vendor sites
-
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!
- The topic ‘Change Suggestion – granular roles/capabilities for multi-vendor sites’ is closed to new replies.