Function
Remove undesired actions and filters on TML pages.
tml_remove_default_actions_and_filters( )
Source
function tml_remove_default_actions_and_filters() {
if ( ! tml_is_action() ) {
return;
}
// Remove actions
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'rsd_link', 10 );
remove_action( 'wp_head', 'wlwmanifest_link', 10 );
remove_action( 'wp_head', 'parent_post_rel_link', 10 );
remove_action( 'wp_head', 'start_post_rel_link', 10 );
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 );
remove_action( 'wp_head', 'rel_canonical', 10 );
// Remove filters
remove_filter( 'template_redirect', 'redirect_canonical' );
}
Uses
Changelog
| Version | Description |
|---|---|
| 7.0 | Introduced. |