WordPress.org

Ideas

DOING_REST (like DOING_AJAX)

  1. caraffande
    Member

    a define('DOING_REST', true); would be the perfect twin of DOING_AJAX in rest api callbacks.
    This could be useful if a plugin, for example, needs to know if it its functionality is being used by a REST API call.

    Posted: 3 weeks ago #
  2. KTS915
    Member

    There already is such a constant. It's called REST_REQUEST

    See https://core.trac.wordpress.org/changeset/35690

    Posted: 2 weeks ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    0 Votes
  • Status

    This idea has been implemented

Tags