Guest User

pinterest-title-image-pop

a guest
Dec 11th, 2014
337
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.pinterest-<?php the_ID(); ?>').each(function(){
  2. var self = this;
  3. $(this).sharrre({
  4. share: {
  5. pinterest: true
  6. },
  7. enableHover: false,
  8. template: '<div class="box"><a class="count" href="#">{total}</a><a class="share" href="#">Pin</a></div>',
  9. enableTracking: true,
  10. buttons: {
  11. pinterest: {
  12. description: '<?php echo the_title(); ?>'<?php if( has_post_thumbnail() ){ ?>,media: '<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>'<?php } ?>
  13. }
  14. },
  15. click: function(api, options){
  16. api.simulateClick();
  17. api.openPopup('pinterest');
  18. }
  19. });
  20. });
RAW Paste Data