Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#24746 closed enhancement (invalid)

Move wp_ajax_nopriv_heartbeat() after wp_ajax_heartbeat()

Reported by: mordauk Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.6
Component: Administration Keywords:
Focuses: Cc:


I was looking through ajax-actions.php and noticed that wp_ajax_nopriv_heartbeat() is at the very top, while wp_ajax_heartbeat() is around line 2055.

For organization's sake, should the two functions be right next to each other?

I was first looking at wp_ajax_heartbeat() and didn't even realize there was a nopriv version until I did a search across the whole code base.

Change History (3)

#1 @azaozz
5 years ago

  • Keywords close added

The handlers in ajax-actions.php are split in three "areas": nopriv goes on top, followed by GET based handlers, followed by POST. This is to emphasis the difference as it's not immediately possible to figure out the request methods.

#2 @mordauk
5 years ago

Ah, makes sense, thanks!

#3 @SergeyBiryukov
5 years ago

  • Component changed from General to Administration
  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.