[wp-trac] [WordPress Trac] #51748: Allow customization of permission_callback errors

WordPress Trac noreply at wordpress.org
Tue Nov 10 16:10:42 UTC 2020


#51748: Allow customization of permission_callback errors
-------------------------+------------------------------
 Reporter:  plucmtl      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------
Changes (by TimothyBlynJacobs):

 * version:  trunk => 4.7


Comment:

 Thanks for the ticket @plucmtl and welcome to trac!

 What is the use case for this? I think it is a strong benefit that all
 errors from the REST API are served in a consistent manner.

 Making this filterable would also prevent `WP_REST_Response::as_error()`
 from being able to properly reconstruct the `WP_Error` object.

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


More information about the wp-trac mailing list