is_amp_endpoint

This function has been deprecated. Use amp_is_request() instead.

is_amp_endpoint()

Description #

Determine whether the current response being served as AMP.

This function cannot be called before the parse_query action because it needs to be able to determine the queried object is able to be served as AMP. If 'amp' theme support is not present, this function returns true just if the query var is present. If theme support is present, then it returns true in transitional mode if an AMP template is available and the query var is present, or else in standard mode if just the template is available.


Return #

(bool) Whether it is the AMP endpoint.


Changelog #

Changelog
Version Description
2.0 Renamed to AMP-prefixed version, amp_is_request().
0.1 Introduced.