wc_prevent_adjacent_posts_rel_link_wp_head

Closes #11683
This commit is contained in:
Mike Jolley 2016-08-12 11:03:28 +01:00
parent 97618fa2af
commit cfc31dd311
1 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,18 @@ function wc_prevent_endpoint_indexing() {
}
add_action( 'template_redirect', 'wc_prevent_endpoint_indexing' );
/**
* Remove adjacent_posts_rel_link_wp_head - pointless for products.
*
* @since 2.7.0
*/
function wc_prevent_adjacent_posts_rel_link_wp_head() {
if ( is_singular( 'product' ) ) {
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
}
}
add_action( 'template_redirect', 'wc_prevent_adjacent_posts_rel_link_wp_head' );
/**
* When the_post is called, put product data into a global.
*