Adds Pin This button to all post images
Extremely lightweight jquery based plugin. Adds “Pin This” button to all images.
Thanks to Elembee for this walkthrough http://elembee.com/blogkeeping-pin-it-for-images/
/wp-content/plugins/
directoryIt’s not working?
2 things to check
1) Is another plugin interfering? The plugin uses jQuery on document ready which if it is interrupted by another pluggin will never fire here.
2) Check the selectors, does it reflect what the HTML is on your page?
Can I reload it?
call cb_pinterest_plugin_load() from javascript and it will repin everything that might not have been available on load
My style is still off ya jerk!
Well calm down, the plugin works by trying to clone style off the image but it can miss some. To tweak what’s missing you will need
to add the following to your themes custom style sheet and add the missing style attributes (which you can use firebug or something similar to find)
.cb_pin_images {
/INSERT MISSING STYLE HERE/
}
Wait the image should be centered!
find the image id using firebug and find the id #pin_images_2 is our example (but also remember it could change if multiple images are added to the page)
add the following to your themes custom style sheet
margin-left:auto;
margin-right:auto;
}
or if it’s plugin specific use your plugin class
.zlrecipe-container-border .cb_pin_images {
margin-left:auto;
margin-right:auto;
}
Fixed issue with dimensions not working.
Fixed 2nd issue with dimenstions.
Added Settings Link To Plugins Screen
Fixed issue with 0 dimensions
Wrapped function so it could be called after load. cb_pinterest_plugin_load()
Changed the way it got the width and height of the image.
Added the move css attributes other than width and height to help with formatting(border,margin,padding).
Added code to work with lazy loading images (thanks vitalvital!);
Added fix for descriptions (thanks vitalvital!);
Changed encodeURI to encodeURIComponent to fix issues with certin urls
Added fixed for 0 size images (thanks freerange)
Added misc support fixes
Added link to Elembee’s walkthrough
replaced non validating php on plugin_action_links_
fixed $defines not being set originally