Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created October 28, 2016 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/33027ef8fc2d6501b5defda334594edf to your computer and use it in GitHub Desktop.
Save billerickson/33027ef8fc2d6501b5defda334594edf to your computer and use it in GitHub Desktop.
<?php
/**
* Disable PinIt Button
*
*/
function ea_disable_pin_on_images( $attr, $attachment ) {
$attr['data-pin-nopin'] = 'nopin';
return $attr;
}
add_filter( 'wp_get_attachment_image_attributes', 'ea_disable_pin_on_images', 10, 2 );
@just-us
Copy link

just-us commented Jun 21, 2017

Just what I was looking for? Just wondering how you would extend this to include logos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment