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

wp_block post type: add delete_posts to capabilities. #4987

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Aug 10, 2023

Syncing changes from:

Adds 'delete_posts' to the wp_block (patterns) capabilities.

Required to allow users to delete draft posts from wp-admin/edit.php?post_type=wp_block

See Gutenberg issue:

Testing Instructions

  1. Add a pattern in the post editor (wp-admin/edit.php?post_type=wp_block)
  2. Save it in draft status
  3. Go back to the list table
  4. Try to trash the pattern (the row action will not be there)

Screenshots or screencast

Before

2023-08-08.14.13.56.mp4

After

2023-08-08.14.14.24.mp4

Trac ticket: https://core.trac.wordpress.org/ticket/59041


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Required to allow users to delete draft posts from wp-admin/edit.php?post_type=wp_block
Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and can confirm the Trash button appears for draft patterns and it works as expected. The draft pattern can be trashed and recovered from trash.

@tellthemachines
Copy link
Contributor

Committed in r56577.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants