Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nofollow cart buttons

  • Loading branch information...
commit 6f17cd4d4e887405923daceee139c87b73ae5afc 1 parent ccc8259
@mikejolley mikejolley authored
View
1  readme.txt
@@ -169,6 +169,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Removed shortcode wrappers/cache for main pages since they are only ever called once per page load
* Fix - Product cat sortable when item cannot be moved.
* Fix - Do not show the Additional Information tab on product single page if contents are hidden or not existing.
+* Fix - nofollow add to cart links to prevent indexing
* Localization - Canada post code locale
* Localization - RMB paypal
* Localization - Bundled translation updates
View
2  shortcodes/shortcode-init.php
@@ -313,7 +313,7 @@ function woocommerce_product_add_to_cart($atts){
if ($data) $link = add_query_arg( $key, $data, $link );
}
- printf('<a href="%s" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', esc_url( $link ), $product->id, $product->product_type, $label);
+ printf('<a href="%s" rel="nofollow" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', esc_url( $link ), $product->id, $product->product_type, $label);
?>
View
2  templates/loop/add-to-cart.php
@@ -34,7 +34,7 @@
break;
endswitch;
- printf('<a href="%s" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', $link, $product->id, $product->product_type, $label);
+ printf('<a href="%s" rel="nofollow" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', $link, $product->id, $product->product_type, $label);
endif;
?>
Please sign in to comment.
Something went wrong with that request. Please try again.