Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#24746 closed enhancement (invalid)

Move wp_ajax_nopriv_heartbeat() after wp_ajax_heartbeat()

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

Description

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
12 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
12 years ago

Ah, makes sense, thanks!

#3 @SergeyBiryukov
12 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.