Unfortunately, the plugin doesn't have any functions like that.
You can either enable editing for a certain role, or not. There's no in between.
Perhaps this behavior can be modified with plugins like User Role Editor, but I have never tried that.
If you need to apply this only to certain tables, you can only hide the options "Add new", "Edit" and/or "Delete" with some CSS - so it will be applied to all.
A workaround would be to create three different tables for every role:
1. Original table where editing is only enabled for Administrators
2. The same table (created with SQL query), where editing is enabled only for subscribers. In this case, you would need to include the CSS on front-end table which would hide "Edit" and "Delete"
3. The same table (created with SQL query), where editing is enabled only for subscribers.
this case, you would need to include the CSS on front-end table which would hide "Delete"
It's cumbersome, but the only way it could work if User Role Editor doesn't do the job.
I think it would be nice if you that kind of functionality since it's not hard to do. Anyway, I accomplished this one already by modifying your plugin's code.
Is it possible to control edits tools based on the role?
Like if you're subscriber:
You can only add
If you're contributor
You can only add / edit
If you're an admin
You can do anything
Also, not globally but base on certain table only.
Hello Cedric
Unfortunately, the plugin doesn't have any functions like that.
You can either enable editing for a certain role, or not. There's no in between.
Perhaps this behavior can be modified with plugins like User Role Editor, but I have never tried that.
If you need to apply this only to certain tables, you can only hide the options "Add new", "Edit" and/or "Delete" with some CSS - so it will be applied to all.
A workaround would be to create three different tables for every role:
1. Original table where editing is only enabled for Administrators
2. The same table (created with SQL query), where editing is enabled only for subscribers. In this case, you would need to include the CSS on front-end table which would hide "Edit" and "Delete"
3. The same table (created with SQL query), where editing is enabled only for subscribers.
this case, you would need to include the CSS on front-end table which would hide "Delete"
It's cumbersome, but the only way it could work if User Role Editor doesn't do the job.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I think it would be nice if you that kind of functionality since it's not hard to do. Anyway, I accomplished this one already by modifying your plugin's code.
Glad to hear that Cedric
Can I ask you to add the suggestion on our suggest a feature page?
It will go directly to our developers, so they can include it in the future.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables