Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trash_post of _any_ type invokes NPR story push delete error if not an admin #2

Closed
tamw-wnet opened this issue May 5, 2021 · 0 comments · Fixed by #3
Closed

trash_post of _any_ type invokes NPR story push delete error if not an admin #2

tamw-wnet opened this issue May 5, 2021 · 0 comments · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@tamw-wnet
Copy link
Member

tamw-wnet commented May 5, 2021

(was not transferred over from NPR repo)
anytime wp_trash_post or trash_post actions are called, nprstory_api_delete is called -- including when someone is deleting their own posts!!! The result is a big fat error message, including when there's nothing to do with the NPR Story API. Offending code below:
function nprstory_api_delete ( $post_ID ) { if ( ! current_user_can( 'delete_others_posts' ) ) { wp_die( __('You do not have permission to delete posts in the NPR API. Users that can delete other users\' posts have that ability: administrators and editors.'), __('NPR Story API Error'), 403 ); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant