amp_frontend_show_canonical

This hook has been deprecated. Remove amp_add_amphtml_link() call on wp_head action instead.

apply_filters_deprecated( 'amp_frontend_show_canonical' )

Description #

Filters whether to show the amphtml link on the frontend.

This is deprecated since the name was wrong and the use case is not clear. To remove this from being printed, instead of using the filter you can rather do:
add_action( 'template_redirect', static function () { remove_action( 'wp_head', 'amp_add_amphtml_link' ); } );



Changelog #

Changelog
Version Description
0.2 Introduced.