Version Description
We have updated our buttons design to make them look even better on your website. If you update the plugin you wont have access to our old buttons.
=
Download this release
Release Info
Developer | joaoromao |
Plugin | Social Media Share Buttons |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 2.0.0
- css/getsocial-style.css +96 -18
- css/group-buttons.css +0 -1
- images/bottom.png +0 -0
- images/custom-actions.png +0 -0
- images/custom-expressions.png +0 -0
- images/done.png +0 -0
- images/floating-bar.png +0 -0
- images/mobile-bar.png +0 -0
- images/native-bar.png +0 -0
- images/off.png +0 -0
- images/sharing-bar.png +0 -0
- images/social-bar.png +0 -0
- images/top.png +0 -0
- init.php +16 -23
- js/builder.js +0 -107
- js/plugin.js +46 -1
- lib/gs.php +33 -112
- readme.txt +53 -42
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- tmpl/alerts.php +0 -10
- tmpl/apps.php +73 -41
- tmpl/{settings.php → apps/settings.php} +6 -6
- tmpl/basic_stats.php +19 -19
- tmpl/custom-expressions.php +0 -59
- tmpl/floating-bar.php +0 -129
- tmpl/header.php +6 -13
- tmpl/social-bar.php +0 -135
- tmpl/tabs.php +0 -6
- wp-share-buttons-analytics-getsocial.php +63 -42
css/getsocial-style.css
CHANGED
@@ -36,6 +36,25 @@ header h2 {
|
|
36 |
border-bottom: 1px solid #e1e1e1;
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
.wrap h2 small {
|
40 |
font-size: 14px
|
41 |
}
|
@@ -80,10 +99,10 @@ header h2 {
|
|
80 |
|
81 |
/***********************************************/
|
82 |
|
83 |
-
|
84 |
width: 900px;
|
85 |
margin: 0 auto;
|
86 |
-
}
|
87 |
|
88 |
.half {
|
89 |
width: 49%;
|
@@ -98,20 +117,50 @@ header h2 {
|
|
98 |
|
99 |
.app-wrapper {
|
100 |
width: 290px;
|
101 |
-
margin: 20px
|
102 |
display: inline-block;
|
103 |
float: left;
|
|
|
|
|
104 |
position: relative;
|
105 |
}
|
106 |
|
107 |
.app-wrapper .title {
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
.app-wrapper img {
|
114 |
-
height:
|
|
|
115 |
}
|
116 |
|
117 |
.app-wrapper:nth-child(3n) {
|
@@ -123,7 +172,6 @@ header h2 {
|
|
123 |
text-align: center;
|
124 |
overflow: hidden;
|
125 |
position: relative;
|
126 |
-
border-radius: 4px;
|
127 |
border: 1px solid #e1e1e1;
|
128 |
}
|
129 |
|
@@ -139,24 +187,28 @@ header h2 {
|
|
139 |
}
|
140 |
|
141 |
.app-status {
|
142 |
-
font-size: 30px;
|
143 |
-
border-style: solid;
|
144 |
position: absolute;
|
145 |
color: white;
|
146 |
font-style: normal;
|
147 |
position: absolute;
|
148 |
-
top:
|
149 |
-
|
150 |
-
|
151 |
-
border-radius: 100%;
|
152 |
-
-webkit-animation: rotate-in 750ms ease-in-out;
|
153 |
-
animation: rotate-in 750ms ease-in-out;
|
154 |
text-align: center;
|
155 |
}
|
156 |
|
157 |
.app-status.done {
|
158 |
-
background:
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
|
162 |
/***********************************************/
|
@@ -441,3 +493,29 @@ i.fa {
|
|
441 |
.graph h4 i {
|
442 |
margin-right: 12px;
|
443 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
border-bottom: 1px solid #e1e1e1;
|
37 |
}
|
38 |
|
39 |
+
.wrap iframe {
|
40 |
+
width: 100%;
|
41 |
+
height: 1800px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wrap iframe.sharing-bar {
|
45 |
+
height: 1800px;
|
46 |
+
}
|
47 |
+
|
48 |
+
.wrap iframe.native-bar {
|
49 |
+
height: 1100px;
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
.wrap .sub-wrap {
|
54 |
+
width: 900px;
|
55 |
+
margin: 0 auto;
|
56 |
+
}
|
57 |
+
|
58 |
.wrap h2 small {
|
59 |
font-size: 14px
|
60 |
}
|
99 |
|
100 |
/***********************************************/
|
101 |
|
102 |
+
/*.wrap, .wrap-header {
|
103 |
width: 900px;
|
104 |
margin: 0 auto;
|
105 |
+
}*/
|
106 |
|
107 |
.half {
|
108 |
width: 49%;
|
117 |
|
118 |
.app-wrapper {
|
119 |
width: 290px;
|
120 |
+
margin: 20px 8px 0 0;
|
121 |
display: inline-block;
|
122 |
float: left;
|
123 |
+
background: white;
|
124 |
+
border: 1px solid #e1e1e1;
|
125 |
position: relative;
|
126 |
}
|
127 |
|
128 |
.app-wrapper .title {
|
129 |
+
position: absolute;
|
130 |
+
bottom: 38px;
|
131 |
+
padding: 10px 15px;
|
132 |
+
background: #339ed5;
|
133 |
+
color: white;
|
134 |
+
border-radius: 0;
|
135 |
+
font-size: 16px;
|
136 |
+
width: 260px;
|
137 |
+
|
138 |
+
}
|
139 |
+
|
140 |
+
.app-wrapper:hover .title p {
|
141 |
+
display: block;
|
142 |
+
}
|
143 |
+
|
144 |
+
.app-wrapper:hover img {
|
145 |
+
opacity: 0.5;
|
146 |
+
}
|
147 |
+
|
148 |
+
.app-wrapper .info {
|
149 |
+
position: absolute;
|
150 |
+
left: 0;
|
151 |
+
top: -20px;
|
152 |
+
width: 290px;
|
153 |
+
height: 20px;
|
154 |
+
background: #2990c6;
|
155 |
+
}
|
156 |
+
.app-wrapper .title p {
|
157 |
+
font-size: 12px;
|
158 |
+
display: none;
|
159 |
}
|
160 |
|
161 |
.app-wrapper img {
|
162 |
+
height: 251px;
|
163 |
+
background: white;
|
164 |
}
|
165 |
|
166 |
.app-wrapper:nth-child(3n) {
|
172 |
text-align: center;
|
173 |
overflow: hidden;
|
174 |
position: relative;
|
|
|
175 |
border: 1px solid #e1e1e1;
|
176 |
}
|
177 |
|
187 |
}
|
188 |
|
189 |
.app-status {
|
|
|
|
|
190 |
position: absolute;
|
191 |
color: white;
|
192 |
font-style: normal;
|
193 |
position: absolute;
|
194 |
+
top: 0px;
|
195 |
+
padding: 1px 10px;
|
196 |
+
font-size: 12px;
|
|
|
|
|
|
|
197 |
text-align: center;
|
198 |
}
|
199 |
|
200 |
.app-status.done {
|
201 |
+
background: rgb(160, 200, 72);
|
202 |
+
left: 0px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.app-status.free {
|
206 |
+
right: 0
|
207 |
+
}
|
208 |
+
|
209 |
+
.app-status.pro {
|
210 |
+
background: #e78834;
|
211 |
+
right: 0;
|
212 |
}
|
213 |
|
214 |
/***********************************************/
|
493 |
.graph h4 i {
|
494 |
margin-right: 12px;
|
495 |
}
|
496 |
+
|
497 |
+
/* BUTTONS */
|
498 |
+
|
499 |
+
.btn {
|
500 |
+
padding: 5px 10px;
|
501 |
+
border-radius: 3px;
|
502 |
+
}
|
503 |
+
|
504 |
+
.btn.btn-default {
|
505 |
+
color: #2481b1;
|
506 |
+
}
|
507 |
+
|
508 |
+
.btn.btn-default:hover {
|
509 |
+
background: #2481b1;
|
510 |
+
color: white;
|
511 |
+
}
|
512 |
+
|
513 |
+
|
514 |
+
.btn.btn-pro {
|
515 |
+
background: #e78834;
|
516 |
+
color: white;
|
517 |
+
}
|
518 |
+
|
519 |
+
.btn.btn-pro:hover {
|
520 |
+
background: #E07415;
|
521 |
+
}
|
css/group-buttons.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.gs-group *{font-family:Helvetica,Arial,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;font-size:100%;display:inline-block;line-height:initial;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.gs-group>div:after{height:0;content:"";clear:both}.gs-group a{margin-right:5px;overflow:hidden}.gs-group a i{background:url("https://s3.amazonaws.com/getsocial-smb/uploads/icons/social/icons_white.png")}.gs-group a i+span{position:absolute;left:-99999px}.gs-group a+.gs-counter{min-width:10px;text-align:center;position:relative}.gs-group a+.gs-counter:before,.gs-group a+.gs-counter:after{width:0;height:0;border-style:solid;content:"";position:absolute;top:50%}.gs-group a,.gs-group a+.gs-counter{float:left}.gs-group.gs-small a+.gs-counter:before{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-small a+.gs-counter:after{border-width:5px 5px 5px 0;left:-5px;margin-top:-5px}.gs-group.gs-medium a+.gs-counter:before{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-medium a+.gs-counter:after{border-width:5px 5px 5px 0;left:-5px;margin-top:-5px}.gs-group.gs-large a+.gs-counter:before{border-width:7px 7px 7px 0;left:-7px;margin-top:-7px}.gs-group.gs-large a+.gs-counter:after{border-width:6px 6px 6px 0;left:-6px;margin-top:-6px}.gs-group.gs-template1.gs-small a{padding:2px 4px 1px}.gs-group.gs-template1.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template1.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template1.gs-small a i,.gs-group.gs-template1.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template1.gs-medium a{padding:4px 4px 1px}.gs-group.gs-template1.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template1.gs-medium a i{background-size:auto 18px;width:18px;height:18px;margin-bottom:-1px}.gs-group.gs-template1.gs-medium a i,.gs-group.gs-template1.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template1.gs-large a{padding:4px 4px 3px}.gs-group.gs-template1.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template1.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template1.gs-large a i,.gs-group.gs-template1.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template1.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template1.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template1.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template1.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template1.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template1.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template1.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template1.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template1.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template1.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template1.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template1.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template1 a{color:#fff;border-radius:4px}.gs-group.gs-template1 a+.gs-counter{border:2px solid transparent;border-radius:4px;margin:0 10px 0 2px !important}.gs-group.gs-template1 a.fb{background:#3B5998}.gs-group.gs-template1 a.fb+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.fb+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.fb:hover,.gs-group.gs-template1 a.fb:focus{background:#344e86}.gs-group.gs-template1 a.tw{background:#00ACED}.gs-group.gs-template1 a.tw+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.tw+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.tw:hover,.gs-group.gs-template1 a.tw:focus{background:#0099d3}.gs-group.gs-template1 a.pn{background:#CC2127}.gs-group.gs-template1 a.pn+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.pn+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.pn:hover,.gs-group.gs-template1 a.pn:focus{background:#b61d23}.gs-group.gs-template1 a.gp{background:#CC3732}.gs-group.gs-template1 a.gp+.gs-counter{color:#999;background:#ddd}.gs-group.gs-template1 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template1 a.gp+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template1 a.gp:hover,.gs-group.gs-template1 a.gp:focus{background:#b8312d}.gs-group.gs-template2.gs-small a{padding:1px 4px}.gs-group.gs-template2.gs-small a+.gs-counter{min-width:20px;padding:4px 4px 3px}.gs-group.gs-template2.gs-small a i{background-size:auto 12px;width:12px;height:12px;margin-bottom:-1px;position:relative;z-index:1}.gs-group.gs-template2.gs-small a i,.gs-group.gs-template2.gs-small a+.gs-counter{font-size:11px;font-weight:bold}.gs-group.gs-template2.gs-medium a{padding:5px 5px 1px}.gs-group.gs-template2.gs-medium a+.gs-counter{min-width:26px;padding:5px 6px 6px}.gs-group.gs-template2.gs-medium a i{background-size:auto 16px;width:16px;height:16px;position:relative;z-index:1}.gs-group.gs-template2.gs-medium a i,.gs-group.gs-template2.gs-medium a+.gs-counter{font-size:13px;font-weight:bold}.gs-group.gs-template2.gs-large a{padding:5px 5px 1px}.gs-group.gs-template2.gs-large a+.gs-counter{min-width:32px;padding:8px}.gs-group.gs-template2.gs-large a i{background-size:auto 22px;width:22px;height:22px;position:relative;z-index:1}.gs-group.gs-template2.gs-large a i,.gs-group.gs-template2.gs-large a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template2.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template2.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template2.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template2.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template2.gs-medium a.fb i{background-position:-16px 0}.gs-group.gs-template2.gs-medium a.tw i{background-position:-48px 0}.gs-group.gs-template2.gs-medium a.pn i{background-position:-80px 0}.gs-group.gs-template2.gs-medium a.gp i{background-position:-112px 0}.gs-group.gs-template2.gs-large a.fb i{background-position:-22px 0}.gs-group.gs-template2.gs-large a.tw i{background-position:-66px 0}.gs-group.gs-template2.gs-large a.pn i{background-position:-110px 0}.gs-group.gs-template2.gs-large a.gp i{background-position:-154px 0}.gs-group.gs-template2>div{margin-right:5px;border-radius:100px;overflow:hidden}.gs-group.gs-template2 a{color:#fff;margin-right:0}.gs-group.gs-template2 a+.gs-counter{border:0 solid transparent;border-radius:100px;margin:0 !important;pointer-events:none}.gs-group.gs-template2 a.fb{background:#3B5998}.gs-group.gs-template2 a.fb+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #3B5998}.gs-group.gs-template2 a.fb+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.fb:hover,.gs-group.gs-template2 a.fb:focus{background:#344e86}.gs-group.gs-template2 a.tw{background:#00ACED}.gs-group.gs-template2 a.tw+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #00ACED}.gs-group.gs-template2 a.tw+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.tw:hover,.gs-group.gs-template2 a.tw:focus{background:#0099d3}.gs-group.gs-template2 a.pn{background:#CC2127}.gs-group.gs-template2 a.pn+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #CC2127}.gs-group.gs-template2 a.pn+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.pn:hover,.gs-group.gs-template2 a.pn:focus{background:#b61d23}.gs-group.gs-template2 a.gp{background:#CC3732}.gs-group.gs-template2 a.gp+.gs-counter{color:#666;background:#ddd;box-shadow:-20px 0 0 10px #CC3732}.gs-group.gs-template2 a.gp+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template2 a.gp:hover,.gs-group.gs-template2 a.gp:focus{background:#b8312d}.gs-group.gs-template3.gs-small a{padding:2px 30px 0 3px}.gs-group.gs-template3.gs-small a+.gs-counter{min-width:20px;padding:1px 0 1px 1px}.gs-group.gs-template3.gs-small a i{background-size:auto 13px;width:13px;height:13px}.gs-group.gs-template3.gs-small a i,.gs-group.gs-template3.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template3.gs-medium a{padding:4px 3px 2px}.gs-group.gs-template3.gs-medium a+.gs-counter{min-width:26px;padding:2px 2px 1px}.gs-group.gs-template3.gs-medium a i{background-size:auto 18px;width:18px;height:18px;margin-bottom:-2px}.gs-group.gs-template3.gs-medium a i,.gs-group.gs-template3.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template3.gs-large a{padding:5px 4px 1px}.gs-group.gs-template3.gs-large a+.gs-counter{min-width:32px;padding:5px}.gs-group.gs-template3.gs-large a i{background-size:auto 22px;width:22px;height:22px}.gs-group.gs-template3.gs-large a i,.gs-group.gs-template3.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template3.gs-small a.fb i{background-position:-13px 0}.gs-group.gs-template3.gs-small a.tw i{background-position:-39px 0}.gs-group.gs-template3.gs-small a.pn i{background-position:-65px 0}.gs-group.gs-template3.gs-small a.gp i{background-position:-91px 0}.gs-group.gs-template3.gs-small>div{min-width:20px;height:20px;padding:0 2px 0 18px}.gs-group.gs-template3.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template3.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template3.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template3.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template3.gs-medium>div{min-width:26px;height:26px;padding:0 2px 0 24px}.gs-group.gs-template3.gs-large a.fb i{background-position:-22px 0}.gs-group.gs-template3.gs-large a.tw i{background-position:-66px 0}.gs-group.gs-template3.gs-large a.pn i{background-position:-110px 0}.gs-group.gs-template3.gs-large a.gp i{background-position:-154px 0}.gs-group.gs-template3.gs-large>div{min-width:32px;height:32px;padding:0 2px 0 30px}.gs-group.gs-template3>div{margin-right:5px;position:relative;overflow:hidden}.gs-group.gs-template3 a{width:100%;color:#fff;text-align:left;margin-right:0;position:absolute;top:0;left:0}.gs-group.gs-template3 a+.gs-counter{border:2px solid transparent;margin:0 !important;pointer-events:none}.gs-group.gs-template3 a.fb{background:#3B5998;background:-moz-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #3B5998), color-stop(100%, #5476bd));background:-webkit-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-o-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:-ms-linear-gradient(top, #3B5998 0%, #5476bd 100%);background:linear-gradient(to bottom, #3B5998 0%, #5476bd 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.fb+.gs-counter{color:#fff}.gs-group.gs-template3 a.fb+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.fb:hover,.gs-group.gs-template3 a.fb:focus{background:#2d4373}.gs-group.gs-template3 a.tw{background:#00ACED;background:-moz-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #00ACED), color-stop(100%, #2bc5ff));background:-webkit-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-o-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:-ms-linear-gradient(top, #00ACED 0%, #2bc5ff 100%);background:linear-gradient(to bottom, #00ACED 0%, #2bc5ff 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.tw+.gs-counter{color:#fff}.gs-group.gs-template3 a.tw+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.tw:hover,.gs-group.gs-template3 a.tw:focus{background:#0087ba}.gs-group.gs-template3 a.pn{background:#CC2127;background:-moz-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #CC2127), color-stop(100%, #e2494e));background:-webkit-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-o-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:-ms-linear-gradient(top, #CC2127 0%, #e2494e 100%);background:linear-gradient(to bottom, #CC2127 0%, #e2494e 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.pn+.gs-counter{color:#fff}.gs-group.gs-template3 a.pn+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.pn:hover,.gs-group.gs-template3 a.pn:focus{background:#a01a1f}.gs-group.gs-template3 a.gp{background:#CC3732;background:-moz-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #CC3732), color-stop(100%, #d96663));background:-webkit-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-o-linear-gradient(top, #CC3732 0%, #d96663 100%);background:-ms-linear-gradient(top, #CC3732 0%, #d96663 100%);background:linear-gradient(to bottom, #CC3732 0%, #d96663 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='$gradient-bottom', endColorstr='$gradient-top',GradientType=0 )}.gs-group.gs-template3 a.gp+.gs-counter{color:#fff}.gs-group.gs-template3 a.gp+.gs-counter:before{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template3 a.gp:hover,.gs-group.gs-template3 a.gp:focus{background:#a32c28}.gs-group.gs-template4.gs-small a{padding:2px 4px 0px}.gs-group.gs-template4.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template4.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template4.gs-small a i,.gs-group.gs-template4.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template4.gs-medium a{padding:4px 4px 0}.gs-group.gs-template4.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template4.gs-medium a i{background-size:auto 18px;width:18px;height:18px}.gs-group.gs-template4.gs-medium a i,.gs-group.gs-template4.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template4.gs-large a{padding:4px 4px 3px}.gs-group.gs-template4.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template4.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template4.gs-large a i,.gs-group.gs-template4.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template4.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template4.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template4.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template4.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template4.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template4.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template4.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template4.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template4.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template4.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template4.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template4.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template4 a{color:#fff;background:#aaa}.gs-group.gs-template4 a+.gs-counter{border:2px solid transparent;margin:0 10px 0 2px !important}.gs-group.gs-template4 a.fb+.gs-counter{color:#999}.gs-group.gs-template4 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.fb+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.fb:hover,.gs-group.gs-template4 a.fb:focus{background:#344e86}.gs-group.gs-template4 a.tw+.gs-counter{color:#999}.gs-group.gs-template4 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.tw+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.tw:hover,.gs-group.gs-template4 a.tw:focus{background:#0099d3}.gs-group.gs-template4 a.pn+.gs-counter{color:#999}.gs-group.gs-template4 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.pn+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.pn:hover,.gs-group.gs-template4 a.pn:focus{background:#b61d23}.gs-group.gs-template4 a.gp+.gs-counter{color:#999}.gs-group.gs-template4 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template4 a.gp+.gs-counter:before{border-color:transparent #e3e3e3 transparent transparent}.gs-group.gs-template4 a.gp:hover,.gs-group.gs-template4 a.gp:focus{background:#b8312d}.gs-group.gs-template5.gs-small a{padding:2px 4px 0px}.gs-group.gs-template5.gs-small a+.gs-counter{min-width:20px;padding:1px}.gs-group.gs-template5.gs-small a i{background-size:auto 12px;width:12px;height:12px}.gs-group.gs-template5.gs-small a i,.gs-group.gs-template5.gs-small a+.gs-counter{font-size:12px;font-weight:bold}.gs-group.gs-template5.gs-medium a{padding:4px 4px 0}.gs-group.gs-template5.gs-medium a+.gs-counter{min-width:26px;padding:3px}.gs-group.gs-template5.gs-medium a i{background-size:auto 18px;width:18px;height:18px}.gs-group.gs-template5.gs-medium a i,.gs-group.gs-template5.gs-medium a+.gs-counter{font-size:14px;font-weight:bold}.gs-group.gs-template5.gs-large a{padding:4px 4px 3px}.gs-group.gs-template5.gs-large a+.gs-counter{min-width:32px;padding:6px 5px 4px}.gs-group.gs-template5.gs-large a i{background-size:auto 24px;width:24px;height:24px;margin-bottom:-3px}.gs-group.gs-template5.gs-large a i,.gs-group.gs-template5.gs-large a+.gs-counter{font-size:16px;font-weight:bold}.gs-group.gs-template5.gs-small a.fb i{background-position:-12px 0}.gs-group.gs-template5.gs-small a.tw i{background-position:-36px 0}.gs-group.gs-template5.gs-small a.pn i{background-position:-60px 0}.gs-group.gs-template5.gs-small a.gp i{background-position:-84px 0}.gs-group.gs-template5.gs-medium a.fb i{background-position:-18px 0}.gs-group.gs-template5.gs-medium a.tw i{background-position:-54px 0}.gs-group.gs-template5.gs-medium a.pn i{background-position:-90px 0}.gs-group.gs-template5.gs-medium a.gp i{background-position:-126px 0}.gs-group.gs-template5.gs-large a.fb i{background-position:-24px 0}.gs-group.gs-template5.gs-large a.tw i{background-position:-72px 0}.gs-group.gs-template5.gs-large a.pn i{background-position:-120px 0}.gs-group.gs-template5.gs-large a.gp i{background-position:-168px 0}.gs-group.gs-template5 a{color:#fff;background:#000}.gs-group.gs-template5 a+.gs-counter{border:2px solid transparent;margin:0 10px 0 2px !important}.gs-group.gs-template5 a.fb+.gs-counter{color:#999}.gs-group.gs-template5 a.fb+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.fb+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.fb:hover,.gs-group.gs-template5 a.fb:focus{background:#344e86}.gs-group.gs-template5 a.tw+.gs-counter{color:#999}.gs-group.gs-template5 a.tw+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.tw+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.tw:hover,.gs-group.gs-template5 a.tw:focus{background:#0099d3}.gs-group.gs-template5 a.pn+.gs-counter{color:#999}.gs-group.gs-template5 a.pn+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.pn+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.pn:hover,.gs-group.gs-template5 a.pn:focus{background:#b61d23}.gs-group.gs-template5 a.gp+.gs-counter{color:#999}.gs-group.gs-template5 a.gp+.gs-counter:after{border-color:transparent transparent transparent transparent}.gs-group.gs-template5 a.gp+.gs-counter:before{border-color:transparent #ddd transparent transparent}.gs-group.gs-template5 a.gp:hover,.gs-group.gs-template5 a.gp:focus{background:#b8312d}
|
|
images/bottom.png
DELETED
Binary file
|
images/custom-actions.png
ADDED
Binary file
|
images/custom-expressions.png
DELETED
Binary file
|
images/done.png
DELETED
Binary file
|
images/floating-bar.png
CHANGED
Binary file
|
images/mobile-bar.png
ADDED
Binary file
|
images/native-bar.png
ADDED
Binary file
|
images/off.png
DELETED
Binary file
|
images/sharing-bar.png
ADDED
Binary file
|
images/social-bar.png
DELETED
Binary file
|
images/top.png
DELETED
Binary file
|
init.php
CHANGED
@@ -1,16 +1,5 @@
|
|
1 |
-
<? include('tmpl/header.php'); ?>
|
2 |
-
<? include('tmpl/alerts.php'); ?>
|
3 |
-
|
4 |
-
<!-- Google Tag Manager -->
|
5 |
-
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WJ2VJ3"
|
6 |
-
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
7 |
-
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
8 |
-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
9 |
-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
10 |
-
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
11 |
-
})(window,document,'script','dataLayer','GTM-WJ2VJ3');</script>
|
12 |
-
<!-- End Google Tag Manager -->
|
13 |
-
|
14 |
|
15 |
<div class="wrap">
|
16 |
<?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] == true): ?>
|
@@ -24,20 +13,21 @@
|
|
24 |
|
25 |
<div id="steps" class="form-content">
|
26 |
<div class="step">
|
27 |
-
<h1>
|
28 |
-
<p>
|
29 |
|
30 |
<div class="info gs-clearfix">
|
31 |
<dl class="gs-clearfix">
|
32 |
<dt>URL</dt>
|
33 |
-
<dd
|
34 |
<dt>Email</dt>
|
35 |
-
<dd
|
|
|
36 |
</dl>
|
37 |
|
38 |
<p class="create-account">
|
39 |
-
<a href="<?php echo $GS->
|
40 |
-
|
41 |
</a>
|
42 |
</p>
|
43 |
|
@@ -60,9 +50,6 @@
|
|
60 |
</div>
|
61 |
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
</div>
|
67 |
|
68 |
</div>
|
@@ -77,7 +64,13 @@
|
|
77 |
|
78 |
<?php else: ?>
|
79 |
|
80 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
<?php endif; ?>
|
83 |
<?php endif; ?>
|
1 |
+
<?php include('tmpl/header.php'); ?>
|
2 |
+
<?php include('tmpl/alerts.php'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
<div class="wrap">
|
5 |
<?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] == true): ?>
|
13 |
|
14 |
<div id="steps" class="form-content">
|
15 |
<div class="step">
|
16 |
+
<h1>Welcome and thanks for downloading GetSocial’s Share Buttons with Analytics.</h1>
|
17 |
+
<p>To get started click on the button below to automatically create a GetSocial account.</strong></p>
|
18 |
|
19 |
<div class="info gs-clearfix">
|
20 |
<dl class="gs-clearfix">
|
21 |
<dt>URL</dt>
|
22 |
+
<dd><?php echo get_option('siteurl') ?></dd>
|
23 |
<dt>Email</dt>
|
24 |
+
<dd><?php echo get_option('admin_email') ?></dd>
|
25 |
+
|
26 |
</dl>
|
27 |
|
28 |
<p class="create-account">
|
29 |
+
<a href="<?php echo $GS->gs_account() ?>/api/v1/sites/create?source=wordpress&email=<?php echo get_option('admin_email') ?>&url=<?php echo get_option('siteurl') ?>" class="button button-primary create-gs-account">
|
30 |
+
Create Account
|
31 |
</a>
|
32 |
</p>
|
33 |
|
50 |
</div>
|
51 |
|
52 |
|
|
|
|
|
|
|
53 |
</div>
|
54 |
|
55 |
</div>
|
64 |
|
65 |
<?php else: ?>
|
66 |
|
67 |
+
<?php if( isset($_GET['update']) || isset($_GET['delete']) ): ?>
|
68 |
+
<div class="notification-bar green-cta" id="success-message">
|
69 |
+
<p>App <?= isset($_GET['update']) ? 'updated' : 'deactivated' ?> with success</p>
|
70 |
+
</div>
|
71 |
+
<?php endif; ?>
|
72 |
+
|
73 |
+
<?php include('tmpl/apps/'.$_GET['tab'].'.php') ?>
|
74 |
|
75 |
<?php endif; ?>
|
76 |
<?php endif; ?>
|
js/builder.js
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
var groupBuilder = {
|
2 |
-
|
3 |
-
updateCode: function(options){
|
4 |
-
var code_template = '<div class="gs-group"\n \t\tdata-template="TEMPLATE:SIZE"\n \t\tdata-networks="NETWORKS"\n \t\tdata-counter="COUNTER"\n \t\tdata-url="[URL_TO_SHARE]"></div>';
|
5 |
-
|
6 |
-
code_template = code_template.replace('TEMPLATE', options.template);
|
7 |
-
code_template = code_template.replace('NETWORKS', options.networks);
|
8 |
-
code_template = code_template.replace('SIZE', options.size);
|
9 |
-
code_template = code_template.replace('COUNTER', options.counter);
|
10 |
-
|
11 |
-
// jQuery('#gs-group-code').html(code_template);
|
12 |
-
},
|
13 |
-
|
14 |
-
updatePreview: function(options){
|
15 |
-
var template = options.template,
|
16 |
-
size = options.size,
|
17 |
-
networks = options.networks,
|
18 |
-
has_counter = options.counter,
|
19 |
-
has_counter = has_counter == '' || has_counter == 'false' ? 0 : 1,
|
20 |
-
$elem = jQuery('#reaction-preview .gs-group');
|
21 |
-
|
22 |
-
$elem.html('');
|
23 |
-
|
24 |
-
if($elem.attr('class').match(/gs-template\d/) != null) {
|
25 |
-
template_to_remove = $elem.attr('class').match(/gs-template\d/)[0]
|
26 |
-
$elem.removeClass(template_to_remove);
|
27 |
-
}
|
28 |
-
|
29 |
-
$elem.addClass(template);
|
30 |
-
$elem.removeClass('gs-small gs-medium gs-large').addClass(size);
|
31 |
-
|
32 |
-
jQuery.each(networks.split(','), function(i,netw){
|
33 |
-
if(netw == ''){ return; }
|
34 |
-
|
35 |
-
providers = {
|
36 |
-
'fb': ['facebook', 'share', false],
|
37 |
-
'tw': ['twitter', 'tweet', true],
|
38 |
-
'pn': ['pinterest', 'pin', true],
|
39 |
-
'gp': ['google-plus', 'share', true]
|
40 |
-
}
|
41 |
-
|
42 |
-
d = document.createElement('div');
|
43 |
-
b = document.createElement('a');
|
44 |
-
i = document.createElement('i');
|
45 |
-
|
46 |
-
pre_tracking = providers[netw][2];
|
47 |
-
provider = providers[netw][0];
|
48 |
-
paction = providers[netw][1];
|
49 |
-
|
50 |
-
b.setAttribute('class', netw+' gs-tracking '+'gs-'+provider+'-'+paction+' '+(pre_tracking ? '' : 'gs-post-tracking'));
|
51 |
-
b.setAttribute('data-provider', provider);
|
52 |
-
b.setAttribute('data-action', paction);
|
53 |
-
b.setAttribute('href', '#');
|
54 |
-
|
55 |
-
b.innerHTML = i.outerHTML+'<span>'+provider+'</span>';
|
56 |
-
|
57 |
-
d.innerHTML = b.outerHTML;
|
58 |
-
|
59 |
-
if(has_counter){
|
60 |
-
counter = document.createElement('span');
|
61 |
-
counter.setAttribute('class', 'gs-counter');
|
62 |
-
counter.innerHTML = parseInt(Math.random()*100);
|
63 |
-
|
64 |
-
d.innerHTML += counter.outerHTML;
|
65 |
-
}
|
66 |
-
|
67 |
-
$elem.append(d);
|
68 |
-
});
|
69 |
-
|
70 |
-
},
|
71 |
-
|
72 |
-
refresh: function(){
|
73 |
-
// var $form = jQuery('#group-builder'),
|
74 |
-
options = {
|
75 |
-
template: jQuery('#group_template').val(),
|
76 |
-
networks: jQuery.map(jQuery('.group-network'), function(val, i){
|
77 |
-
if(jQuery(val).is(':checked')){
|
78 |
-
return jQuery(val).attr('rel');
|
79 |
-
}
|
80 |
-
}).join(','),
|
81 |
-
size: jQuery('#group_size').val(),
|
82 |
-
counter: jQuery('input.has_counter:checked').val() == 'Y' ? 'true' : 'false'
|
83 |
-
};
|
84 |
-
|
85 |
-
this.updatePreview(options);
|
86 |
-
this.updateCode(options);
|
87 |
-
}
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
jQuery(function(){
|
92 |
-
$group_builder = jQuery('#social-bar');
|
93 |
-
if($group_builder.size() > 0){
|
94 |
-
|
95 |
-
groupBuilder.refresh();
|
96 |
-
|
97 |
-
jQuery('#social-bar input, #social-bar select').on('change', function(){
|
98 |
-
groupBuilder.refresh();
|
99 |
-
})
|
100 |
-
|
101 |
-
jQuery('input.ntw').on('change', function(event){
|
102 |
-
groupBuilder.refresh();
|
103 |
-
});
|
104 |
-
}
|
105 |
-
|
106 |
-
|
107 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/plugin.js
CHANGED
@@ -1,3 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
jQuery(function($) {
|
2 |
jQuery('#api-key-form').submit(function() {
|
3 |
var data = jQuery(this).serialize();
|
@@ -7,7 +46,7 @@ jQuery(function($) {
|
|
7 |
jQuery.post( 'options.php', data).success( function(response){
|
8 |
jQuery('.notification-bar.success').show();
|
9 |
|
10 |
-
setTimeout('window.location
|
11 |
});
|
12 |
return false;
|
13 |
});
|
@@ -37,4 +76,10 @@ jQuery(function($) {
|
|
37 |
|
38 |
})
|
39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
});
|
1 |
+
function resizeIframe(obj) {
|
2 |
+
// obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
3 |
+
}
|
4 |
+
|
5 |
+
|
6 |
+
function forceUpdate(event){
|
7 |
+
var data = {
|
8 |
+
'action': 'gs_update'
|
9 |
+
};
|
10 |
+
|
11 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
12 |
+
jQuery.post(ajaxurl, data, function(response) { });
|
13 |
+
}
|
14 |
+
|
15 |
+
var getsocial_window;
|
16 |
+
|
17 |
+
function checkForUpdate(){
|
18 |
+
getsocial_window.postMessage("needs update?", "*");
|
19 |
+
}
|
20 |
+
|
21 |
+
jQuery('.getsocial-tab').on('click', function(e){
|
22 |
+
e.preventDefault();
|
23 |
+
$this = jQuery(this);
|
24 |
+
|
25 |
+
getsocial_window = window.open($this.attr('href'));
|
26 |
+
|
27 |
+
setInterval('checkForUpdate()', 1000);
|
28 |
+
})
|
29 |
+
|
30 |
+
function handleMessage(event){
|
31 |
+
|
32 |
+
currEvent = event.data;
|
33 |
+
|
34 |
+
switch (currEvent) {
|
35 |
+
case 'publish':
|
36 |
+
forceUpdate(currEvent);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
jQuery(function($) {
|
41 |
jQuery('#api-key-form').submit(function() {
|
42 |
var data = jQuery(this).serialize();
|
46 |
jQuery.post( 'options.php', data).success( function(response){
|
47 |
jQuery('.notification-bar.success').show();
|
48 |
|
49 |
+
setTimeout('window.location.reload();', 3000);
|
50 |
});
|
51 |
return false;
|
52 |
});
|
76 |
|
77 |
})
|
78 |
}
|
79 |
+
|
80 |
+
if (!window.addEventListener) {
|
81 |
+
window.attachEvent('onmessage', handleMessage);
|
82 |
+
} else {
|
83 |
+
window.addEventListener('message', handleMessage);
|
84 |
+
}
|
85 |
});
|
lib/gs.php
CHANGED
@@ -4,18 +4,17 @@ class GS {
|
|
4 |
private $gs_url = "http://api.at.getsocial.io";
|
5 |
private $gs_account = "http://getsocial.io/";
|
6 |
private $api_url = "http://getsocial.io/api/v1/";
|
7 |
-
|
8 |
// private $gs_url = "//localhost:3001";
|
9 |
// private $gs_account = "http://localhost:3000/";
|
10 |
// private $api_url = "http://localhost:3000/api/v1/";
|
11 |
|
12 |
-
function __construct($api_key, $identifier, $
|
13 |
$this->api_key = $api_key;
|
14 |
$this->identifier = $identifier;
|
15 |
-
$this->elements = $elements;
|
16 |
$this->lang = $lang == null ? 'en' : $lang;
|
17 |
}
|
18 |
|
|
|
19 |
private function api($path) {
|
20 |
try {
|
21 |
$r = wp_remote_get($this->api_url.$path, array());
|
@@ -38,14 +37,6 @@ class GS {
|
|
38 |
return $this->api_url.$path;
|
39 |
}
|
40 |
|
41 |
-
function getElements(){
|
42 |
-
return json_decode($this->elements,true);
|
43 |
-
}
|
44 |
-
|
45 |
-
function hasElements(){
|
46 |
-
return count($this->getElements()) > 0;
|
47 |
-
}
|
48 |
-
|
49 |
function getSite(){
|
50 |
if($this->api_key != ''):
|
51 |
return $this->api('sites/'.$this->api_key);
|
@@ -58,31 +49,34 @@ class GS {
|
|
58 |
$site = $this->getSite();
|
59 |
if($site != null):
|
60 |
$this->save($site);
|
61 |
-
update_option('gs-needs-update', 0);
|
62 |
endif;
|
63 |
}
|
64 |
|
65 |
function save($site_info){
|
66 |
update_option('gs-identifier', $site_info->identifier);
|
67 |
-
update_option('gs-
|
|
|
68 |
}
|
69 |
|
70 |
-
function
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
function getLib(){
|
@@ -100,92 +94,19 @@ EOF;
|
|
100 |
return $code;
|
101 |
}
|
102 |
|
103 |
-
function getButton($identifier, $action){
|
104 |
-
global $post;
|
105 |
-
|
106 |
-
$permalink = esc_url( get_permalink() );
|
107 |
-
$title = esc_html( get_the_title() );
|
108 |
-
$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
|
109 |
-
|
110 |
-
$code = <<<EOF
|
111 |
-
<div class="getsocial gs-expression gs-$identifier"
|
112 |
-
data-action="$action"
|
113 |
-
data-identifier="$identifier"
|
114 |
-
data-url="$permalink"
|
115 |
-
data-image="$image"
|
116 |
-
data-title="$title">
|
117 |
-
</div>
|
118 |
-
EOF;
|
119 |
-
return $code;
|
120 |
-
}
|
121 |
-
|
122 |
-
function getGroup(){
|
123 |
-
$permalink = esc_url( get_permalink() );
|
124 |
-
$template = get_option('gs-group-template');
|
125 |
-
$size = get_option('gs-group-size');
|
126 |
-
$counter = get_option('gs-group-counter') == 'Y' ? 'true' : 'false';
|
127 |
-
$position = get_option('gs-group-position');
|
128 |
-
|
129 |
-
$ntw_fb = get_option('gs-group-network-fb');
|
130 |
-
$ntw_tw = get_option('gs-group-network-tw');
|
131 |
-
$ntw_pn = get_option('gs-group-network-pn');
|
132 |
-
$ntw_gp = get_option('gs-group-network-gp');
|
133 |
-
|
134 |
-
$networks = '';
|
135 |
-
$networks_available = array('fb', 'tw', 'pn', 'gp');
|
136 |
-
foreach($networks_available as $nw):
|
137 |
-
if(get_option('gs-group-network-'.$nw) == 'Y'):
|
138 |
-
$networks .= ( $networks == '' ? $nw : ','.$nw);
|
139 |
-
endif;
|
140 |
-
endforeach;
|
141 |
-
|
142 |
-
$code = <<<EOF
|
143 |
-
<div class="gs-group"
|
144 |
-
data-template="$template:$size"
|
145 |
-
data-networks="$networks"
|
146 |
-
data-counter="$counter"
|
147 |
-
data-url="$permalink"></div>
|
148 |
-
EOF;
|
149 |
-
|
150 |
-
return $code;
|
151 |
-
|
152 |
-
}
|
153 |
-
|
154 |
-
function getFloatingBar(){
|
155 |
-
$permalink = esc_url( get_permalink() );
|
156 |
-
$template = get_option('gs-floating-template');
|
157 |
-
$size = get_option('gs-floating-size');
|
158 |
-
$counter = get_option('gs-floating-counter') == 'Y' ? 'true' : 'false';
|
159 |
-
$position = get_option('gs-floating-position');
|
160 |
-
$floating = ($position == '1' ? 'right' : 'left');
|
161 |
-
|
162 |
-
$ntw_fb = get_option('gs-floating-network-fb');
|
163 |
-
$ntw_tw = get_option('gs-floating-network-tw');
|
164 |
-
$ntw_pn = get_option('gs-floating-network-pn');
|
165 |
-
$ntw_gp = get_option('gs-floating-network-gp');
|
166 |
-
|
167 |
-
$networks = '';
|
168 |
-
$networks_available = array('fb', 'tw', 'pn', 'gp');
|
169 |
-
foreach($networks_available as $nw):
|
170 |
-
if(get_option('gs-floating-network-'.$nw) == 'Y'):
|
171 |
-
$networks .= ( $networks == '' ? $nw : ','.$nw);
|
172 |
-
endif;
|
173 |
-
endforeach;
|
174 |
-
|
175 |
-
$code = <<<EOF
|
176 |
-
<div class="gs-group"
|
177 |
-
data-template="$template:$size"
|
178 |
-
data-networks="$networks"
|
179 |
-
data-counter="$counter"
|
180 |
-
data-floating="$floating"
|
181 |
-
data-url="$permalink"></div>
|
182 |
-
EOF;
|
183 |
-
|
184 |
-
return $code;
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
-
function
|
189 |
return $this->gs_account;
|
190 |
}
|
191 |
|
4 |
private $gs_url = "http://api.at.getsocial.io";
|
5 |
private $gs_account = "http://getsocial.io/";
|
6 |
private $api_url = "http://getsocial.io/api/v1/";
|
|
|
7 |
// private $gs_url = "//localhost:3001";
|
8 |
// private $gs_account = "http://localhost:3000/";
|
9 |
// private $api_url = "http://localhost:3000/api/v1/";
|
10 |
|
11 |
+
function __construct($api_key, $identifier, $lang){
|
12 |
$this->api_key = $api_key;
|
13 |
$this->identifier = $identifier;
|
|
|
14 |
$this->lang = $lang == null ? 'en' : $lang;
|
15 |
}
|
16 |
|
17 |
+
|
18 |
private function api($path) {
|
19 |
try {
|
20 |
$r = wp_remote_get($this->api_url.$path, array());
|
37 |
return $this->api_url.$path;
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
function getSite(){
|
41 |
if($this->api_key != ''):
|
42 |
return $this->api('sites/'.$this->api_key);
|
49 |
$site = $this->getSite();
|
50 |
if($site != null):
|
51 |
$this->save($site);
|
|
|
52 |
endif;
|
53 |
}
|
54 |
|
55 |
function save($site_info){
|
56 |
update_option('gs-identifier', $site_info->identifier);
|
57 |
+
update_option('gs-pro', $site_info->pro);
|
58 |
+
update_option('gs-apps', json_encode($site_info->gs_apps));
|
59 |
}
|
60 |
|
61 |
+
function apps($app_name){
|
62 |
+
$apps = json_decode(get_option('gs-apps'), true);
|
63 |
+
|
64 |
+
return (array_key_exists($app_name, $apps) ? $apps[$app_name] : false);
|
65 |
+
}
|
66 |
+
|
67 |
+
function is_pro(){
|
68 |
+
return get_option('gs-pro');
|
69 |
+
}
|
70 |
+
|
71 |
+
function is_active($app_name){
|
72 |
+
$app = $this->apps($app_name);
|
73 |
+
|
74 |
+
return (!empty($app) ? $app['active'] : false);
|
75 |
+
}
|
76 |
+
|
77 |
+
function prop($app_name, $prop){
|
78 |
+
$app = $this->apps($app_name);
|
79 |
+
return $app[$prop];
|
80 |
}
|
81 |
|
82 |
function getLib(){
|
94 |
return $code;
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
+
function getCode($app_name){
|
99 |
+
switch ($app_name) {
|
100 |
+
case 'sharing_bar':
|
101 |
+
return '<div class="getsocial gs-inline-group"></div>';
|
102 |
+
case 'native_bar':
|
103 |
+
return '<div class="getsocial gs-native-bar"></div>';
|
104 |
+
case 'custom_actions':
|
105 |
+
return '<div class="getsocial gs-custom-actions"></div>';
|
106 |
+
}
|
107 |
}
|
108 |
|
109 |
+
function gs_account(){
|
110 |
return $this->gs_account;
|
111 |
}
|
112 |
|
readme.txt
CHANGED
@@ -1,86 +1,97 @@
|
|
1 |
-
===
|
2 |
Contributors: GetSocial.io
|
3 |
Donate link:
|
4 |
-
Tags:
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
-
==
|
14 |
-
*GetSocial's* **Social Sharing Buttons & Analytics** is a free WordPress plugin that enables social sharing on your site. These buttons not only allow your visitors to share your content, but they also track your users' actions such as how many shares have been made, how those shares are generating traffic to your site, and how that traffic is converting into more sales or subscriptions.
|
15 |
-
|
16 |
-
<h4>For more information check out <a href="http://getsocial.io/why-getsocial">Why GetSocial</a></h4>
|
17 |
|
18 |
-
|
|
|
19 |
|
|
|
20 |
|
21 |
-
|
22 |
|
|
|
23 |
|
24 |
-
|
25 |
-
* **Social Sharing Bar**: Define which social networks you want your users to share your content and start understanding their behavior.
|
26 |
-
* **Classic Share Buttons**: Upgrade your existing social buttons with a simple snippet that will help you identify your traffic.
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
35 |
|
|
|
36 |
|
37 |
-
|
|
|
|
|
38 |
|
|
|
39 |
|
40 |
-
|
41 |
-
* **Influencers**: See who is your most influential user and how many leads and conversions they generate for your page.
|
42 |
-
* **Conversions**: Identify which users, products, and sharing buttons are most effective for increasing conversions through social sharing.
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
48 |
-
3. Access GetSocial on the left navigation column
|
49 |
-
4. Create a GetSocial account or login into your existing account.
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
54 |
|
55 |
-
== Frequently Asked Questions ==
|
56 |
-
|
57 |
-
<h4> What is a custom action? </h4>
|
58 |
A custom action is a button placed in your website that, when clicked, will create and post contextualized Facebook stories in your users' timelines.
|
59 |
|
60 |
-
|
|
|
61 |
You'll have access to data regarding users, visits, shares and items (this can be products, news articles, blog posts, etc). You can even download the whole data set generated by GetSocial.
|
62 |
|
63 |
-
|
|
|
64 |
Our influence analysis allows our clients to understand how their website is being impacted per user, per item, or per share. This means that it's simple to know, for instance, which user brought more new users into your website, which item brought in more page views or which share type generated more unique visitors
|
65 |
|
66 |
-
|
|
|
67 |
Today, Facebook buttons are simply buttons with counters. The data and value you get from them are purely the number of shares. However, you don’t know who’s sharing or how they are interacting with your site. Instead, you just know how many people shared something. GetSocial provides you with not only these buttons, but also the social analytics that will help you understand your users and grow your business.
|
68 |
|
|
|
|
|
69 |
== Screenshots ==
|
70 |
|
71 |
-
1.
|
72 |
-
2.
|
73 |
-
3.
|
74 |
-
4.
|
75 |
-
5.
|
76 |
-
6. Item Data
|
77 |
-
7. Shares Data
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
**1.1.3**
|
82 |
|
83 |
-
- Bug
|
84 |
|
85 |
**1.1.2**
|
86 |
|
1 |
+
=== Share Buttons by GetSocial.io ===
|
2 |
Contributors: GetSocial.io
|
3 |
Donate link:
|
4 |
+
Tags: share buttons, sharing buttons, share button, sharing button, sharing, share links, social buttons, social button, social sharing, social share, ecommerce, social analytics, addthis, sharethis, woocommerce, e-commerce, addtoany, admin, bookmark, bookmarking, bookmarks, button, Facebook, Facebook share, facebook like, google, google plus, google plus one, Like, linkedin, lockerz, pin, pin it, pinit, pinterest, plugin, plus 1, plus one, Post, posts, Reddit, save, seo, sexybookmarks, share, shareaholic, sharedaddy, sharethis, sharing, sidebar, sociable, social, social bookmarking, social bookmarks, statistics, stats, stumbleupon, tumblr, tweet, twitter, social media, widget, Sociable, Social Media Widget ,Really Simple Share ,Social Share Buttons for WordPress ,Slick Social Share Buttons ,Sharebar ,Socialize ,Trackable Social Share Icons ,Facebook Social Plugins ,Tilt Social Share Widget ,Artiss Social Share ,WP Socializer, Hupso Share Buttons for Twitter, Easy Facebook Share Thumbnail, Floating Social Media Links, Social Metrics, Socialize This
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 2.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Share buttons with analytics. Increase traffic, grow referrals and boost your SEO. FREE to use, no code required.
|
12 |
|
13 |
+
== Upgrade Notice ==
|
|
|
|
|
|
|
14 |
|
15 |
+
= 2.0.0 =
|
16 |
+
We have updated our button’s design to make them look even better on your website. If you update the plugin you won’t have access to our old buttons.
|
17 |
|
18 |
+
== Description ==
|
19 |
|
20 |
+
**Share Buttons by GetSocial.io** is a free WordPress plugin that enables you to track social shares on Wordpress. Provide beautiful wordpress sharing buttons, track how many shares were made in each post and see how much traffic and conversions each post generated. Optimize your SEO and social shares with GetSocial.
|
21 |
|
22 |
+
GetSocial.io is the social media app-store for all your needs: from awareness to conversion. You can find more info about our product <a href="http://getsocial.io">here</a>. In this plugin, you'll find the following features:
|
23 |
|
24 |
+
<h4>Social Apps</h4>
|
|
|
|
|
25 |
|
26 |
+
* **Social media bar**: Add our floating social bar and get free social media tracking of the shares made on your website. This social media widget will help your users to do more social shares of your content.
|
27 |
+
* **Dark social media tracking**: Tracking social media in alternative methods such as SMS, Chat or Copy & Paste URL will allow you to effectively measure social media ROI.
|
28 |
+
* **Free Social Media Analytics**: All our social sharing plugins contribute for your undertanding on how social sharing is driving you traffic and conversions. From social share buttons to conversion tracking, your social media monitoring will be available in simple yet comprehensive dashboards.
|
29 |
+
* **Custom Sharing Actions**: Sometimes we need to say more than a simple 'Like'. Here you'll find more than 50 custom stories such as Awesome, Wish or Love.
|
30 |
+
* **Conversion Tracking**: Understand how social sharing is driving your conversions. Analyze results per user, per post or per social network.
|
31 |
+
* **Mobile Web Sharing**: Mobile sharing doesn't have to be a terrible experinece. Create beautiful interfaces for your mobile users to share their thoughts about your content.
|
32 |
|
33 |
+
== Installation ==
|
34 |
|
35 |
+
For an automatic installation through WordPress:
|
36 |
|
37 |
+
1. Go to the "Plugins" menu in your left sidebar, and click "Add New" link.
|
38 |
+
1. Search for 'Share Buttons & Analytics by GetSocial'
|
39 |
+
1. Click 'Install Now' and activate the plugin
|
40 |
+
1. On the left bar a menu item 'GetSocial' will appear.
|
41 |
|
42 |
+
For a manual installation:
|
43 |
|
44 |
+
1. Extract 'WP-Share-Buttons-Analytics-getsocial.zip' into your WordPress plugins folder.
|
45 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
46 |
+
1. On the left bar a menu item "GetSocial" will appear.
|
47 |
|
48 |
+
== Frequently Asked Questions ==
|
49 |
|
50 |
+
**Is GetSocial Free?**
|
|
|
|
|
51 |
|
52 |
+
Yes. Most of our apps are free. You can upgrade to our Pro Plan ($9/month) for enhanced experience, such as mobile web sharing, white-labeling and custom actions.
|
53 |
|
54 |
+
**Why install GetSocial?**
|
|
|
|
|
|
|
55 |
|
56 |
+
We’ve tracked more than 50 million users in thousands of websites. We know that social users rock! On average, they perform 6x more pageviews and 3x more visits than the non-social users. It’s our mission to help you increase the number of social users in your site, thus generating more and highly qualified traffic.
|
57 |
|
58 |
+
**What is a custom action?**
|
59 |
|
|
|
|
|
|
|
60 |
A custom action is a button placed in your website that, when clicked, will create and post contextualized Facebook stories in your users' timelines.
|
61 |
|
62 |
+
**Which data will I get from your analytics?**
|
63 |
+
|
64 |
You'll have access to data regarding users, visits, shares and items (this can be products, news articles, blog posts, etc). You can even download the whole data set generated by GetSocial.
|
65 |
|
66 |
+
**What is social influence analysis?**
|
67 |
+
|
68 |
Our influence analysis allows our clients to understand how their website is being impacted per user, per item, or per share. This means that it's simple to know, for instance, which user brought more new users into your website, which item brought in more page views or which share type generated more unique visitors
|
69 |
|
70 |
+
**Why should I use these buttons instead of the ones provided on Facebook?**
|
71 |
+
|
72 |
Today, Facebook buttons are simply buttons with counters. The data and value you get from them are purely the number of shares. However, you don’t know who’s sharing or how they are interacting with your site. Instead, you just know how many people shared something. GetSocial provides you with not only these buttons, but also the social analytics that will help you understand your users and grow your business.
|
73 |
|
74 |
+
Have more doubts? You can go to <a href="http://feedback.getsocial.io">Getsocial Help Page</a> or <a mailto="support@getsocial.io">contact us</a>. We will try to be as fast as possible.
|
75 |
+
|
76 |
== Screenshots ==
|
77 |
|
78 |
+
1. Our Buttons
|
79 |
+
2. More examples of Buttons
|
80 |
+
3. Social Apps
|
81 |
+
4. Customize Buttons
|
82 |
+
5. Analytics
|
|
|
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
**2.0.0**
|
87 |
+
|
88 |
+
- New Social Apps
|
89 |
+
- Old template removed
|
90 |
+
- New Universal Template
|
91 |
+
|
92 |
**1.1.3**
|
93 |
|
94 |
+
- Bug Fixes
|
95 |
|
96 |
**1.1.2**
|
97 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
DELETED
Binary file
|
screenshot-7.png
DELETED
Binary file
|
tmpl/alerts.php
CHANGED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php if($needs_update == '2'): ?>
|
2 |
-
<div class="notification-bar red-cta">
|
3 |
-
<p>Having some problems getting an answer from Getsocial... Could you try later?</p>
|
4 |
-
</div>
|
5 |
-
<?php elseif($needs_update == '1'): ?>
|
6 |
-
<div class="notification-bar green-cta">
|
7 |
-
<p>Changes have been made to your custom action buttons. Please update your changes here!</p>
|
8 |
-
<a href="<?= $actual_link ?>&refresh=1">Update now!</a>
|
9 |
-
</div>
|
10 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tmpl/apps.php
CHANGED
@@ -1,48 +1,80 @@
|
|
1 |
-
<h2><i class="fa fa-list"></i>Apps</h2>
|
2 |
-
<div class="app-list">
|
3 |
-
<?php
|
4 |
-
$apps = array(
|
5 |
-
'Social bar' => array(
|
6 |
-
'file' => 'social-bar',
|
7 |
-
'active' => (get_option('gs-group-active') == '1'),
|
8 |
-
),
|
9 |
-
'Floating bar' => array(
|
10 |
-
'file' => 'floating-bar',
|
11 |
-
'active' => (get_option('gs-floating-active') == '1'),
|
12 |
-
),
|
13 |
-
// 'native bar' => array(
|
14 |
-
// 'file' => 'native-bar'
|
15 |
-
// ),
|
16 |
-
'Custom Expressions' => array(
|
17 |
-
'file' => 'custom-expressions',
|
18 |
-
'active' => (get_option('gs-custom-expression-active') == '1'),
|
19 |
-
),
|
20 |
-
// 'url tracking' => array(
|
21 |
-
// 'file' => 'url tracking'
|
22 |
-
// ),
|
23 |
-
// 'conversions'=> array(
|
24 |
-
// 'file' => 'conversions'
|
25 |
-
// )
|
26 |
-
);
|
27 |
-
|
28 |
-
foreach($apps as $app => $settings):
|
29 |
-
?>
|
30 |
-
|
31 |
-
<div class="app-wrapper">
|
32 |
-
<div class="app-link">
|
33 |
-
<? if($settings['active']): ?>
|
34 |
-
<div class="app-status done"><i class="fa fa-check"></i></div>
|
35 |
-
<? endif; ?>
|
36 |
-
<div class="title"><? echo $app ?></div>
|
37 |
-
<img src="<? echo plugins_url( '../images/'.$settings['file'].'.png', __FILE__ ) ?>" alt="">
|
38 |
-
<div class="app-link-buttons app-type-edit">
|
39 |
-
<a href="admin.php?page=<? echo slug_path('init.php&tab='.$settings['file']) ?>">
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<?php echo ($settings['active']) ? '<i class="fa fa-edit"></i>Edit' : '<i class="fa fa-plus"></i>Add' ?>
|
42 |
</a>
|
43 |
</div>
|
|
|
44 |
</div>
|
45 |
-
</div>
|
46 |
|
47 |
-
|
|
|
|
|
48 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
+
<h2>
|
3 |
+
<i class="fa fa-list"></i>Apps
|
4 |
+
<?php if(!$GS->is_pro()): ?>
|
5 |
+
<a href="<?php echo $GS->gs_account() ?>/sites/gs-wordpress/billing/select_tier?api_key=<?= $GS->api_key ?>&source=wordpress" target="_blank" class="btn btn-pro">Upgrade to Pro</a>
|
6 |
+
<?php endif; ?>
|
7 |
+
</h2>
|
8 |
+
<div class="sub-wrap">
|
9 |
+
<div class="app-list">
|
10 |
+
<?php
|
11 |
+
$apps = array(
|
12 |
+
'Custom Sharing Actions' => array(
|
13 |
+
'file' => 'custom-actions',
|
14 |
+
'active' => $GS->is_active('custom_actions'),
|
15 |
+
'pro' => true,
|
16 |
+
'href' => $GS->gs_account().'/sites/gs-wordpress/elements/new?api_key='.$GS->api_key.'&source=wordpress',
|
17 |
+
'desc' => "Sometimes we need to say more than a simple 'Like'. Here you'll find more than 50 custom stories such as Awesome, Wish or Love."
|
18 |
+
),
|
19 |
+
'Horizontal Sharing Bar' => array(
|
20 |
+
'file' => 'sharing-bar',
|
21 |
+
'active' => $GS->is_active('sharing_bar'),
|
22 |
+
'href' => $GS->gs_account().'/sites/gs-wordpress/groups/new?api_key='.$GS->api_key.'&source=wordpress',
|
23 |
+
'desc' => "Use one of our templates or design your own social sharing bar. Customize size, shape & colour and pick from 15 social networks."
|
24 |
+
),
|
25 |
+
'Native Sharing Bar' => array(
|
26 |
+
'file' => 'native-bar',
|
27 |
+
'active' => $GS->is_active('native_bar'),
|
28 |
+
'href' => $GS->gs_account().'/sites/gs-wordpress/native_bar/new?api_key='.$GS->api_key.'&source=wordpress',
|
29 |
+
'desc' => "It doesn't get much more classic than this. Your native sharing buttons with tracking abilities. Great for those who want to keep it real."
|
30 |
+
),
|
31 |
+
'Floating Sharing Bar' => array(
|
32 |
+
'file' => 'floating-bar',
|
33 |
+
'active' => $GS->is_active('floating_bar'),
|
34 |
+
'href' => $GS->gs_account().'/sites/gs-wordpress/floating_bar/new?api_key='.$GS->api_key.'&source=wordpress',
|
35 |
+
"desc" => "Use one of our templates or design your own floating sharing bar. Customize size, shape & placement and pick from 15 social networks."
|
36 |
+
),
|
37 |
+
'Mobile Sharing Bar' => array(
|
38 |
+
'file' => 'mobile-bar',
|
39 |
+
'active' => $GS->is_active('mobile_bar'),
|
40 |
+
'pro' => true,
|
41 |
+
'href' => $GS->gs_account().'/sites/gs-wordpress/mobile_bar/new?api_key='.$GS->api_key.'&source=wordpress',
|
42 |
+
"desc" => "Mobile Web is one of the fastest growing platform both in traffic and shares. Don't miss out on the opportunity to boost your traffic with our slick mobile web sharing interface. No code needed."
|
43 |
+
),
|
44 |
+
);
|
45 |
+
|
46 |
+
foreach($apps as $app => $settings):
|
47 |
+
?>
|
48 |
+
|
49 |
+
<div class="app-wrapper">
|
50 |
+
<img src="<?php echo plugins_url( '../images/'.$settings['file'].'.png', __FILE__ ) ?>" alt="">
|
51 |
+
|
52 |
+
|
53 |
+
<div class="title">
|
54 |
+
<div class="info">
|
55 |
+
<?php if($settings['active']): ?>
|
56 |
+
<div class="app-status done">Installed</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
|
59 |
+
<?php if( isset($settings['pro']) && $settings['pro'] ): ?>
|
60 |
+
<div class="app-status pro">Pro</div>
|
61 |
+
<?php else: ?>
|
62 |
+
<div class="app-status free">Free</div>
|
63 |
+
<?php endif; ?>
|
64 |
+
|
65 |
+
</div>
|
66 |
+
<?php echo $app ?>
|
67 |
+
<p><?php echo $settings['desc'] ?></p>
|
68 |
+
</div>
|
69 |
+
<div class="app-link-buttons app-type-edit">
|
70 |
+
<a class="getsocial-tab" href="<?php echo $settings['href'] ?>" target="_blank">
|
71 |
<?php echo ($settings['active']) ? '<i class="fa fa-edit"></i>Edit' : '<i class="fa fa-plus"></i>Add' ?>
|
72 |
</a>
|
73 |
</div>
|
74 |
+
|
75 |
</div>
|
|
|
76 |
|
77 |
+
<?php endforeach; ?>
|
78 |
+
|
79 |
+
</div>
|
80 |
</div>
|
tmpl/{settings.php → apps/settings.php}
RENAMED
@@ -13,17 +13,17 @@
|
|
13 |
|
14 |
<?php if(get_option('gs-api-key') != ''): ?>
|
15 |
|
16 |
-
<div class="form-content">
|
17 |
<label class="control">Language</label>
|
18 |
<div class="languages">
|
19 |
<select name="gs-lang">
|
20 |
-
<option value="en" <?php echo (get_option('gs-lang') == 'en' ? 'selected="selected"' : '') ?>>English</option>
|
21 |
-
<option value="es" <?php echo (get_option('gs-lang') == 'es' ? 'selected="selected"' : '') ?>>Spanish</option>
|
22 |
-
<option value="pt_PT" <?php echo (get_option('gs-lang') == 'pt_PT' ? 'selected="selected"' : '') ?>>Portuguese (Portugal)</option>
|
23 |
-
<option value="pt_BR" <?php echo (get_option('gs-lang') == 'pt_BR' ? 'selected="selected"' : '') ?>>Portuguese (Brazil)</option>
|
24 |
</select>
|
25 |
</div>
|
26 |
-
</div>
|
27 |
|
28 |
<?php endif; ?>
|
29 |
|
13 |
|
14 |
<?php if(get_option('gs-api-key') != ''): ?>
|
15 |
|
16 |
+
<!-- <div class="form-content">
|
17 |
<label class="control">Language</label>
|
18 |
<div class="languages">
|
19 |
<select name="gs-lang">
|
20 |
+
<option value="en" <?php //echo (get_option('gs-lang') == 'en' ? 'selected="selected"' : '') ?>>English</option>
|
21 |
+
<option value="es" <?php //echo (get_option('gs-lang') == 'es' ? 'selected="selected"' : '') ?>>Spanish</option>
|
22 |
+
<option value="pt_PT" <?php //echo (get_option('gs-lang') == 'pt_PT' ? 'selected="selected"' : '') ?>>Portuguese (Portugal)</option>
|
23 |
+
<option value="pt_BR" <?php //echo (get_option('gs-lang') == 'pt_BR' ? 'selected="selected"' : '') ?>>Portuguese (Brazil)</option>
|
24 |
</select>
|
25 |
</div>
|
26 |
+
</div> -->
|
27 |
|
28 |
<?php endif; ?>
|
29 |
|
tmpl/basic_stats.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
<h2>
|
2 |
<i class="fa fa-bar-chart"></i>Stats
|
3 |
-
<? $from = date('Y-m-d', strtotime('-8 days')) ?>
|
4 |
-
<? $to = date('Y-m-d', strtotime('-1 days')) ?>
|
5 |
-
<small>from <strong><? echo $from ?></strong> to <strong><? echo $to ?></strong></small>
|
6 |
-
<a href="
|
7 |
</h2>
|
8 |
-
|
9 |
-
<div class="graphs gs-clearfix" data-graph-api="<?php echo $GS->api_url('sites/analytics/'.get_option('gs-api-key')) ?>">
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
21 |
</div>
|
|
|
22 |
</div>
|
23 |
-
|
24 |
-
<div class="cl"></div>
|
1 |
<h2>
|
2 |
<i class="fa fa-bar-chart"></i>Stats
|
3 |
+
<?php $from = date('Y-m-d', strtotime('-8 days')) ?>
|
4 |
+
<?php $to = date('Y-m-d', strtotime('-1 days')) ?>
|
5 |
+
<small>from <strong><?php echo $from ?></strong> to <strong><?php echo $to ?></strong></small>
|
6 |
+
<a href="<?php echo $GS->gs_account().'/sites/gs-wordpress/analytics/dashboard?api_key='.$GS->api_key.'&source=wordpress' ?>" target="_blank" class="btn btn-default"><i class="fa fa-area-chart"></i>Detailed Stats</a>
|
7 |
</h2>
|
8 |
+
<div class="sub-wrap">
|
9 |
+
<div class="graphs gs-clearfix" data-graph-api="<?php echo $GS->api_url('sites/analytics/'.get_option('gs-api-key')) ?>">
|
10 |
+
<div class="graph">
|
11 |
+
<h4><i class="fa fa-group"></i>Visits</h4>
|
12 |
+
<h3 class="total_visits">...</h5>
|
13 |
+
</div>
|
14 |
+
<div class="graph">
|
15 |
+
<h4><i class="fa fa-share-alt"></i>Shares</h4>
|
16 |
+
<h3 class="total_shares">...</h5>
|
17 |
+
</div>
|
18 |
+
<div class="graph">
|
19 |
+
<h4><i class="fa fa-sign-in"></i>Leads</h4>
|
20 |
+
<h3 class="total_leads">...</h5>
|
21 |
+
</div>
|
22 |
</div>
|
23 |
+
<div class="cl"></div>
|
24 |
</div>
|
|
|
|
tmpl/custom-expressions.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<h2><i class="fa fa-cog"></i>Custom Actions</h2>
|
2 |
-
|
3 |
-
<p class="notification-bar yellow-cta">
|
4 |
-
Sorry, in this version you have to build our custom actions in our site editor.
|
5 |
-
<a href="http://getsocial.io" target="_blank" class="button"><i class="fa fa-add"></i>New Custom Action</a>
|
6 |
-
</p>
|
7 |
-
|
8 |
-
<?php
|
9 |
-
$has_custom_social_actions = !(get_option('gs-api-key') != '' && get_option('gs-elements') == '{}' );
|
10 |
-
if(!$has_custom_social_actions): ?>
|
11 |
-
<div class="notification-bar blue-cta">
|
12 |
-
<p>You haven’t created any social action yet. Create your first action button now.</p>
|
13 |
-
</div>
|
14 |
-
|
15 |
-
<?php endif; ?>
|
16 |
-
|
17 |
-
<form id="custom-bar" method="post" action="options.php">
|
18 |
-
<?php settings_fields( 'getsocial-gs-custom-expressions' ); ?>
|
19 |
-
<?php do_settings_sections( 'getsocial-gs-custom-expressions' ); ?>
|
20 |
-
|
21 |
-
<?php if($has_custom_social_actions): ?>
|
22 |
-
|
23 |
-
<div class="form-content">
|
24 |
-
<h4>Expressions created</h4>
|
25 |
-
<table class="custom-expressions">
|
26 |
-
<?php foreach($GS->getElements() as $identifier => $elem): ?>
|
27 |
-
<tr>
|
28 |
-
<td><?= $elem ?></td>
|
29 |
-
</tr>
|
30 |
-
<?php endforeach; ?>
|
31 |
-
</table>
|
32 |
-
</div>
|
33 |
-
|
34 |
-
<div class="form-content">
|
35 |
-
<label class="control active">Active</label>
|
36 |
-
<div>
|
37 |
-
<input type="checkbox" name="gs-custom-expression-active" value="1" <?php echo (get_option('gs-custom-expression-active') == '1' ? 'checked' : '') ?>/>
|
38 |
-
</div>
|
39 |
-
</div>
|
40 |
-
|
41 |
-
<div class="form-content">
|
42 |
-
<label class="control">Position</label>
|
43 |
-
|
44 |
-
<div class="position with-inputs-label">
|
45 |
-
<label>Top</label>
|
46 |
-
<input type="radio" value="1" name="gs-custom-expression-position" <?php echo (get_option('gs-custom-expression-position') == 1 ? 'checked="checked"' : '') ?> />
|
47 |
-
<label>Bottom</label>
|
48 |
-
<input type="radio" value="0" name="gs-custom-expression-position" <?php echo (get_option('gs-custom-expression-position') == 0 ? 'checked="checked"' : '') ?> />
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
|
52 |
-
<div class="bar-active">
|
53 |
-
<?php submit_button('Save Changes'); ?>
|
54 |
-
|
55 |
-
<div class="cl"></div>
|
56 |
-
</div>
|
57 |
-
|
58 |
-
<?php endif; ?>
|
59 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tmpl/floating-bar.php
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
<h2><i class="fa fa-cog"></i>Floating Bar</h2>
|
2 |
-
|
3 |
-
<form id="social-bar" method="post" action="options.php">
|
4 |
-
<?php settings_fields( 'getsocial-gs-floating' ); ?>
|
5 |
-
<?php do_settings_sections( 'getsocial-gs-floating' ); ?>
|
6 |
-
|
7 |
-
<div class="form-content editor-preview">
|
8 |
-
<div id="reaction-preview" class="native-buttons text-center clearfix">
|
9 |
-
<div class="gs-group"></div>
|
10 |
-
</div>
|
11 |
-
</div>
|
12 |
-
|
13 |
-
<div class="form-content">
|
14 |
-
<label class="control active">Active</label>
|
15 |
-
<div class="activate">
|
16 |
-
<input type="checkbox" name="gs-floating-active" value="1" <?php echo (get_option('gs-floating-active') == '1' ? 'checked' : '') ?>/>
|
17 |
-
</div>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div class="form-content">
|
21 |
-
<label class="control">Social Networks</label>
|
22 |
-
|
23 |
-
<div class="networks with-inputs-label">
|
24 |
-
<?php
|
25 |
-
$social = array(
|
26 |
-
'fb' => array('facebook', 'facebook'),
|
27 |
-
'tw' => array('twitter', 'twitter'),
|
28 |
-
'pn' => array('pinterest', 'pinterest'),
|
29 |
-
'gp' => array('google', 'google-plus')
|
30 |
-
); ?>
|
31 |
-
|
32 |
-
<?php foreach($social as $key => $value): ?>
|
33 |
-
|
34 |
-
<?php
|
35 |
-
$name = $value[0];
|
36 |
-
$icon = $value[1];
|
37 |
-
$option_value_exists = !get_option('gs-floating-network-'.$key);
|
38 |
-
$option_value = get_option('gs-floating-network-'.$key);
|
39 |
-
?>
|
40 |
-
|
41 |
-
<input type="checkbox"
|
42 |
-
name="gs-floating-network-<?php echo $key ?>"
|
43 |
-
id="gs-floating-network-<?php echo $key ?>"
|
44 |
-
class="ntw group-network"
|
45 |
-
value="Y"
|
46 |
-
rel="<?php echo $key ?>"
|
47 |
-
<?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
|
48 |
-
|
49 |
-
<label for="gs-floating-network-<?php echo $key ?>" class="no-padding"><?php echo $name ?></label>
|
50 |
-
|
51 |
-
<?php endforeach; ?>
|
52 |
-
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
|
56 |
-
<div class="form-content">
|
57 |
-
<label class="control">Template</label>
|
58 |
-
|
59 |
-
<div class="templates">
|
60 |
-
<?php
|
61 |
-
$templates = array(
|
62 |
-
'Square Rounded' => 'gs-template1',
|
63 |
-
'Rounded' => 'gs-template2',
|
64 |
-
'Special' => 'gs-template3',
|
65 |
-
'Basic Grey' => 'gs-template4',
|
66 |
-
'Basic Black' => 'gs-template5'
|
67 |
-
)
|
68 |
-
?>
|
69 |
-
|
70 |
-
<select id="group_template" name="gs-floating-template">
|
71 |
-
<?php foreach($templates as $name => $value): ?>
|
72 |
-
<option value="<?= $value ?>" <?= get_option('gs-floating-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
|
73 |
-
<?php endforeach; ?>
|
74 |
-
</select>
|
75 |
-
</div>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
<div class="form-content">
|
79 |
-
<label class="control">Size</label>
|
80 |
-
|
81 |
-
<div class="sizes">
|
82 |
-
<?php
|
83 |
-
$sizes = array(
|
84 |
-
'Small' => 'gs-small',
|
85 |
-
'Medium' => 'gs-medium',
|
86 |
-
'Large' => 'gs-large'
|
87 |
-
)
|
88 |
-
?>
|
89 |
-
<select id="group_size" name="gs-floating-size">
|
90 |
-
<?php foreach($sizes as $name => $value): ?>
|
91 |
-
<option value="<?php echo $value ?>" <?php echo get_option('gs-floating-size') == $value || (!get_option('gs-floating-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?php echo $name ?></option>
|
92 |
-
<?php endforeach; ?>
|
93 |
-
</select>
|
94 |
-
</div>
|
95 |
-
</div>
|
96 |
-
|
97 |
-
<div class="form-content">
|
98 |
-
<label class="control">Counter</label>
|
99 |
-
<div class="counter with-inputs-label">
|
100 |
-
|
101 |
-
<input type="radio" value="Y" class="has_counter" name="gs-floating-counter" <?php echo (get_option('gs-floating-counter') == 'Y' || !get_option('gs-floating-counter') ? 'checked="checked"' : '') ?> />
|
102 |
-
<label>Yes</label>
|
103 |
-
|
104 |
-
<input type="radio" value="N" class="has_counter" name="gs-floating-counter" <?php echo (get_option('gs-floating-counter') == 'N' ? 'checked="checked"' : '') ?> />
|
105 |
-
<label>No</label>
|
106 |
-
|
107 |
-
</div>
|
108 |
-
</div>
|
109 |
-
|
110 |
-
<div class="form-content">
|
111 |
-
<label class="control">Position</label>
|
112 |
-
|
113 |
-
<div class="position with-inputs-label">
|
114 |
-
<input type="radio" value="0" name="gs-floating-position" <?php echo (get_option('gs-floating-position') == 0 ? 'checked="checked"' : '') ?> />
|
115 |
-
<label>Left</label>
|
116 |
-
|
117 |
-
<input type="radio" value="1" name="gs-floating-position" <?php echo (get_option('gs-floating-position') == 1 ? 'checked="checked"' : '') ?> />
|
118 |
-
<label>Right</label>
|
119 |
-
</div>
|
120 |
-
|
121 |
-
</div>
|
122 |
-
|
123 |
-
<div class="bar-active">
|
124 |
-
<?php submit_button('Save Changes'); ?>
|
125 |
-
|
126 |
-
<div class="cl"></div>
|
127 |
-
</div>
|
128 |
-
|
129 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tmpl/header.php
CHANGED
@@ -10,20 +10,13 @@ $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
|
10 |
|
11 |
$GS = new GS( get_option('gs-api-key'),
|
12 |
get_option('gs-identifier'),
|
13 |
-
get_option('gs-elements'),
|
14 |
get_option('gs-lang'));
|
15 |
|
16 |
-
// if(isset($_GET["refresh"]) && $GS->needs_update()):
|
17 |
$site_info = $GS->refreshSite();
|
18 |
-
// endif;
|
19 |
-
|
20 |
-
$needs_update = $GS->needs_update();
|
21 |
|
22 |
wp_register_style( 'getsocial-style', plugins_url('../css/getsocial-style.css', __FILE__) );
|
23 |
-
wp_register_style( 'group-buttons', plugins_url('../css/group-buttons.css', __FILE__) );
|
24 |
|
25 |
wp_enqueue_style( 'getsocial-style' );
|
26 |
-
wp_enqueue_style( 'group-buttons' );
|
27 |
|
28 |
wp_register_script( 'builder', plugins_url('../js/builder.js', __FILE__) );
|
29 |
wp_register_script( 'plugin', plugins_url('../js/plugin.js', __FILE__) );
|
@@ -38,10 +31,10 @@ wp_enqueue_script( 'plugin' );
|
|
38 |
<header class="gs-clearfix">
|
39 |
<div class="wrap-header">
|
40 |
<h1>
|
41 |
-
<img src="
|
42 |
-
<? if(isset($sub_menu)): ?>
|
43 |
-
<small>-
|
44 |
-
<? endif; ?>
|
45 |
</h1>
|
46 |
|
47 |
<h2>
|
@@ -56,8 +49,8 @@ wp_enqueue_script( 'plugin' );
|
|
56 |
<div class="cl"></div>
|
57 |
<div class="top-nav">
|
58 |
<div class="wrap">
|
59 |
-
<a href="admin.php?page=<? echo slug_path('init.php') ?>" class="<?php echo !isset($_GET['tab']) ? 'active' : '' ?>"><i class="fa fa-home"></i>Home</a>
|
60 |
-
<a href="admin.php?page=<? echo slug_path('init.php&tab=settings') ?>" class="<?php echo ($_GET['tab'] == 'settings') ? 'active' : '' ?>"><i class="fa fa-cog"></i>Settings</a>
|
61 |
<a href="mailto:support@getsocial.io"><i class="fa fa-question-circle"></i>Can we help you?</a>
|
62 |
</div>
|
63 |
</div>
|
10 |
|
11 |
$GS = new GS( get_option('gs-api-key'),
|
12 |
get_option('gs-identifier'),
|
|
|
13 |
get_option('gs-lang'));
|
14 |
|
|
|
15 |
$site_info = $GS->refreshSite();
|
|
|
|
|
|
|
16 |
|
17 |
wp_register_style( 'getsocial-style', plugins_url('../css/getsocial-style.css', __FILE__) );
|
|
|
18 |
|
19 |
wp_enqueue_style( 'getsocial-style' );
|
|
|
20 |
|
21 |
wp_register_script( 'builder', plugins_url('../js/builder.js', __FILE__) );
|
22 |
wp_register_script( 'plugin', plugins_url('../js/plugin.js', __FILE__) );
|
31 |
<header class="gs-clearfix">
|
32 |
<div class="wrap-header">
|
33 |
<h1>
|
34 |
+
<img src="<?php echo plugins_url( '../images/logo.png', __FILE__ ) ?>" alt="GetSocial" />
|
35 |
+
<?php if(isset($sub_menu)): ?>
|
36 |
+
<small>- <?php echo $sub_menu ?></small>
|
37 |
+
<?php endif; ?>
|
38 |
</h1>
|
39 |
|
40 |
<h2>
|
49 |
<div class="cl"></div>
|
50 |
<div class="top-nav">
|
51 |
<div class="wrap">
|
52 |
+
<a href="admin.php?page=<?php echo slug_path('init.php') ?>" class="<?php echo !isset($_GET['tab']) ? 'active' : '' ?>"><i class="fa fa-home"></i>Home</a>
|
53 |
+
<a href="admin.php?page=<?php echo slug_path('init.php&tab=settings') ?>" class="<?php echo ($_GET['tab'] == 'settings') ? 'active' : '' ?>"><i class="fa fa-cog"></i>Settings</a>
|
54 |
<a href="mailto:support@getsocial.io"><i class="fa fa-question-circle"></i>Can we help you?</a>
|
55 |
</div>
|
56 |
</div>
|
tmpl/social-bar.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<h2><i class="fa fa-cog"></i>Social Bar</h2>
|
2 |
-
|
3 |
-
<form id="social-bar" method="post" action="options.php">
|
4 |
-
<?php settings_fields( 'getsocial-gs-group' ); ?>
|
5 |
-
<?php do_settings_sections( 'getsocial-gs-group' ); ?>
|
6 |
-
|
7 |
-
<div class="form-content editor-preview">
|
8 |
-
<div id="reaction-preview" class="native-buttons text-center clearfix">
|
9 |
-
<div class="gs-group"></div>
|
10 |
-
</div>
|
11 |
-
</div>
|
12 |
-
|
13 |
-
<div class="form-content">
|
14 |
-
<label class="control active">Active</label>
|
15 |
-
<div class="activate">
|
16 |
-
<input type="checkbox" name="gs-group-active" value="1" <?php echo (get_option('gs-group-active') == '1' ? 'checked' : '') ?>/>
|
17 |
-
</div>
|
18 |
-
</div>
|
19 |
-
<div class="form-content">
|
20 |
-
<label class="control">Social Networks</label>
|
21 |
-
|
22 |
-
<div class="networks with-inputs-label">
|
23 |
-
<?php
|
24 |
-
$social = array(
|
25 |
-
'fb' => array('facebook', 'facebook'),
|
26 |
-
'tw' => array('twitter', 'twitter'),
|
27 |
-
'pn' => array('pinterest', 'pinterest'),
|
28 |
-
'gp' => array('google', 'google-plus')
|
29 |
-
); ?>
|
30 |
-
|
31 |
-
<?php foreach($social as $key => $value): ?>
|
32 |
-
|
33 |
-
<?php
|
34 |
-
$name = $value[0];
|
35 |
-
$icon = $value[1];
|
36 |
-
$option_value_exists = !get_option('gs-group-network-'.$key);
|
37 |
-
$option_value = get_option('gs-group-network-'.$key);
|
38 |
-
?>
|
39 |
-
|
40 |
-
<input type="checkbox"
|
41 |
-
name="gs-group-network-<?php echo $key ?>"
|
42 |
-
id="gs-group-network-<?php echo $key ?>"
|
43 |
-
class="ntw group-network"
|
44 |
-
value="Y"
|
45 |
-
rel="<?php echo $key ?>"
|
46 |
-
<?php echo ($option_value == 'Y' || !$option_value_exists ? 'checked' : '') ?>/>
|
47 |
-
|
48 |
-
<label for="gs-group-network-<?php echo $key ?>" class="no-padding"><?php echo $name ?></label>
|
49 |
-
|
50 |
-
<?php endforeach; ?>
|
51 |
-
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
|
55 |
-
<div class="form-content">
|
56 |
-
<label class="control">Template</label>
|
57 |
-
|
58 |
-
<div class="templates">
|
59 |
-
<?php
|
60 |
-
$templates = array(
|
61 |
-
'Square Rounded' => 'gs-template1',
|
62 |
-
'Rounded' => 'gs-template2',
|
63 |
-
'Special' => 'gs-template3',
|
64 |
-
'Basic Grey' => 'gs-template4',
|
65 |
-
'Basic Black' => 'gs-template5'
|
66 |
-
)
|
67 |
-
?>
|
68 |
-
|
69 |
-
<select id="group_template" name="gs-group-template">
|
70 |
-
<?php foreach($templates as $name => $value): ?>
|
71 |
-
<option value="<?= $value ?>" <?= get_option('gs-group-template') == $value ? 'selected' : '' ?>><?= $name ?></option>
|
72 |
-
<?php endforeach; ?>
|
73 |
-
</select>
|
74 |
-
</div>
|
75 |
-
</div>
|
76 |
-
|
77 |
-
<div class="form-content">
|
78 |
-
<label class="control">Size</label>
|
79 |
-
|
80 |
-
<div class="sizes">
|
81 |
-
<?php
|
82 |
-
$sizes = array(
|
83 |
-
'Small' => 'gs-small',
|
84 |
-
'Medium' => 'gs-medium',
|
85 |
-
'Large' => 'gs-large'
|
86 |
-
)
|
87 |
-
?>
|
88 |
-
<select id="group_size" name="gs-group-size">
|
89 |
-
<?php foreach($sizes as $name => $value): ?>
|
90 |
-
<option value="<?php echo $value ?>" <?php echo get_option('gs-group-size') == $value || (!get_option('gs-group-size') && $value == 'gs-large') ? 'selected' : '' ?> ><?php echo $name ?></option>
|
91 |
-
<?php endforeach; ?>
|
92 |
-
</select>
|
93 |
-
</div>
|
94 |
-
</div>
|
95 |
-
|
96 |
-
<div class="form-content">
|
97 |
-
<label class="control">Counter</label>
|
98 |
-
<div class="counter with-inputs-label">
|
99 |
-
|
100 |
-
<input type="radio" value="Y" class="has_counter" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'Y' || !get_option('gs-group-counter') ? 'checked="checked"' : '') ?> />
|
101 |
-
<label>Yes</label>
|
102 |
-
|
103 |
-
<input type="radio" value="N" class="has_counter" name="gs-group-counter" <?php echo (get_option('gs-group-counter') == 'N' ? 'checked="checked"' : '') ?> />
|
104 |
-
<label>No</label>
|
105 |
-
|
106 |
-
</div>
|
107 |
-
</div>
|
108 |
-
|
109 |
-
<div class="form-content">
|
110 |
-
<label class="control">Position</label>
|
111 |
-
|
112 |
-
<div class="position with-inputs-label">
|
113 |
-
<input type="radio" value="1" name="gs-group-position" <?php echo (get_option('gs-group-position') == 1 ? 'checked="checked"' : '') ?> />
|
114 |
-
<label>Top</label>
|
115 |
-
|
116 |
-
<input type="radio" value="0" name="gs-group-position" <?php echo (get_option('gs-group-position') == 0 ? 'checked="checked"' : '') ?> />
|
117 |
-
<label>Bottom</label>
|
118 |
-
|
119 |
-
<input type="radio" value="4" name="gs-group-position" <?php echo (get_option('gs-group-position') == 4 ? 'checked="checked"' : '') ?> />
|
120 |
-
<label>Top & Bottom</label>
|
121 |
-
</div>
|
122 |
-
|
123 |
-
<!-- <label>Floating Right</label>
|
124 |
-
<input type="radio" value="2" name="gs-group-position" <?php echo (get_option('gs-group-position') == 2 ? 'checked="checked"' : '') ?> />
|
125 |
-
<label>Floating Left</label>
|
126 |
-
<input type="radio" value="3" name="gs-group-position" <?php echo (get_option('gs-group-position') == 3 ? 'checked="checked"' : '') ?> /> -->
|
127 |
-
</div>
|
128 |
-
|
129 |
-
<div class="bar-active">
|
130 |
-
<?php submit_button('Save Changes'); ?>
|
131 |
-
|
132 |
-
<div class="cl"></div>
|
133 |
-
</div>
|
134 |
-
|
135 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tmpl/tabs.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2 class="nav-tab-wrapper">
|
2 |
-
|
3 |
-
<a href="admin.php?page=<? echo slug_path('init.php&tab=sharing-bar') ?>" class="nav-tab <?php echo $_GET['tab'] == 'sharing-bar' ? 'nav-tab-active' : '' ?>">Sharing Bar</a>
|
4 |
-
<a href="admin.php?page=<? echo slug_path('init.php&tab=custom-expressions') ?>" class="nav-tab <?php echo $_GET['tab'] == 'custom-expressions' ? 'nav-tab-active' : '' ?>">Custom Actions</a>
|
5 |
-
|
6 |
-
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
wp-share-buttons-analytics-getsocial.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name:
|
4 |
* Plugin URI: http://getsocial.io
|
5 |
* Description: Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
|
6 |
-
* Version:
|
7 |
* Author: Getsocial, S.A.
|
8 |
* Author URI: http://getsocial.io
|
9 |
* License: GPL2
|
@@ -18,8 +18,6 @@ add_action( 'admin_menu', 'gs_getsocial_menu' );
|
|
18 |
function gs_getsocial_menu(){
|
19 |
$GS = get_gs();
|
20 |
|
21 |
-
$needs_update = $GS->needs_update() == '0' ? 'on' : 'off';
|
22 |
-
|
23 |
add_menu_page( 'GetSocial', 'GetSocial', 'manage_options', slug_path('init.php'), '', plugins_url( 'images/on.png', __FILE__ ) );
|
24 |
add_action( 'admin_init', 'register_gs_settings' );
|
25 |
}
|
@@ -29,6 +27,17 @@ function slug_path($s) {
|
|
29 |
return ($main_slug.$s);
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
function register_gs_settings(){
|
33 |
register_setting( 'getsocial-gs-settings' , 'gs-api-key' );
|
34 |
// register_setting( 'getsocial-gs-settings' , 'gs-buttons-position' );
|
@@ -54,7 +63,6 @@ function register_gs_settings(){
|
|
54 |
function get_gs(){
|
55 |
return new GS(get_option('gs-api-key'),
|
56 |
get_option('gs-identifier'),
|
57 |
-
get_option('gs-elements'),
|
58 |
get_option('gs-lang'));
|
59 |
}
|
60 |
|
@@ -72,50 +80,63 @@ function on_content($content) {
|
|
72 |
if ( is_single() ):
|
73 |
$GS = get_gs();
|
74 |
|
75 |
-
$groups_active =
|
76 |
-
$
|
|
|
77 |
//
|
78 |
-
$
|
79 |
-
$
|
80 |
|
81 |
$custom_content = $content;
|
82 |
|
83 |
//
|
84 |
if(!is_feed() && !is_home()):
|
|
|
|
|
85 |
if($groups_active):
|
86 |
-
$groups
|
87 |
-
|
88 |
-
$position =
|
89 |
-
|
90 |
-
if($position
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
$custom_content = $groups.'<br/>'.$custom_content.$groups;
|
97 |
-
endif;
|
98 |
-
else:
|
99 |
-
$custom_content = $groups.$content;
|
100 |
endif;
|
101 |
endif;
|
102 |
|
103 |
if($custom_active):
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
-
$position
|
|
|
|
|
109 |
|
110 |
-
if($position ==
|
111 |
-
$
|
112 |
-
else:
|
113 |
-
$custom_content = $buttons.'<br/>'.$custom_content;
|
114 |
endif;
|
115 |
endif;
|
116 |
-
endif;
|
117 |
|
|
|
|
|
|
|
|
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
return $custom_content;
|
121 |
else:
|
@@ -124,14 +145,14 @@ function on_content($content) {
|
|
124 |
}
|
125 |
|
126 |
function on_all_site(){
|
127 |
-
$GS = get_gs();
|
128 |
-
|
129 |
-
$floating_active = get_option('gs-floating-active') == 1;
|
130 |
-
$floatingbar = "";
|
131 |
-
|
132 |
-
if($floating_active):
|
133 |
-
|
134 |
-
endif;
|
135 |
-
|
136 |
-
echo $floatingbar;
|
137 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Share Buttons & Analytics by GetSocial
|
4 |
* Plugin URI: http://getsocial.io
|
5 |
* Description: Add social media sharing buttons from the most popular networks to track user activity, increase traffic, improve SEO, and follow conversions.
|
6 |
+
* Version: 2.0.0
|
7 |
* Author: Getsocial, S.A.
|
8 |
* Author URI: http://getsocial.io
|
9 |
* License: GPL2
|
18 |
function gs_getsocial_menu(){
|
19 |
$GS = get_gs();
|
20 |
|
|
|
|
|
21 |
add_menu_page( 'GetSocial', 'GetSocial', 'manage_options', slug_path('init.php'), '', plugins_url( 'images/on.png', __FILE__ ) );
|
22 |
add_action( 'admin_init', 'register_gs_settings' );
|
23 |
}
|
27 |
return ($main_slug.$s);
|
28 |
}
|
29 |
|
30 |
+
add_action( 'wp_ajax_gs_update', 'update_getsocial' );
|
31 |
+
|
32 |
+
function update_getsocial() {
|
33 |
+
global $wpdb; // this is how you get access to the database
|
34 |
+
|
35 |
+
$GS = get_gs();
|
36 |
+
$GS->refreshSite();
|
37 |
+
|
38 |
+
wp_die(); // this is required to terminate immediately and return a proper response
|
39 |
+
}
|
40 |
+
|
41 |
function register_gs_settings(){
|
42 |
register_setting( 'getsocial-gs-settings' , 'gs-api-key' );
|
43 |
// register_setting( 'getsocial-gs-settings' , 'gs-buttons-position' );
|
63 |
function get_gs(){
|
64 |
return new GS(get_option('gs-api-key'),
|
65 |
get_option('gs-identifier'),
|
|
|
66 |
get_option('gs-lang'));
|
67 |
}
|
68 |
|
80 |
if ( is_single() ):
|
81 |
$GS = get_gs();
|
82 |
|
83 |
+
$groups_active = $GS->is_active('sharing_bar');
|
84 |
+
$native_active = $GS->is_active('native_bar');
|
85 |
+
$custom_active = $GS->is_active('custom_actions');
|
86 |
//
|
87 |
+
$before_content = "";
|
88 |
+
$after_content = "";
|
89 |
|
90 |
$custom_content = $content;
|
91 |
|
92 |
//
|
93 |
if(!is_feed() && !is_home()):
|
94 |
+
// if(!is_home()):
|
95 |
+
|
96 |
if($groups_active):
|
97 |
+
$groups = $GS->getCode('sharing_bar');
|
98 |
+
|
99 |
+
$position = $GS->prop('sharing_bar', 'position');
|
100 |
+
|
101 |
+
if($position == 'bottom' || $position == 'both'):
|
102 |
+
$after_content = $groups;
|
103 |
+
endif;
|
104 |
+
|
105 |
+
if ( $position == 'top' || $position == 'both' ):
|
106 |
+
$before_content = $groups.'<br/>';
|
|
|
|
|
|
|
|
|
107 |
endif;
|
108 |
endif;
|
109 |
|
110 |
if($custom_active):
|
111 |
+
$custom = $GS->getCode('custom_actions');
|
112 |
+
|
113 |
+
$position = $GS->prop('custom_actions', 'position');
|
114 |
|
115 |
+
if($position == 'bottom' || $position == 'both'):
|
116 |
+
$after_content = $after_content.$custom;
|
117 |
+
endif;
|
118 |
|
119 |
+
if ( $position == 'top' || $position == 'both' ):
|
120 |
+
$before_content = $before_content.$custom.'<br/>';
|
|
|
|
|
121 |
endif;
|
122 |
endif;
|
|
|
123 |
|
124 |
+
if($native_active):
|
125 |
+
$native = $GS->getCode('native_bar');
|
126 |
+
|
127 |
+
$position = $GS->prop('native_bar', 'position');
|
128 |
|
129 |
+
if($position == 'bottom' || $position == 'both'):
|
130 |
+
$after_content = $after_content.$native;
|
131 |
+
endif;
|
132 |
+
|
133 |
+
if ( $position == 'top' || $position == 'both' ):
|
134 |
+
$before_content = $before_content.$native.'<br/>';
|
135 |
+
endif;
|
136 |
+
endif;
|
137 |
+
|
138 |
+
$custom_content = $before_content.$custom_content.$after_content;
|
139 |
+
endif;
|
140 |
|
141 |
return $custom_content;
|
142 |
else:
|
145 |
}
|
146 |
|
147 |
function on_all_site(){
|
148 |
+
// $GS = get_gs();
|
149 |
+
|
150 |
+
// $floating_active = get_option('gs-floating-active') == 1;
|
151 |
+
// $floatingbar = "";
|
152 |
+
//
|
153 |
+
// if($floating_active):
|
154 |
+
// $floatingbar .= $GS->getFloatingBar();
|
155 |
+
// endif;
|
156 |
+
//
|
157 |
+
// echo $floatingbar;
|
158 |
}
|