amp_pre_get_permalink

apply_filters( 'amp_pre_get_permalink',  false $url,  int $post_id )

Description #

Filters the AMP permalink to short-circuit normal generation.

Returning a string value in this filter will bypass the get_permalink() from being called and the amp_get_permalink filter will not apply.


Parameters #

$url

Short-circuited URL.

$post_id

Post ID.



Changelog #

Changelog
Version Description
1.0 This filter only applies when using the legacy reader paired URL structure.
0.4 Introduced.