amp_get_slug

amp_get_slug( bool $ignore_late_defined_slug = false )

Description #

Get the slug used in AMP for the query var, endpoint, and post type support.

The return value can be overridden by previously defining a AMP_QUERY_VAR constant or by adding a 'amp_query_var' filter, but *warning* this ability may be deprecated in the future. Normally the slug should be just 'amp'.


Parameters #

$ignore_late_defined_slug

(Optional) Whether to ignore the late defined slug.

Default value:false


Return #

(string) Slug used for query var, endpoint, and post type support.


Changelog #

Changelog
Version Description
2.1 Added $ignore_late_defined_slug argument.
0.7 Introduced.