[wp-trac] [WordPress Trac] #40197: meta cap 'publish_post' is not being used

WordPress Trac noreply at wordpress.org
Fri Oct 25 17:30:03 UTC 2024


#40197: meta cap 'publish_post' is not being used
-------------------------------------------------+-------------------------
 Reporter:  panjmp                               |       Owner:
                                                 |  johnbillion
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Role/Capability                      |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  refresh                                        |  administration
-------------------------------------------------+-------------------------
Changes (by rmccue):

 * keywords:  good-first-bug has-patch => good-first-bug has-patch needs-
     refresh


Comment:

 One big benefit of changing this would be that you can filter the meta
 cap, and conditionally allow/deny publication based on the post's content
 - e.g. you could block publish at the caps level if a condition isn't met.
 This isn't possible with the generic `publish_posts` cap, which is missing
 the context.

 I suspect this patch probably needs refreshing, and we need to check that
 there haven't been any new uses introduced (e.g. for Gutenberg).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40197#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list