3.5 Cannot Delete CustomPost from Frontend anymore
-
I updated to 3.5, and the functionality to delete Custom Posts (via the frontend), broke.
Previously, I would generate a hyperlink, based on the following function:
function wp_delete_post_link($text = '[delete]',$confirm_required=true) { global $post; $delLink = wp_nonce_url( site_url() . "/wp-admin/post.php?action=trash&post=" . $post->ID, 'trash-' . $post->post_type . '_' . $post->ID); return $confirm_required ? '<a href="' . $delLink . '" onclick="javascript:if(!confirm(\'Are you sure you want to remove this post?\')) return false;" />'.$text."</a>" : '<a href="' . $delLink . '">'.$text."</a>"; }
Now when I click the link, I am redirected to a “WordPress Failure Notice” page:
Are you sure you want to do this? Please try again.
I am running this install locally using DesktopServer, and have not upgraded my live site yet.
To remedy, I have tried:
– Restarting the server
– Clearing my browser cache/cookies…etc
– Disabling all plugins *except BuddyPress & a small one I needed to generate the linkNothing generated in error_log
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘3.5 Cannot Delete CustomPost from Frontend anymore’ is closed to new replies.