/
single-share.php
49 lines (43 loc) · 1.3 KB
/
single-share.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
<div class="btn-group btn-group-justified">
<?php
$url = rawurlencode( get_permalink() );
$url2 = rawurlencode( wp_get_shortlink( get_the_id() ) );
$title = get_the_title();
$username = 'AnnuaireHaiti'; ?>
<a
class="btn btn-primary"
target="_blank"
title="Sou Facebook"
href="http://www.facebook.com/sharer.php?u=<?php echo $url; ?>&t=<?php echo $title; ?>">
<strong>
<i class="fa fa-facebook fb"></i> <span class="fab">Facebook</span>
</strong>
</a>
<a
class="btn btn-info"
target="_blank"
title="Sou Twitter"
href="http://twitter.com/share?url=<?php echo $url2; ?>&text=<?php echo $title; ?>&via=<?php echo $username; ?>">
<strong>
<i class="fa fa-twitter tw"></i> <span class="fab">Twitter</span>
</strong>
</a>
<a
class="btn btn-success"
target="_blank"
title="sou WhatsApp"
href="whatsapp://send?text=<?= $title . ' ' . $url2 . ' via @' . $username; ?>">
<strong>
<i class="fa fa-whatsapp wa"></i> <span class="fab">WhatsApp</span>
</strong>
</a>
<a
class="btn btn-danger"
target="_blank"
title="Sou Google Plus"
href="https://plus.google.com/share?url=<?php echo $url; ?>">
<strong>
<i class="fa fa-google-plus google"></i> <span class="fab">Google+</span>
</strong>
</a>
</div>