forked from wp-plugins/html-social-share-buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shortcode.php
33 lines (29 loc) · 912 Bytes
/
shortcode.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
<?php
add_shortcode("zm_sh_btn", 'zm_sh_shortcode_cb');
function zm_sh_shortcode_cb($atts){
global $zm_sh;
if(isset($zm_sh->excluded) and $zm_sh->excluded == true) return;
$atts = shortcode_atts(array(
'title' => '',
'iconset' => "default",
'url' => "%%permalink%%",
'icons' => array(
"facebook" => "on",
"twitter" => "on",
"linkedin" => "on",
"googlepluse" => "on",
"bookmark" => "on",
"pinterest" => "on",
"mail" => "on",
),
'iconset_type' => "square",
'class' => "in_shortcode",
),
$atts,
'zm_sh_btn'
);
$icons = $atts['icons'];
$icons = explode(",", $icons);
$atts['icons'] = array_flip($icons);
return $zm_sh->zm_sh_btn($atts);
}