[wp-trac] [WordPress Trac] #61710: Introduce a new action hook for ajax requests for both logged-in and non-logged-in users

WordPress Trac noreply at wordpress.org
Sat Jun 14 11:36:03 UTC 2025


#61710: Introduce a new action hook for ajax requests for both logged-in and non-
logged-in users
-----------------------------+------------------------------
 Reporter:  nirajgirixd      |       Owner:  (none)
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:  6.6
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:
-----------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  dev-feedback has-patch => has-patch close


Comment:

 Thanks for the ticket and PR @nirajgirixd. I must say I'm not too excited
 about this new action, I think it might be ''more'' confusing for
 developers since it introduces an extra ajax hook which is functionally no
 different from using the two existing ones.

 The `wp_ajax_nopriv_{action}` hook has the advantage of explicitly having
 `nopriv` in its name which helps developers recognise that this action
 will fire for non privileged users. `wp_ajax_all_{action}` does not have
 this.

 Thanks again for the contribution but I think this should be closed.

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


More information about the wp-trac mailing list