-
Notifications
You must be signed in to change notification settings - Fork 0
/
socialshare.php
75 lines (64 loc) · 2.9 KB
/
socialshare.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div class="anli-ss">
<div id="footer-compartir">
<div class="recomienda">Compartir:</div>
<!-- FACEBOOK -->
<div class="bt-share">
<a class="facebook" href="<?php the_permalink(); ?>"
onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;">
</a>
</div><!-- .fb-share -->
<!-- TWITTER -->
<div class="bt-share">
<a class="twitter" href="#"
onclick="popUp=window.open(
'https://twitter.com/share?text=<?php the_title(); ?>&url=<?php the_permalink(); ?>',
'popupwindow',
'scrollbars=yes,width=630,height=440');
popUp.focus();
return false">
</a>
</div><!-- .tw-share -->
<!-- GOOGLE +1 -->
<div class="bt-share">
<a class="googleplus" href="#"
onclick="popUp=window.open(
'https://plus.google.com/share?url=<?php the_permalink(); ?>',
'popupwindow',
'scrollbars=yes,width=630,height=440');
popUp.focus();
return false">
</a>
</div>
<!-- LINKEDIN -->
<div class="bt-share">
<a class="linkedin" href="#"
onclick="popUp=window.open(
'http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>&summary=&source=',
'popupwindow',
'scrollbars=yes,width=630,height=440');
popUp.focus();
return false">
</a>
</div><!-- .tw-share -->
<!-- PINTEREST -->
<?php //obtengo el url de la imagen para hacer el PIN
$image_obt = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' );
$pin_image = $image_obt['0']; ?>
<div class="bt-share">
<a class="pinterest" href="#"
onclick="popUp=window.open(
'//www.pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php echo $pin_image; ?>&description=<?php the_title(); ?>',
'popupwindow',
'scrollbars=yes,width=630,height=440');
popUp.focus();
return false">
</a>
</div><!-- .tw-share -->
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>
</div><!-- #compartir -->
</div><!-- #footer-barra-social -->