WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#45875 closed enhancement (duplicate)

Rest API: Have a method to check if a REST request is being done

Reported by: andizer Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: REST API Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

We have functions for checking the type of several requests, e.g. wp_doing_ajax and wp_doing_cron.

The only one I am missing is a functions for checking if a REST request is being executed.

Attachments (1)

45875.diff (1.7 KB) - added by andizer 3 years ago.
Patch with unittests

Download all attachments as: .zip

Change History (3)

#1 follow-up: @ocean90
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #42061.

@andizer
3 years ago

Patch with unittests

#2 in reply to: ↑ 1 @andizer
3 years ago

Replying to ocean90:

Duplicate of #42061.

Ah no! I did a search but couldn't find it.

Note: See TracTickets for help on using tickets.