WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 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:

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)

comment:1 @azaozz2 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.

comment:2 @mordauk2 years ago

Ah, makes sense, thanks!

comment:3 @SergeyBiryukov2 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.