Just did some more testing to find that the delete button only works with admin roles and I’m assuming editor would work as well. I obviously can’t give everyone the editor role.
Without looking at the code one thing that may cause this is the “WP User Frontend:Settings” – “Others” -> “Users can delete post?” option being set to “No”.
Cheers
TheProfessor
Then again I have that option set correctly and I get the same error too when logged in as an “author”. Works when I am logged in as an editor.
If WP User Frontend observed default WordPress role capabilities the only users besides non-logged in users that shouldn’t be able to delete their own posts should be those with the WordPress role “Subscriber”.
So this is definitely a bug.
Cheers
The Professor
Yeah the setting is definitely set to “yes” right now. I just tried setting it to “no” in hopes that the form was backwards or something like that and the delete links on the dashboard are no longer there. Clearly it’s doing something right, but the functionality just isn’t there when it is on. If it displays itself as being set to “No” when looking at the code I assume this would be an easy fix.
This affects my application as my users are all “Authors”. So if your not a coder and nobody else fixes it first I will end up fixing it next weekend.
Cheers
TheProfessor
Yeah, I’m not a coder at all, I’m just barely getting used to WordPress and how it works. That would be awesome! I still haven’t officially launched my site to our community yet. I’m trying to get all of the functionality where I want it before a bunch of people are using it and I’m pretty sure this is the last thing to do on my list. Keep me updated!
[ Please do not bump, that’s not permitted here. ]
Simple bug due to omission of global $userdata declaration.
Change the following lines in the file wpuf-dashboard.php
/**
* Delete a post
*
* Only post author and editors has the capability to delete a post
*/
function delete_post() {
$nonce = $_REQUEST['_wpnonce'];
to
/**
* Delete a post
*
* Only post author and editors has the capability to delete a post
*/
function delete_post() {
global $userdata;
$nonce = $_REQUEST['_wpnonce'];
Cheers
TheProfessor