Social Share Icons & Social Share Buttons - Version 3.2.4

Version Description

  • Update: Text changes.
Download this release

Release Info

Developer socialdude
Plugin Icon 128x128 Social Share Icons & Social Share Buttons
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.4

analyst/sdk_resolver.php CHANGED
@@ -1,79 +1,79 @@
1
- <?php
2
-
3
- if (!function_exists('analyst_resolve_sdk')) {
4
-
5
- /**
6
- * Resolve supported sdk versions and load latest supported one
7
- * also bootstrap sdk with autoloader
8
- *
9
- * @since 1.1.3
10
- *
11
- * @param null $thisPluginPath
12
- * @return void
13
- * @throws Exception
14
- */
15
- function analyst_resolve_sdk($thisPluginPath = null) {
16
- static $loaded = false;
17
-
18
- // Exit if we already resolved SDK
19
- if ($loaded) return;
20
-
21
- $plugins = get_option('active_plugins');
22
-
23
- if ($thisPluginPath) {
24
- array_push($plugins, plugin_basename($thisPluginPath));
25
- }
26
-
27
- $pluginsFolder = WP_PLUGIN_DIR;
28
-
29
- $possibleSDKs = array_map(function ($path) use ($pluginsFolder) {
30
- $sdkFolder = sprintf('%s/%s/analyst/', $pluginsFolder, dirname($path));
31
-
32
- $sdkFolder = str_replace('\\', '/', $sdkFolder);
33
-
34
- $versionPath = $sdkFolder . 'version.php';
35
-
36
- if (file_exists($versionPath)) {
37
- return require $versionPath;
38
- }
39
-
40
- return false;
41
- }, $plugins);
42
-
43
- global $wp_version;
44
-
45
- // Filter out plugins which has no SDK
46
- $SDKs = array_filter($possibleSDKs, function ($s) {return is_array($s);});
47
-
48
- // Filter SDKs which is supported by PHP and WP
49
- $supported = array_values(array_filter($SDKs, function ($sdk) use($wp_version) {
50
- $phpSupported = version_compare(PHP_VERSION, $sdk['php']) >= 0;
51
- $wpSupported = version_compare($wp_version, $sdk['wp']) >= 0;
52
-
53
- return $phpSupported && $wpSupported;
54
- }));
55
-
56
- // Sort SDK by version in descending order
57
- uasort($supported, function ($x, $y) {
58
- return version_compare($y['sdk'], $x['sdk']);
59
- });
60
-
61
- // Reset sorted values keys
62
- $supported = array_values($supported);
63
-
64
- if (!isset($supported[0])) {
65
- throw new Exception('There is no SDK which is support current PHP version and WP version');
66
- }
67
-
68
- // Autoload files for supported SDK
69
- $autoloaderPath = str_replace(
70
- '\\',
71
- '/',
72
- sprintf('%s/autoload.php', $supported[0]['path'])
73
- );
74
-
75
- require_once $autoloaderPath;
76
-
77
- $loaded = true;
78
- }
79
- }
1
+ <?php
2
+
3
+ if (!function_exists('analyst_resolve_sdk')) {
4
+
5
+ /**
6
+ * Resolve supported sdk versions and load latest supported one
7
+ * also bootstrap sdk with autoloader
8
+ *
9
+ * @since 1.1.3
10
+ *
11
+ * @param null $thisPluginPath
12
+ * @return void
13
+ * @throws Exception
14
+ */
15
+ function analyst_resolve_sdk($thisPluginPath = null) {
16
+ static $loaded = false;
17
+
18
+ // Exit if we already resolved SDK
19
+ if ($loaded) return;
20
+
21
+ $plugins = get_option('active_plugins');
22
+
23
+ if ($thisPluginPath) {
24
+ array_push($plugins, plugin_basename($thisPluginPath));
25
+ }
26
+
27
+ $pluginsFolder = WP_PLUGIN_DIR;
28
+
29
+ $possibleSDKs = array_map(function ($path) use ($pluginsFolder) {
30
+ $sdkFolder = sprintf('%s/%s/analyst/', $pluginsFolder, dirname($path));
31
+
32
+ $sdkFolder = str_replace('\\', '/', $sdkFolder);
33
+
34
+ $versionPath = $sdkFolder . 'version.php';
35
+
36
+ if (file_exists($versionPath)) {
37
+ return require $versionPath;
38
+ }
39
+
40
+ return false;
41
+ }, $plugins);
42
+
43
+ global $wp_version;
44
+
45
+ // Filter out plugins which has no SDK
46
+ $SDKs = array_filter($possibleSDKs, function ($s) {return is_array($s);});
47
+
48
+ // Filter SDKs which is supported by PHP and WP
49
+ $supported = array_values(array_filter($SDKs, function ($sdk) use($wp_version) {
50
+ $phpSupported = version_compare(PHP_VERSION, $sdk['php']) >= 0;
51
+ $wpSupported = version_compare($wp_version, $sdk['wp']) >= 0;
52
+
53
+ return $phpSupported && $wpSupported;
54
+ }));
55
+
56
+ // Sort SDK by version in descending order
57
+ uasort($supported, function ($x, $y) {
58
+ return version_compare($y['sdk'], $x['sdk']);
59
+ });
60
+
61
+ // Reset sorted values keys
62
+ $supported = array_values($supported);
63
+
64
+ if (!isset($supported[0])) {
65
+ throw new Exception('There is no SDK which is support current PHP version and WP version');
66
+ }
67
+
68
+ // Autoload files for supported SDK
69
+ $autoloaderPath = str_replace(
70
+ '\\',
71
+ '/',
72
+ sprintf('%s/autoload.php', $supported[0]['path'])
73
+ );
74
+
75
+ require_once $autoloaderPath;
76
+
77
+ $loaded = true;
78
+ }
79
+ }
analyst/src/Account/Account.php CHANGED
@@ -1,604 +1,604 @@
1
- <?php
2
-
3
- namespace Account;
4
-
5
- use Analyst\Analyst;
6
- use Analyst\ApiRequestor;
7
- use Analyst\Cache\DatabaseCache;
8
- use Analyst\Collector;
9
- use Analyst\Http\Requests\ActivateRequest;
10
- use Analyst\Http\Requests\DeactivateRequest;
11
- use Analyst\Http\Requests\InstallRequest;
12
- use Analyst\Http\Requests\OptInRequest;
13
- use Analyst\Http\Requests\OptOutRequest;
14
- use Analyst\Http\Requests\UninstallRequest;
15
- use Analyst\Notices\Notice;
16
- use Analyst\Notices\NoticeFactory;
17
- use Analyst\Contracts\TrackerContract;
18
- use Analyst\Contracts\RequestorContract;
19
-
20
- /**
21
- * Class Account
22
- *
23
- * This is plugin's account object
24
- */
25
- class Account implements TrackerContract
26
- {
27
- /**
28
- * Account id
29
- *
30
- * @var string
31
- */
32
- protected $id;
33
-
34
- /**
35
- * Basename of plugin
36
- *
37
- * @var string
38
- */
39
- protected $path;
40
-
41
- /**
42
- * Whether plugin is active or not
43
- *
44
- * @var bool
45
- */
46
- protected $isInstalled = false;
47
-
48
- /**
49
- * Is user sign in for data tracking
50
- *
51
- * @var bool
52
- */
53
- protected $isOptedIn = false;
54
-
55
- /**
56
- * Is user accepted permissions grant
57
- * for collection site data
58
- *
59
- * @var bool
60
- */
61
- protected $isSigned = false;
62
-
63
- /**
64
- * Is user ever resolved install modal window?
65
- *
66
- * @var bool
67
- */
68
- protected $isInstallResolved = false;
69
-
70
- /**
71
- * Public secret code
72
- *
73
- * @var string
74
- */
75
- protected $clientSecret;
76
-
77
- /**
78
- * @var AccountData
79
- */
80
- protected $data;
81
-
82
- /**
83
- * Base plugin path
84
- *
85
- * @var string
86
- */
87
- protected $basePluginPath;
88
-
89
- /**
90
- * @var RequestorContract
91
- */
92
- protected $requestor;
93
-
94
- /**
95
- * @var Collector
96
- */
97
- protected $collector;
98
-
99
- /**
100
- * Account constructor.
101
- * @param $id
102
- * @param $secret
103
- * @param $baseDir
104
- */
105
- public function __construct($id, $secret, $baseDir)
106
- {
107
- $this->id = $id;
108
- $this->clientSecret = $secret;
109
-
110
- $this->path = $baseDir;
111
-
112
- $this->basePluginPath = plugin_basename($baseDir);
113
- }
114
-
115
- /**
116
- * @return string
117
- */
118
- public function getPath()
119
- {
120
- return $this->path;
121
- }
122
-
123
- /**
124
- * @param string $path
125
- */
126
- public function setPath($path)
127
- {
128
- $this->data->setPath($path);
129
-
130
- $this->path = $path;
131
- }
132
-
133
- /**
134
- * @return bool
135
- */
136
- public function isOptedIn()
137
- {
138
- return $this->isOptedIn;
139
- }
140
-
141
- /**
142
- * @param bool $isOptedIn
143
- */
144
- public function setIsOptedIn($isOptedIn)
145
- {
146
- $this->data->setIsOptedIn($isOptedIn);
147
-
148
- $this->isOptedIn = $isOptedIn;
149
- }
150
-
151
- /**
152
- * Whether plugin is active
153
- *
154
- * @return bool
155
- */
156
- public function isActive()
157
- {
158
- return is_plugin_active($this->path);
159
- }
160
-
161
- /**
162
- * @param string $id
163
- */
164
- public function setId($id)
165
- {
166
- $this->id = $id;
167
- }
168
-
169
- /**
170
- * @return string
171
- */
172
- public function getId()
173
- {
174
- return $this->id;
175
- }
176
-
177
- /**
178
- * @return bool
179
- */
180
- public function isInstalled()
181
- {
182
- return $this->isInstalled;
183
- }
184
-
185
- /**
186
- * @param bool $isInstalled
187
- */
188
- public function setIsInstalled($isInstalled)
189
- {
190
- $this->data->setIsInstalled($isInstalled);
191
-
192
- $this->isInstalled = $isInstalled;
193
- }
194
-
195
- /**
196
- * Should register activation and deactivation
197
- * event hooks
198
- *
199
- * @return void
200
- */
201
- public function registerHooks()
202
- {
203
- register_activation_hook($this->basePluginPath, [&$this, 'onActivePluginListener']);
204
- register_uninstall_hook($this->basePluginPath, ['Account\Account', 'onUninstallPluginListener']);
205
-
206
- $this->addFilter('plugin_action_links', [&$this, 'onRenderActionLinksHook']);
207
-
208
- $this->addAjax('analyst_opt_in', [&$this, 'onOptInListener']);
209
- $this->addAjax('analyst_opt_out', [&$this, 'onOptOutListener']);
210
- $this->addAjax('analyst_plugin_deactivate', [&$this, 'onDeactivatePluginListener']);
211
- $this->addAjax('analyst_install', [&$this, 'onInstallListener']);
212
- $this->addAjax('analyst_skip_install', [&$this, 'onSkipInstallListener']);
213
- $this->addAjax('analyst_install_verified', [&$this, 'onInstallVerifiedListener']);
214
- }
215
-
216
- /**
217
- * Will fire when admin activates plugin
218
- *
219
- * @return void
220
- */
221
- public function onActivePluginListener()
222
- {
223
- if (!$this->isInstallResolved()) {
224
- DatabaseCache::getInstance()->put('plugin_to_install', $this->id);
225
- }
226
-
227
- if (!$this->isAllowingLogging()) return;
228
-
229
- ActivateRequest::make($this->collector, $this->id, $this->path)
230
- ->execute($this->requestor);
231
-
232
- $this->setIsInstalled(true);
233
-
234
- AccountDataFactory::syncData();
235
- }
236
-
237
- /**
238
- * Will fire when admin deactivates plugin
239
- *
240
- * @return void
241
- */
242
- public function onDeactivatePluginListener()
243
- {
244
- if (!$this->isAllowingLogging()) return;
245
-
246
- $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
- $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
-
249
- $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
- ->execute($this->requestor);
251
-
252
- // Exit if request failed
253
- if (!$response->isSuccess()) {
254
- wp_send_json_error($response->body);
255
- }
256
-
257
- $this->setIsInstalled(false);
258
-
259
- AccountDataFactory::syncData();
260
-
261
- wp_send_json_success();
262
- }
263
-
264
- /**
265
- * Will fire when user opted in
266
- *
267
- * @return void
268
- */
269
- public function onOptInListener()
270
- {
271
- $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
272
-
273
- // Exit if request failed
274
- if (!$response->isSuccess()) {
275
- wp_send_json_error($response->body);
276
- }
277
-
278
- $this->setIsOptedIn(true);
279
-
280
- AccountDataFactory::syncData();
281
-
282
- wp_die();
283
- }
284
-
285
- /**
286
- * Will fire when user opted out
287
- *
288
- * @return void
289
- */
290
- public function onOptOutListener()
291
- {
292
- $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
293
-
294
- // Exit if request failed
295
- if (!$response->isSuccess()) {
296
- wp_send_json_error($response->body);
297
- }
298
-
299
- $this->setIsOptedIn(false);
300
-
301
- AccountDataFactory::syncData();
302
-
303
- wp_send_json_success();
304
- }
305
-
306
- /**
307
- * Will fire when user accept opt-in
308
- * at first time
309
- *
310
- * @return void
311
- */
312
- public function onInstallListener()
313
- {
314
- $cache = DatabaseCache::getInstance();
315
-
316
- // Set flag to true which indicates that install is resolved
317
- // also remove install plugin id from cache
318
- $this->setIsInstallResolved(true);
319
- $cache->delete('plugin_to_install');
320
-
321
- $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
322
-
323
- // Exit if request failed
324
- if (!$response->isSuccess()) {
325
- wp_send_json_error($response->body);
326
- }
327
-
328
- $this->setIsSigned(true);
329
-
330
- $this->setIsOptedIn(true);
331
-
332
- $factory = NoticeFactory::instance();
333
-
334
- $message = sprintf('Please confirm your email by clicking on the link we sent to %s. This makes sure you’re not a bot.', $this->collector->getGeneralEmailAddress());
335
-
336
- $notificationId = uniqid();
337
-
338
- $notice = Notice::make(
339
- $notificationId,
340
- $this->getId(),
341
- $message,
342
- $this->collector->getPluginName($this->path)
343
- );
344
-
345
- $factory->addNotice($notice);
346
-
347
- AccountDataFactory::syncData();
348
-
349
- // Set email confirmation notification id to cache
350
- // se we can extract and remove it when user confirmed email
351
- $cache->put(
352
- sprintf('account_email_confirmation_%s', $this->getId()),
353
- $notificationId
354
- );
355
-
356
- wp_send_json_success();
357
- }
358
-
359
- /**
360
- * Will fire when user skipped installation
361
- *
362
- * @return void
363
- */
364
- public function onSkipInstallListener()
365
- {
366
- // Set flag to true which indicates that install is resolved
367
- // also remove install plugin id from cache
368
- $this->setIsInstallResolved(true);
369
- DatabaseCache::getInstance()->delete('plugin_to_install');
370
- }
371
-
372
- /**
373
- * Will fire when user delete plugin through admin panel.
374
- * This action will happen if admin at least once
375
- * activated the plugin.
376
- *
377
- * @return void
378
- * @throws \Exception
379
- */
380
- public static function onUninstallPluginListener()
381
- {
382
- $factory = AccountDataFactory::instance();
383
-
384
- $pluginFile = substr(current_filter(), strlen( 'uninstall_' ));
385
-
386
- $account = $factory->getAccountDataByBasePath($pluginFile);
387
-
388
- // If account somehow is not found, exit the execution
389
- if (!$account) return;
390
-
391
- $analyst = Analyst::getInstance();
392
-
393
- $collector = new Collector($analyst);
394
-
395
- $requestor = new ApiRequestor($account->getId(), $account->getSecret(), $analyst->getApiBase());
396
-
397
- // Just send request to log uninstall event not caring about response
398
- UninstallRequest::make($collector, $account->getId(), $account->getPath())->execute($requestor);
399
-
400
- $factory->sync();
401
- }
402
-
403
- /**
404
- * Fires when used verified his account
405
- */
406
- public function onInstallVerifiedListener()
407
- {
408
- $factory = NoticeFactory::instance();
409
-
410
- $notice = Notice::make(
411
- uniqid(),
412
- $this->getId(),
413
- 'Thank you for confirming your email.',
414
- $this->collector->getPluginName($this->path)
415
- );
416
-
417
- $factory->addNotice($notice);
418
-
419
- // Remove confirmation notification
420
- $confirmationNotificationId = DatabaseCache::getInstance()->pop(sprintf('account_email_confirmation_%s', $this->getId()));
421
- $factory->remove($confirmationNotificationId);
422
-
423
- AccountDataFactory::syncData();
424
-
425
- wp_send_json_success();
426
- }
427
-
428
- /**
429
- * Will fire when wp renders plugin
430
- * action buttons
431
- *
432
- * @param $defaultLinks
433
- * @return array
434
- */
435
- public function onRenderActionLinksHook($defaultLinks)
436
- {
437
- $customLinks = [];
438
-
439
- $customLinks[] = $this->isOptedIn()
440
- ? '<a class="analyst-action-opt analyst-opt-out" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt Out</a>'
441
- : '<a class="analyst-action-opt analyst-opt-in" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt In</a>';
442
-
443
- // Append anchor to find specific deactivation link
444
- if (isset($defaultLinks['deactivate'])) {
445
- $defaultLinks['deactivate'] .= '<span analyst-plugin-id="' . $this->getId() . '" analyst-plugin-opted-in="' . (int) $this->isOptedIn() . '"></span>';
446
- }
447
-
448
- return array_merge($customLinks, $defaultLinks);
449
- }
450
-
451
- /**
452
- * @return AccountData
453
- */
454
- public function getData()
455
- {
456
- return $this->data;
457
- }
458
-
459
- /**
460
- * @param AccountData $data
461
- */
462
- public function setData(AccountData $data)
463
- {
464
- $this->data = $data;
465
-
466
- $this->setIsOptedIn($data->isOptedIn());
467
- $this->setIsInstalled($data->isInstalled());
468
- $this->setIsSigned($data->isSigned());
469
- $this->setIsInstallResolved($data->isInstallResolved());
470
- }
471
-
472
- /**
473
- * Resolves valid action name
474
- * based on client id
475
- *
476
- * @param $action
477
- * @return string
478
- */
479
- private function resolveActionName($action)
480
- {
481
- return sprintf('%s_%s', $action, $this->id);
482
- }
483
-
484
- /**
485
- * Register action for current plugin
486
- *
487
- * @param $action
488
- * @param $callback
489
- */
490
- private function addFilter($action, $callback)
491
- {
492
- $validAction = sprintf('%s_%s', $action, $this->basePluginPath);
493
-
494
- add_filter($validAction, $callback, 10);
495
- }
496
-
497
- /**
498
- * Add ajax action for current plugin
499
- *
500
- * @param $action
501
- * @param $callback
502
- * @param bool $raw Format action ??
503
- */
504
- private function addAjax($action, $callback, $raw = false)
505
- {
506
- $validAction = $raw ? $action : sprintf('%s%s', 'wp_ajax_', $this->resolveActionName($action));
507
-
508
- add_action($validAction, $callback);
509
- }
510
-
511
- /**
512
- * @return bool
513
- */
514
- public function isSigned()
515
- {
516
- return $this->isSigned;
517
- }
518
-
519
- /**
520
- * @param bool $isSigned
521
- */
522
- public function setIsSigned($isSigned)
523
- {
524
- $this->data->setIsSigned($isSigned);
525
-
526
- $this->isSigned = $isSigned;
527
- }
528
-
529
- /**
530
- * @return RequestorContract
531
- */
532
- public function getRequestor()
533
- {
534
- return $this->requestor;
535
- }
536
-
537
- /**
538
- * @param RequestorContract $requestor
539
- */
540
- public function setRequestor(RequestorContract $requestor)
541
- {
542
- $this->requestor = $requestor;
543
- }
544
-
545
- /**
546
- * @return string
547
- */
548
- public function getClientSecret()
549
- {
550
- return $this->clientSecret;
551
- }
552
-
553
- /**
554
- * @return Collector
555
- */
556
- public function getCollector()
557
- {
558
- return $this->collector;
559
- }
560
-
561
- /**
562
- * @param Collector $collector
563
- */
564
- public function setCollector(Collector $collector)
565
- {
566
- $this->collector = $collector;
567
- }
568
-
569
- /**
570
- * Do we allowing logging
571
- *
572
- * @return bool
573
- */
574
- public function isAllowingLogging()
575
- {
576
- return $this->isOptedIn;
577
- }
578
-
579
- /**
580
- * @return string
581
- */
582
- public function getBasePluginPath()
583
- {
584
- return $this->basePluginPath;
585
- }
586
-
587
- /**
588
- * @return bool
589
- */
590
- public function isInstallResolved()
591
- {
592
- return $this->isInstallResolved;
593
- }
594
-
595
- /**
596
- * @param bool $isInstallResolved
597
- */
598
- public function setIsInstallResolved($isInstallResolved)
599
- {
600
- $this->data->setIsInstallResolved($isInstallResolved);
601
-
602
- $this->isInstallResolved = $isInstallResolved;
603
- }
604
- }
1
+ <?php
2
+
3
+ namespace Account;
4
+
5
+ use Analyst\Analyst;
6
+ use Analyst\ApiRequestor;
7
+ use Analyst\Cache\DatabaseCache;
8
+ use Analyst\Collector;
9
+ use Analyst\Http\Requests\ActivateRequest;
10
+ use Analyst\Http\Requests\DeactivateRequest;
11
+ use Analyst\Http\Requests\InstallRequest;
12
+ use Analyst\Http\Requests\OptInRequest;
13
+ use Analyst\Http\Requests\OptOutRequest;
14
+ use Analyst\Http\Requests\UninstallRequest;
15
+ use Analyst\Notices\Notice;
16
+ use Analyst\Notices\NoticeFactory;
17
+ use Analyst\Contracts\TrackerContract;
18
+ use Analyst\Contracts\RequestorContract;
19
+
20
+ /**
21
+ * Class Account
22
+ *
23
+ * This is plugin's account object
24
+ */
25
+ class Account implements TrackerContract
26
+ {
27
+ /**
28
+ * Account id
29
+ *
30
+ * @var string
31
+ */
32
+ protected $id;
33
+
34
+ /**
35
+ * Basename of plugin
36
+ *
37
+ * @var string
38
+ */
39
+ protected $path;
40
+
41
+ /**
42
+ * Whether plugin is active or not
43
+ *
44
+ * @var bool
45
+ */
46
+ protected $isInstalled = false;
47
+
48
+ /**
49
+ * Is user sign in for data tracking
50
+ *
51
+ * @var bool
52
+ */
53
+ protected $isOptedIn = false;
54
+
55
+ /**
56
+ * Is user accepted permissions grant
57
+ * for collection site data
58
+ *
59
+ * @var bool
60
+ */
61
+ protected $isSigned = false;
62
+
63
+ /**
64
+ * Is user ever resolved install modal window?
65
+ *
66
+ * @var bool
67
+ */
68
+ protected $isInstallResolved = false;
69
+
70
+ /**
71
+ * Public secret code
72
+ *
73
+ * @var string
74
+ */
75
+ protected $clientSecret;
76
+
77
+ /**
78
+ * @var AccountData
79
+ */
80
+ protected $data;
81
+
82
+ /**
83
+ * Base plugin path
84
+ *
85
+ * @var string
86
+ */
87
+ protected $basePluginPath;
88
+
89
+ /**
90
+ * @var RequestorContract
91
+ */
92
+ protected $requestor;
93
+
94
+ /**
95
+ * @var Collector
96
+ */
97
+ protected $collector;
98
+
99
+ /**
100
+ * Account constructor.
101
+ * @param $id
102
+ * @param $secret
103
+ * @param $baseDir
104
+ */
105
+ public function __construct($id, $secret, $baseDir)
106
+ {
107
+ $this->id = $id;
108
+ $this->clientSecret = $secret;
109
+
110
+ $this->path = $baseDir;
111
+
112
+ $this->basePluginPath = plugin_basename($baseDir);
113
+ }
114
+
115
+ /**
116
+ * @return string
117
+ */
118
+ public function getPath()
119
+ {
120
+ return $this->path;
121
+ }
122
+
123
+ /**
124
+ * @param string $path
125
+ */
126
+ public function setPath($path)
127
+ {
128
+ $this->data->setPath($path);
129
+
130
+ $this->path = $path;
131
+ }
132
+
133
+ /**
134
+ * @return bool
135
+ */
136
+ public function isOptedIn()
137
+ {
138
+ return $this->isOptedIn;
139
+ }
140
+
141
+ /**
142
+ * @param bool $isOptedIn
143
+ */
144
+ public function setIsOptedIn($isOptedIn)
145
+ {
146
+ $this->data->setIsOptedIn($isOptedIn);
147
+
148
+ $this->isOptedIn = $isOptedIn;
149
+ }
150
+
151
+ /**
152
+ * Whether plugin is active
153
+ *
154
+ * @return bool
155
+ */
156
+ public function isActive()
157
+ {
158
+ return is_plugin_active($this->path);
159
+ }
160
+
161
+ /**
162
+ * @param string $id
163
+ */
164
+ public function setId($id)
165
+ {
166
+ $this->id = $id;
167
+ }
168
+
169
+ /**
170
+ * @return string
171
+ */
172
+ public function getId()
173
+ {
174
+ return $this->id;
175
+ }
176
+
177
+ /**
178
+ * @return bool
179
+ */
180
+ public function isInstalled()
181
+ {
182
+ return $this->isInstalled;
183
+ }
184
+
185
+ /**
186
+ * @param bool $isInstalled
187
+ */
188
+ public function setIsInstalled($isInstalled)
189
+ {
190
+ $this->data->setIsInstalled($isInstalled);
191
+
192
+ $this->isInstalled = $isInstalled;
193
+ }
194
+
195
+ /**
196
+ * Should register activation and deactivation
197
+ * event hooks
198
+ *
199
+ * @return void
200
+ */
201
+ public function registerHooks()
202
+ {
203
+ register_activation_hook($this->basePluginPath, [&$this, 'onActivePluginListener']);
204
+ register_uninstall_hook($this->basePluginPath, ['Account\Account', 'onUninstallPluginListener']);
205
+
206
+ $this->addFilter('plugin_action_links', [&$this, 'onRenderActionLinksHook']);
207
+
208
+ $this->addAjax('analyst_opt_in', [&$this, 'onOptInListener']);
209
+ $this->addAjax('analyst_opt_out', [&$this, 'onOptOutListener']);
210
+ $this->addAjax('analyst_plugin_deactivate', [&$this, 'onDeactivatePluginListener']);
211
+ $this->addAjax('analyst_install', [&$this, 'onInstallListener']);
212
+ $this->addAjax('analyst_skip_install', [&$this, 'onSkipInstallListener']);
213
+ $this->addAjax('analyst_install_verified', [&$this, 'onInstallVerifiedListener']);
214
+ }
215
+
216
+ /**
217
+ * Will fire when admin activates plugin
218
+ *
219
+ * @return void
220
+ */
221
+ public function onActivePluginListener()
222
+ {
223
+ if (!$this->isInstallResolved()) {
224
+ DatabaseCache::getInstance()->put('plugin_to_install', $this->id);
225
+ }
226
+
227
+ if (!$this->isAllowingLogging()) return;
228
+
229
+ ActivateRequest::make($this->collector, $this->id, $this->path)
230
+ ->execute($this->requestor);
231
+
232
+ $this->setIsInstalled(true);
233
+
234
+ AccountDataFactory::syncData();
235
+ }
236
+
237
+ /**
238
+ * Will fire when admin deactivates plugin
239
+ *
240
+ * @return void
241
+ */
242
+ public function onDeactivatePluginListener()
243
+ {
244
+ if (!$this->isAllowingLogging()) return;
245
+
246
+ $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
+ $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
+
249
+ $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
+ ->execute($this->requestor);
251
+
252
+ // Exit if request failed
253
+ if (!$response->isSuccess()) {
254
+ wp_send_json_error($response->body);
255
+ }
256
+
257
+ $this->setIsInstalled(false);
258
+
259
+ AccountDataFactory::syncData();
260
+
261
+ wp_send_json_success();
262
+ }
263
+
264
+ /**
265
+ * Will fire when user opted in
266
+ *
267
+ * @return void
268
+ */
269
+ public function onOptInListener()
270
+ {
271
+ $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
272
+
273
+ // Exit if request failed
274
+ if (!$response->isSuccess()) {
275
+ wp_send_json_error($response->body);
276
+ }
277
+
278
+ $this->setIsOptedIn(true);
279
+
280
+ AccountDataFactory::syncData();
281
+
282
+ wp_die();
283
+ }
284
+
285
+ /**
286
+ * Will fire when user opted out
287
+ *
288
+ * @return void
289
+ */
290
+ public function onOptOutListener()
291
+ {
292
+ $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
293
+
294
+ // Exit if request failed
295
+ if (!$response->isSuccess()) {
296
+ wp_send_json_error($response->body);
297
+ }
298
+
299
+ $this->setIsOptedIn(false);
300
+
301
+ AccountDataFactory::syncData();
302
+
303
+ wp_send_json_success();
304
+ }
305
+
306
+ /**
307
+ * Will fire when user accept opt-in
308
+ * at first time
309
+ *
310
+ * @return void
311
+ */
312
+ public function onInstallListener()
313
+ {
314
+ $cache = DatabaseCache::getInstance();
315
+
316
+ // Set flag to true which indicates that install is resolved
317
+ // also remove install plugin id from cache
318
+ $this->setIsInstallResolved(true);
319
+ $cache->delete('plugin_to_install');
320
+
321
+ $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
322
+
323
+ // Exit if request failed
324
+ if (!$response->isSuccess()) {
325
+ wp_send_json_error($response->body);
326
+ }
327
+
328
+ $this->setIsSigned(true);
329
+
330
+ $this->setIsOptedIn(true);
331
+
332
+ $factory = NoticeFactory::instance();
333
+
334
+ $message = sprintf('Please confirm your email by clicking on the link we sent to %s. This makes sure you’re not a bot.', $this->collector->getGeneralEmailAddress());
335
+
336
+ $notificationId = uniqid();
337
+
338
+ $notice = Notice::make(
339
+ $notificationId,
340
+ $this->getId(),
341
+ $message,
342
+ $this->collector->getPluginName($this->path)
343
+ );
344
+
345
+ $factory->addNotice($notice);
346
+
347
+ AccountDataFactory::syncData();
348
+
349
+ // Set email confirmation notification id to cache
350
+ // se we can extract and remove it when user confirmed email
351
+ $cache->put(
352
+ sprintf('account_email_confirmation_%s', $this->getId()),
353
+ $notificationId
354
+ );
355
+
356
+ wp_send_json_success();
357
+ }
358
+
359
+ /**
360
+ * Will fire when user skipped installation
361
+ *
362
+ * @return void
363
+ */
364
+ public function onSkipInstallListener()
365
+ {
366
+ // Set flag to true which indicates that install is resolved
367
+ // also remove install plugin id from cache
368
+ $this->setIsInstallResolved(true);
369
+ DatabaseCache::getInstance()->delete('plugin_to_install');
370
+ }
371
+
372
+ /**
373
+ * Will fire when user delete plugin through admin panel.
374
+ * This action will happen if admin at least once
375
+ * activated the plugin.
376
+ *
377
+ * @return void
378
+ * @throws \Exception
379
+ */
380
+ public static function onUninstallPluginListener()
381
+ {
382
+ $factory = AccountDataFactory::instance();
383
+
384
+ $pluginFile = substr(current_filter(), strlen( 'uninstall_' ));
385
+
386
+ $account = $factory->getAccountDataByBasePath($pluginFile);
387
+
388
+ // If account somehow is not found, exit the execution
389
+ if (!$account) return;
390
+
391
+ $analyst = Analyst::getInstance();
392
+
393
+ $collector = new Collector($analyst);
394
+
395
+ $requestor = new ApiRequestor($account->getId(), $account->getSecret(), $analyst->getApiBase());
396
+
397
+ // Just send request to log uninstall event not caring about response
398
+ UninstallRequest::make($collector, $account->getId(), $account->getPath())->execute($requestor);
399
+
400
+ $factory->sync();
401
+ }
402
+
403
+ /**
404
+ * Fires when used verified his account
405
+ */
406
+ public function onInstallVerifiedListener()
407
+ {
408
+ $factory = NoticeFactory::instance();
409
+
410
+ $notice = Notice::make(
411
+ uniqid(),
412
+ $this->getId(),
413
+ 'Thank you for confirming your email.',
414
+ $this->collector->getPluginName($this->path)
415
+ );
416
+
417
+ $factory->addNotice($notice);
418
+
419
+ // Remove confirmation notification
420
+ $confirmationNotificationId = DatabaseCache::getInstance()->pop(sprintf('account_email_confirmation_%s', $this->getId()));
421
+ $factory->remove($confirmationNotificationId);
422
+
423
+ AccountDataFactory::syncData();
424
+
425
+ wp_send_json_success();
426
+ }
427
+
428
+ /**
429
+ * Will fire when wp renders plugin
430
+ * action buttons
431
+ *
432
+ * @param $defaultLinks
433
+ * @return array
434
+ */
435
+ public function onRenderActionLinksHook($defaultLinks)
436
+ {
437
+ $customLinks = [];
438
+
439
+ $customLinks[] = $this->isOptedIn()
440
+ ? '<a class="analyst-action-opt analyst-opt-out" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt Out</a>'
441
+ : '<a class="analyst-action-opt analyst-opt-in" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt In</a>';
442
+
443
+ // Append anchor to find specific deactivation link
444
+ if (isset($defaultLinks['deactivate'])) {
445
+ $defaultLinks['deactivate'] .= '<span analyst-plugin-id="' . $this->getId() . '" analyst-plugin-opted-in="' . (int) $this->isOptedIn() . '"></span>';
446
+ }
447
+
448
+ return array_merge($customLinks, $defaultLinks);
449
+ }
450
+
451
+ /**
452
+ * @return AccountData
453
+ */
454
+ public function getData()
455
+ {
456
+ return $this->data;
457
+ }
458
+
459
+ /**
460
+ * @param AccountData $data
461
+ */
462
+ public function setData(AccountData $data)
463
+ {
464
+ $this->data = $data;
465
+
466
+ $this->setIsOptedIn($data->isOptedIn());
467
+ $this->setIsInstalled($data->isInstalled());
468
+ $this->setIsSigned($data->isSigned());
469
+ $this->setIsInstallResolved($data->isInstallResolved());
470
+ }
471
+
472
+ /**
473
+ * Resolves valid action name
474
+ * based on client id
475
+ *
476
+ * @param $action
477
+ * @return string
478
+ */
479
+ private function resolveActionName($action)
480
+ {
481
+ return sprintf('%s_%s', $action, $this->id);
482
+ }
483
+
484
+ /**
485
+ * Register action for current plugin
486
+ *
487
+ * @param $action
488
+ * @param $callback
489
+ */
490
+ private function addFilter($action, $callback)
491
+ {
492
+ $validAction = sprintf('%s_%s', $action, $this->basePluginPath);
493
+
494
+ add_filter($validAction, $callback, 10);
495
+ }
496
+
497
+ /**
498
+ * Add ajax action for current plugin
499
+ *
500
+ * @param $action
501
+ * @param $callback
502
+ * @param bool $raw Format action ??
503
+ */
504
+ private function addAjax($action, $callback, $raw = false)
505
+ {
506
+ $validAction = $raw ? $action : sprintf('%s%s', 'wp_ajax_', $this->resolveActionName($action));
507
+
508
+ add_action($validAction, $callback);
509
+ }
510
+
511
+ /**
512
+ * @return bool
513
+ */
514
+ public function isSigned()
515
+ {
516
+ return $this->isSigned;
517
+ }
518
+
519
+ /**
520
+ * @param bool $isSigned
521
+ */
522
+ public function setIsSigned($isSigned)
523
+ {
524
+ $this->data->setIsSigned($isSigned);
525
+
526
+ $this->isSigned = $isSigned;
527
+ }
528
+
529
+ /**
530
+ * @return RequestorContract
531
+ */
532
+ public function getRequestor()
533
+ {
534
+ return $this->requestor;
535
+ }
536
+
537
+ /**
538
+ * @param RequestorContract $requestor
539
+ */
540
+ public function setRequestor(RequestorContract $requestor)
541
+ {
542
+ $this->requestor = $requestor;
543
+ }
544
+
545
+ /**
546
+ * @return string
547
+ */
548
+ public function getClientSecret()
549
+ {
550
+ return $this->clientSecret;
551
+ }
552
+
553
+ /**
554
+ * @return Collector
555
+ */
556
+ public function getCollector()
557
+ {
558
+ return $this->collector;
559
+ }
560
+
561
+ /**
562
+ * @param Collector $collector
563
+ */
564
+ public function setCollector(Collector $collector)
565
+ {
566
+ $this->collector = $collector;
567
+ }
568
+
569
+ /**
570
+ * Do we allowing logging
571
+ *
572
+ * @return bool
573
+ */
574
+ public function isAllowingLogging()
575
+ {
576
+ return $this->isOptedIn;
577
+ }
578
+
579
+ /**
580
+ * @return string
581
+ */
582
+ public function getBasePluginPath()
583
+ {
584
+ return $this->basePluginPath;
585
+ }
586
+
587
+ /**
588
+ * @return bool
589
+ */
590
+ public function isInstallResolved()
591
+ {
592
+ return $this->isInstallResolved;
593
+ }
594
+
595
+ /**
596
+ * @param bool $isInstallResolved
597
+ */
598
+ public function setIsInstallResolved($isInstallResolved)
599
+ {
600
+ $this->data->setIsInstallResolved($isInstallResolved);
601
+
602
+ $this->isInstallResolved = $isInstallResolved;
603
+ }
604
+ }
analyst/src/Mutator.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
-
3
- namespace Analyst;
4
-
5
- use Analyst\Cache\DatabaseCache;
6
- use Analyst\Contracts\CacheContract;
7
- use Analyst\Notices\NoticeFactory;
8
-
9
- /**
10
- * Class Mutator mutates (modifies) UX with additional
11
- * functional
12
- */
13
- class Mutator
14
- {
15
- protected $notices = [];
16
-
17
- /**
18
- * @var NoticeFactory
19
- */
20
- protected $factory;
21
-
22
- /**
23
- * @var CacheContract
24
- */
25
- protected $cache;
26
-
27
- public function __construct()
28
- {
29
- $this->factory = NoticeFactory::instance();
30
-
31
- $this->notices = $this->factory->getNotices();
32
-
33
- $this->cache = DatabaseCache::getInstance();
34
- }
35
-
36
- /**
37
- * Register filters all necessary stuff.
38
- * Can be invoked only once.
39
- *
40
- * @return void
41
- */
42
- public function initialize()
43
- {
44
- $this->registerLinks();
45
- $this->registerAssets();
46
- $this->registerHooks();
47
- }
48
-
49
- /**
50
- * Register all necessary filters and templates
51
- *
52
- * @return void
53
- */
54
- protected function registerLinks()
55
- {
56
- add_action('admin_footer', function () {
57
- analyst_require_template('optout.php', [
58
- 'shieldImage' => analyst_assets_url('img/shield_question.png')
59
- ]);
60
-
61
- analyst_require_template('optin.php');
62
-
63
- analyst_require_template('forms/deactivate.php', [
64
- 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
- 'smileImage' => analyst_assets_url('img/smile.png'),
66
- ]);
67
-
68
- analyst_require_template('forms/install.php', [
69
- 'pluginToInstall' => $this->cache->get('plugin_to_install'),
70
- 'shieldImage' => analyst_assets_url('img/shield_success.png'),
71
- ]);
72
- });
73
-
74
- add_action('admin_notices',function () {
75
- foreach ($this->notices as $notice) {
76
- analyst_require_template('notice.php', ['notice' => $notice]);
77
- }
78
- });
79
- }
80
-
81
- /**
82
- * Register all assets
83
- */
84
- public function registerAssets()
85
- {
86
- add_action('admin_enqueue_scripts', function () {
87
- wp_enqueue_style('analyst_custom', analyst_assets_url('/css/customize.css'));
88
- wp_enqueue_script('analyst_custom', analyst_assets_url('/js/customize.js'));
89
- });
90
- }
91
-
92
- /**
93
- * Register action hooks
94
- */
95
- public function registerHooks()
96
- {
97
- add_action('wp_ajax_analyst_notification_dismiss', function () {
98
- $this->factory->remove($_POST['id']);
99
-
100
- $this->factory->sync();
101
- });
102
- }
103
- }
1
+ <?php
2
+
3
+ namespace Analyst;
4
+
5
+ use Analyst\Cache\DatabaseCache;
6
+ use Analyst\Contracts\CacheContract;
7
+ use Analyst\Notices\NoticeFactory;
8
+
9
+ /**
10
+ * Class Mutator mutates (modifies) UX with additional
11
+ * functional
12
+ */
13
+ class Mutator
14
+ {
15
+ protected $notices = [];
16
+
17
+ /**
18
+ * @var NoticeFactory
19
+ */
20
+ protected $factory;
21
+
22
+ /**
23
+ * @var CacheContract
24
+ */
25
+ protected $cache;
26
+
27
+ public function __construct()
28
+ {
29
+ $this->factory = NoticeFactory::instance();
30
+
31
+ $this->notices = $this->factory->getNotices();
32
+
33
+ $this->cache = DatabaseCache::getInstance();
34
+ }
35
+
36
+ /**
37
+ * Register filters all necessary stuff.
38
+ * Can be invoked only once.
39
+ *
40
+ * @return void
41
+ */
42
+ public function initialize()
43
+ {
44
+ $this->registerLinks();
45
+ $this->registerAssets();
46
+ $this->registerHooks();
47
+ }
48
+
49
+ /**
50
+ * Register all necessary filters and templates
51
+ *
52
+ * @return void
53
+ */
54
+ protected function registerLinks()
55
+ {
56
+ add_action('admin_footer', function () {
57
+ analyst_require_template('optout.php', [
58
+ 'shieldImage' => analyst_assets_url('img/shield_question.png')
59
+ ]);
60
+
61
+ analyst_require_template('optin.php');
62
+
63
+ analyst_require_template('forms/deactivate.php', [
64
+ 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
+ 'smileImage' => analyst_assets_url('img/smile.png'),
66
+ ]);
67
+
68
+ analyst_require_template('forms/install.php', [
69
+ 'pluginToInstall' => $this->cache->get('plugin_to_install'),
70
+ 'shieldImage' => analyst_assets_url('img/shield_success.png'),
71
+ ]);
72
+ });
73
+
74
+ add_action('admin_notices',function () {
75
+ foreach ($this->notices as $notice) {
76
+ analyst_require_template('notice.php', ['notice' => $notice]);
77
+ }
78
+ });
79
+ }
80
+
81
+ /**
82
+ * Register all assets
83
+ */
84
+ public function registerAssets()
85
+ {
86
+ add_action('admin_enqueue_scripts', function () {
87
+ wp_enqueue_style('analyst_custom', analyst_assets_url('/css/customize.css'));
88
+ wp_enqueue_script('analyst_custom', analyst_assets_url('/js/customize.js'));
89
+ });
90
+ }
91
+
92
+ /**
93
+ * Register action hooks
94
+ */
95
+ public function registerHooks()
96
+ {
97
+ add_action('wp_ajax_analyst_notification_dismiss', function () {
98
+ $this->factory->remove($_POST['id']);
99
+
100
+ $this->factory->sync();
101
+ });
102
+ }
103
+ }
analyst/version.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
-
3
- return array(
4
- // The sdk version
5
- 'sdk' => '1.3.26',
6
-
7
- // Minimum supported WordPress version
8
- 'wp' => '4.7',
9
-
10
- // Supported PHP version
11
- 'php' => '5.4',
12
-
13
- // Path to current SDK$
14
- 'path' => __DIR__,
15
- );
1
+ <?php
2
+
3
+ return array(
4
+ // The sdk version
5
+ 'sdk' => '1.3.26',
6
+
7
+ // Minimum supported WordPress version
8
+ 'wp' => '4.7',
9
+
10
+ // Supported PHP version
11
+ 'php' => '5.4',
12
+
13
+ // Path to current SDK$
14
+ 'path' => __DIR__,
15
+ );
libs/controllers/sfsiocns_OnPosts.php CHANGED
@@ -1,555 +1,555 @@
1
- <?php
2
- /* add fb like add this share to end of every post */
3
- function sfsi_plus_social_buttons_below($content)
4
- {
5
- global $post;
6
- $sfsi_section6= unserialize(get_option('sfsi_plus_section6_options',false));
7
-
8
- //new options that are added on the third questions
9
- //so in this function we are replacing all the past options
10
- //that were saved under option6 by new settings saved under option8
11
- $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
12
- $sfsi_plus_show_item_onposts = $sfsi_section8['sfsi_plus_show_item_onposts'];
13
- //new options that are added on the third questions
14
-
15
- //checking for standard icons
16
- if(!isset($sfsi_section8['sfsi_plus_rectsub']))
17
- {
18
- $sfsi_section8['sfsi_plus_rectsub'] = 'no';
19
- }
20
- if(!isset($sfsi_section8['sfsi_plus_rectfb']))
21
- {
22
- $sfsi_section8['sfsi_plus_rectfb'] = 'yes';
23
- }
24
- if(!isset($sfsi_section8['sfsi_plus_recttwtr']))
25
- {
26
- $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
27
- }
28
- if(!isset($sfsi_section8['sfsi_plus_rectpinit']))
29
- {
30
- $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
31
- }
32
- if(!isset($sfsi_section8['sfsi_plus_rectfbshare']))
33
- {
34
- $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
35
- }
36
- //checking for standard icons
37
-
38
- /* check if option activated in admin or not */
39
- //if($sfsi_section6['sfsi_plus_show_Onposts']=="yes")
40
- //removing following condition for now
41
- /*if($sfsi_section8['sfsi_plus_show_Onposts']=="yes")
42
- {*/
43
- $permalink = get_permalink($post->ID);
44
- $title = get_the_title();
45
- $sfsiLikeWith="45px;";
46
-
47
- /* check for counter display */
48
- //if($sfsi_section6['sfsi_plus_icons_DisplayCounts']=="yes")
49
-
50
- if($sfsi_section8['sfsi_plus_icons_DisplayCounts']=="yes")
51
- {
52
- $show_count=1;
53
- $sfsiLikeWith="75px;";
54
- }
55
- else
56
- {
57
- $show_count=0;
58
- }
59
- $common_options_check = (($sfsi_section8['sfsi_plus_show_via_widget'] == "yes") || ($sfsi_section8['sfsi_plus_float_on_page'] == "yes") && (isset($sfsi_section8['sfsi_plus_float_page_position'])) || ($sfsi_section8['sfsi_plus_place_item_manually'] == "yes") || ($sfsi_section8['sfsi_plus_place_item_gutenberg'] == "yes"));
60
-
61
- //$txt=(isset($sfsi_section6['sfsi_plus_textBefor_icons']))? $sfsi_section6['sfsi_plus_textBefor_icons'] : "Share this Post with :" ;
62
- $txt=(isset($sfsi_section8['sfsi_plus_textBefor_icons']))? $sfsi_section8['sfsi_plus_textBefor_icons'] : "Please follow and like us:" ;
63
- //$float= $sfsi_section6['sfsi_plus_icons_alignment'];
64
- $float= $sfsi_section8['sfsi_plus_icons_alignment'];
65
- if($sfsi_section8['sfsi_plus_rectsub'] == 'yes' || $sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' || $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes')
66
- {
67
- $icons="<div class='sfsi_plus_Sicons ".$float."' style='float:".$float."'><div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>".$txt."</span></div>";
68
- }
69
- if($sfsi_section8['sfsi_plus_rectsub'] == 'yes')
70
- {
71
- if($show_count){$sfsiLikeWithsub = "93px";}else{$sfsiLikeWithsub = "64px";}
72
- if(!isset($sfsiLikeWithsub)){$sfsiLikeWithsub = $sfsiLikeWith;}
73
- $icons.="<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_Subscribelike($permalink,$show_count)."</div>";
74
- }
75
- if($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $common_options_check)
76
- {
77
- $icons.="<div class='sf_fb' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_FBlike($permalink,$show_count)."</div>";
78
- }
79
-
80
- if($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes' || $common_options_check )
81
- {
82
- $icons.="<div class='sf_fb' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_FBshare($permalink,$show_count)."</div>";
83
- }
84
-
85
- if($sfsi_section8['sfsi_plus_recttwtr'] == 'yes')
86
- {
87
- if($show_count){$sfsiLikeWithtwtr = "77px";}else{$sfsiLikeWithtwtr = "56px";}
88
- if(!isset($sfsiLikeWithtwtr)){$sfsiLikeWithtwtr = $sfsiLikeWith;}
89
- $icons.="<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_twitterlike($permalink,$show_count)."</div>";
90
- }
91
- if($sfsi_section8['sfsi_plus_rectpinit'] == 'yes')
92
- {
93
- if($show_count){$sfsiLikeWithpinit = "100px";}else{$sfsiLikeWithpinit = "auto";}
94
- $icons.="<div class='sf_pinit' style='display: inline-block;text-align:left;vertical-align: middle;width: ".$sfsiLikeWithpinit.";'>".sfsi_plus_pinitpinterest($permalink,$show_count)."</div>";
95
- }
96
- $icons.="</div>";
97
-
98
- if(!is_feed() && !is_home() && !is_page())
99
- {
100
- $content = $content .$icons;
101
- }
102
- //}
103
- return $content;
104
- }
105
-
106
- /*subscribe like*/
107
- function sfsi_plus_Subscribelike($permalink, $show_count)
108
- {
109
- global $socialObj;
110
- $socialObj = new sfsi_plus_SocialHelper();
111
-
112
- $sfsi_plus_section2_options= unserialize(get_option('sfsi_plus_section2_options',false));
113
- $sfsi_plus_section4_options = unserialize(get_option('sfsi_plus_section4_options',false));
114
- $sfsi_plus_section8_options= unserialize(get_option('sfsi_plus_section8_options',false));
115
- $option5 = unserialize(get_option('sfsi_plus_section5_options',false));
116
-
117
- $post_icons = $option5['sfsi_plus_follow_icons_language'];
118
- $visit_icon1 = SFSI_PLUS_DOCROOT.'/images/visit_icons/Follow/icon_'.$post_icons.'.png';
119
- $visit_iconsUrl = SFSI_PLUS_PLUGURL."images/";
120
-
121
- if(file_exists($visit_icon1))
122
- {
123
- $visit_icon = $visit_iconsUrl."visit_icons/Follow/icon_".$post_icons.".png";
124
- }
125
- else
126
- {
127
- $visit_icon = $visit_iconsUrl."follow_subscribe.png";
128
- }
129
-
130
- $url = (isset($sfsi_plus_section2_options['sfsi_plus_email_url'])) ? $sfsi_plus_section2_options['sfsi_plus_email_url'] : 'javascript:void(0);';
131
-
132
- if($sfsi_plus_section4_options['sfsi_plus_email_countsFrom']=="manual")
133
- {
134
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_email_manualCounts']);
135
- }
136
- else
137
- {
138
- $counts= $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_plus_feed_id',false)));
139
- }
140
-
141
- if($sfsi_plus_section8_options['sfsi_plus_icons_DisplayCounts']=="yes")
142
- {
143
- $icon = '<a href="'.$url.'" target="_blank"><img src="'.$visit_icon.'" /></a>
144
- <span class="bot_no">'.$counts.'</span>';
145
- }
146
- else
147
- {
148
- $icon = '<a href="'.$url.'" target="_blank"><img src="'.$visit_icon.'" /></a>';
149
- }
150
- return $icon;
151
- }
152
- /*subscribe like*/
153
-
154
- /*twitter like*/
155
- function sfsi_plus_twitterlike($permalink, $show_count)
156
- {
157
- global $socialObj;
158
- $socialObj = new sfsi_plus_SocialHelper();
159
- $twitter_text = '';
160
- $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
161
- $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
162
- if(!empty($permalink))
163
- {
164
- $postid = url_to_postid( $permalink );
165
- }
166
- if(!empty($postid))
167
- {
168
- $twitter_text = get_the_title($postid);
169
- }
170
- return $socialObj->sfsi_twitterSharewithcount($permalink,$twitter_text, $show_count, $icons_language);
171
- }
172
- /*twitter like*/
173
-
174
- /* create fb like button */
175
- function sfsi_plus_FBlike($permalink,$show_count)
176
- {
177
- $send = 'false';
178
- $width = 180;
179
-
180
- $fb_like_html = '';
181
-
182
- $fb_like_html .= '<div class="fb-like" data-href="'.$permalink.'" data-action="like" data-size="small" data-show-faces="false" data-share="false"';
183
-
184
- if(1 == $show_count)
185
- {
186
- $fb_like_html .= 'data-layout="button_count"';
187
- }
188
- else
189
- {
190
- $fb_like_html .= 'data-layout="button"';
191
- }
192
-
193
- $fb_like_html .= ' ></div>';
194
-
195
- return $fb_like_html;
196
- }
197
-
198
- function sfsi_plus_FBshare($permalink,$show_count){
199
-
200
- $send = 'false';
201
- $width = 180;
202
-
203
- $fb_share_html = '';
204
-
205
- $fb_share_html .= '<div class="fb-share-button" data-action="share" data-href="'.$permalink.'" data-size="small" data-mobile-iframe="true"';
206
-
207
- if(1 == $show_count)
208
- {
209
- $fb_share_html .= 'data-layout="button_count"';
210
- }
211
- else
212
- {
213
- $fb_share_html .= 'data-layout="button"';
214
- }
215
-
216
- $fb_share_html .= '><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.$permalink.';src=sdkpreparse" class="fb-xfbml-parse-ignore"></a></div>';
217
-
218
- return $fb_share_html;
219
-
220
- }
221
- /* create pinit button */
222
-
223
- function sfsi_plus_pinitpinterest($permalink,$show_count)
224
- {
225
- $pinit_html = '<a href="https://www.pinterest.com/pin/create/button/?url=&media=&description=" data-pin-do="buttonPin" data-pin-save="true"';
226
-
227
- if($show_count)
228
- {
229
- $pinit_html .= 'data-pin-count="beside"';
230
- }
231
- else
232
- {
233
- $pinit_html .= 'data-pin-count="none"';
234
- }
235
-
236
- $pinit_html .= '></a>';
237
-
238
- return $pinit_html;
239
- }
240
-
241
- /* add all external javascript to wp_footer */
242
- function sfsi_plus_footer_script()
243
- {
244
- $sfsi_section1= unserialize(get_option('sfsi_plus_section1_options',false));
245
- $sfsi_section6= unserialize(get_option('sfsi_plus_section6_options',false));
246
- $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
247
- $sfsi_section2= unserialize(get_option('sfsi_plus_section2_options',false));
248
-
249
-
250
- $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
251
-
252
- if(
253
- isset($sfsi_plus_section5_options['sfsi_plus_icons_language']) &&
254
- !empty($sfsi_plus_section5_options['sfsi_plus_icons_language'])
255
- )
256
- {
257
- $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
258
- }
259
- else
260
- {
261
- $icons_language = "en_US";
262
- }
263
-
264
- if(!isset($sfsi_section8['sfsi_plus_rectsub']))
265
- {
266
- $sfsi_section8['sfsi_plus_rectsub'] = 'no';
267
- }
268
- if(!isset($sfsi_section8['sfsi_plus_rectfb']))
269
- {
270
- $sfsi_section8['sfsi_plus_rectfb'] = 'yes';
271
- }
272
- if(!isset($sfsi_section8['sfsi_plus_recttwtr']))
273
- {
274
- $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
275
- }
276
- if(!isset($sfsi_section8['sfsi_plus_rectpinit']))
277
- {
278
- $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
279
- }
280
-
281
- if(!isset($sfsi_section8['sfsi_plus_rectfbshare']))
282
- {
283
- $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
284
- }
285
- $common_options_check = (
286
- ($sfsi_section8['sfsi_plus_show_via_widget'] == "yes") ||
287
- ($sfsi_section8['sfsi_plus_float_on_page'] == "yes") ||
288
- (isset($sfsi_section8['sfsi_plus_float_page_position']) && "yes" == $sfsi_section8['sfsi_plus_float_page_position']) ||
289
- ($sfsi_section8['sfsi_plus_place_item_manually'] == "yes") ||
290
- ($sfsi_section8['sfsi_plus_place_item_gutenberg'] == "yes") ||
291
- (isset($sfsi_section8['sfsi_plus_show_item_onposts']) && "yes" == $sfsi_section8['sfsi_plus_show_item_onposts'] && (isset($sfsi_section8["sfsi_plus_display_button_type"])) && "normal_button" == $sfsi_section8["sfsi_plus_display_button_type"] )
292
- );
293
- if(
294
- (
295
- $sfsi_section8['sfsi_plus_rectfb'] == "yes" &&
296
- $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
297
- $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
298
- ) ||
299
- (
300
- $sfsi_section8['sfsi_plus_rectfbshare'] == "yes" &&
301
- $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
302
- $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
303
- ) ||
304
- ($sfsi_section1['sfsi_plus_facebook_display']=="yes" && ($sfsi_section2['sfsi_plus_facebookShare_option']=="yes" || $sfsi_section2['sfsi_plus_facebookLike_option']=="yes" ) && $common_options_check)
305
- )
306
- {?>
307
- <!--facebook like and share js -->
308
- <div id="fb-root"></div>
309
-
310
- <script>
311
- (function(d, s, id) {
312
- var js, fjs = d.getElementsByTagName(s)[0];
313
- if (d.getElementById(id)) return;
314
- js = d.createElement(s); js.id = id;
315
- js.src = "//connect.facebook.net/<?php echo $icons_language;?>/sdk.js#xfbml=1&version=v2.5";
316
- fjs.parentNode.insertBefore(js, fjs);
317
- }(document, 'script', 'facebook-jssdk'));</script>
318
- <?php
319
- }
320
-
321
- if(
322
- ($sfsi_section1['sfsi_plus_youtube_display']=="yes" && $sfsi_section2['sfsi_plus_youtube_follow']=="yes" && $common_options_check)
323
- ){?>
324
-
325
- <!-- youtube share -->
326
- <script type="text/javascript">
327
- (function() {
328
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
329
- po.src = 'https://apis.google.com/js/platform.js';
330
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
331
- })();
332
- </script>
333
- <?php
334
- }
335
- if(
336
- ($sfsi_section1['sfsi_plus_linkedin_display']=="yes" && ( $sfsi_section2['sfsi_plus_linkedin_follow']=="yes" || $sfsi_section2['sfsi_plus_linkedin_recommendBusines']=="yes" || $sfsi_section2['sfsi_plus_linkedin_SharePage'] == "yes" ) && $common_options_check)
337
- ){
338
- if($icons_language == 'ar_AR')
339
- {
340
- $icons_language = 'ar_AE';
341
- }
342
- if($common_options_check)
343
- {
344
-
345
- ?>
346
- <!-- linkedIn share and follow js -->
347
- <script src="//platform.linkedin.com/in.js">lang: <?php echo $icons_language;?></script>
348
- <?php
349
- }
350
-
351
- }
352
- if(
353
- (
354
- $sfsi_section8['sfsi_plus_rectpinit'] == "yes" &&
355
- $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
356
- $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
357
- ) ||
358
- ($sfsi_section1['sfsi_plus_pinterest_display']=="yes" && $sfsi_section2["sfsi_plus_pinterest_pingBlog"]=="yes" && $common_options_check)
359
- ){
360
- ?>
361
- <!--pinit js -->
362
- <script src="//assets.pinterest.com/js/pinit.js"></script>
363
- <?php
364
- }
365
- if(
366
- (
367
- $sfsi_section8['sfsi_plus_recttwtr'] == "yes" &&
368
- $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
369
- $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
370
- ) ||
371
- ($sfsi_section1['sfsi_plus_twitter_display']=="yes" && $sfsi_section2["sfsi_plus_twitter_aboutPage"]=="yes" && $common_options_check)
372
- )
373
- {?>
374
- <!-- twitter JS End -->
375
- <script>
376
- !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
377
- <?php
378
- }
379
-
380
- /* activate footer credit link */
381
- if(get_option('sfsi_plus_footer_sec')=="yes")
382
- {
383
- if(!is_admin())
384
- {
385
- //$footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;">Social media & sharing icons powered by <a href="https://wordpress.org/plugins/ultimate-social-media-icons/" target="_new">UltimatelySocial</a> ';
386
- $footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;"><a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="_new">Social media & sharing icons </a> powered by UltimatelySocial';
387
- $footer_link.="</div>";
388
- echo $footer_link;
389
- }
390
- }
391
-
392
- }
393
- /* filter the content of post */
394
- //commenting following code as we are going to extend this functionality
395
- //add_filter('the_content', 'sfsi_plus_social_buttons_below');
396
-
397
- /* update footer for frontend and admin both */
398
- if(!is_admin())
399
- {
400
- global $post;
401
- add_action( 'wp_footer', 'sfsi_plus_footer_script' );
402
- if(!function_exists('sfsi_plus_check_PopUp')){
403
- include('sfsi_frontpopUp.php');
404
- }
405
- add_action('wp_footer','sfsi_plus_check_PopUp');
406
- add_action('wp_footer','sfsi_plus_frontFloter');
407
- }
408
- if(is_admin())
409
- {
410
- add_action('in_admin_footer', 'sfsi_plus_footer_script');
411
- }
412
- /* ping to vendor site on updation of new post */
413
-
414
-
415
- //<---------------------* Responsive icons *----------------->
416
- function sfsi_plus_social_responsive_buttons($content,$option8,$server_side=false)
417
- {
418
-
419
- if( (isset($option8["sfsi_plus_show_item_onposts"])&& $option8["sfsi_plus_show_item_onposts"]=="yes" && isset($option8["sfsi_plus_display_button_type"]) && $option8["sfsi_plus_display_button_type"]=="responsive_button") || $server_side ):
420
- $option2 = unserialize(get_option('sfsi_plus_section2_options',false));
421
- $option4 = unserialize(get_option('sfsi_plus_section4_options',false));
422
- $icons= "";
423
- $sfsi_plus_responsive_icons = (isset($option8["sfsi_plus_responsive_icons"])?$option8["sfsi_plus_responsive_icons"]:null);
424
-
425
- if(is_null($sfsi_plus_responsive_icons) ){
426
- return ""; // dont return anything if options not set;
427
- }
428
- $icon_width_type = $sfsi_plus_responsive_icons["settings"]["icon_width_type"];
429
- if($option4['sfsi_plus_display_counts']=='yes' &&isset($sfsi_plus_responsive_icons["settings"]['show_count'])&&$sfsi_plus_responsive_icons["settings"]['show_count']=="yes"):
430
-
431
- $counter_class="sfsi_plus_responsive_with_counter_icons";
432
- $couter_display="inline-block";
433
-
434
- else:
435
- $counter_class="sfsi_plus_responsive_without_counter_icons";
436
- $couter_display="none";
437
- endif;
438
- $counts = sfsi_plus_getCounts(true);
439
- $count = 0;
440
- if(isset($counts['email_count'])){
441
- $count = (int)($counts['email_count'])+$count;
442
- }
443
- if(isset($counts['fb_count'])){
444
- $count = (int)($counts['fb_count'])+$count;
445
- }
446
- if(isset($counts['twitter_count'])){
447
- $count = (int)($counts['twitter_count'])+$count;
448
- }else{
449
- $count = 0;
450
- }
451
- $icons .= "<div class='sfsi_plus_responsive_icons' style='display:inline-block; ".($icon_width_type=="Fully Responsive"?"width:100%;display:flex; ":'width:100%')."' data-icon-width-type='".$icon_width_type."' data-icon-width-size='".$sfsi_plus_responsive_icons["settings"]['icon_width_size']."' data-edge-type='".$sfsi_plus_responsive_icons["settings"]['edge_type']."' data-edge-radius='".$sfsi_plus_responsive_icons["settings"]['edge_radius']."' >";
452
- $sfsi_plus_anchor_div_style="";
453
- if($sfsi_plus_responsive_icons["settings"]["edge_type"]==="Round"){
454
- $sfsi_plus_anchor_div_style.=" border-radius:";
455
- if($sfsi_plus_responsive_icons["settings"]["edge_radius"]!==""){
456
- $sfsi_plus_anchor_div_style.=$sfsi_plus_responsive_icons["settings"]["edge_radius"].'px; ';
457
- }else{
458
- $sfsi_plus_anchor_div_style.='0px; ';
459
- }
460
- }
461
-
462
- ob_start();?>
463
- <div class="sfsi_plus_responsive_icons_count sfsi_plus_<?php echo ($icon_width_type=="Fully responsive"?'responsive':'fixed'); ?>_count_container sfsi_plus_<?php echo strtolower($sfsi_plus_responsive_icons['settings']['icon_size']); ?>_button" style='display:<?php echo $couter_display; ?>;text-align:center; background-color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_bg_color'] ;?>;color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>; <?php echo $sfsi_plus_anchor_div_style; ?>;' >
464
- <h3 style="color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>; " ><?php echo $count; ?></h3>
465
- <h6 style="color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>;" ><?php echo $sfsi_plus_responsive_icons['settings']["share_count_text"]; ?></h6>
466
- </div>
467
- <?php
468
- $icons.= ob_get_contents();
469
- ob_end_clean();
470
- $icons .= "\t<div class='sfsi_plus_icons_container ".$counter_class." sfsi_plus_".strtolower($sfsi_plus_responsive_icons['settings']['icon_size'])."_button_container sfsi_plus_icons_container_box_".($icon_width_type!=="Fixed icon width"?"fully":'fixed')."_container ' style='".($icon_width_type!=="Fixed icon width"?"width:100%;display:flex; ":'width:auto')."; text-align:center;' >";
471
- $socialObj = new sfsi_plus_SocialHelper();
472
- //styles
473
- $sfsi_plus_anchor_style="";
474
- if($sfsi_plus_responsive_icons["settings"]["text_align"]=="Centered"){
475
- $sfsi_plus_anchor_style.='text-align:center;';
476
- }
477
- if($sfsi_plus_responsive_icons["settings"]["margin"]!==""){
478
- $sfsi_plus_anchor_style.='margin-left:'.$sfsi_plus_responsive_icons["settings"]["margin"]."px; ";
479
- // $sfsi_plus_anchor_style.='margin-bottom:'.$sfsi_plus_responsive_icons["settings"]["margin"]."px; ";
480
- }
481
- //styles
482
-
483
- if($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width")
484
- {
485
- $sfsi_plus_anchor_div_style.='width:'.$sfsi_plus_responsive_icons['settings']['icon_width_size'].'px;';
486
- }
487
- else{
488
- $sfsi_plus_anchor_style.=" flex-basis:100%;";
489
- $sfsi_plus_anchor_div_style.=" width:100%;";
490
- }
491
- // var_dump($sfsi_plus_anchor_style,$sfsi_plus_anchor_div_style);
492
- foreach($sfsi_plus_responsive_icons['default_icons'] as $icon=>$icon_config){
493
- // var_dump($icon_config);
494
- // $current_url = $socialObj->sfsi_get_custom_share_link(strtolower($icon));
495
- switch($icon){
496
- case "facebook":$share_url="https://www.facebook.com/sharer/sharer.php?u=".get_permalink(); break;
497
- case "Twitter":$twitter_text = $share_url = "https://twitter.com/intent/tweet?text=".get_the_title()."&url=".get_permalink();break;
498
- case "Follow":
499
- if(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'sf')
500
- {
501
- $share_url = (isset($option2['sfsi_plus_email_url']))
502
- ? $option2['sfsi_plus_email_url']
503
- : 'javascript:';
504
- }
505
- elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'contact')
506
- {
507
- $share_url = (isset($option2['sfsi_plus_email_icons_contact']) && !empty($option2['sfsi_plus_email_icons_contact']))
508
- ? "mailto:".$option2['sfsi_plus_email_icons_contact']
509
- : 'javascript:';
510
- }
511
- elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'page')
512
- {
513
- $share_url = (isset($option2['sfsi_plus_email_icons_pageurl']) && !empty($option2['sfsi_plus_email_icons_pageurl']))
514
- ? $option2['sfsi_plus_email_icons_pageurl']
515
- : 'javascript:';
516
- }
517
- elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'share_email')
518
- {
519
- $subject = stripslashes($option2['sfsi_plus_email_icons_subject_line']);
520
- $subject = str_replace('${title}', $socialObj->sfsi_get_the_title(), $subject);
521
- $subject = str_replace('"', '', str_replace("'", '', $subject));
522
- $subject = html_entity_decode(strip_tags($subject), ENT_QUOTES,'UTF-8');
523
- $subject = str_replace("%26%238230%3B", "...", $subject);
524
- $subject = rawurlencode($subject);
525
-
526
- $body = stripslashes($option2['sfsi_plus_email_icons_email_content']);
527
- $body = str_replace('${title}', $socialObj->sfsi_get_the_title(), $body);
528
- $body = str_replace('${link}', trailingslashit($socialObj->sfsi_get_custom_share_link('email')), $body);
529
- $body = str_replace('"', '', str_replace("'", '', $body));
530
- $body = html_entity_decode(strip_tags($body), ENT_QUOTES,'UTF-8');
531
- $body = str_replace("%26%238230%3B", "...", $body);
532
- $body = rawurlencode($body);
533
- $share_url = "mailto:?subject=$subject&body=$body";
534
- }
535
- else
536
- {
537
- $share_url = (isset($option2['sfsi_plus_email_url']))
538
- ? $option2['sfsi_plus_email_url']
539
- : 'javascript:';
540
- }
541
- break;
542
-
543
- }
544
- $icons.="\t\t"."<a ".sfsi_plus_checkNewWindow()." href='".($icon_config['url']==""?$share_url:$icon_config['url'])."' style='".($icon_config['active']=='yes'?($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width"?'display:inline-flex':'display:block'):'display:none').";".$sfsi_plus_anchor_style."' class=".($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width"?'sfsi_plus_responsive_fixed_width':'sfsi_plus_responsive_fluid')." >"."\n";
545
- $icons.="\t\t\t<div class='sfsi_plus_responsive_icon_item_container sfsi_plus_responsive_icon_".strtolower($icon)."_container sfsi_plus_".strtolower($sfsi_plus_responsive_icons['settings']['icon_size'])."_button ".($sfsi_plus_responsive_icons['settings']['style']=="Gradient"?'sfsi_plus_responsive_icon_gradient':'').( " sfsi_plus_".(strtolower($sfsi_plus_responsive_icons['settings']['text_align'])=="centered"?'centered':'left-align')."_icon")."' style='".$sfsi_plus_anchor_div_style." ' >"."\n";
546
- $icons.="\t\t\t\t<img style='max-height: 25px;display:unset;margin:0' src='".SFSI_PLUS_PLUGURL."images/responsive-icon/".$icon.('Follow'===$icon?'.png':'.svg')."'>"."\n";
547
- $icons.="\t\t\t\t<span style='color:#fff' >".($icon_config["text"])."</span>"."\n";
548
- $icons.="\t\t\t</div>"."\n";
549
- $icons.="\t\t</a>"."\n\n";
550
- }
551
- $icons.="</div></div><!--end responsive_icons-->";
552
- return $icons;
553
- endif;
554
- }
555
- ?>
1
+ <?php
2
+ /* add fb like add this share to end of every post */
3
+ function sfsi_plus_social_buttons_below($content)
4
+ {
5
+ global $post;
6
+ $sfsi_section6= unserialize(get_option('sfsi_plus_section6_options',false));
7
+
8
+ //new options that are added on the third questions
9
+ //so in this function we are replacing all the past options
10
+ //that were saved under option6 by new settings saved under option8
11
+ $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
12
+ $sfsi_plus_show_item_onposts = $sfsi_section8['sfsi_plus_show_item_onposts'];
13
+ //new options that are added on the third questions
14
+
15
+ //checking for standard icons
16
+ if(!isset($sfsi_section8['sfsi_plus_rectsub']))
17
+ {
18
+ $sfsi_section8['sfsi_plus_rectsub'] = 'no';
19
+ }
20
+ if(!isset($sfsi_section8['sfsi_plus_rectfb']))
21
+ {
22
+ $sfsi_section8['sfsi_plus_rectfb'] = 'yes';
23
+ }
24
+ if(!isset($sfsi_section8['sfsi_plus_recttwtr']))
25
+ {
26
+ $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
27
+ }
28
+ if(!isset($sfsi_section8['sfsi_plus_rectpinit']))
29
+ {
30
+ $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
31
+ }
32
+ if(!isset($sfsi_section8['sfsi_plus_rectfbshare']))
33
+ {
34
+ $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
35
+ }
36
+ //checking for standard icons
37
+
38
+ /* check if option activated in admin or not */
39
+ //if($sfsi_section6['sfsi_plus_show_Onposts']=="yes")
40
+ //removing following condition for now
41
+ /*if($sfsi_section8['sfsi_plus_show_Onposts']=="yes")
42
+ {*/
43
+ $permalink = get_permalink($post->ID);
44
+ $title = get_the_title();
45
+ $sfsiLikeWith="45px;";
46
+
47
+ /* check for counter display */
48
+ //if($sfsi_section6['sfsi_plus_icons_DisplayCounts']=="yes")
49
+
50
+ if($sfsi_section8['sfsi_plus_icons_DisplayCounts']=="yes")
51
+ {
52
+ $show_count=1;
53
+ $sfsiLikeWith="75px;";
54
+ }
55
+ else
56
+ {
57
+ $show_count=0;
58
+ }
59
+ $common_options_check = (($sfsi_section8['sfsi_plus_show_via_widget'] == "yes") || ($sfsi_section8['sfsi_plus_float_on_page'] == "yes") && (isset($sfsi_section8['sfsi_plus_float_page_position'])) || ($sfsi_section8['sfsi_plus_place_item_manually'] == "yes") || ($sfsi_section8['sfsi_plus_place_item_gutenberg'] == "yes"));
60
+
61
+ //$txt=(isset($sfsi_section6['sfsi_plus_textBefor_icons']))? $sfsi_section6['sfsi_plus_textBefor_icons'] : "Share this Post with :" ;
62
+ $txt=(isset($sfsi_section8['sfsi_plus_textBefor_icons']))? $sfsi_section8['sfsi_plus_textBefor_icons'] : "Please follow and like us:" ;
63
+ //$float= $sfsi_section6['sfsi_plus_icons_alignment'];
64
+ $float= $sfsi_section8['sfsi_plus_icons_alignment'];
65
+ if($sfsi_section8['sfsi_plus_rectsub'] == 'yes' || $sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' || $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes')
66
+ {
67
+ $icons="<div class='sfsi_plus_Sicons ".$float."' style='float:".$float."'><div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>".$txt."</span></div>";
68
+ }
69
+ if($sfsi_section8['sfsi_plus_rectsub'] == 'yes')
70
+ {
71
+ if($show_count){$sfsiLikeWithsub = "93px";}else{$sfsiLikeWithsub = "64px";}
72
+ if(!isset($sfsiLikeWithsub)){$sfsiLikeWithsub = $sfsiLikeWith;}
73
+ $icons.="<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_Subscribelike($permalink,$show_count)."</div>";
74
+ }
75
+ if($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $common_options_check)
76
+ {
77
+ $icons.="<div class='sf_fb' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_FBlike($permalink,$show_count)."</div>";
78
+ }
79
+
80
+ if($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes' || $common_options_check )
81
+ {
82
+ $icons.="<div class='sf_fb' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_FBshare($permalink,$show_count)."</div>";
83
+ }
84
+
85
+ if($sfsi_section8['sfsi_plus_recttwtr'] == 'yes')
86
+ {
87
+ if($show_count){$sfsiLikeWithtwtr = "77px";}else{$sfsiLikeWithtwtr = "56px";}
88
+ if(!isset($sfsiLikeWithtwtr)){$sfsiLikeWithtwtr = $sfsiLikeWith;}
89
+ $icons.="<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>".sfsi_plus_twitterlike($permalink,$show_count)."</div>";
90
+ }
91
+ if($sfsi_section8['sfsi_plus_rectpinit'] == 'yes')
92
+ {
93
+ if($show_count){$sfsiLikeWithpinit = "100px";}else{$sfsiLikeWithpinit = "auto";}
94
+ $icons.="<div class='sf_pinit' style='display: inline-block;text-align:left;vertical-align: middle;width: ".$sfsiLikeWithpinit.";'>".sfsi_plus_pinitpinterest($permalink,$show_count)."</div>";
95
+ }
96
+ $icons.="</div>";
97
+
98
+ if(!is_feed() && !is_home() && !is_page())
99
+ {
100
+ $content = $content .$icons;
101
+ }
102
+ //}
103
+ return $content;
104
+ }
105
+
106
+ /*subscribe like*/
107
+ function sfsi_plus_Subscribelike($permalink, $show_count)
108
+ {
109
+ global $socialObj;
110
+ $socialObj = new sfsi_plus_SocialHelper();
111
+
112
+ $sfsi_plus_section2_options= unserialize(get_option('sfsi_plus_section2_options',false));
113
+ $sfsi_plus_section4_options = unserialize(get_option('sfsi_plus_section4_options',false));
114
+ $sfsi_plus_section8_options= unserialize(get_option('sfsi_plus_section8_options',false));
115
+ $option5 = unserialize(get_option('sfsi_plus_section5_options',false));
116
+
117
+ $post_icons = $option5['sfsi_plus_follow_icons_language'];
118
+ $visit_icon1 = SFSI_PLUS_DOCROOT.'/images/visit_icons/Follow/icon_'.$post_icons.'.png';
119
+ $visit_iconsUrl = SFSI_PLUS_PLUGURL."images/";
120
+
121
+ if(file_exists($visit_icon1))
122
+ {
123
+ $visit_icon = $visit_iconsUrl."visit_icons/Follow/icon_".$post_icons.".png";
124
+ }
125
+ else
126
+ {
127
+ $visit_icon = $visit_iconsUrl."follow_subscribe.png";
128
+ }
129
+
130
+ $url = (isset($sfsi_plus_section2_options['sfsi_plus_email_url'])) ? $sfsi_plus_section2_options['sfsi_plus_email_url'] : 'javascript:void(0);';
131
+
132
+ if($sfsi_plus_section4_options['sfsi_plus_email_countsFrom']=="manual")
133
+ {
134
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_email_manualCounts']);
135
+ }
136
+ else
137
+ {
138
+ $counts= $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_plus_feed_id',false)));
139
+ }
140
+
141
+ if($sfsi_plus_section8_options['sfsi_plus_icons_DisplayCounts']=="yes")
142
+ {
143
+ $icon = '<a href="'.$url.'" target="_blank"><img src="'.$visit_icon.'" /></a>
144
+ <span class="bot_no">'.$counts.'</span>';
145
+ }
146
+ else
147
+ {
148
+ $icon = '<a href="'.$url.'" target="_blank"><img src="'.$visit_icon.'" /></a>';
149
+ }
150
+ return $icon;
151
+ }
152
+ /*subscribe like*/
153
+
154
+ /*twitter like*/
155
+ function sfsi_plus_twitterlike($permalink, $show_count)
156
+ {
157
+ global $socialObj;
158
+ $socialObj = new sfsi_plus_SocialHelper();
159
+ $twitter_text = '';
160
+ $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
161
+ $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
162
+ if(!empty($permalink))
163
+ {
164
+ $postid = url_to_postid( $permalink );
165
+ }
166
+ if(!empty($postid))
167
+ {
168
+ $twitter_text = get_the_title($postid);
169
+ }
170
+ return $socialObj->sfsi_twitterSharewithcount($permalink,$twitter_text, $show_count, $icons_language);
171
+ }
172
+ /*twitter like*/
173
+
174
+ /* create fb like button */
175
+ function sfsi_plus_FBlike($permalink,$show_count)
176
+ {
177
+ $send = 'false';
178
+ $width = 180;
179
+
180
+ $fb_like_html = '';
181
+
182
+ $fb_like_html .= '<div class="fb-like" data-href="'.$permalink.'" data-action="like" data-size="small" data-show-faces="false" data-share="false"';
183
+
184
+ if(1 == $show_count)
185
+ {
186
+ $fb_like_html .= 'data-layout="button_count"';
187
+ }
188
+ else
189
+ {
190
+ $fb_like_html .= 'data-layout="button"';
191
+ }
192
+
193
+ $fb_like_html .= ' ></div>';
194
+
195
+ return $fb_like_html;
196
+ }
197
+
198
+ function sfsi_plus_FBshare($permalink,$show_count){
199
+
200
+ $send = 'false';
201
+ $width = 180;
202
+
203
+ $fb_share_html = '';
204
+
205
+ $fb_share_html .= '<div class="fb-share-button" data-action="share" data-href="'.$permalink.'" data-size="small" data-mobile-iframe="true"';
206
+
207
+ if(1 == $show_count)
208
+ {
209
+ $fb_share_html .= 'data-layout="button_count"';
210
+ }
211
+ else
212
+ {
213
+ $fb_share_html .= 'data-layout="button"';
214
+ }
215
+
216
+ $fb_share_html .= '><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='.$permalink.';src=sdkpreparse" class="fb-xfbml-parse-ignore"></a></div>';
217
+
218
+ return $fb_share_html;
219
+
220
+ }
221
+ /* create pinit button */
222
+
223
+ function sfsi_plus_pinitpinterest($permalink,$show_count)
224
+ {
225
+ $pinit_html = '<a href="https://www.pinterest.com/pin/create/button/?url=&media=&description=" data-pin-do="buttonPin" data-pin-save="true"';
226
+
227
+ if($show_count)
228
+ {
229
+ $pinit_html .= 'data-pin-count="beside"';
230
+ }
231
+ else
232
+ {
233
+ $pinit_html .= 'data-pin-count="none"';
234
+ }
235
+
236
+ $pinit_html .= '></a>';
237
+
238
+ return $pinit_html;
239
+ }
240
+
241
+ /* add all external javascript to wp_footer */
242
+ function sfsi_plus_footer_script()
243
+ {
244
+ $sfsi_section1= unserialize(get_option('sfsi_plus_section1_options',false));
245
+ $sfsi_section6= unserialize(get_option('sfsi_plus_section6_options',false));
246
+ $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
247
+ $sfsi_section2= unserialize(get_option('sfsi_plus_section2_options',false));
248
+
249
+
250
+ $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
251
+
252
+ if(
253
+ isset($sfsi_plus_section5_options['sfsi_plus_icons_language']) &&
254
+ !empty($sfsi_plus_section5_options['sfsi_plus_icons_language'])
255
+ )
256
+ {
257
+ $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
258
+ }
259
+ else
260
+ {
261
+ $icons_language = "en_US";
262
+ }
263
+
264
+ if(!isset($sfsi_section8['sfsi_plus_rectsub']))
265
+ {
266
+ $sfsi_section8['sfsi_plus_rectsub'] = 'no';
267
+ }
268
+ if(!isset($sfsi_section8['sfsi_plus_rectfb']))
269
+ {
270
+ $sfsi_section8['sfsi_plus_rectfb'] = 'yes';
271
+ }
272
+ if(!isset($sfsi_section8['sfsi_plus_recttwtr']))
273
+ {
274
+ $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
275
+ }
276
+ if(!isset($sfsi_section8['sfsi_plus_rectpinit']))
277
+ {
278
+ $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
279
+ }
280
+
281
+ if(!isset($sfsi_section8['sfsi_plus_rectfbshare']))
282
+ {
283
+ $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
284
+ }
285
+ $common_options_check = (
286
+ ($sfsi_section8['sfsi_plus_show_via_widget'] == "yes") ||
287
+ ($sfsi_section8['sfsi_plus_float_on_page'] == "yes") ||
288
+ (isset($sfsi_section8['sfsi_plus_float_page_position']) && "yes" == $sfsi_section8['sfsi_plus_float_page_position']) ||
289
+ ($sfsi_section8['sfsi_plus_place_item_manually'] == "yes") ||
290
+ (isset($sfsi_section8['sfsi_plus_place_item_gutenberg']) && $sfsi_section8['sfsi_plus_place_item_gutenberg'] == "yes") ||
291
+ (isset($sfsi_section8['sfsi_plus_show_item_onposts']) && "yes" == $sfsi_section8['sfsi_plus_show_item_onposts'] && (isset($sfsi_section8["sfsi_plus_display_button_type"])) && "normal_button" == $sfsi_section8["sfsi_plus_display_button_type"] )
292
+ );
293
+ if(
294
+ (
295
+ $sfsi_section8['sfsi_plus_rectfb'] == "yes" &&
296
+ $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
297
+ $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
298
+ ) ||
299
+ (
300
+ $sfsi_section8['sfsi_plus_rectfbshare'] == "yes" &&
301
+ $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
302
+ $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
303
+ ) ||
304
+ ($sfsi_section1['sfsi_plus_facebook_display']=="yes" && ($sfsi_section2['sfsi_plus_facebookShare_option']=="yes" || $sfsi_section2['sfsi_plus_facebookLike_option']=="yes" ) && $common_options_check)
305
+ )
306
+ {?>
307
+ <!--facebook like and share js -->
308
+ <div id="fb-root"></div>
309
+
310
+ <script>
311
+ (function(d, s, id) {
312
+ var js, fjs = d.getElementsByTagName(s)[0];
313
+ if (d.getElementById(id)) return;
314
+ js = d.createElement(s); js.id = id;
315
+ js.src = "//connect.facebook.net/<?php echo $icons_language;?>/sdk.js#xfbml=1&version=v2.5";
316
+ fjs.parentNode.insertBefore(js, fjs);
317
+ }(document, 'script', 'facebook-jssdk'));</script>
318
+ <?php
319
+ }
320
+
321
+ if(
322
+ ($sfsi_section1['sfsi_plus_youtube_display']=="yes" && $sfsi_section2['sfsi_plus_youtube_follow']=="yes" && $common_options_check)
323
+ ){?>
324
+
325
+ <!-- youtube share -->
326
+ <script type="text/javascript">
327
+ (function() {
328
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
329
+ po.src = 'https://apis.google.com/js/platform.js';
330
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
331
+ })();
332
+ </script>
333
+ <?php
334
+ }
335
+ if(
336
+ ($sfsi_section1['sfsi_plus_linkedin_display']=="yes" && ( $sfsi_section2['sfsi_plus_linkedin_follow']=="yes" || $sfsi_section2['sfsi_plus_linkedin_recommendBusines']=="yes" || $sfsi_section2['sfsi_plus_linkedin_SharePage'] == "yes" ) && $common_options_check)
337
+ ){
338
+ if($icons_language == 'ar_AR')
339
+ {
340
+ $icons_language = 'ar_AE';
341
+ }
342
+ if($common_options_check)
343
+ {
344
+
345
+ ?>
346
+ <!-- linkedIn share and follow js -->
347
+ <script src="//platform.linkedin.com/in.js">lang: <?php echo $icons_language;?></script>
348
+ <?php
349
+ }
350
+
351
+ }
352
+ if(
353
+ (
354
+ $sfsi_section8['sfsi_plus_rectpinit'] == "yes" &&
355
+ $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
356
+ $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
357
+ ) ||
358
+ ($sfsi_section1['sfsi_plus_pinterest_display']=="yes" && $sfsi_section2["sfsi_plus_pinterest_pingBlog"]=="yes" && $common_options_check)
359
+ ){
360
+ ?>
361
+ <!--pinit js -->
362
+ <script src="//assets.pinterest.com/js/pinit.js"></script>
363
+ <?php
364
+ }
365
+ if(
366
+ (
367
+ $sfsi_section8['sfsi_plus_recttwtr'] == "yes" &&
368
+ $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes" &&
369
+ $sfsi_section8['sfsi_plus_display_button_type'] == "standard_buttons"
370
+ ) ||
371
+ ($sfsi_section1['sfsi_plus_twitter_display']=="yes" && $sfsi_section2["sfsi_plus_twitter_aboutPage"]=="yes" && $common_options_check)
372
+ )
373
+ {?>
374
+ <!-- twitter JS End -->
375
+ <script>
376
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
377
+ <?php
378
+ }
379
+
380
+ /* activate footer credit link */
381
+ if(get_option('sfsi_plus_footer_sec')=="yes")
382
+ {
383
+ if(!is_admin())
384
+ {
385
+ //$footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;">Social media & sharing icons powered by <a href="https://wordpress.org/plugins/ultimate-social-media-icons/" target="_new">UltimatelySocial</a> ';
386
+ $footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;"><a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="_new">Social media & sharing icons </a> powered by UltimatelySocial';
387
+ $footer_link.="</div>";
388
+ echo $footer_link;
389
+ }
390
+ }
391
+
392
+ }
393
+ /* filter the content of post */
394
+ //commenting following code as we are going to extend this functionality
395
+ //add_filter('the_content', 'sfsi_plus_social_buttons_below');
396
+
397
+ /* update footer for frontend and admin both */
398
+ if(!is_admin())
399
+ {
400
+ global $post;
401
+ add_action( 'wp_footer', 'sfsi_plus_footer_script' );
402
+ if(!function_exists('sfsi_plus_check_PopUp')){
403
+ include('sfsi_frontpopUp.php');
404
+ }
405
+ add_action('wp_footer','sfsi_plus_check_PopUp');
406
+ add_action('wp_footer','sfsi_plus_frontFloter');
407
+ }
408
+ if(is_admin())
409
+ {
410
+ add_action('in_admin_footer', 'sfsi_plus_footer_script');
411
+ }
412
+ /* ping to vendor site on updation of new post */
413
+
414
+
415
+ //<---------------------* Responsive icons *----------------->
416
+ function sfsi_plus_social_responsive_buttons($content,$option8,$server_side=false)
417
+ {
418
+
419
+ if( (isset($option8["sfsi_plus_show_item_onposts"])&& $option8["sfsi_plus_show_item_onposts"]=="yes" && isset($option8["sfsi_plus_display_button_type"]) && $option8["sfsi_plus_display_button_type"]=="responsive_button") || $server_side ):
420
+ $option2 = unserialize(get_option('sfsi_plus_section2_options',false));
421
+ $option4 = unserialize(get_option('sfsi_plus_section4_options',false));
422
+ $icons= "";
423
+ $sfsi_plus_responsive_icons = (isset($option8["sfsi_plus_responsive_icons"])?$option8["sfsi_plus_responsive_icons"]:null);
424
+
425
+ if(is_null($sfsi_plus_responsive_icons) ){
426
+ return ""; // dont return anything if options not set;
427
+ }
428
+ $icon_width_type = $sfsi_plus_responsive_icons["settings"]["icon_width_type"];
429
+ if($option4['sfsi_plus_display_counts']=='yes' &&isset($sfsi_plus_responsive_icons["settings"]['show_count'])&&$sfsi_plus_responsive_icons["settings"]['show_count']=="yes"):
430
+
431
+ $counter_class="sfsi_plus_responsive_with_counter_icons";
432
+ $couter_display="inline-block";
433
+
434
+ else:
435
+ $counter_class="sfsi_plus_responsive_without_counter_icons";
436
+ $couter_display="none";
437
+ endif;
438
+ $counts = sfsi_plus_getCounts(true);
439
+ $count = 0;
440
+ if(isset($counts['email_count'])){
441
+ $count = (int)($counts['email_count'])+$count;
442
+ }
443
+ if(isset($counts['fb_count'])){
444
+ $count = (int)($counts['fb_count'])+$count;
445
+ }
446
+ if(isset($counts['twitter_count'])){
447
+ $count = (int)($counts['twitter_count'])+$count;
448
+ }else{
449
+ $count = 0;
450
+ }
451
+ $icons .= "<div class='sfsi_plus_responsive_icons' style='display:inline-block; ".($icon_width_type=="Fully Responsive"?"width:100%;display:flex; ":'width:100%')."' data-icon-width-type='".$icon_width_type."' data-icon-width-size='".$sfsi_plus_responsive_icons["settings"]['icon_width_size']."' data-edge-type='".$sfsi_plus_responsive_icons["settings"]['edge_type']."' data-edge-radius='".$sfsi_plus_responsive_icons["settings"]['edge_radius']."' >";
452
+ $sfsi_plus_anchor_div_style="";
453
+ if($sfsi_plus_responsive_icons["settings"]["edge_type"]==="Round"){
454
+ $sfsi_plus_anchor_div_style.=" border-radius:";
455
+ if($sfsi_plus_responsive_icons["settings"]["edge_radius"]!==""){
456
+ $sfsi_plus_anchor_div_style.=$sfsi_plus_responsive_icons["settings"]["edge_radius"].'px; ';
457
+ }else{
458
+ $sfsi_plus_anchor_div_style.='0px; ';
459
+ }
460
+ }
461
+
462
+ ob_start();?>
463
+ <div class="sfsi_plus_responsive_icons_count sfsi_plus_<?php echo ($icon_width_type=="Fully responsive"?'responsive':'fixed'); ?>_count_container sfsi_plus_<?php echo strtolower($sfsi_plus_responsive_icons['settings']['icon_size']); ?>_button" style='display:<?php echo $couter_display; ?>;text-align:center; background-color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_bg_color'] ;?>;color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>; <?php echo $sfsi_plus_anchor_div_style; ?>;' >
464
+ <h3 style="color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>; " ><?php echo $count; ?></h3>
465
+ <h6 style="color:<?php echo $sfsi_plus_responsive_icons['settings']['counter_color'] ;?>;" ><?php echo $sfsi_plus_responsive_icons['settings']["share_count_text"]; ?></h6>
466
+ </div>
467
+ <?php
468
+ $icons.= ob_get_contents();
469
+ ob_end_clean();
470
+ $icons .= "\t<div class='sfsi_plus_icons_container ".$counter_class." sfsi_plus_".strtolower($sfsi_plus_responsive_icons['settings']['icon_size'])."_button_container sfsi_plus_icons_container_box_".($icon_width_type!=="Fixed icon width"?"fully":'fixed')."_container ' style='".($icon_width_type!=="Fixed icon width"?"width:100%;display:flex; ":'width:auto')."; text-align:center;' >";
471
+ $socialObj = new sfsi_plus_SocialHelper();
472
+ //styles
473
+ $sfsi_plus_anchor_style="";
474
+ if($sfsi_plus_responsive_icons["settings"]["text_align"]=="Centered"){
475
+ $sfsi_plus_anchor_style.='text-align:center;';
476
+ }
477
+ if($sfsi_plus_responsive_icons["settings"]["margin"]!==""){
478
+ $sfsi_plus_anchor_style.='margin-left:'.$sfsi_plus_responsive_icons["settings"]["margin"]."px; ";
479
+ // $sfsi_plus_anchor_style.='margin-bottom:'.$sfsi_plus_responsive_icons["settings"]["margin"]."px; ";
480
+ }
481
+ //styles
482
+
483
+ if($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width")
484
+ {
485
+ $sfsi_plus_anchor_div_style.='width:'.$sfsi_plus_responsive_icons['settings']['icon_width_size'].'px;';
486
+ }
487
+ else{
488
+ $sfsi_plus_anchor_style.=" flex-basis:100%;";
489
+ $sfsi_plus_anchor_div_style.=" width:100%;";
490
+ }
491
+ // var_dump($sfsi_plus_anchor_style,$sfsi_plus_anchor_div_style);
492
+ foreach($sfsi_plus_responsive_icons['default_icons'] as $icon=>$icon_config){
493
+ // var_dump($icon_config);
494
+ // $current_url = $socialObj->sfsi_get_custom_share_link(strtolower($icon));
495
+ switch($icon){
496
+ case "facebook":$share_url="https://www.facebook.com/sharer/sharer.php?u=".get_permalink(); break;
497
+ case "Twitter":$twitter_text = $share_url = "https://twitter.com/intent/tweet?text=".get_the_title()."&url=".get_permalink();break;
498
+ case "Follow":
499
+ if(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'sf')
500
+ {
501
+ $share_url = (isset($option2['sfsi_plus_email_url']))
502
+ ? $option2['sfsi_plus_email_url']
503
+ : 'javascript:';
504
+ }
505
+ elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'contact')
506
+ {
507
+ $share_url = (isset($option2['sfsi_plus_email_icons_contact']) && !empty($option2['sfsi_plus_email_icons_contact']))
508
+ ? "mailto:".$option2['sfsi_plus_email_icons_contact']
509
+ : 'javascript:';
510
+ }
511
+ elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'page')
512
+ {
513
+ $share_url = (isset($option2['sfsi_plus_email_icons_pageurl']) && !empty($option2['sfsi_plus_email_icons_pageurl']))
514
+ ? $option2['sfsi_plus_email_icons_pageurl']
515
+ : 'javascript:';
516
+ }
517
+ elseif(isset($option2['sfsi_plus_email_icons_functions']) && $option2['sfsi_plus_email_icons_functions'] == 'share_email')
518
+ {
519
+ $subject = stripslashes($option2['sfsi_plus_email_icons_subject_line']);
520
+ $subject = str_replace('${title}', $socialObj->sfsi_get_the_title(), $subject);
521
+ $subject = str_replace('"', '', str_replace("'", '', $subject));
522
+ $subject = html_entity_decode(strip_tags($subject), ENT_QUOTES,'UTF-8');
523
+ $subject = str_replace("%26%238230%3B", "...", $subject);
524
+ $subject = rawurlencode($subject);
525
+
526
+ $body = stripslashes($option2['sfsi_plus_email_icons_email_content']);
527
+ $body = str_replace('${title}', $socialObj->sfsi_get_the_title(), $body);
528
+ $body = str_replace('${link}', trailingslashit($socialObj->sfsi_get_custom_share_link('email')), $body);
529
+ $body = str_replace('"', '', str_replace("'", '', $body));
530
+ $body = html_entity_decode(strip_tags($body), ENT_QUOTES,'UTF-8');
531
+ $body = str_replace("%26%238230%3B", "...", $body);
532
+ $body = rawurlencode($body);
533
+ $share_url = "mailto:?subject=$subject&body=$body";
534
+ }
535
+ else
536
+ {
537
+ $share_url = (isset($option2['sfsi_plus_email_url']))
538
+ ? $option2['sfsi_plus_email_url']
539
+ : 'javascript:';
540
+ }
541
+ break;
542
+
543
+ }
544
+ $icons.="\t\t"."<a ".sfsi_plus_checkNewWindow()." href='".($icon_config['url']==""?$share_url:$icon_config['url'])."' style='".($icon_config['active']=='yes'?($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width"?'display:inline-flex':'display:block'):'display:none').";".$sfsi_plus_anchor_style."' class=".($sfsi_plus_responsive_icons['settings']['icon_width_type']==="Fixed icon width"?'sfsi_plus_responsive_fixed_width':'sfsi_plus_responsive_fluid')." >"."\n";
545
+ $icons.="\t\t\t<div class='sfsi_plus_responsive_icon_item_container sfsi_plus_responsive_icon_".strtolower($icon)."_container sfsi_plus_".strtolower($sfsi_plus_responsive_icons['settings']['icon_size'])."_button ".($sfsi_plus_responsive_icons['settings']['style']=="Gradient"?'sfsi_plus_responsive_icon_gradient':'').( " sfsi_plus_".(strtolower($sfsi_plus_responsive_icons['settings']['text_align'])=="centered"?'centered':'left-align')."_icon")."' style='".$sfsi_plus_anchor_div_style." ' >"."\n";
546
+ $icons.="\t\t\t\t<img style='max-height: 25px;display:unset;margin:0' src='".SFSI_PLUS_PLUGURL."images/responsive-icon/".$icon.('Follow'===$icon?'.png':'.svg')."'>"."\n";
547
+ $icons.="\t\t\t\t<span style='color:#fff' >".($icon_config["text"])."</span>"."\n";
548
+ $icons.="\t\t\t</div>"."\n";
549
+ $icons.="\t\t</a>"."\n\n";
550
+ }
551
+ $icons.="</div></div><!--end responsive_icons-->";
552
+ return $icons;
553
+ endif;
554
+ }
555
+ ?>
libs/sfsi_install_uninstall.php CHANGED
@@ -12,7 +12,7 @@ function sfsi_plus_update_plugin()
12
  }
13
 
14
  //Install version
15
- update_option("sfsi_plus_pluginVersion", "3.22");
16
 
17
  if(!get_option('sfsi_plus_serverphpVersionnotification'))
18
  {
12
  }
13
 
14
  //Install version
15
+ update_option("sfsi_plus_pluginVersion", "3.24");
16
 
17
  if(!get_option('sfsi_plus_serverphpVersionnotification'))
18
  {
libs/sfsi_plus_subscribe_widget.php CHANGED
@@ -1,253 +1,288 @@
1
- <?php
2
- //Add Subscriber form css
3
- add_action("wp_head", "sfsi_plus_addStyleFunction");
4
- function sfsi_plus_addStyleFunction()
5
- {
6
- $option9 = unserialize(get_option('sfsi_plus_section9_options',false));
7
- $sfsi_plus_feediid = sanitize_text_field(get_option('sfsi_plus_feed_id'));
8
- $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
9
-
10
- echo $return = '';
11
- ?>
12
- <script>
13
- jQuery(document).ready(function(e) {
14
- jQuery("body").addClass("sfsi_plus_<?php echo get_option("sfsi_plus_pluginVersion");?>")
15
- });
16
- function sfsi_plus_processfurther(ref) {
17
- var feed_id = '<?php echo $sfsi_plus_feediid?>';
18
- var feedtype = 8;
19
- var email = jQuery(ref).find('input[name="data[Widget][email]"]').val();
20
- var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
21
- if ((email != "Enter your email") && (filter.test(email))) {
22
- if (feedtype == "8") {
23
- var url = "<?php echo $url; ?>"+feed_id+"/"+feedtype;
24
- window.open('', "popupwindow", "scrollbars=yes,width=1080,height=760");
25
- ref.target="popupwindow";
26
- ref.action=url;
27
- return true;
28
- }else{
29
- return false;
30
- }
31
- } else {
32
- alert("Please enter email address");
33
- jQuery(ref).find('input[name="data[Widget][email]"]').focus();
34
- return false;
35
- }
36
- }
37
- </script>
38
- <style >
39
- .sfsi_plus_subscribe_Popinner
40
- {
41
- <?php if($option9['sfsi_plus_form_adjustment'] == 'yes') : ?>
42
- width: 100% !important;
43
- height: auto !important;
44
- <?php else: ?>
45
- width: <?php echo $option9['sfsi_plus_form_width'] ?>px !important;
46
- height: <?php echo $option9['sfsi_plus_form_height'] ?>px !important;
47
- <?php endif;?>
48
- <?php if($option9['sfsi_plus_form_border'] == 'yes') : ?>
49
- border: <?php echo $option9['sfsi_plus_form_border_thickness']."px solid ".$option9['sfsi_plus_form_border_color'];?> !important;
50
- <?php endif;?>
51
- padding: 18px 0px !important;
52
- background-color: <?php echo $option9['sfsi_plus_form_background'] ?> !important;
53
- }
54
- .sfsi_plus_subscribe_Popinner form
55
- {
56
- margin: 0 20px !important;
57
- }
58
- .sfsi_plus_subscribe_Popinner h5
59
- {
60
- font-family: <?php echo $option9['sfsi_plus_form_heading_font'] ?> !important;
61
- <?php if($option9['sfsi_plus_form_heading_fontstyle'] != 'bold') {?>
62
- font-style: <?php echo $option9['sfsi_plus_form_heading_fontstyle'] ?> !important;
63
- <?php } else{ ?>
64
- font-weight: <?php echo $option9['sfsi_plus_form_heading_fontstyle'] ?> !important;
65
- <?php }?>
66
- color: <?php echo $option9['sfsi_plus_form_heading_fontcolor'] ?> !important;
67
- font-size: <?php echo $option9['sfsi_plus_form_heading_fontsize']."px" ?> !important;
68
- text-align: <?php echo $option9['sfsi_plus_form_heading_fontalign'] ?> !important;
69
- margin: 0 0 10px !important;
70
- padding: 0 !important;
71
- }
72
- .sfsi_plus_subscription_form_field {
73
- margin: 5px 0 !important;
74
- width: 100% !important;
75
- display: inline-flex;
76
- display: -webkit-inline-flex;
77
- }
78
- .sfsi_plus_subscription_form_field input {
79
- width: 100% !important;
80
- padding: 10px 0px !important;
81
- }
82
- .sfsi_plus_subscribe_Popinner input[type=email]
83
- {
84
- font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
85
- <?php if($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {?>
86
- font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
87
- <?php } else{ ?>
88
- font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
89
- <?php }?>
90
- color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
91
- font-size: <?php echo $option9['sfsi_plus_form_field_fontsize']."px" ?> !important;
92
- text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
93
- }
94
- .sfsi_plus_subscribe_Popinner input[type=email]::-webkit-input-placeholder {
95
- font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
96
- <?php if($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {?>
97
- font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
98
- <?php } else{ ?>
99
- font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
100
- <?php }?>
101
- color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
102
- font-size: <?php echo $option9['sfsi_plus_form_field_fontsize']."px" ?> !important;
103
- text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
104
- }
105
-
106
- .sfsi_plus_subscribe_Popinner input[type=email]:-moz-placeholder { /* Firefox 18- */
107
- font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
108
- <?php if($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {?>
109
- font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
110
- <?php } else{ ?>
111
- font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
112
- <?php }?>
113
- color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
114
- font-size: <?php echo $option9['sfsi_plus_form_field_fontsize']."px" ?> !important;
115
- text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
116
- }
117
-
118
- .sfsi_plus_subscribe_Popinner input[type=email]::-moz-placeholder { /* Firefox 19+ */
119
- font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
120
- <?php if($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {?>
121
- font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
122
- <?php } else{ ?>
123
- font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
124
- <?php }?>
125
- color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
126
- font-size: <?php echo $option9['sfsi_plus_form_field_fontsize']."px" ?> !important;
127
- text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
128
- }
129
-
130
- .sfsi_plus_subscribe_Popinner input[type=email]:-ms-input-placeholder {
131
- font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
132
- <?php if($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {?>
133
- font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
134
- <?php } else{ ?>
135
- font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
136
- <?php }?>
137
- color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
138
- font-size: <?php echo $option9['sfsi_plus_form_field_fontsize']."px" ?> !important;
139
- text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
140
- }
141
- .sfsi_plus_subscribe_Popinner input[type=submit]
142
- {
143
- font-family: <?php echo $option9['sfsi_plus_form_button_font'] ?> !important;
144
- <?php if($option9['sfsi_plus_form_button_fontstyle'] != 'bold') {?>
145
- font-style: <?php echo $option9['sfsi_plus_form_button_fontstyle']; ?> !important;
146
- <?php } else{ ?>
147
- font-weight: <?php echo $option9['sfsi_plus_form_button_fontstyle']; ?> !important;
148
- <?php }?>
149
- color: <?php echo $option9['sfsi_plus_form_button_fontcolor'] ?> !important;
150
- font-size: <?php echo $option9['sfsi_plus_form_button_fontsize']."px" ?> !important;
151
- text-align: <?php echo $option9['sfsi_plus_form_button_fontalign'] ?> !important;
152
- background-color: <?php echo $option9['sfsi_plus_form_button_background'] ?> !important;
153
- }
154
- </style>
155
- <?php
156
- }
157
- // Creating the widget
158
- class sfsiPlus_subscriber_widget extends WP_Widget {
159
-
160
- function __construct()
161
- {
162
- parent::__construct(
163
- // Base ID of your widget
164
- 'sfsiPlus_subscriber_widget',
165
-
166
- // Widget name will appear in UI
167
- 'Ultimate Social Plus Subscribe Form',
168
-
169
- // Widget description
170
- array( 'description' => 'Ultimate Social Plus Subscribe Form')
171
- );
172
- }
173
-
174
- public function widget( $args, $instance )
175
- {
176
- $title = apply_filters( 'widget_title', $instance['title'] );
177
-
178
- // before and after widget arguments are defined by themes
179
- echo $args['before_widget'];
180
-
181
- if ( ! empty( $title ) )
182
- {
183
- echo $args['before_title'] . $title . $args['after_title'];
184
- }
185
-
186
- // Call subscriber form
187
- echo do_shortcode("[USM_plus_form]");
188
-
189
- echo $args['after_widget'];
190
- }
191
-
192
- // Widget Backend
193
- public function form( $instance )
194
- {
195
- if ( isset( $instance[ 'title' ] ))
196
- {
197
- $title = $instance[ 'title' ];
198
- }
199
- else
200
- {
201
- $title = '';
202
- }
203
- ?>
204
- <p>
205
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title' ); ?>:</label>
206
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
207
- </p>
208
- <?php
209
- }
210
-
211
- // Updating widget replacing old instances with new
212
- public function update( $newInstance, $oldInstance )
213
- {
214
- $instance = array();
215
- $instance['title'] = ( ! empty( $newInstance['title'] ) ) ? strip_tags( $newInstance['title'] ) : '';
216
- return $instance;
217
- }
218
- }
219
- // Class wpb_widget ends here
220
-
221
- // Register and load the widget
222
- function sfsiPlus_subscriber_load_widget()
223
- {
224
- register_widget( 'sfsiPlus_subscriber_widget');
225
- }
226
- add_action( 'widgets_init', 'sfsiPlus_subscriber_load_widget');
227
- ?>
228
- <?php
229
- add_shortcode("USM_plus_form", "sfsi_plus_get_subscriberForm");
230
- function sfsi_plus_get_subscriberForm()
231
- {
232
- $option9 = unserialize(get_option('sfsi_plus_section9_options',false));
233
- $sfsi_plus_feediid = sanitize_text_field(get_option('sfsi_plus_feed_id'));
234
- $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
235
-
236
- $return = '';
237
- $url = $url.$sfsi_plus_feediid.'/8/';
238
- $return .= '<div class="sfsi_plus_subscribe_Popinner">
239
- <form method="post" onsubmit="return sfsi_plus_processfurther(this);" action="#">
240
- <h5>'.__(trim($option9['sfsi_plus_form_heading_text']),SFSI_PLUS_DOMAIN).'</h5>
241
- <div class="sfsi_plus_subscription_form_field">
242
- <input type="email" name="data[Widget][email]" value="" placeholder="'.trim($option9['sfsi_plus_form_field_text']).'"/>
243
- </div>
244
- <div class="sfsi_plus_subscription_form_field">
245
- <input type="hidden" name="data[Widget][feed_id]" value="'.$sfsi_plus_feediid.'">
246
- <input type="hidden" name="data[Widget][feedtype]" value="8">
247
- <input type="submit" name="subscribe" value="'.__($option9['sfsi_plus_form_button_text'],SFSI_PLUS_DOMAIN).'" />
248
- </div>
249
- </form>
250
- </div>';
251
- return $return;
252
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  ?>
1
+ <?php
2
+ //Add Subscriber form css
3
+ add_action("wp_head", "sfsi_plus_addStyleFunction");
4
+ function sfsi_plus_addStyleFunction()
5
+ {
6
+ $option9 = unserialize(get_option('sfsi_plus_section9_options', false));
7
+ $sfsi_plus_feediid = sanitize_text_field(get_option('sfsi_plus_feed_id'));
8
+ $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
9
+
10
+ echo $return = '';
11
+ ?>
12
+ <script>
13
+ jQuery(document).ready(function(e) {
14
+ jQuery("body").addClass("sfsi_plus_<?php echo get_option("sfsi_plus_pluginVersion"); ?>")
15
+ });
16
+
17
+ function sfsi_plus_processfurther(ref) {
18
+ var feed_id = '<?php echo $sfsi_plus_feediid ?>';
19
+ var feedtype = 8;
20
+ var email = jQuery(ref).find('input[name="data[Widget][email]"]').val();
21
+ var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
22
+ if ((email != "Enter your email") && (filter.test(email))) {
23
+ if (feed_id != "") {
24
+ if (feedtype == "8") {
25
+ var url = "<?php echo $url; ?>" + feed_id + "/" + feedtype;
26
+ window.open('', "popupwindow", "scrollbars=yes,width=1080,height=760");
27
+ ref.target = "popupwindow";
28
+ ref.action = url;
29
+ return true;
30
+ } else {
31
+ return false;
32
+ }
33
+ }
34
+ } else {
35
+ alert("Please enter email address");
36
+ jQuery(ref).find('input[name="data[Widget][email]"]').focus();
37
+ return false;
38
+ }
39
+ }
40
+ </script>
41
+ <style>
42
+ .sfsi_plus_subscribe_Popinner {
43
+ <?php if ($option9['sfsi_plus_form_adjustment'] == 'yes') : ?>width: 100% !important;
44
+ height: auto !important;
45
+ <?php else : ?>width: <?php echo $option9['sfsi_plus_form_width'] ?>px !important;
46
+ height: <?php echo $option9['sfsi_plus_form_height'] ?>px !important;
47
+ <?php endif;
48
+ ?><?php if ($option9['sfsi_plus_form_border'] == 'yes') : ?>border: <?php echo $option9['sfsi_plus_form_border_thickness'] . "px solid " . $option9['sfsi_plus_form_border_color'];
49
+ ?> !important;
50
+ <?php endif;
51
+ ?>padding: 18px 0px !important;
52
+ background-color: <?php echo $option9['sfsi_plus_form_background'] ?> !important;
53
+ }
54
+
55
+ .sfsi_plus_subscribe_Popinner form {
56
+ margin: 0 20px !important;
57
+ }
58
+
59
+ .sfsi_plus_subscribe_Popinner h5 {
60
+ font-family: <?php echo $option9['sfsi_plus_form_heading_font'] ?> !important;
61
+
62
+ <?php if ($option9['sfsi_plus_form_heading_fontstyle'] != 'bold') {
63
+ ?>font-style: <?php echo $option9['sfsi_plus_form_heading_fontstyle'] ?> !important;
64
+ <?php
65
+ } else {
66
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_heading_fontstyle'] ?> !important;
67
+ <?php
68
+ }
69
+
70
+ ?>color: <?php echo $option9['sfsi_plus_form_heading_fontcolor'] ?> !important;
71
+ font-size: <?php echo $option9['sfsi_plus_form_heading_fontsize'] . "px" ?> !important;
72
+ text-align: <?php echo $option9['sfsi_plus_form_heading_fontalign'] ?> !important;
73
+ margin: 0 0 10px !important;
74
+ padding: 0 !important;
75
+ }
76
+
77
+ .sfsi_plus_subscription_form_field {
78
+ margin: 5px 0 !important;
79
+ width: 100% !important;
80
+ display: inline-flex;
81
+ display: -webkit-inline-flex;
82
+ }
83
+
84
+ .sfsi_plus_subscription_form_field input {
85
+ width: 100% !important;
86
+ padding: 10px 0px !important;
87
+ }
88
+
89
+ .sfsi_plus_subscribe_Popinner input[type=email] {
90
+ font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
91
+
92
+ <?php if ($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {
93
+ ?>font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
94
+ <?php
95
+ } else {
96
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
97
+ <?php
98
+ }
99
+
100
+ ?>color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
101
+ font-size: <?php echo $option9['sfsi_plus_form_field_fontsize'] . "px" ?> !important;
102
+ text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
103
+ }
104
+
105
+ .sfsi_plus_subscribe_Popinner input[type=email]::-webkit-input-placeholder {
106
+ font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
107
+
108
+ <?php if ($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {
109
+ ?>font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
110
+ <?php
111
+ } else {
112
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
113
+ <?php
114
+ }
115
+
116
+ ?>color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
117
+ font-size: <?php echo $option9['sfsi_plus_form_field_fontsize'] . "px" ?> !important;
118
+ text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
119
+ }
120
+
121
+ .sfsi_plus_subscribe_Popinner input[type=email]:-moz-placeholder {
122
+ /* Firefox 18- */
123
+ font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
124
+
125
+ <?php if ($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {
126
+ ?>font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
127
+ <?php
128
+ } else {
129
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
130
+ <?php
131
+ }
132
+
133
+ ?>color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
134
+ font-size: <?php echo $option9['sfsi_plus_form_field_fontsize'] . "px" ?> !important;
135
+ text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
136
+ }
137
+
138
+ .sfsi_plus_subscribe_Popinner input[type=email]::-moz-placeholder {
139
+ /* Firefox 19+ */
140
+ font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
141
+
142
+ <?php if ($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {
143
+ ?>font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
144
+ <?php
145
+ } else {
146
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
147
+ <?php
148
+ }
149
+
150
+ ?>color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
151
+ font-size: <?php echo $option9['sfsi_plus_form_field_fontsize'] . "px" ?> !important;
152
+ text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
153
+ }
154
+
155
+ .sfsi_plus_subscribe_Popinner input[type=email]:-ms-input-placeholder {
156
+ font-family: <?php echo $option9['sfsi_plus_form_field_font'] ?> !important;
157
+
158
+ <?php if ($option9['sfsi_plus_form_field_fontstyle'] != 'bold') {
159
+ ?>font-style: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
160
+ <?php
161
+ } else {
162
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_field_fontstyle'] ?> !important;
163
+ <?php
164
+ }
165
+
166
+ ?>color: <?php echo $option9['sfsi_plus_form_field_fontcolor'] ?> !important;
167
+ font-size: <?php echo $option9['sfsi_plus_form_field_fontsize'] . "px" ?> !important;
168
+ text-align: <?php echo $option9['sfsi_plus_form_field_fontalign'] ?> !important;
169
+ }
170
+
171
+ .sfsi_plus_subscribe_Popinner input[type=submit] {
172
+ font-family: <?php echo $option9['sfsi_plus_form_button_font'] ?> !important;
173
+
174
+ <?php if ($option9['sfsi_plus_form_button_fontstyle'] != 'bold') {
175
+ ?>font-style: <?php echo $option9['sfsi_plus_form_button_fontstyle'];
176
+ ?> !important;
177
+ <?php
178
+ } else {
179
+ ?>font-weight: <?php echo $option9['sfsi_plus_form_button_fontstyle'];
180
+ ?> !important;
181
+ <?php
182
+ }
183
+
184
+ ?>color: <?php echo $option9['sfsi_plus_form_button_fontcolor'] ?> !important;
185
+ font-size: <?php echo $option9['sfsi_plus_form_button_fontsize'] . "px" ?> !important;
186
+ text-align: <?php echo $option9['sfsi_plus_form_button_fontalign'] ?> !important;
187
+ background-color: <?php echo $option9['sfsi_plus_form_button_background'] ?> !important;
188
+ }
189
+ </style>
190
+ <?php
191
+ }
192
+ // Creating the widget
193
+ class sfsiPlus_subscriber_widget extends WP_Widget
194
+ {
195
+
196
+ function __construct()
197
+ {
198
+ parent::__construct(
199
+ // Base ID of your widget
200
+ 'sfsiPlus_subscriber_widget',
201
+
202
+ // Widget name will appear in UI
203
+ 'Ultimate Social Plus Subscribe Form',
204
+
205
+ // Widget description
206
+ array('description' => 'Ultimate Social Plus Subscribe Form')
207
+ );
208
+ }
209
+
210
+ public function widget($args, $instance)
211
+ {
212
+ $title = apply_filters('widget_title', $instance['title']);
213
+
214
+ // before and after widget arguments are defined by themes
215
+ echo $args['before_widget'];
216
+
217
+ if (!empty($title)) {
218
+ echo $args['before_title'] . $title . $args['after_title'];
219
+ }
220
+
221
+ // Call subscriber form
222
+ echo do_shortcode("[USM_plus_form]");
223
+
224
+ echo $args['after_widget'];
225
+ }
226
+
227
+ // Widget Backend
228
+ public function form($instance)
229
+ {
230
+ if (isset($instance['title'])) {
231
+ $title = $instance['title'];
232
+ } else {
233
+ $title = '';
234
+ }
235
+ ?>
236
+ <p>
237
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title'); ?>:</label>
238
+ <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
239
+ </p>
240
+ <?php
241
+ }
242
+
243
+ // Updating widget replacing old instances with new
244
+ public function update($newInstance, $oldInstance)
245
+ {
246
+ $instance = array();
247
+ $instance['title'] = (!empty($newInstance['title'])) ? strip_tags($newInstance['title']) : '';
248
+ return $instance;
249
+ }
250
+ }
251
+ // Class wpb_widget ends here
252
+
253
+ // Register and load the widget
254
+ function sfsiPlus_subscriber_load_widget()
255
+ {
256
+ register_widget('sfsiPlus_subscriber_widget');
257
+ }
258
+ add_action('widgets_init', 'sfsiPlus_subscriber_load_widget');
259
+ ?>
260
+ <?php
261
+ add_shortcode("USM_plus_form", "sfsi_plus_get_subscriberForm");
262
+ function sfsi_plus_get_subscriberForm()
263
+ {
264
+ $option9 = unserialize(get_option('sfsi_plus_section9_options', false));
265
+ $sfsi_plus_feediid = sanitize_text_field(get_option('sfsi_plus_feed_id'));
266
+ if ($sfsi_plus_feediid) {
267
+ $url = "https://www.specificfeeds.com/subscribe?pub=boTZa2n0OIjC4D8PkiyzByH-uKEJSZgqMW-sJiFwbuEnoxENjKva2A";
268
+ } else {
269
+ $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
270
+ $url = $url . $sfsi_plus_feediid . '/8/';
271
+ }
272
+ $return = '';
273
+ $return .= '<div class="sfsi_plus_subscribe_Popinner">
274
+ <form method="post" onsubmit="return sfsi_plus_processfurther(this);" action="#">
275
+ <h5>' . __(trim($option9['sfsi_plus_form_heading_text']), SFSI_PLUS_DOMAIN) . '</h5>
276
+ <div class="sfsi_plus_subscription_form_field">
277
+ <input type="email" name="data[Widget][email]" value="" placeholder="' . trim($option9['sfsi_plus_form_field_text']) . '"/>
278
+ </div>
279
+ <div class="sfsi_plus_subscription_form_field">
280
+ <input type="hidden" name="data[Widget][feed_id]" value="' . $sfsi_plus_feediid . '">
281
+ <input type="hidden" name="data[Widget][feedtype]" value="8">
282
+ <input type="submit" name="subscribe" value="' . __($option9['sfsi_plus_form_button_text'], SFSI_PLUS_DOMAIN) . '" />
283
+ </div>
284
+ </form>
285
+ </div>';
286
+ return $return;
287
+ }
288
  ?>
libs/sfsi_widget.php CHANGED
@@ -1,1811 +1,1815 @@
1
- <?php
2
- /* create SFSI widget */
3
- class Sfsi_Plus_Widget extends WP_Widget
4
- {
5
- function __construct()
6
- {
7
- $widget_ops = array( 'classname' => 'sfsi_plus', 'description' => 'Ultimate Social Media PLUS widgets');
8
- $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-plus-widget' );
9
-
10
- parent::__construct(
11
- // Base ID of your widget
12
- 'sfsi-plus-widget',
13
-
14
- // Widget name will appear in UI
15
- 'Ultimate Social Media PLUS',
16
-
17
- // Widget description
18
- $widget_ops,
19
-
20
- $control_ops
21
- );
22
- }
23
-
24
- function widget( $args, $instance )
25
- {
26
- extract( $args );
27
- //if show via widget is checked
28
- $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
29
- $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
30
- $sfsi_plus_show_via_widget = $sfsi_plus_section8_options['sfsi_plus_show_via_widget'];
31
- if($sfsi_plus_show_via_widget == "yes")
32
- {
33
- /*Our variables from the widget settings. */
34
- $title = apply_filters('widget_title', $instance['title'] );
35
- $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false;
36
- global $is_floter;
37
- echo $before_widget;
38
- /* Display the widget title */
39
- if ( $title ) echo $before_title . $title . $after_title;
40
- ?>
41
- <div class="sfsi_plus_widget" data-position="widget">
42
- <div id='sfsi_plus_wDiv'></div>
43
- <?php
44
- /* Link the main icons function */
45
- echo sfsi_plus_check_visiblity(0);
46
- ?>
47
- <div style="clear: both;"></div>
48
- </div>
49
- <?php
50
- if ( is_active_widget( false, false, $this->id_base, true ) ) { }
51
- echo $after_widget;
52
- }
53
- else
54
- {
55
- //echo 'Kindly go to setting page and check the option "show them via a widget"';
56
- }
57
- }
58
-
59
- /*Update the widget */
60
- function update( $new_instance, $old_instance )
61
- {
62
- $instance = $old_instance;
63
- //Strip tags from title and name to remove HTML
64
- if($new_instance['showf']==0)
65
- {
66
- $instance['showf']=1;
67
- }
68
- else
69
- {
70
- $instance['showf']=0;
71
- }
72
- $instance['title'] = strip_tags( $new_instance['title'] );
73
- return $instance;
74
- }
75
-
76
- /* Set up some default widget settings. */
77
- function form( $instance )
78
- {
79
- $defaults = array( 'title' =>"" );
80
- $instance = wp_parse_args( (array) $instance, $defaults );
81
- if(isset($instance['showf']))
82
- {
83
- if( $instance['showf'] == 0 && empty($instance['title']))
84
- {
85
- $instance['title']='Please follow & like us :)';
86
- }
87
- else
88
- {
89
- $instance['title'];
90
- }
91
- }
92
- else
93
- {
94
- $instance['title']='Please follow & like us :)';
95
- }
96
- ?>
97
- <p>
98
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">
99
- <?php _e('Title', SFSI_PLUS_DOMAIN); ?>:
100
- </label>
101
- <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:100%;" />
102
- <input type="hidden" value="<?php echo isset($instance['showf'])?$instance['showf']:''; ?>" id="<?php echo $this->get_field_id( 'showf' ); ?>" name="<?php echo $this->get_field_name( 'showf' ); ?>" />
103
- </p>
104
- <p>
105
- <?php _e('Please go to the plugin page to set your preferences:',SFSI_PLUS_DOMAIN); ?>
106
- <a href="admin.php?page=sfsi-plus-options"><?php _e('Click here', SFSI_PLUS_DOMAIN); ?></a>
107
- </p>
108
- <?php
109
- }
110
- }
111
- /* END OF widget Class */
112
-
113
- /* register widget to wordpress */
114
- function register_sfsi_plus_widgets()
115
- {
116
- register_widget( 'sfsi_plus_widget' );
117
- }
118
- add_action( 'widgets_init', 'register_sfsi_plus_widgets' );
119
-
120
- /* check the icons visiblity */
121
- function sfsi_plus_check_visiblity($isFloter=0,$share_url=null,$container_position='absolute')
122
- {
123
- global $wpdb;
124
- /* Access the saved settings in database */
125
- $sfsi_plus_section1_options = unserialize(get_option('sfsi_plus_section1_options',false));
126
- $sfsi_section3 = unserialize(get_option('sfsi_plus_section3_options',false));
127
- $sfsi_section5 = unserialize(get_option('sfsi_plus_section5_options',false));
128
- //options that are added on the third question
129
- $sfsi_section8 = unserialize(get_option('sfsi_plus_section8_options',false));
130
-
131
- /* calculate the width and icons display alignments */
132
- $icons_space = $sfsi_section5['sfsi_plus_icons_spacing'];
133
- $icons_size = $sfsi_section5['sfsi_plus_icons_size'];
134
- $icons_per_row = ($sfsi_section5['sfsi_plus_icons_perRow'])? $sfsi_section5['sfsi_plus_icons_perRow'] : '';
135
- $icons_alignment = $sfsi_section5['sfsi_plus_icons_Alignment'];
136
- $position = 'position:absolute;';
137
- $position1 = 'position:'.$container_position.';';
138
- $jquery='<script>';
139
-
140
- $jquery .= 'jQuery(".sfsi_plus_widget").each(function( index ) {
141
- if(jQuery(this).attr("data-position") == "widget")
142
- {
143
- var wdgt_hght = jQuery(this).children(".sfsiplus_norm_row.sfsi_plus_wDiv").height();
144
- var title_hght = jQuery(this).parent(".widget.sfsi_plus").children(".widget-title").height();
145
- var totl_hght = parseInt( title_hght ) + parseInt( wdgt_hght );
146
- jQuery(this).parent(".widget.sfsi_plus").css("min-height", totl_hght+"px");
147
- }
148
- });';
149
-
150
- /* check if icons shuffling is activated in admin or not */
151
- if($sfsi_section5['sfsi_plus_icons_stick']=="yes")
152
- {
153
- if(is_admin_bar_showing())
154
- {
155
- $Ictop="30px";
156
- }
157
- else
158
- {
159
- $Ictop="0";
160
- }
161
- $jquery.='var s = jQuery(".sfsi_plus_widget");
162
- var pos = s.position();
163
- jQuery(window).scroll(function(){
164
- sfsi_plus_stick_widget("'.$Ictop.'");
165
- }); ';
166
- }
167
-
168
- /* check if icons floating is activated in admin */
169
- /*settings under third question*/
170
- if($sfsi_section8['sfsi_plus_float_on_page']=="yes")
171
- {
172
- $top="15";
173
- //switch($sfsi_section5['sfsi_plus_icons_floatPosition'])
174
- switch($sfsi_section8['sfsi_plus_float_page_position'])
175
- {
176
- case "top-left" :
177
- if(is_admin_bar_showing())
178
- {
179
- $position.="position:absolute;left:30px;top:35px;"; $top="35";
180
- }
181
- else
182
- {
183
- $position.="position:absolute;left:10px;top:2%"; $top="10";
184
- }
185
- break;
186
- case "top-right" :
187
- if(is_admin_bar_showing())
188
- {
189
- $position.="position:absolute;right:30px;top:35px;"; $top="35";
190
- }else
191
- {
192
- $position.="position:absolute;right:10px;top:2%"; $top="10";
193
- }
194
- break;
195
- case "center-right" :
196
- $position.="position:absolute;right:30px;top:50%"; $top="center";
197
- break;
198
- case "center-left" :
199
- $position.="position:absolute;left:30px;top:50%"; $top="center";
200
- break;
201
- case "bottom-right" :
202
- $position.="position:absolute;right:30px;bottom:0px"; $top="bottom";
203
- break;
204
- case "bottom-left" :
205
- $position.="position:absolute;left:30px;bottom:0px"; $top="bottom";
206
- break;
207
- }
208
- if($sfsi_section8['sfsi_plus_float_page_position'] == 'center-right' || $sfsi_section8['sfsi_plus_float_page_position'] == 'center-left')
209
- {
210
- $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." )
211
- {
212
- var topalign = ( jQuery(window).height() - jQuery('#sfsi_plus_floater').height() ) / 2;
213
- jQuery('#sfsi_plus_floater').css('top',topalign);
214
- sfsi_plus_float_widget('".$top."');
215
- });";
216
- }
217
- else
218
- {
219
- $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { sfsi_plus_float_widget('".$top."')});";
220
- }
221
- }
222
-
223
- $extra=0;
224
- if($sfsi_section3['sfsi_plus_shuffle_icons']=="yes")
225
- {
226
- if($sfsi_section3['sfsi_plus_shuffle_Firstload']=="yes" && $sfsi_section3['sfsi_plus_shuffle_interval']=="yes")
227
- {
228
- $shuffle_time=(isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
229
- $shuffle_time=$shuffle_time*1000;
230
- $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
231
- }
232
- else if($sfsi_section3['sfsi_plus_shuffle_Firstload']=="no" && $sfsi_section3['sfsi_plus_shuffle_interval']=="yes")
233
- {
234
- $shuffle_time=(isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
235
- $shuffle_time=$shuffle_time*1000;
236
- $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
237
- }
238
- else
239
- {
240
- $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
241
- }
242
- }
243
-
244
- /* magnage the icons in saved order in admin */
245
- $custom_icons_order = unserialize($sfsi_section5['sfsi_plus_CustomIcons_order']);
246
- $icons_list = array();
247
- if(isset($sfsi_plus_section1_options['sfsi_custom_files'])){
248
- if(is_string($sfsi_plus_section1_options['sfsi_custom_files'])){
249
- $icons_list= unserialize($sfsi_plus_section1_options['sfsi_custom_files']);
250
- }else{
251
- $icons_list= $sfsi_plus_section1_options['sfsi_custom_files'];
252
- }
253
- }
254
- if(!isset($sfsi_plus_section5_options['sfsi_plus_houzzIcon_order'])){
255
- $sfsi_plus_section5_options['sfsi_plus_houzzIcon_order']=11;
256
- }
257
- if(!isset($sfsi_plus_section5_options['sfsi_plus_okIcon_order'])){
258
- $sfsi_plus_section5_options['sfsi_plus_okIcon_order']=22;
259
- }
260
- if(!isset($sfsi_plus_section5_options['sfsi_plus_telegramIcon_order'])){
261
- $sfsi_plus_section5_options['sfsi_plus_telegramIcon_order']=23;
262
- }
263
- if(!isset($sfsi_plus_section5_options['sfsi_plus_vkIcon_order'])){
264
- $sfsi_plus_section5_options['sfsi_plus_vkIcon_order']=24;
265
- }
266
- if(!isset($sfsi_plus_section5_options['sfsi_plus_wechatIcon_order'])){
267
- $sfsi_plus_section5_options['sfsi_plus_wechatIcon_order']=26;
268
- }
269
- if(!isset($sfsi_plus_section5_options['sfsi_plus_weiboIcon_order'])){
270
- $sfsi_plus_section5_options['sfsi_plus_weiboIcon_order']=25;
271
- }
272
-
273
- // $icons_list = (isset($sfsi_plus_section1_options['sfsi_custom_files']))?(!is_string($sfsi_plus_section1_options['sfsi_custom_files'])?unserialize($sfsi_plus_section1_options['sfsi_custom_files'],false):$sfsi_plus_section1_options['sfsi_custom_files']):(array());
274
-
275
- $icons_order = array(
276
- '0' => '',
277
- $sfsi_section5['sfsi_plus_rssIcon_order']=>'rss',
278
- $sfsi_section5['sfsi_plus_emailIcon_order']=>'email',
279
- $sfsi_section5['sfsi_plus_facebookIcon_order']=>'facebook',
280
- $sfsi_section5['sfsi_plus_twitterIcon_order']=>'twitter',
281
- $sfsi_section5['sfsi_plus_youtubeIcon_order']=>'youtube',
282
- $sfsi_section5['sfsi_plus_pinterestIcon_order']=>'pinterest',
283
- $sfsi_section5['sfsi_plus_linkedinIcon_order']=>'linkedin',
284
- $sfsi_section5['sfsi_plus_instagramIcon_order']=>'instagram',
285
- $sfsi_section5['sfsi_plus_houzzIcon_order']=>'houzz',
286
- $sfsi_section5['sfsi_plus_okIcon_order']=>'ok',
287
- $sfsi_section5['sfsi_plus_telegramIcon_order']=>'telegram',
288
- $sfsi_section5['sfsi_plus_vkIcon_order']=>'vk',
289
- $sfsi_section5['sfsi_plus_wechatIcon_order']=>'wechat',
290
- $sfsi_section5['sfsi_plus_weiboIcon_order']=>'weibo'
291
-
292
- );
293
- if(!is_array($custom_icons_order)){
294
- $custom_icons_order = array();
295
- }
296
- $max_custom_icon_order=max(array_keys($icons_order));
297
- if(is_array($icons_list)){
298
- foreach($icons_list as $index=>$icon){
299
- if(false===array_search($index, array_column($custom_icons_order, 'ele'))){
300
- array_push($custom_icons_order,array('order'=>($max_custom_icon_order+count($custom_icons_order)),'ele'=>$index));
301
- }
302
- }
303
- }
304
- if(is_array($custom_icons_order) )
305
- {
306
- foreach($custom_icons_order as $data)
307
- {
308
- $icons_order[$data['order']] = $data;
309
- }
310
- }
311
-
312
- ksort($icons_order);
313
- /* calculate the total width of widget according to icons */
314
- if(!empty($icons_per_row))
315
- {
316
- $width = ((int)$icons_space+(int)$icons_size)*(int)$icons_per_row;
317
- $main_width = $width=$width+$extra;
318
- $main_width = $main_width."px";
319
- }
320
- else
321
- {
322
- $main_width="35%";
323
- }
324
-
325
- /* built the main widget div */
326
- $icons_main='<div class="sfsiplus_norm_row sfsi_plus_wDiv" style="width:'.$main_width.';text-align:'.$icons_alignment.';'.$position1.'">';
327
- $icons="";
328
- /* loop through icons and bulit the icons with all settings applied in admin */
329
- foreach($icons_order as $index => $icn)
330
- {
331
-
332
- if(is_array($icn))
333
- {
334
- $icon_arry=$icn; $icn="custom" ;
335
- }
336
- switch ($icn)
337
- {
338
- case 'rss' : if($sfsi_plus_section1_options['sfsi_plus_rss_display']=='yes') $icons.= sfsi_plus_prepairIcons('rss',0,"no",null,$share_url);
339
- break;
340
- case 'email' : if($sfsi_plus_section1_options['sfsi_plus_email_display']=='yes') $icons.= sfsi_plus_prepairIcons('email',0,"no",null,$share_url);
341
- break;
342
- case 'facebook' : if($sfsi_plus_section1_options['sfsi_plus_facebook_display']=='yes') $icons.= sfsi_plus_prepairIcons('facebook',0,"no",null,$share_url);
343
- break;
344
-
345
- case 'twitter' : if($sfsi_plus_section1_options['sfsi_plus_twitter_display']=='yes') $icons.= sfsi_plus_prepairIcons('twitter',0,"no",null,$share_url);
346
- break;
347
- case 'youtube' : if($sfsi_plus_section1_options['sfsi_plus_youtube_display']=='yes') $icons.= sfsi_plus_prepairIcons('youtube',0,"no",null,$share_url);
348
- break;
349
- case 'pinterest' : if($sfsi_plus_section1_options['sfsi_plus_pinterest_display']=='yes') $icons.= sfsi_plus_prepairIcons('pinterest',0,"no",null,$share_url);
350
- break;
351
- case 'linkedin' : if($sfsi_plus_section1_options['sfsi_plus_linkedin_display']=='yes') $icons.= sfsi_plus_prepairIcons('linkedin',0,"no",null,$share_url);
352
- break;
353
- case 'instagram' : if($sfsi_plus_section1_options['sfsi_plus_instagram_display']=='yes') $icons.= sfsi_plus_prepairIcons('instagram',0,"no",null,$share_url);
354
- break;
355
- case 'houzz' :
356
- if(
357
- isset($sfsi_plus_section1_options['sfsi_plus_houzz_display']) &&
358
- $sfsi_plus_section1_options['sfsi_plus_houzz_display'] == 'yes'
359
- )
360
- {
361
- $icons.= sfsi_plus_prepairIcons('houzz',0,"no",null,$share_url);
362
- }
363
- break;
364
- case 'ok' : if($sfsi_plus_section1_options['sfsi_plus_ok_display']=='yes') $icons.= sfsi_plus_prepairIcons('ok',0,"no",null,$share_url);
365
- break;
366
- case 'telegram' : if($sfsi_plus_section1_options['sfsi_plus_telegram_display']=='yes') $icons.= sfsi_plus_prepairIcons('telegram',0,"no",null,$share_url);
367
- break;
368
- case 'vk' : if($sfsi_plus_section1_options['sfsi_plus_vk_display']=='yes') $icons.= sfsi_plus_prepairIcons('vk',0,"no",null,$share_url);
369
- break;
370
- case 'weibo' : if($sfsi_plus_section1_options['sfsi_plus_weibo_display']=='yes') $icons.= sfsi_plus_prepairIcons('weibo',0,"no",null,$share_url);
371
- break;
372
-
373
- case 'wechat' : if($sfsi_plus_section1_options['sfsi_plus_wechat_display']=='yes') $icons.= sfsi_plus_prepairIcons('wechat',0,"no",null,$share_url);
374
- break;
375
- case 'custom' : $icons.= sfsi_plus_prepairIcons($icon_arry['ele'],0,"no",null,$share_url);
376
- break;
377
- }
378
- }
379
-
380
-
381
- $jquery.="</script>";
382
- $icons.='</div >';
383
-
384
- $width = isset($width) && !empty($width) ? $width : 0;
385
-
386
- $margin= $width+11;
387
-
388
- $icons_main.=$icons.'<div id="sfsi_holder" class="sfsi_plus_holders" style="position: relative; float: left;width:100%;z-index:-1;"></div >'.$jquery;
389
- /* if floating of icons is active create a floater div */
390
- $icons_float='';
391
- if($sfsi_section8['sfsi_plus_float_on_page']=="yes" && $isFloter==1)
392
- {
393
- if($sfsi_section8['sfsi_plus_float_page_position'] == "top-left")
394
- {
395
- $styleMargin = "margin-top:".$sfsi_section8['sfsi_plus_icons_floatMargin_top']."px;margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
396
- }
397
- elseif($sfsi_section8['sfsi_plus_float_page_position'] == "top-right")
398
- {
399
- $styleMargin = "margin-top:".$sfsi_section8['sfsi_plus_icons_floatMargin_top']."px;margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
400
- }
401
- elseif($sfsi_section8['sfsi_plus_float_page_position'] == "center-left")
402
- {
403
- $styleMargin = "margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
404
- }
405
- elseif($sfsi_section8['sfsi_plus_float_page_position'] == "center-right")
406
- {
407
- $styleMargin = "margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
408
- }
409
- elseif($sfsi_section8['sfsi_plus_float_page_position'] == "bottom-left")
410
- {
411
- $styleMargin = "margin-bottom:".$sfsi_section8['sfsi_plus_icons_floatMargin_bottom']."px;margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
412
- }
413
- elseif($sfsi_section8['sfsi_plus_float_page_position'] == "bottom-right")
414
- {
415
- $styleMargin = "margin-bottom:".$sfsi_section8['sfsi_plus_icons_floatMargin_bottom']."px;margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
416
- }
417
-
418
- // $icons_float = '<style >#sfsi_plus_floater { '.$styleMargin.' }</style>';
419
- add_action('wp_footer',function()use($styleMargin){
420
- echo '<script>var css = "#sfsi_plus_floater { '.$styleMargin.' }",
421
- head = document.head || document.getElementsByTagName("head")[0],
422
- style = document.createElement("style");
423
-
424
- head.appendChild(style);
425
- if (style.styleSheet){
426
- // This is required for IE8 and below.
427
- style.styleSheet.cssText = css;
428
- } else {
429
- style.appendChild(document.createTextNode(css));
430
- }</script>';
431
- },100);
432
- $icons_float .= '<div class="sfsiplus_norm_row sfsi_plus_wDiv" id="sfsi_plus_floater" style="z-index: 9999;width:'.$width.'px;text-align:'.$icons_alignment.';'.$position.'">';
433
- $icons_float .= $icons;
434
- $icons_float .= "<input type='hidden' id='sfsi_plus_floater_sec' value='".$sfsi_section8['sfsi_plus_float_page_position']."' />";
435
- $icons_float .= $jquery;
436
- return $icons_float; exit;
437
- }
438
- $icons_data=$icons_main.$icons_float;
439
- return $icons_data;
440
- }
441
- /* make all icons with saved settings in admin */
442
- function sfsi_plus_prepairIcons($icon_name,$is_front=0, $onpost="no", $fromPost = NULL,$share_url=null)
443
- {
444
- global $wpdb; global $socialObj; global $post;
445
- $mouse_hover_effect = '';
446
- $active_theme = 'official';
447
- $sfsi_plus_shuffle_Firstload = 'no';
448
- $sfsi_plus_display_counts = "no";
449
- $icon = '';
450
- $url = '';
451
- $alt_text = '';
452
- $new_window = '';
453
- $class = '';
454
- /* access all saved settings in admin */
455
- $sfsi_plus_section1_options = unserialize(get_option('sfsi_plus_section1_options',false));
456
- $sfsi_plus_section2_options = unserialize(get_option('sfsi_plus_section2_options',false));
457
- $sfsi_plus_section3_options = unserialize(get_option('sfsi_plus_section3_options',false));
458
- $sfsi_plus_section4_options = unserialize(get_option('sfsi_plus_section4_options',false));
459
- $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
460
- $sfsi_plus_section6_options = unserialize(get_option('sfsi_plus_section6_options',false));
461
- $sfsi_plus_section7_options = unserialize(get_option('sfsi_plus_section7_options',false));
462
- $sfsi_plus_section8_options = unserialize(get_option('sfsi_plus_section8_options',false));
463
- /* get active theme */
464
- $border_radius = '';
465
- $active_theme = $sfsi_plus_section3_options['sfsi_plus_actvite_theme'];
466
-
467
-
468
- /* shuffle effect */
469
- if($sfsi_plus_section3_options['sfsi_plus_shuffle_icons']=='yes')
470
- {
471
- $sfsi_plus_shuffle_Firstload=$sfsi_plus_section3_options["sfsi_plus_shuffle_Firstload"];
472
- if($sfsi_plus_section3_options["sfsi_plus_shuffle_interval"]=="yes")
473
- {
474
- $sfsi_plus_shuffle_interval = $sfsi_plus_section3_options["sfsi_plus_shuffle_intervalTime"];
475
- }
476
- }
477
- /* define the main url for icon access */
478
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/".$active_theme."/";
479
- $visit_iconsUrl = SFSI_PLUS_PLUGURL."images/visit_icons/";
480
- $share_iconsUrl = SFSI_PLUS_PLUGURL."images/share_icons/";
481
- $hoverSHow = 0;
482
- // var_dump($icons_baseUrl,$visit_iconsUrl);die();
483
- /* check is icon is a custom icon or default icon */
484
- if(is_numeric($icon_name)) { $icon_n=$icon_name; $icon_name="custom" ; }
485
- $counts='';
486
- $twit_tolCls = "";
487
- $twt_margin = "";
488
- $icons_space = $sfsi_plus_section5_options['sfsi_plus_icons_spacing'];
489
- $padding_top = '';
490
-
491
- $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
492
- $option3 = unserialize(get_option('sfsi_plus_section3_options',false));
493
-
494
- if(isset($option3['sfsi_plus_actvite_theme']) && !empty($option3['sfsi_plus_actvite_theme'])){
495
-
496
- $active_theme = $option3['sfsi_plus_actvite_theme'];
497
- }else{
498
- $active_theme = "default";
499
- }
500
- $glossy_theme_adjustment=0;
501
- //$current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
502
- if(null!==$share_url){
503
- $current_url = $share_url;
504
- }elseif($fromPost == 'yes' && !empty($post))
505
- {
506
- $current_url = get_permalink($post->ID);
507
- }
508
- else
509
- {
510
- //$current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
511
- $current_url = sfsi_plus_get_current_url();
512
- }
513
- $url = "#";
514
- $cmcls='';
515
- $toolClass = '';
516
- $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
517
- switch($icon_name)
518
- {
519
-
520
-
521
- case "rss" :
522
- $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
523
- $url = ($sfsi_plus_section2_options['sfsi_plus_rss_url'])? $sfsi_plus_section2_options['sfsi_plus_rss_url'] : 'javascript:void(0);';
524
- $toolClass = "rss_tool_bdr";
525
- $hoverdiv = '';
526
- $arsfsiplus_row_class = "bot_rss_arow";
527
-
528
- /* fecth no of counts if active in admin section */
529
- if($sfsi_plus_section4_options['sfsi_plus_rss_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
530
- {
531
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_rss_manualCounts']);
532
- }
533
-
534
- if(!empty($sfsi_plus_section5_options['sfsi_plus_rss_MouseOverText']))
535
- {
536
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_rss_MouseOverText'];
537
- }
538
- else
539
- {
540
- $alt_text = 'RSS';
541
- }
542
-
543
- //Custom Skin Support {Monad}
544
- if($active_theme == 'custom_support')
545
- {
546
- if(get_option("plus_rss_skin"))
547
- {
548
- $icon = get_option("plus_rss_skin");
549
- }
550
- else
551
- {
552
- $active_theme = 'default';
553
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
554
- $icon = $icons_baseUrl.$active_theme."_rss.png";
555
- }
556
- }
557
- else
558
- {
559
- $icon = $icons_baseUrl.$active_theme."_rss.png";
560
- }
561
- break;
562
-
563
- case "email" :
564
- $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
565
- $hoverdiv = '';
566
- $sfsi_plus_section2_options['sfsi_plus_email_url'];
567
- $url = (isset($sfsi_plus_section2_options['sfsi_plus_email_url'])) ? $sfsi_plus_section2_options['sfsi_plus_email_url'] : 'javascript:void(0);';
568
- $toolClass = "email_tool_bdr";
569
- $arsfsiplus_row_class = "bot_eamil_arow";
570
-
571
- /* fecth no of counts if active in admin section */
572
- if($sfsi_plus_section4_options['sfsi_plus_email_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
573
- {
574
- if($sfsi_plus_section4_options['sfsi_plus_email_countsFrom']=="manual")
575
- {
576
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_email_manualCounts']);
577
- }
578
- else
579
- {
580
- $counts= $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_plus_feed_id',false)));
581
- }
582
- }
583
-
584
- if(!empty($sfsi_plus_section5_options['sfsi_plus_email_MouseOverText']))
585
- {
586
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_email_MouseOverText'];
587
- }
588
- else
589
- {
590
- $alt_text = 'EMAIL';
591
- }
592
-
593
- //Custom Skin Support {Monad}
594
- if($active_theme == 'custom_support')
595
- {
596
- if(get_option("plus_email_skin"))
597
- {
598
- $icon = get_option("plus_email_skin");
599
- }
600
- else
601
- {
602
- $active_theme = 'default';
603
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
604
- //$icon=($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
605
- if($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi")
606
- {
607
- $icon = $icons_baseUrl.$active_theme."_sf.png";
608
- }
609
- elseif($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="email")
610
- {
611
- $icon = $icons_baseUrl.$active_theme."_email.png";
612
- }
613
- else
614
- {
615
- $icon = $icons_baseUrl.$active_theme."_subscribe.png";
616
- }
617
- }
618
- }
619
- else
620
- {
621
- //$icon=($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
622
- if($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi")
623
- {
624
- $icon = $icons_baseUrl.$active_theme."_sf.png";
625
- }
626
- elseif($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="email")
627
- {
628
- $icon = $icons_baseUrl.$active_theme."_email.png";
629
- }
630
- else
631
- {
632
- $icon = $icons_baseUrl.$active_theme."_subscribe.png";
633
- }
634
- }
635
- break;
636
-
637
- case "facebook" :
638
- $socialObj = new sfsi_plus_SocialHelper();
639
- $width = 62;
640
- $totwith = $width+28+$icons_space;
641
- $twt_margin = $totwith /2;
642
- $toolClass = "sfsi_plus_fb_tool_bdr";
643
- $arsfsiplus_row_class = "bot_fb_arow";
644
-
645
- /* check for the over section */
646
- if(!empty($sfsi_plus_section5_options['sfsi_plus_facebook_MouseOverText']))
647
- {
648
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_facebook_MouseOverText'];
649
- }
650
- else
651
- {
652
- $alt_text = "FACEBOOK";
653
- }
654
-
655
- $facebook_icons_lang = $sfsi_plus_section5_options['sfsi_plus_facebook_icons_language'];
656
- // return $facebook_icons_lang;die();wp_die();
657
- $visit_icon = SFSI_PLUS_DOCROOT.'/images/visit_icons/Visit_us_fb/icon_'.$facebook_icons_lang.'.png';
658
- if(file_exists($visit_icon))
659
- {
660
- $visit_icon = $visit_iconsUrl."Visit_us_fb/icon_".$facebook_icons_lang.".png";
661
- }
662
- else
663
- {
664
- $visit_icon = $visit_iconsUrl."fb.png";
665
- }
666
-
667
- //$visit_iconDefault = $visit_iconsUrl."facebook.png";
668
-
669
-
670
- $url = ($sfsi_plus_section2_options['sfsi_plus_facebookPage_url']) ? $sfsi_plus_section2_options['sfsi_plus_facebookPage_url']:'javascript:void(0);';
671
-
672
- if($sfsi_plus_section2_options['sfsi_plus_facebookLike_option']=="yes" || $sfsi_plus_section2_options['sfsi_plus_facebookShare_option']=="yes" )
673
- {
674
- $url=($sfsi_plus_section2_options['sfsi_plus_facebookPage_url']) ? $sfsi_plus_section2_options['sfsi_plus_facebookPage_url']:'javascript:void(0);';
675
- $hoverSHow=1;
676
- $hoverdiv='';
677
- if($sfsi_plus_section2_options['sfsi_plus_facebookPage_option']=="yes")
678
- {
679
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
680
- }
681
- if($sfsi_plus_section2_options['sfsi_plus_facebookLike_option']=="yes")
682
- {
683
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_plus_FBlike($current_url)."</div>";
684
- }
685
- if($sfsi_plus_section2_options['sfsi_plus_facebookShare_option']=="yes")
686
- {
687
- $hoverdiv.="<div class='icon3'>".$socialObj->sfsiFB_Share($current_url)."</div>";
688
- }
689
-
690
- }
691
-
692
- /* fecth no of counts if active in admin section */
693
- if(
694
- $fromPost == 'yes' && !empty($post) &&
695
- $sfsi_plus_section4_options['sfsi_plus_facebook_countsDisplay']=="yes" &&
696
- $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes"
697
- )
698
- {
699
- $fb_data=$socialObj->sfsi_get_fb($current_url);
700
- $counts=$socialObj->format_num($fb_data['total_count']);
701
- if(empty($counts))
702
- {
703
- $counts=(string) "0";
704
- }
705
- }
706
- else
707
- {
708
- if(
709
- $sfsi_plus_section4_options['sfsi_plus_facebook_countsDisplay']=="yes" &&
710
- $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes"
711
- )
712
- {
713
- if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="manual")
714
- {
715
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_facebook_manualCounts']);
716
- }
717
- else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="likes")
718
- {
719
- $fb_data=$socialObj->sfsi_get_fb($current_url);
720
- $counts=$socialObj->format_num($fb_data);
721
- if(empty($counts))
722
- {
723
- $counts=(string) "0";
724
- }
725
- }
726
- else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="followers")
727
- {
728
- $fb_data=$socialObj->sfsi_get_fb($current_url);
729
- $counts=$socialObj->format_num($fb_data['share_count']);
730
-
731
- }
732
- else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="mypage")
733
- {
734
- $current_url = $sfsi_plus_section4_options['sfsi_plus_facebook_mypageCounts'];
735
- $fb_data=$socialObj->sfsi_get_fb_pagelike($current_url);
736
- $counts=$socialObj->format_num($fb_data);
737
- }
738
- }
739
- }
740
-
741
- //Custom Skin Support {Monad}
742
- if($active_theme == 'custom_support')
743
- {
744
- if(get_option("plus_facebook_skin"))
745
- {
746
- $icon = get_option("plus_facebook_skin");
747
- }
748
- else
749
- {
750
- $active_theme = 'default';
751
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
752
- $icon=$icons_baseUrl.$active_theme."_fb.png";
753
- }
754
- }
755
- else
756
- {
757
- $icon=$icons_baseUrl.$active_theme."_fb.png";
758
- }
759
- break;
760
-
761
- case "twitter" :
762
- $toolClass = "sfsi_plus_twt_tool_bdr";
763
- $arsfsiplus_row_class = "bot_twt_arow";
764
- $socialObj = new sfsi_plus_SocialHelper();
765
- $url = ($sfsi_plus_section2_options['sfsi_plus_twitter_pageURL'])?$sfsi_plus_section2_options['sfsi_plus_twitter_pageURL'] : 'javascript:void(0);';
766
- $twitter_user = $sfsi_plus_section2_options['sfsi_plus_twitter_followUserName'];
767
- $twitter_text = __($sfsi_plus_section2_options['sfsi_plus_twitter_aboutPageText'],SFSI_PLUS_DOMAIN);
768
- $width = 59;
769
- $totwith = $width+28+$icons_space;
770
- $twt_margin = $totwith /2;
771
- /* check for icons to display */
772
- $hoverdiv='';
773
-
774
- $twitter_icons_lang = $sfsi_plus_section5_options['sfsi_plus_twitter_icons_language'];
775
- $visit_icon = SFSI_PLUS_DOCROOT.'/images/visit_icons/Visit_us_twitter/icon_'.$twitter_icons_lang.'.png';
776
- if(file_exists($visit_icon))
777
- {
778
- $visit_icon = $visit_iconsUrl."Visit_us_twitter/icon_".$twitter_icons_lang.".png";
779
- }
780
- else
781
- {
782
- $visit_icon = $visit_iconsUrl."twitter.png";
783
- }
784
- //$visit_icon = $visit_iconsUrl."twitter.png";
785
-
786
- if($icons_language == 'nn_NO')
787
- {
788
- $icons_language = 'no';
789
- }
790
-
791
- if($sfsi_plus_section2_options['sfsi_plus_twitter_followme']=="yes" || $sfsi_plus_section2_options['sfsi_plus_twitter_aboutPage']=="yes")
792
- {
793
- $hoverSHow=1;
794
- //Visit twitter page {Monad}
795
- if($sfsi_plus_section2_options['sfsi_plus_twitter_page']=="yes")
796
- {
797
- $hoverdiv.="<div class='cstmicon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='Visit Us' title='Visit Us' src='".$visit_icon."' /></a></div>";
798
- }
799
- if($sfsi_plus_section2_options['sfsi_plus_twitter_followme']=="yes" && !empty($twitter_user))
800
- {
801
- $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_twitterFollow($twitter_user,$icons_language)."</div>";
802
- }
803
- if($sfsi_plus_section2_options['sfsi_plus_twitter_aboutPage']=="yes")
804
- {
805
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_twitterShare($current_url,$twitter_text,$icons_language)."</div>";
806
- }
807
-
808
- }
809
-
810
- /* fecth no of counts if active in admin section */
811
- if($sfsi_plus_section4_options['sfsi_plus_twitter_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
812
- {
813
- if($sfsi_plus_section4_options['sfsi_plus_twitter_countsFrom']=="manual")
814
- {
815
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_twitter_manualCounts']);
816
- }
817
- else if($sfsi_plus_section4_options['sfsi_plus_twitter_countsFrom']=="source")
818
- {
819
- $tw_settings=array('sfsiplus_tw_consumer_key'=>$sfsi_plus_section4_options['sfsiplus_tw_consumer_key'],
820
- 'sfsiplus_tw_consumer_secret'=> $sfsi_plus_section4_options['sfsiplus_tw_consumer_secret'],
821
- 'sfsiplus_tw_oauth_access_token'=> $sfsi_plus_section4_options['sfsiplus_tw_oauth_access_token'],
822
- 'sfsiplus_tw_oauth_access_token_secret'=> $sfsi_plus_section4_options['sfsiplus_tw_oauth_access_token_secret']);
823
-
824
- $followers=$socialObj->sfsi_get_tweets($twitter_user,$tw_settings);
825
- $counts=$socialObj->format_num($followers);
826
- if(empty($counts))
827
- {
828
- $counts=(string) "0";
829
- }
830
- }
831
- }
832
-
833
- //Giving alternative text to image
834
- if(!empty($sfsi_plus_section5_options['sfsi_plus_twitter_MouseOverText']))
835
- {
836
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_twitter_MouseOverText'];
837
- }
838
- else
839
- {
840
- $alt_text = "TWITTER";
841
- }
842
-
843
- //Custom Skin Support {Monad}
844
- if($active_theme == 'custom_support')
845
- {
846
- if(get_option("plus_twitter_skin"))
847
- {
848
- $icon = get_option("plus_twitter_skin");
849
- }
850
- else
851
- {
852
- $active_theme = 'default';
853
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
854
- $icon=$icons_baseUrl.$active_theme."_twitter.png";
855
- }
856
- }
857
- else
858
- {
859
- $icon=$icons_baseUrl.$active_theme."_twitter.png";
860
- }
861
- break;
862
-
863
- case "youtube" :
864
- $socialObj = new sfsi_plus_SocialHelper();
865
- $toolClass = "utube_tool_bdr";
866
- $arsfsiplus_row_class = "bot_utube_arow";
867
- $socialObj = new sfsi_plus_SocialHelper();
868
- $width = 96;
869
- $totwith = $width+28+$icons_space;
870
- $twt_margin = $totwith /2;
871
- $youtube_user = (isset($sfsi_plus_section4_options['sfsi_plus_youtube_user']) && !empty($sfsi_plus_section4_options['sfsi_plus_youtube_user'])) ? $sfsi_plus_section4_options['sfsi_plus_youtube_user'] : 'SpecificFeeds';
872
- $visit_icon = $visit_iconsUrl."youtube.png";
873
-
874
- $url = ($sfsi_plus_section2_options['sfsi_plus_youtube_pageUrl'])? $sfsi_plus_section2_options['sfsi_plus_youtube_pageUrl'] : 'javascript:void(0);';
875
-
876
- //Giving alternative text to image
877
- if(!empty($sfsi_plus_section5_options['sfsi_plus_youtube_MouseOverText']))
878
- {
879
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_youtube_MouseOverText'];
880
- }
881
- else
882
- {
883
- $alt_text = "YOUTUBE";
884
- }
885
-
886
- /* check for icons to display */
887
- $hoverdiv="";
888
- if($sfsi_plus_section2_options['sfsi_plus_youtube_follow']=="yes" )
889
- {
890
- $hoverSHow=1;
891
- if($sfsi_plus_section2_options['sfsi_plus_youtube_page']=="yes")
892
- {
893
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
894
- }
895
- if($sfsi_plus_section2_options['sfsi_plus_youtube_follow']=="yes")
896
- {
897
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_YouTubeSub($youtube_user)."</div>";
898
- }
899
- }
900
-
901
- /* fecth no of counts if active in admin section */
902
- if($sfsi_plus_section4_options['sfsi_plus_youtube_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
903
- {
904
- if($sfsi_plus_section4_options['sfsi_plus_youtube_countsFrom']=="manual")
905
- {
906
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_youtube_manualCounts']);
907
- }
908
- else if($sfsi_plus_section4_options['sfsi_plus_youtube_countsFrom']=="subscriber")
909
- {
910
- $followers=$socialObj->sfsi_get_youtube($youtube_user);
911
- $counts=$socialObj->format_num($followers);
912
- if(empty($counts))
913
- {
914
- $counts=(string) "0";
915
- }
916
- }
917
- }
918
-
919
- //Custom Skin Support {Monad}
920
- if($active_theme == 'custom_support')
921
- {
922
- if(get_option("plus_youtube_skin"))
923
- {
924
- $icon = get_option("plus_youtube_skin");
925
- }
926
- else
927
- {
928
- $active_theme = 'default';
929
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
930
- $icon = $icons_baseUrl.$active_theme."_youtube.png";
931
- }
932
- }
933
- else
934
- {
935
- $icon = $icons_baseUrl.$active_theme."_youtube.png";
936
- }
937
- break;
938
-
939
- case "pinterest" :
940
- $width = 73;
941
- $totwith = $width+28+$icons_space;
942
- $twt_margin = $totwith /2;
943
- $socialObj = new sfsi_plus_SocialHelper();
944
- $toolClass = "sfsi_plus_printst_tool_bdr";
945
- $arsfsiplus_row_class = "bot_pintst_arow";
946
-
947
- $pinterest_user = (isset($sfsi_plus_section4_options['sfsi_plus_pinterest_user']))
948
- ? $sfsi_plus_section4_options['sfsi_plus_pinterest_user'] : '';
949
-
950
- $pinterest_board = (isset($sfsi_plus_section4_options['sfsi_plus_pinterest_board']))
951
- ? $sfsi_plus_section4_options['sfsi_plus_pinterest_board'] : '';
952
-
953
- $visit_icon = $visit_iconsUrl."pinterest.png";
954
-
955
- $url = (isset($sfsi_plus_section2_options['sfsi_plus_pinterest_pageUrl'])) ? $sfsi_plus_section2_options['sfsi_plus_pinterest_pageUrl'] : 'javascript:void(0);';
956
-
957
- //Giving alternative text to image
958
- if(!empty($sfsi_plus_section5_options['sfsi_plus_pinterest_MouseOverText']))
959
- {
960
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_pinterest_MouseOverText'];
961
- }
962
- else
963
- {
964
- $alt_text = "PINTEREST";
965
- }
966
-
967
- /* check for icons to display */
968
- $hoverdiv="";
969
- if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes" )
970
- {
971
- $hoverSHow=1;
972
- if($sfsi_plus_section2_options['sfsi_plus_pinterest_page']=="yes")
973
- {
974
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
975
- }
976
- if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes")
977
- {
978
- if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes")
979
- {
980
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_PinIt($current_url)."</div>";
981
- }
982
- }
983
- }
984
-
985
- /* fecth no of counts if active in admin section */
986
- if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
987
- {
988
- if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsFrom']=="manual")
989
- {
990
- $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_pinterest_manualCounts']);
991
- }
992
- else if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsFrom']=="pins")
993
- {
994
- $pins=$socialObj->sfsi_get_pinterest($current_url);
995
- $counts=$pins;
996
- if(empty($counts))
997
- {
998
- $counts=(string) "0";
999
- }
1000
- }
1001
- }
1002
-
1003
- //Custom Skin Support {Monad}
1004
- if($active_theme == 'custom_support')
1005
- {
1006
- if(get_option("plus_pintrest_skin"))
1007
- {
1008
- $icon = get_option("plus_pintrest_skin");
1009
- }
1010
- else
1011
- {
1012
- $active_theme = 'default';
1013
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1014
- $icon=$icons_baseUrl.$active_theme."_pinterest.png";
1015
- }
1016
- }
1017
- else
1018
- {
1019
- $icon=$icons_baseUrl.$active_theme."_pinterest.png";
1020
- }
1021
- break;
1022
-
1023
- case "instagram" :
1024
- $toolClass = "instagram_tool_bdr";
1025
- $arsfsiplus_row_class = "bot_pintst_arow";
1026
- $socialObj = new sfsi_plus_SocialHelper();
1027
- $url = (isset($sfsi_plus_section2_options['sfsi_plus_instagram_pageUrl'])) ? $sfsi_plus_section2_options['sfsi_plus_instagram_pageUrl'] : 'javascript:void(0);';
1028
- $instagram_user_name = $sfsi_plus_section4_options['sfsi_plus_instagram_User'];
1029
-
1030
- //Giving alternative text to image
1031
- if(!empty($sfsi_plus_section5_options['sfsi_plus_instagram_MouseOverText']))
1032
- {
1033
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_instagram_MouseOverText'];
1034
- }
1035
- else
1036
- {
1037
- $alt_text = "INSTAGRAM";
1038
- }
1039
-
1040
- $hoverdiv="";
1041
- /* fecth no of counts if active in admin section */
1042
- if($sfsi_plus_section4_options['sfsi_plus_instagram_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1043
- {
1044
- if($sfsi_plus_section4_options['sfsi_plus_instagram_countsFrom']=="manual")
1045
- {
1046
- $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_instagram_manualCounts']);
1047
- }
1048
- else if($sfsi_plus_section4_options['sfsi_plus_instagram_countsFrom']=="followers")
1049
- {
1050
- $counts=$socialObj->sfsi_get_instagramFollowers($instagram_user_name);
1051
- if(empty($counts))
1052
- {
1053
- $counts=(string) "0";
1054
- }
1055
- }
1056
- }
1057
-
1058
- //Custom Skin Support {Monad}
1059
- if($active_theme == 'custom_support')
1060
- {
1061
- if(get_option("plus_instagram_skin"))
1062
- {
1063
- $icon = get_option("plus_instagram_skin");
1064
- }
1065
- else
1066
- {
1067
- $active_theme = 'default';
1068
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1069
- $icon=$icons_baseUrl.$active_theme."_instagram.png";
1070
- }
1071
- }
1072
- else
1073
- {
1074
- $icon=$icons_baseUrl.$active_theme."_instagram.png";
1075
- }
1076
- break;
1077
-
1078
- case "houzz" :
1079
- $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
1080
- $url = ($sfsi_plus_section2_options['sfsi_plus_houzz_pageUrl'])? $sfsi_plus_section2_options['sfsi_plus_houzz_pageUrl'] : 'javascript:void(0);';
1081
- $toolClass = "rss_tool_bdr";
1082
- $hoverdiv = '';
1083
- $arsfsiplus_row_class = "bot_rss_arow";
1084
-
1085
- /* fecth no of counts if active in admin section */
1086
- if(
1087
- isset($sfsi_plus_section4_options['sfsi_plus_houzz_countsDisplay']) &&
1088
- $sfsi_plus_section4_options['sfsi_plus_houzz_countsDisplay'] == "yes" &&
1089
- $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1090
- )
1091
- {
1092
- $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_houzz_manualCounts']);
1093
- }
1094
-
1095
- if(
1096
- isset($sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText']) &&
1097
- !empty($sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText'])
1098
- )
1099
- {
1100
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText'];
1101
- }
1102
- else
1103
- {
1104
- $alt_text = 'Houzz';
1105
- }
1106
-
1107
- //Custom Skin Support {Monad}
1108
- if($active_theme == 'custom_support')
1109
- {
1110
- if(get_option("plus_houzz_skin"))
1111
- {
1112
- $icon = get_option("plus_houzz_skin");
1113
- }
1114
- else
1115
- {
1116
- $active_theme = 'default';
1117
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1118
- $icon = $icons_baseUrl.$active_theme."_houzz.png";
1119
- }
1120
- }
1121
- else
1122
- {
1123
- $icon = $icons_baseUrl.$active_theme."_houzz.png";
1124
- }
1125
- break;
1126
-
1127
- case "linkedin" :
1128
- $width = 66;
1129
- $socialObj = new sfsi_plus_SocialHelper();
1130
- $toolClass = "sfsi_plus_linkedin_tool_bdr";
1131
- $arsfsiplus_row_class = "bot_linkedin_arow";
1132
- $linkedIn_compayId = $sfsi_plus_section2_options['sfsi_plus_linkedin_followCompany'];
1133
- $linkedIn_compay = $sfsi_plus_section2_options['sfsi_plus_linkedin_followCompany'];
1134
- $linkedIn_ProductId = $sfsi_plus_section2_options['sfsi_plus_linkedin_recommendProductId'];
1135
- $visit_icon = $visit_iconsUrl."linkedIn.png";
1136
-
1137
- /*check for icons to display */
1138
- $url=($sfsi_plus_section2_options['sfsi_plus_linkedin_pageURL'])? $sfsi_plus_section2_options['sfsi_plus_linkedin_pageURL'] : 'javascript:void(0);';
1139
-
1140
- if($sfsi_plus_section2_options['sfsi_plus_linkedin_follow']=="yes" || $sfsi_plus_section2_options['sfsi_plus_linkedin_SharePage']=="yes" || $sfsi_plus_section2_options['sfsi_plus_linkedin_recommendBusines']=="yes" )
1141
- {
1142
- $hoverSHow=1;
1143
- $hoverdiv='';
1144
- if($sfsi_plus_section2_options['sfsi_plus_linkedin_page']=="yes")
1145
- {
1146
- $hoverdiv.="<div class='icon4'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
1147
- }
1148
- if($sfsi_plus_section2_options['sfsi_plus_linkedin_follow']=="yes")
1149
- {
1150
- $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_LinkedInFollow($linkedIn_compayId)."</div>";
1151
- }
1152
- if($sfsi_plus_section2_options['sfsi_plus_linkedin_SharePage']=="yes")
1153
- {
1154
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_LinkedInShare($current_url)."</div>";
1155
- }
1156
- if($sfsi_plus_section2_options['sfsi_plus_linkedin_recommendBusines']=="yes")
1157
- {
1158
- $hoverdiv.="<div class='icon3'>".$socialObj->sfsi_LinkedInRecommend($linkedIn_compay,$linkedIn_ProductId)."</div>";
1159
- $width=99;
1160
- }
1161
- }
1162
-
1163
-
1164
- if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1165
- {
1166
- if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsFrom']=="manual")
1167
- {
1168
- $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_linkedIn_manualCounts']);
1169
- }
1170
- else if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsFrom']=="follower")
1171
- {
1172
- $linkedIn_compay=$sfsi_plus_section4_options['sfsi_plus_ln_company'];
1173
- $ln_settings = array('sfsi_plus_ln_api_key'=>$sfsi_plus_section4_options['sfsi_plus_ln_api_key'],
1174
- 'sfsi_plus_ln_secret_key'=>$sfsi_plus_section4_options['sfsi_plus_ln_secret_key'],
1175
- 'sfsi_plus_ln_oAuth_user_token'=>$sfsi_plus_section4_options['sfsi_plus_ln_oAuth_user_token']);
1176
-
1177
- $followers=$socialObj->sfsi_getlinkedin_follower($linkedIn_compay,$ln_settings);
1178
- (int) $followers;
1179
- $counts=$socialObj->format_num($followers);
1180
- if(empty($counts))
1181
- {
1182
- $counts = (string) "0";
1183
- }
1184
- }
1185
- }
1186
-
1187
- $totwith = $width+28+$icons_space;
1188
- $twt_margin = $totwith /2;
1189
-
1190
- //Giving alternative text to image
1191
- if(!empty($sfsi_plus_section5_options['sfsi_plus_linkedIn_MouseOverText']))
1192
- {
1193
- $alt_text = $sfsi_plus_section5_options['sfsi_plus_linkedIn_MouseOverText'];
1194
- }
1195
- else
1196
- {
1197
- $alt_text = "LINKEDIN";
1198
- }
1199
-
1200
- //Custom Skin Support {Monad}
1201
- if($active_theme == 'custom_support')
1202
- {
1203
- if(get_option("plus_linkedin_skin"))
1204
- {
1205
- $icon = get_option("plus_linkedin_skin");
1206
- }
1207
- else
1208
- {
1209
- $active_theme = 'default';
1210
- $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1211
- $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1212
- }
1213
- }
1214
- else
1215
- {
1216
- $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1217
- }
1218
- break;
1219
-
1220
- // MZ CODE START
1221
-
1222
-
1223
-
1224
- case "ok":
1225
-
1226
- $toolClass = "sfsi_plus_ok_tool_bdr";
1227
- $hoverdiv = '';
1228
- $arsfsiplus_row_class = "bot_rss_arow";
1229
-
1230
- /* fecth no of counts if active in admin section */
1231
- if(
1232
- isset($sfsi_plus_section4_options['sfsi_plus_ok_countsDisplay']) &&
1233
- "yes" == $sfsi_plus_section4_options['sfsi_plus_ok_countsDisplay'] &&
1234
- "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']
1235
- )
1236
- {
1237
- $counts = $sfsi_plus_section4_options['sfsi_plus_ok_manualCounts'];
1238
- }
1239
-
1240
- $alt_text = sfsi_plus_get_icon_mouseover_text("ok");
1241
- // $icon=$icons_baseUrl.$active_theme."_ok.png";
1242
- $icon = sfsi_plus_get_icon_image("ok");
1243
- $like_icon = $share_iconsUrl.$icon_name.".svg";
1244
- $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1245
- $sub_icon = $visit_iconsUrl."ok_subscribe.svg";
1246
- $url = "#";
1247
-
1248
- $hoverSHow = 0;
1249
- if(isset($sfsi_plus_section2_options['sfsi_plus_okVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_okVisit_url'])){
1250
-
1251
- $url = $sfsi_plus_section2_options['sfsi_plus_okVisit_url'];
1252
- }else{
1253
- $url="#";
1254
- $sfsi_onclick="event.preventDefault();";
1255
- }
1256
- if($active_theme == "glossy"){
1257
- $glossy_theme_adjustment=4;
1258
- }
1259
- break;
1260
-
1261
- case "telegram":
1262
-
1263
- $toolClass = "sfsi_plus_telegram_tool_bdr";
1264
- $hoverdiv = '';
1265
- $arsfsiplus_row_class = "bot_rss_arow";
1266
-
1267
- /* fecth no of counts if active in admin section */
1268
- if(
1269
- isset($sfsi_plus_section4_options['sfsi_plus_telegram_countsDisplay']) &&
1270
- $sfsi_plus_section4_options['sfsi_plus_telegram_countsDisplay'] == "yes" &&
1271
- $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1272
- )
1273
- {
1274
- $counts = $sfsi_plus_section4_options['sfsi_plus_telegram_manualCounts'];
1275
- }
1276
-
1277
- $alt_text = sfsi_plus_get_icon_mouseover_text("telegram");
1278
-
1279
- $icon = sfsi_plus_get_icon_image("telegram");
1280
-
1281
- $messageus_icon = $visit_iconsUrl.$icon_name."_message.svg";
1282
- $share_icon = $share_iconsUrl.$icon_name.".svg";
1283
- $visit_icon = $visit_iconsUrl."telegram.png";
1284
-
1285
- $url = "#";
1286
- if(
1287
- isset($sfsi_plus_section2_options['sfsi_plus_telegram_message']) && !empty($sfsi_plus_section2_options['sfsi_plus_telegram_message'])
1288
- &&
1289
- isset($sfsi_plus_section2_options['sfsi_plus_telegram_username']) && !empty($sfsi_plus_section2_options['sfsi_plus_telegram_username'])
1290
-
1291
- ){
1292
- $tg_username = $sfsi_plus_section2_options['sfsi_plus_telegram_username'];
1293
- $tg_msg = stripslashes($sfsi_plus_section2_options['sfsi_plus_telegram_message']);
1294
- $tg_msg = str_replace('"', '', str_replace("'", '', $tg_msg));
1295
- $tg_msg = html_entity_decode(strip_tags($tg_msg), ENT_QUOTES,'UTF-8');
1296
- $tg_msg = str_replace("%26%238230%3B", "...", $tg_msg);
1297
- $tg_msg = rawurlencode($tg_msg);
1298
- if(isMobileDevice()){
1299
- $url = "tg://resolve?domain=".$tg_username;
1300
- }
1301
- else {
1302
- $url = "https://web.telegram.im/?p=@".$tg_username;
1303
- }
1304
-
1305
- //$url = "https://t.me/".$tg_username;
1306
- }else{
1307
- $url="#";
1308
- $sfsi_onclick="event.preventDefault();";
1309
- }
1310
-
1311
- if($active_theme == "glossy"){
1312
- $glossy_theme_adjustment=4;
1313
- }
1314
- break;
1315
-
1316
- case "vk":
1317
-
1318
- $toolClass = "sfsi_plus_vk_tool_bdr";
1319
- $hoverdiv = '';
1320
- $arsfsiplus_row_class = "bot_rss_arow";
1321
-
1322
- /* fecth no of counts if active in admin section */
1323
- if(
1324
- isset($sfsi_plus_section4_options['sfsi_plus_vk_countsDisplay']) &&
1325
- $sfsi_plus_section4_options['sfsi_plus_vk_countsDisplay'] == "yes" &&
1326
- $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1327
- )
1328
- {
1329
- $counts = $sfsi_plus_section4_options['sfsi_plus_vk_manualCounts'];
1330
- }
1331
-
1332
- $alt_text = sfsi_plus_get_icon_mouseover_text("vk");
1333
- $icon = sfsi_plus_get_icon_image("vk");
1334
- // $icon=$icons_baseUrl.$active_theme."_vk.png";
1335
- $share_icon = $share_iconsUrl.$icon_name.".svg";
1336
- $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1337
- $url = "#";
1338
-
1339
- $hoverSHow = 0;
1340
- if(isset($sfsi_plus_section2_options['sfsi_plus_vkVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_vkVisit_url'])){
1341
-
1342
- $url = $sfsi_plus_section2_options['sfsi_plus_vkVisit_url'];
1343
- }else{
1344
- $url="#";
1345
- $sfsi_onclick="event.preventDefault();";
1346
- }
1347
-
1348
- if($active_theme == "glossy"){
1349
- $glossy_theme_adjustment=4;
1350
- }
1351
- break;
1352
-
1353
- case "weibo":
1354
-
1355
- $toolClass = "sfsi_plus_weibo_tool_bdr";
1356
- $hoverdiv = '';
1357
- $arsfsiplus_row_class = "bot_rss_arow";
1358
-
1359
- /* fecth no of counts if active in admin section */
1360
- if(isset($sfsi_plus_section4_options['sfsi_plus_weibo_countsDisplay']) && "yes" == $sfsi_plus_section4_options['sfsi_plus_weibo_countsDisplay'] && "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']){
1361
-
1362
- $counts = $sfsi_plus_section4_options['sfsi_plus_weibo_manualCounts'];
1363
- }
1364
-
1365
- $alt_text = sfsi_plus_get_icon_mouseover_text($icon_name);
1366
- $icon = sfsi_plus_get_icon_image($icon_name);
1367
- // $icon=$icons_baseUrl.$active_theme."_weibo.png";
1368
- $url = "#";
1369
-
1370
- $hoverSHow = 0;
1371
- if(isset($sfsi_plus_section2_options['sfsi_plus_weiboVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_weiboVisit_url'])){
1372
-
1373
- $url = $sfsi_plus_section2_options['sfsi_plus_weiboVisit_url'];
1374
- }else{
1375
- $url="#";
1376
- $sfsi_onclick="event.preventDefault();";
1377
- }
1378
-
1379
- if($active_theme == "glossy"){
1380
- $glossy_theme_adjustment=4;
1381
- }
1382
- break;
1383
-
1384
-
1385
- case "wechat":
1386
-
1387
- $toolClass = "sfsi_plus_wechat_tool_bdr";
1388
- $hoverdiv = '';
1389
- $arsfsiplus_row_class = "bot_rss_arow";
1390
-
1391
- /* fecth no of counts if active in admin section */
1392
- if(isset($sfsi_plus_section4_options['sfsi_plus_wechat_countsDisplay']) && "yes" == $sfsi_plus_section4_options['sfsi_plus_wechat_countsDisplay'] && "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']){
1393
-
1394
- $counts = $sfsi_plus_section4_options['sfsi_plus_wechat_manualCounts'];
1395
- }
1396
-
1397
- $alt_text = sfsi_plus_get_icon_mouseover_text($icon_name);
1398
- $icon = sfsi_plus_get_icon_image($icon_name);
1399
- // $icon=$icons_baseUrl.$active_theme."_wechat.png";
1400
-
1401
- $share_icon = $share_iconsUrl.$icon_name.".svg";
1402
- $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1403
- $url = "#";
1404
- // if(!wp_is_mobile()){
1405
- $sfsi_onclick="event.preventDefault();sfsi_plus_wechat_share()" ;
1406
- // }else{
1407
- // $url = "weixin://dl/chat";
1408
- // }
1409
-
1410
- if($active_theme == "glossy"){
1411
- $glossy_theme_adjustment=4;
1412
- }
1413
- break;
1414
-
1415
-
1416
-
1417
- ///MZ CODE END
1418
-
1419
- default:
1420
- $border_radius = "";
1421
- //$border_radius =" border-radius:48%;";
1422
- $cmcls = "cmcls";
1423
- $padding_top = "";
1424
- if($active_theme=="badge")
1425
- {
1426
- //$border_radius="border-radius: 18%;";
1427
- }
1428
- if($active_theme=="cute")
1429
- {
1430
- //$border_radius="border-radius: 38%;";
1431
- }
1432
-
1433
- $custom_icon_urls = isset($sfsi_plus_section2_options['sfsi_plus_CustomIcon_links'])&& ""!==$sfsi_plus_section2_options['sfsi_plus_CustomIcon_links']?unserialize($sfsi_plus_section2_options['sfsi_plus_CustomIcon_links']):array();
1434
- $url = (isset($custom_icon_urls[$icon_n]) && !empty($custom_icon_urls[$icon_n])) ? $custom_icon_urls[$icon_n]:'javascript:void(0);';
1435
- $toolClass = "custom_lkn";
1436
- $arsfsiplus_row_class = "";
1437
- $custom_icons_hoverTxt = unserialize($sfsi_plus_section5_options['sfsi_plus_custom_MouseOverTexts']);
1438
- $icons = isset($sfsi_plus_section1_options['sfsi_custom_files'])&& ""!==$sfsi_plus_section1_options['sfsi_custom_files']?unserialize($sfsi_plus_section1_options['sfsi_custom_files']):array();;
1439
- // var_dump($icons,$custom_icon_urls,$icon_n,$sfsi_plus_section2_options);die();
1440
- $icon = $icons[$icon_n];
1441
-
1442
- //Giving alternative text to image
1443
- if(!empty($custom_icons_hoverTxt[$icon_n]))
1444
- {
1445
- $alt_text = $custom_icons_hoverTxt[$icon_n];
1446
- }
1447
- else
1448
- {
1449
- $alt_text = "SOCIALICON";
1450
- }
1451
- break;
1452
- }
1453
-
1454
- $icons="";
1455
-
1456
- /* apply size of icon */
1457
- if($is_front==0)
1458
- {
1459
- $icons_size = $sfsi_plus_section5_options['sfsi_plus_icons_size'];
1460
- }
1461
- else
1462
- {
1463
- $icons_size = 51;
1464
- }
1465
-
1466
- /* spacing and no of icons per row */
1467
- $icons_space = '';
1468
- $icons_space = $sfsi_plus_section5_options['sfsi_plus_icons_spacing'];
1469
- $icon_width = (int)$icons_size;
1470
- /* check for mouse hover effect */
1471
- $icon_opacity="1";
1472
-
1473
- if($sfsi_plus_section3_options['sfsi_plus_mouseOver']=='yes')
1474
- {
1475
- $mouse_hover_effect=$sfsi_plus_section3_options["sfsi_plus_mouseOver_effect"];
1476
- if($mouse_hover_effect=="fade_in" || $mouse_hover_effect=="combo")
1477
- {
1478
- $icon_opacity="0.6";
1479
- }
1480
- }
1481
-
1482
- $toolT_cls='';
1483
- if((int) $icon_width <=49 && (int) $icon_width >=30)
1484
- {
1485
- $bt_class="";
1486
- $toolT_cls="sfsi_plus_Tlleft";
1487
- }
1488
- else if((int) $icon_width <=20)
1489
- {
1490
- $bt_class="sfsiSmBtn";
1491
- $toolT_cls="sfsi_plus_Tlleft";
1492
- }
1493
- else
1494
- {
1495
- $bt_class="";
1496
- $toolT_cls="sfsi_plus_Tlleft";
1497
- }
1498
-
1499
- if($toolClass=="rss_tool_bdr" || $toolClass=='email_tool_bdr' || $toolClass=="custom_lkn" || $toolClass=="instagram_tool_bdr" )
1500
- {
1501
- $new_window = sfsi_plus_checkNewWindow();
1502
- }
1503
- else if($hoverSHow)
1504
- {
1505
- if(!function_exists('wp_is_mobile')||!wp_is_mobile())
1506
- {
1507
- $new_window = sfsi_plus_checkNewWindow();
1508
- }
1509
- else
1510
- {
1511
- $new_window = '';
1512
- $url = "javascript:void(0);";
1513
- }
1514
- }
1515
- else
1516
- {
1517
- $new_window = sfsi_plus_checkNewWindow();
1518
- }
1519
-
1520
- if("javascript:void(0);" == $url){
1521
- $new_window = "";
1522
- }
1523
-
1524
- $margin_bot=(5+$glossy_theme_adjustment)."px;";
1525
- if($sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1526
- {
1527
- $margin_bot = (30+($glossy_theme_adjustment>0?$glossy_theme_adjustment-1:$glossy_theme_adjustment))."px;";
1528
- }
1529
-
1530
- if(isset($icon) && !empty($icon) && filter_var($icon, FILTER_VALIDATE_URL))
1531
- {
1532
- $icons.= "<div style='width:".$icon_width."px; height:".$icon_width."px;margin-left:".$icons_space."px;margin-bottom:".$margin_bot."' class='sfsi_plus_wicons shuffeldiv ".$cmcls."'>";
1533
-
1534
- $icons.= "<div class='sfsiplus_inerCnt'>";
1535
-
1536
- $icons.= "<a class='".$class." sficn' data-effect='".$mouse_hover_effect."' $new_window href='".$url."' style='opacity:".$icon_opacity."' ".(isset($sfsi_onclick)?'onclick="'.$sfsi_onclick.'"':'').">";
1537
-
1538
- $icons.= "<img alt='".$alt_text."' title='".$alt_text."' src='".$icon."' width='".$icons_size."' height='".$icons_size."' style='".$border_radius.$padding_top."' class='sfcm sfsi_wicon sfsiplusid_round_icon_".$icon_name."' data-effect='".$mouse_hover_effect."' />";
1539
-
1540
- $icons.= '</a>';
1541
-
1542
- if(isset($counts) && $counts!='' && $onpost == "no")
1543
- {
1544
- $icons.= '<span class="bot_no '.$bt_class.'">'.$counts.'</span>';
1545
- }
1546
-
1547
- if($hoverSHow && !empty($hoverdiv))
1548
- {
1549
- //$icons.= '<div class="sfsi_plus_tool_tip_2 '.$toolClass.' '.$toolT_cls.'" style="width:'.$width.'px ;opacity:0;z-index:-1;margin-left:-'.$twt_margin.'px;" id="sfsiplusid_'.$icon_name.'">';
1550
-
1551
- $icons.= '<div class="sfsi_plus_tool_tip_2 '.$toolClass.' '.$toolT_cls.' sfsiplusid_'.$icon_name.'" style="display:block;'.(isset($width)?'width:'.$width.'px':'').';opacity:0;z-index:-1;">';
1552
- $icons.= '<span class="bot_arow '.$arsfsiplus_row_class.'"></span>';
1553
- $icons.= '<div class="sfsi_plus_inside">'.$hoverdiv."</div>";
1554
- $icons.= "</div>";
1555
- }
1556
- $icons.="</div>";
1557
- $icons.="</div>";
1558
- }
1559
- return $icons;
1560
- }
1561
-
1562
- /* make url for new window */
1563
- function sfsi_plus_checkNewWindow()
1564
- {
1565
- global $wpdb;
1566
- $sfsi_plus_section5_options= unserialize(get_option('sfsi_plus_section5_options',false));
1567
- if($sfsi_plus_section5_options['sfsi_plus_icons_ClickPageOpen']=="yes")
1568
- {
1569
- return $new_window="target='_blank'";
1570
- }
1571
- else
1572
- {
1573
- return '';
1574
- }
1575
- }
1576
-
1577
- function sfsi_plus_check_posts_visiblity($isFloter=0 , $fromPost = NULL)
1578
- {
1579
- global $wpdb;
1580
- /* Access the saved settings in database */
1581
- $sfsi_plus_section1_options= unserialize(get_option('sfsi_plus_section1_options',false));
1582
- $sfsi_section3= unserialize(get_option('sfsi_plus_section3_options',false));
1583
- $sfsi_section5= unserialize(get_option('sfsi_plus_section5_options',false));
1584
-
1585
- //options that are added on the third question
1586
- $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
1587
-
1588
- /* calculate the width and icons display alignments */
1589
- $icons_space=$sfsi_section8['sfsi_plus_post_icons_spacing'];
1590
- $icons_size=$sfsi_section8['sfsi_plus_post_icons_size'];
1591
- $extra=0;
1592
-
1593
-
1594
- /* magnage the icons in saved order in admin */
1595
- $custom_icons_order = unserialize($sfsi_section5['sfsi_plus_CustomIcons_order']);
1596
- $icons= unserialize($sfsi_plus_section1_options['sfsi_custom_files']);
1597
- $icons_order = array(
1598
- '0' => '',
1599
- $sfsi_section5['sfsi_plus_rssIcon_order']=>'rss',
1600
- $sfsi_section5['sfsi_plus_emailIcon_order']=>'email',
1601
- $sfsi_section5['sfsi_plus_facebookIcon_order']=>'facebook',
1602
- $sfsi_section5['sfsi_plus_twitterIcon_order']=>'twitter',
1603
- $sfsi_section5['sfsi_plus_youtubeIcon_order']=>'youtube',
1604
- $sfsi_section5['sfsi_plus_pinterestIcon_order']=>'pinterest',
1605
- $sfsi_section5['sfsi_plus_linkedinIcon_order']=>'linkedin',
1606
- $sfsi_section5['sfsi_plus_instagramIcon_order']=>'instagram',
1607
- $sfsi_section5['sfsi_plus_okIcon_order']=>'ok',
1608
- $sfsi_section5['sfsi_plus_telegramIcon_order']=>'telegram',
1609
- $sfsi_section5['sfsi_plus_vkIcon_order']=>'vk',
1610
- $sfsi_section5['sfsi_plus_weiboIcon_order']=>'weibo',
1611
- $sfsi_section5['sfsi_plus_wechatIcon_order']=>'wechat',
1612
- (isset($sfsi_section5['sfsi_plus_houzzIcon_order']))
1613
- ? $sfsi_section5['sfsi_plus_houzzIcon_order']
1614
- : 12 => 'houzz'
1615
- );
1616
- if(is_array($custom_icons_order) )
1617
- {
1618
- foreach($custom_icons_order as $data)
1619
- {
1620
- $icons_order[$data['order']] = $data;
1621
- }
1622
- }
1623
- ksort($icons_order);
1624
-
1625
- /* built the main widget div */
1626
- $icons_main='<div class="sfsiplus_norm_row sfsi_plus_wDivothr">';
1627
- $icons="";
1628
-
1629
- // $icons .= '<style>.sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}</style>';
1630
- // add_action('wp_head', function(){
1631
- // echo '<style>.sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}</style>';
1632
- // }, 100);
1633
- add_action('wp_footer', function()use($icons_space,$icons_size){
1634
- echo '<script>var css = ".sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}",
1635
- head = document.head || document.getElementsByTagName("head")[0],
1636
- style = document.createElement("style");
1637
-
1638
- head.appendChild(style);
1639
- if (style.styleSheet){
1640
- // This is required for IE8 and below.
1641
- style.styleSheet.cssText = css;
1642
- } else {
1643
- style.appendChild(document.createTextNode(css));
1644
- }</script>';
1645
- }, 100);
1646
- /* loop through icons and bulit the icons with all settings applied in admin */
1647
- foreach($icons_order as $index => $icn)
1648
- {
1649
- if(is_array($icn))
1650
- {
1651
- $icon_arry = $icn;
1652
- $icn = "custom" ;
1653
- }
1654
- switch ($icn) :
1655
- case 'rss' :
1656
- if($sfsi_plus_section1_options['sfsi_plus_rss_display'] == 'yes')
1657
- {
1658
- $icons.= sfsi_plus_prepairIcons('rss');
1659
- }
1660
- break;
1661
- case 'email' :
1662
- if($sfsi_plus_section1_options['sfsi_plus_email_display']=='yes')
1663
- {
1664
- $icons.= sfsi_plus_prepairIcons('email');
1665
- }
1666
- break;
1667
- case 'facebook' :
1668
- if($sfsi_plus_section1_options['sfsi_plus_facebook_display'] == 'yes')
1669
- {
1670
- $icons.= sfsi_plus_prepairIcons('facebook', 0, "no", $fromPost);
1671
- }
1672
- break;
1673
-
1674
-
1675
- case 'twitter' :
1676
- if($sfsi_plus_section1_options['sfsi_plus_twitter_display']=='yes')
1677
- {
1678
- $icons.= sfsi_plus_prepairIcons('twitter', 0, "no", $fromPost);
1679
- }
1680
- break;
1681
- case 'youtube' :
1682
- if($sfsi_plus_section1_options['sfsi_plus_youtube_display']=='yes')
1683
- {
1684
- $icons.= sfsi_plus_prepairIcons('youtube');
1685
- }
1686
- break;
1687
-
1688
- case 'pinterest' :
1689
- if($sfsi_plus_section1_options['sfsi_plus_pinterest_display']=='yes')
1690
- {
1691
- $icons.= sfsi_plus_prepairIcons('pinterest');
1692
- }
1693
- break;
1694
- case 'linkedin' :
1695
- if($sfsi_plus_section1_options['sfsi_plus_linkedin_display']=='yes')
1696
- {
1697
- $icons.= sfsi_plus_prepairIcons('linkedin', 0, "no", $fromPost);
1698
- }
1699
- break;
1700
- case 'instagram' :
1701
- if($sfsi_plus_section1_options['sfsi_plus_instagram_display']=='yes')
1702
- {
1703
- $icons.= sfsi_plus_prepairIcons('instagram');
1704
- }
1705
- break;
1706
- case 'houzz' :
1707
- if(
1708
- isset($sfsi_plus_section1_options['sfsi_plus_houzz_display']) &&
1709
- $sfsi_plus_section1_options['sfsi_plus_houzz_display']=='yes'
1710
- )
1711
- {
1712
- $icons.= sfsi_plus_prepairIcons('houzz');
1713
- }
1714
- break;
1715
- case 'ok' :
1716
- if(
1717
- isset($sfsi_plus_section1_options['sfsi_plus_okdisplay']) &&
1718
- $sfsi_plus_section1_options['sfsi_plus_ok_display']=='yes'
1719
- )
1720
- {
1721
- $icons.= sfsi_plus_prepairIcons('ok');
1722
-
1723
- }
1724
- break;
1725
- case 'telegram' :
1726
- if(
1727
- isset($sfsi_plus_section1_options['sfsi_plus_telegram_display']) &&
1728
- $sfsi_plus_section1_options['sfsi_plus_telegram_display']=='yes'
1729
- )
1730
- {
1731
- $icons.= sfsi_plus_prepairIcons('telegram');
1732
-
1733
- }
1734
- break;
1735
- case 'vk' :
1736
- if(
1737
- isset($sfsi_plus_section1_options['sfsi_plus_vk_display']) &&
1738
- $sfsi_plus_section1_options['sfsi_plus_vk_display']=='yes'
1739
- )
1740
- {
1741
- $icons.= sfsi_plus_prepairIcons('vk');
1742
-
1743
- }
1744
- break;
1745
- case 'weibo' :
1746
- if(
1747
- isset($sfsi_plus_section1_options['sfsi_plus_weibo_display']) &&
1748
- $sfsi_plus_section1_options['sfsi_plus_weibo_display']=='yes'
1749
- )
1750
- {
1751
- $icons.= sfsi_plus_prepairIcons('weibo');
1752
-
1753
- }
1754
- break;
1755
- case 'wechat' :
1756
- if(
1757
- isset($sfsi_plus_section1_options['sfsi_plus_wechat_display']) &&
1758
- $sfsi_plus_section1_options['sfsi_plus_wechat_display']=='yes'
1759
- )
1760
- {
1761
- $icons.= sfsi_plus_prepairIcons('wechat');
1762
-
1763
- }
1764
- break;
1765
- case 'custom' :
1766
- $icons.= sfsi_plus_prepairIcons($icon_arry['ele']);
1767
- break;
1768
- endswitch;
1769
- }
1770
-
1771
- $icons.='</div >';
1772
- $icons_main.=$icons;
1773
-
1774
- /* if floating of icons is active create a floater div */
1775
- $icons_float='';
1776
- $icons_data=$icons_main.$icons_float;
1777
- return $icons_data;
1778
- }
1779
-
1780
- // MZ CODE
1781
-
1782
-
1783
- function sfsi_plus_get_icon_mouseover_text($icon_name){
1784
-
1785
- $alt_text = '';
1786
-
1787
- if(isset($icon_name) && !empty($icon_name)){
1788
-
1789
- $icon_name = strtolower($icon_name);
1790
-
1791
- $key = 'sfsi_plus_'.$icon_name.'_MouseOverText';
1792
-
1793
- $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
1794
-
1795
- if(isset($sfsi_plus_section5_options[$key]) && !empty($sfsi_plus_section5_options[$key]) )
1796
- {
1797
- $alt_text = $sfsi_plus_section5_options[$key];
1798
- }
1799
- }
1800
-
1801
- return $alt_text;
1802
- }
1803
-
1804
-
1805
-
1806
- //MZ CODE END
1807
-
1808
- function isMobileDevice() {
1809
- return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
1810
- }
 
 
 
 
1811
  ?>
1
+ <?php
2
+ /* create SFSI widget */
3
+ class Sfsi_Plus_Widget extends WP_Widget
4
+ {
5
+ function __construct()
6
+ {
7
+ $widget_ops = array( 'classname' => 'sfsi_plus', 'description' => 'Ultimate Social Media PLUS widgets');
8
+ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-plus-widget' );
9
+
10
+ parent::__construct(
11
+ // Base ID of your widget
12
+ 'sfsi-plus-widget',
13
+
14
+ // Widget name will appear in UI
15
+ 'Ultimate Social Media PLUS',
16
+
17
+ // Widget description
18
+ $widget_ops,
19
+
20
+ $control_ops
21
+ );
22
+ }
23
+
24
+ function widget( $args, $instance )
25
+ {
26
+ extract( $args );
27
+ //if show via widget is checked
28
+ $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
29
+ $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
30
+ $sfsi_plus_show_via_widget = $sfsi_plus_section8_options['sfsi_plus_show_via_widget'];
31
+ if($sfsi_plus_show_via_widget == "yes")
32
+ {
33
+ /*Our variables from the widget settings. */
34
+ $title = apply_filters('widget_title', $instance['title'] );
35
+ $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false;
36
+ global $is_floter;
37
+ echo $before_widget;
38
+ /* Display the widget title */
39
+ if ( $title ) echo $before_title . $title . $after_title;
40
+ ?>
41
+ <div class="sfsi_plus_widget" data-position="widget">
42
+ <div id='sfsi_plus_wDiv'></div>
43
+ <?php
44
+ /* Link the main icons function */
45
+ echo sfsi_plus_check_visiblity(0);
46
+ ?>
47
+ <div style="clear: both;"></div>
48
+ </div>
49
+ <?php
50
+ if ( is_active_widget( false, false, $this->id_base, true ) ) { }
51
+ echo $after_widget;
52
+ }
53
+ else
54
+ {
55
+ //echo 'Kindly go to setting page and check the option "show them via a widget"';
56
+ }
57
+ }
58
+
59
+ /*Update the widget */
60
+ function update( $new_instance, $old_instance )
61
+ {
62
+ $instance = $old_instance;
63
+ //Strip tags from title and name to remove HTML
64
+ if($new_instance['showf']==0)
65
+ {
66
+ $instance['showf']=1;
67
+ }
68
+ else
69
+ {
70
+ $instance['showf']=0;
71
+ }
72
+ $instance['title'] = strip_tags( $new_instance['title'] );
73
+ return $instance;
74
+ }
75
+
76
+ /* Set up some default widget settings. */
77
+ function form( $instance )
78
+ {
79
+ $defaults = array( 'title' =>"" );
80
+ $instance = wp_parse_args( (array) $instance, $defaults );
81
+ if(isset($instance['showf']))
82
+ {
83
+ if( $instance['showf'] == 0 && empty($instance['title']))
84
+ {
85
+ $instance['title']='Please follow & like us :)';
86
+ }
87
+ else
88
+ {
89
+ $instance['title'];
90
+ }
91
+ }
92
+ else
93
+ {
94
+ $instance['title']='Please follow & like us :)';
95
+ }
96
+ ?>
97
+ <p>
98
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">
99
+ <?php _e('Title', SFSI_PLUS_DOMAIN); ?>:
100
+ </label>
101
+ <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>"
102
+ value="<?php echo $instance['title']; ?>" style="width:100%;" />
103
+ <input type="hidden" value="<?php echo isset($instance['showf'])?$instance['showf']:''; ?>"
104
+ id="<?php echo $this->get_field_id( 'showf' ); ?>" name="<?php echo $this->get_field_name( 'showf' ); ?>" />
105
+ </p>
106
+ <p>
107
+ <?php _e('Please go to the plugin page to set your preferences:',SFSI_PLUS_DOMAIN); ?>
108
+ <a href="admin.php?page=sfsi-plus-options"><?php _e('Click here', SFSI_PLUS_DOMAIN); ?></a>
109
+ </p>
110
+ <?php
111
+ }
112
+ }
113
+ /* END OF widget Class */
114
+
115
+ /* register widget to wordpress */
116
+ function register_sfsi_plus_widgets()
117
+ {
118
+ register_widget( 'sfsi_plus_widget' );
119
+ }
120
+ add_action( 'widgets_init', 'register_sfsi_plus_widgets' );
121
+
122
+ /* check the icons visiblity */
123
+ function sfsi_plus_check_visiblity($isFloter=0,$share_url=null,$container_position='absolute')
124
+ {
125
+ global $wpdb;
126
+ /* Access the saved settings in database */
127
+ $sfsi_plus_section1_options = unserialize(get_option('sfsi_plus_section1_options',false));
128
+ $sfsi_section3 = unserialize(get_option('sfsi_plus_section3_options',false));
129
+ $sfsi_section5 = unserialize(get_option('sfsi_plus_section5_options',false));
130
+ //options that are added on the third question
131
+ $sfsi_section8 = unserialize(get_option('sfsi_plus_section8_options',false));
132
+
133
+ /* calculate the width and icons display alignments */
134
+ $icons_space = $sfsi_section5['sfsi_plus_icons_spacing'];
135
+ $icons_size = $sfsi_section5['sfsi_plus_icons_size'];
136
+ $icons_per_row = ($sfsi_section5['sfsi_plus_icons_perRow'])? $sfsi_section5['sfsi_plus_icons_perRow'] : '';
137
+ $icons_alignment = $sfsi_section5['sfsi_plus_icons_Alignment'];
138
+ $position = 'position:absolute;';
139
+ $position1 = 'position:'.$container_position.';';
140
+ $jquery='<script>';
141
+
142
+ $jquery .= 'jQuery(".sfsi_plus_widget").each(function( index ) {
143
+ if(jQuery(this).attr("data-position") == "widget")
144
+ {
145
+ var wdgt_hght = jQuery(this).children(".sfsiplus_norm_row.sfsi_plus_wDiv").height();
146
+ var title_hght = jQuery(this).parent(".widget.sfsi_plus").children(".widget-title").height();
147
+ var totl_hght = parseInt( title_hght ) + parseInt( wdgt_hght );
148
+ jQuery(this).parent(".widget.sfsi_plus").css("min-height", totl_hght+"px");
149
+ }
150
+ });';
151
+
152
+ /* check if icons shuffling is activated in admin or not */
153
+ if($sfsi_section5['sfsi_plus_icons_stick']=="yes")
154
+ {
155
+ if(is_admin_bar_showing())
156
+ {
157
+ $Ictop="30px";
158
+ }
159
+ else
160
+ {
161
+ $Ictop="0";
162
+ }
163
+ $jquery.='var s = jQuery(".sfsi_plus_widget");
164
+ var pos = s.position();
165
+ jQuery(window).scroll(function(){
166
+ sfsi_plus_stick_widget("'.$Ictop.'");
167
+ }); ';
168
+ }
169
+
170
+ /* check if icons floating is activated in admin */
171
+ /*settings under third question*/
172
+ if($sfsi_section8['sfsi_plus_float_on_page']=="yes")
173
+ {
174
+ $top="15";
175
+ //switch($sfsi_section5['sfsi_plus_icons_floatPosition'])
176
+ switch($sfsi_section8['sfsi_plus_float_page_position'])
177
+ {
178
+ case "top-left" :
179
+ if(is_admin_bar_showing())
180
+ {
181
+ $position.="position:absolute;left:30px;top:35px;"; $top="35";
182
+ }
183
+ else
184
+ {
185
+ $position.="position:absolute;left:10px;top:2%"; $top="10";
186
+ }
187
+ break;
188
+ case "top-right" :
189
+ if(is_admin_bar_showing())
190
+ {
191
+ $position.="position:absolute;right:30px;top:35px;"; $top="35";
192
+ }else
193
+ {
194
+ $position.="position:absolute;right:10px;top:2%"; $top="10";
195
+ }
196
+ break;
197
+ case "center-right" :
198
+ $position.="position:absolute;right:30px;top:50%"; $top="center";
199
+ break;
200
+ case "center-left" :
201
+ $position.="position:absolute;left:30px;top:50%"; $top="center";
202
+ break;
203
+ case "bottom-right" :
204
+ $position.="position:absolute;right:30px;bottom:0px"; $top="bottom";
205
+ break;
206
+ case "bottom-left" :
207
+ $position.="position:absolute;left:30px;bottom:0px"; $top="bottom";
208
+ break;
209
+ }
210
+ if($sfsi_section8['sfsi_plus_float_page_position'] == 'center-right' || $sfsi_section8['sfsi_plus_float_page_position'] == 'center-left')
211
+ {
212
+ $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." )
213
+ {
214
+ var topalign = ( jQuery(window).height() - jQuery('#sfsi_plus_floater').height() ) / 2;
215
+ jQuery('#sfsi_plus_floater').css('top',topalign);
216
+ sfsi_plus_float_widget('".$top."');
217
+ });";
218
+ }
219
+ else
220
+ {
221
+ $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { sfsi_plus_float_widget('".$top."')});";
222
+ }
223
+ }
224
+
225
+ $extra=0;
226
+ if($sfsi_section3['sfsi_plus_shuffle_icons']=="yes")
227
+ {
228
+ if($sfsi_section3['sfsi_plus_shuffle_Firstload']=="yes" && $sfsi_section3['sfsi_plus_shuffle_interval']=="yes")
229
+ {
230
+ $shuffle_time=(isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
231
+ $shuffle_time=$shuffle_time*1000;
232
+ $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
233
+ }
234
+ else if($sfsi_section3['sfsi_plus_shuffle_Firstload']=="no" && $sfsi_section3['sfsi_plus_shuffle_interval']=="yes")
235
+ {
236
+ $shuffle_time=(isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
237
+ $shuffle_time=$shuffle_time*1000;
238
+ $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
239
+ }
240
+ else
241
+ {
242
+ $jquery.="jQuery( document ).ready(function( totwith=".(isset($totwith)?$totwith:0)." ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
243
+ }
244
+ }
245
+
246
+ /* magnage the icons in saved order in admin */
247
+ $custom_icons_order = unserialize($sfsi_section5['sfsi_plus_CustomIcons_order']);
248
+ $icons_list = array();
249
+ if(isset($sfsi_plus_section1_options['sfsi_custom_files'])){
250
+ if(is_string($sfsi_plus_section1_options['sfsi_custom_files'])){
251
+ $icons_list= unserialize($sfsi_plus_section1_options['sfsi_custom_files']);
252
+ }else{
253
+ $icons_list= $sfsi_plus_section1_options['sfsi_custom_files'];
254
+ }
255
+ }
256
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_houzzIcon_order'])){
257
+ $sfsi_plus_section5_options['sfsi_plus_houzzIcon_order']=11;
258
+ }
259
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_okIcon_order'])){
260
+ $sfsi_plus_section5_options['sfsi_plus_okIcon_order']=22;
261
+ }
262
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_telegramIcon_order'])){
263
+ $sfsi_plus_section5_options['sfsi_plus_telegramIcon_order']=23;
264
+ }
265
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_vkIcon_order'])){
266
+ $sfsi_plus_section5_options['sfsi_plus_vkIcon_order']=24;
267
+ }
268
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_wechatIcon_order'])){
269
+ $sfsi_plus_section5_options['sfsi_plus_wechatIcon_order']=26;
270
+ }
271
+ if(!isset($sfsi_plus_section5_options['sfsi_plus_weiboIcon_order'])){
272
+ $sfsi_plus_section5_options['sfsi_plus_weiboIcon_order']=25;
273
+ }
274
+
275
+ // $icons_list = (isset($sfsi_plus_section1_options['sfsi_custom_files']))?(!is_string($sfsi_plus_section1_options['sfsi_custom_files'])?unserialize($sfsi_plus_section1_options['sfsi_custom_files'],false):$sfsi_plus_section1_options['sfsi_custom_files']):(array());
276
+
277
+ $icons_order = array(
278
+ '0' => '',
279
+ $sfsi_section5['sfsi_plus_rssIcon_order']=>'rss',
280
+ $sfsi_section5['sfsi_plus_emailIcon_order']=>'email',
281
+ $sfsi_section5['sfsi_plus_facebookIcon_order']=>'facebook',
282
+ $sfsi_section5['sfsi_plus_twitterIcon_order']=>'twitter',
283
+ $sfsi_section5['sfsi_plus_youtubeIcon_order']=>'youtube',
284
+ $sfsi_section5['sfsi_plus_pinterestIcon_order']=>'pinterest',
285
+ $sfsi_section5['sfsi_plus_linkedinIcon_order']=>'linkedin',
286
+ $sfsi_section5['sfsi_plus_instagramIcon_order']=>'instagram',
287
+ $sfsi_section5['sfsi_plus_houzzIcon_order']=>'houzz',
288
+ $sfsi_section5['sfsi_plus_okIcon_order']=>'ok',
289
+ $sfsi_section5['sfsi_plus_telegramIcon_order']=>'telegram',
290
+ $sfsi_section5['sfsi_plus_vkIcon_order']=>'vk',
291
+ $sfsi_section5['sfsi_plus_wechatIcon_order']=>'wechat',
292
+ $sfsi_section5['sfsi_plus_weiboIcon_order']=>'weibo'
293
+
294
+ );
295
+ if(!is_array($custom_icons_order)){
296
+ $custom_icons_order = array();
297
+ }
298
+ $max_custom_icon_order=max(array_keys($icons_order));
299
+ if(is_array($icons_list)){
300
+ foreach($icons_list as $index=>$icon){
301
+ if(false===array_search($index, array_column($custom_icons_order, 'ele'))){
302
+ array_push($custom_icons_order,array('order'=>($max_custom_icon_order+count($custom_icons_order)),'ele'=>$index));
303
+ }
304
+ }
305
+ }
306
+ if(is_array($custom_icons_order) )
307
+ {
308
+ foreach($custom_icons_order as $data)
309
+ {
310
+ $icons_order[$data['order']] = $data;
311
+ }
312
+ }
313
+
314
+ ksort($icons_order);
315
+ /* calculate the total width of widget according to icons */
316
+ if(!empty($icons_per_row))
317
+ {
318
+ $width = ((int)$icons_space+(int)$icons_size)*(int)$icons_per_row;
319
+ $main_width = $width=$width+$extra;
320
+ $main_width = $main_width."px";
321
+ }
322
+ else
323
+ {
324
+ $main_width="35%";
325
+ }
326
+
327
+ /* built the main widget div */
328
+ $icons_main='<div class="sfsiplus_norm_row sfsi_plus_wDiv" style="width:'.$main_width.';text-align:'.$icons_alignment.';'.$position1.'">';
329
+ $icons="";
330
+ /* loop through icons and bulit the icons with all settings applied in admin */
331
+ foreach($icons_order as $index => $icn)
332
+ {
333
+
334
+ if(is_array($icn))
335
+ {
336
+ $icon_arry=$icn; $icn="custom" ;
337
+ }
338
+ switch ($icn)
339
+ {
340
+ case 'rss' : if($sfsi_plus_section1_options['sfsi_plus_rss_display']=='yes') $icons.= sfsi_plus_prepairIcons('rss',0,"no",null,$share_url);
341
+ break;
342
+ case 'email' : if($sfsi_plus_section1_options['sfsi_plus_email_display']=='yes') $icons.= sfsi_plus_prepairIcons('email',0,"no",null,$share_url);
343
+ break;
344
+ case 'facebook' : if($sfsi_plus_section1_options['sfsi_plus_facebook_display']=='yes') $icons.= sfsi_plus_prepairIcons('facebook',0,"no",null,$share_url);
345
+ break;
346
+
347
+ case 'twitter' : if($sfsi_plus_section1_options['sfsi_plus_twitter_display']=='yes') $icons.= sfsi_plus_prepairIcons('twitter',0,"no",null,$share_url);
348
+ break;
349
+ case 'youtube' : if($sfsi_plus_section1_options['sfsi_plus_youtube_display']=='yes') $icons.= sfsi_plus_prepairIcons('youtube',0,"no",null,$share_url);
350
+ break;
351
+ case 'pinterest' : if($sfsi_plus_section1_options['sfsi_plus_pinterest_display']=='yes') $icons.= sfsi_plus_prepairIcons('pinterest',0,"no",null,$share_url);
352
+ break;
353
+ case 'linkedin' : if($sfsi_plus_section1_options['sfsi_plus_linkedin_display']=='yes') $icons.= sfsi_plus_prepairIcons('linkedin',0,"no",null,$share_url);
354
+ break;
355
+ case 'instagram' : if($sfsi_plus_section1_options['sfsi_plus_instagram_display']=='yes') $icons.= sfsi_plus_prepairIcons('instagram',0,"no",null,$share_url);
356
+ break;
357
+ case 'houzz' :
358
+ if(
359
+ isset($sfsi_plus_section1_options['sfsi_plus_houzz_display']) &&
360
+ $sfsi_plus_section1_options['sfsi_plus_houzz_display'] == 'yes'
361
+ )
362
+ {
363
+ $icons.= sfsi_plus_prepairIcons('houzz',0,"no",null,$share_url);
364
+ }
365
+ break;
366
+ case 'ok' : if($sfsi_plus_section1_options['sfsi_plus_ok_display']=='yes') $icons.= sfsi_plus_prepairIcons('ok',0,"no",null,$share_url);
367
+ break;
368
+ case 'telegram' : if($sfsi_plus_section1_options['sfsi_plus_telegram_display']=='yes') $icons.= sfsi_plus_prepairIcons('telegram',0,"no",null,$share_url);
369
+ break;
370
+ case 'vk' : if($sfsi_plus_section1_options['sfsi_plus_vk_display']=='yes') $icons.= sfsi_plus_prepairIcons('vk',0,"no",null,$share_url);
371
+ break;
372
+ case 'weibo' : if($sfsi_plus_section1_options['sfsi_plus_weibo_display']=='yes') $icons.= sfsi_plus_prepairIcons('weibo',0,"no",null,$share_url);
373
+ break;
374
+
375
+ case 'wechat' : if($sfsi_plus_section1_options['sfsi_plus_wechat_display']=='yes') $icons.= sfsi_plus_prepairIcons('wechat',0,"no",null,$share_url);
376
+ break;
377
+ case 'custom' : $icons.= sfsi_plus_prepairIcons($icon_arry['ele'],0,"no",null,$share_url);
378
+ break;
379
+ }
380
+ }
381
+
382
+
383
+ $jquery.="</script>";
384
+ $icons.='</div >';
385
+
386
+ $width = isset($width) && !empty($width) ? $width : 0;
387
+
388
+ $margin= $width+11;
389
+
390
+ $icons_main.=$icons.'<div id="sfsi_holder" class="sfsi_plus_holders" style="position: relative; float: left;width:100%;z-index:-1;"></div >'.$jquery;
391
+ /* if floating of icons is active create a floater div */
392
+ $icons_float='';
393
+ if($sfsi_section8['sfsi_plus_float_on_page']=="yes" && $isFloter==1)
394
+ {
395
+ if($sfsi_section8['sfsi_plus_float_page_position'] == "top-left")
396
+ {
397
+ $styleMargin = "margin-top:".$sfsi_section8['sfsi_plus_icons_floatMargin_top']."px;margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
398
+ }
399
+ elseif($sfsi_section8['sfsi_plus_float_page_position'] == "top-right")
400
+ {
401
+ $styleMargin = "margin-top:".$sfsi_section8['sfsi_plus_icons_floatMargin_top']."px;margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
402
+ }
403
+ elseif($sfsi_section8['sfsi_plus_float_page_position'] == "center-left")
404
+ {
405
+ $styleMargin = "margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
406
+ }
407
+ elseif($sfsi_section8['sfsi_plus_float_page_position'] == "center-right")
408
+ {
409
+ $styleMargin = "margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
410
+ }
411
+ elseif($sfsi_section8['sfsi_plus_float_page_position'] == "bottom-left")
412
+ {
413
+ $styleMargin = "margin-bottom:".$sfsi_section8['sfsi_plus_icons_floatMargin_bottom']."px;margin-left:".$sfsi_section8['sfsi_plus_icons_floatMargin_left']."px;";
414
+ }
415
+ elseif($sfsi_section8['sfsi_plus_float_page_position'] == "bottom-right")
416
+ {
417
+ $styleMargin = "margin-bottom:".$sfsi_section8['sfsi_plus_icons_floatMargin_bottom']."px;margin-right:".$sfsi_section8['sfsi_plus_icons_floatMargin_right']."px;";
418
+ }
419
+
420
+ // $icons_float = '<style >#sfsi_plus_floater { '.$styleMargin.' }</style>';
421
+ add_action('wp_footer',function()use($styleMargin){
422
+ echo '<script>var css = "#sfsi_plus_floater { '.$styleMargin.' }",
423
+ head = document.head || document.getElementsByTagName("head")[0],
424
+ style = document.createElement("style");
425
+
426
+ head.appendChild(style);
427
+ if (style.styleSheet){
428
+ // This is required for IE8 and below.
429
+ style.styleSheet.cssText = css;
430
+ } else {
431
+ style.appendChild(document.createTextNode(css));
432
+ }</script>';
433
+ },100);
434
+ $icons_float .= '<div class="sfsiplus_norm_row sfsi_plus_wDiv" id="sfsi_plus_floater" style="z-index: 9999;width:'.$width.'px;text-align:'.$icons_alignment.';'.$position.'">';
435
+ $icons_float .= $icons;
436
+ $icons_float .= "<input type='hidden' id='sfsi_plus_floater_sec' value='".$sfsi_section8['sfsi_plus_float_page_position']."' />";
437
+ $icons_float .= $jquery;
438
+ return $icons_float; exit;
439
+ }
440
+ $icons_data=$icons_main.$icons_float;
441
+ return $icons_data;
442
+ }
443
+ /* make all icons with saved settings in admin */
444
+ function sfsi_plus_prepairIcons($icon_name,$is_front=0, $onpost="no", $fromPost = NULL,$share_url=null)
445
+ {
446
+ global $wpdb; global $socialObj; global $post;
447
+ $mouse_hover_effect = '';
448
+ $active_theme = 'official';
449
+ $sfsi_plus_shuffle_Firstload = 'no';
450
+ $sfsi_plus_display_counts = "no";
451
+ $icon = '';
452
+ $url = '';
453
+ $alt_text = '';
454
+ $new_window = '';
455
+ $class = '';
456
+ /* access all saved settings in admin */
457
+ $sfsi_plus_section1_options = unserialize(get_option('sfsi_plus_section1_options',false));
458
+ $sfsi_plus_section2_options = unserialize(get_option('sfsi_plus_section2_options',false));
459
+ $sfsi_plus_section3_options = unserialize(get_option('sfsi_plus_section3_options',false));
460
+ $sfsi_plus_section4_options = unserialize(get_option('sfsi_plus_section4_options',false));
461
+ $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
462
+ $sfsi_plus_section6_options = unserialize(get_option('sfsi_plus_section6_options',false));
463
+ $sfsi_plus_section7_options = unserialize(get_option('sfsi_plus_section7_options',false));
464
+ $sfsi_plus_section8_options = unserialize(get_option('sfsi_plus_section8_options',false));
465
+ /* get active theme */
466
+ $border_radius = '';
467
+ $active_theme = $sfsi_plus_section3_options['sfsi_plus_actvite_theme'];
468
+
469
+
470
+ /* shuffle effect */
471
+ if($sfsi_plus_section3_options['sfsi_plus_shuffle_icons']=='yes')
472
+ {
473
+ $sfsi_plus_shuffle_Firstload=$sfsi_plus_section3_options["sfsi_plus_shuffle_Firstload"];
474
+ if($sfsi_plus_section3_options["sfsi_plus_shuffle_interval"]=="yes")
475
+ {
476
+ $sfsi_plus_shuffle_interval = $sfsi_plus_section3_options["sfsi_plus_shuffle_intervalTime"];
477
+ }
478
+ }
479
+ /* define the main url for icon access */
480
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/".$active_theme."/";
481
+ $visit_iconsUrl = SFSI_PLUS_PLUGURL."images/visit_icons/";
482
+ $share_iconsUrl = SFSI_PLUS_PLUGURL."images/share_icons/";
483
+ $hoverSHow = 0;
484
+ // var_dump($icons_baseUrl,$visit_iconsUrl);die();
485
+ /* check is icon is a custom icon or default icon */
486
+ if(is_numeric($icon_name)) { $icon_n=$icon_name; $icon_name="custom" ; }
487
+ $counts='';
488
+ $twit_tolCls = "";
489
+ $twt_margin = "";
490
+ $icons_space = $sfsi_plus_section5_options['sfsi_plus_icons_spacing'];
491
+ $padding_top = '';
492
+
493
+ $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
494
+ $option3 = unserialize(get_option('sfsi_plus_section3_options',false));
495
+
496
+ if(isset($option3['sfsi_plus_actvite_theme']) && !empty($option3['sfsi_plus_actvite_theme'])){
497
+
498
+ $active_theme = $option3['sfsi_plus_actvite_theme'];
499
+ }else{
500
+ $active_theme = "default";
501
+ }
502
+ $glossy_theme_adjustment=0;
503
+ //$current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
504
+ if(null!==$share_url){
505
+ $current_url = $share_url;
506
+ }elseif($fromPost == 'yes' && !empty($post))
507
+ {
508
+ $current_url = get_permalink($post->ID);
509
+ }
510
+ else
511
+ {
512
+ //$current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
513
+ $current_url = sfsi_plus_get_current_url();
514
+ }
515
+ $url = "#";
516
+ $cmcls='';
517
+ $toolClass = '';
518
+ $icons_language = $sfsi_plus_section5_options['sfsi_plus_icons_language'];
519
+ switch($icon_name)
520
+ {
521
+
522
+
523
+ case "rss" :
524
+ $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
525
+ $url = ($sfsi_plus_section2_options['sfsi_plus_rss_url'])? $sfsi_plus_section2_options['sfsi_plus_rss_url'] : 'javascript:void(0);';
526
+ $toolClass = "rss_tool_bdr";
527
+ $hoverdiv = '';
528
+ $arsfsiplus_row_class = "bot_rss_arow";
529
+
530
+ /* fecth no of counts if active in admin section */
531
+ if($sfsi_plus_section4_options['sfsi_plus_rss_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
532
+ {
533
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_rss_manualCounts']);
534
+ }
535
+
536
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_rss_MouseOverText']))
537
+ {
538
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_rss_MouseOverText'];
539
+ }
540
+ else
541
+ {
542
+ $alt_text = 'RSS';
543
+ }
544
+
545
+ //Custom Skin Support {Monad}
546
+ if($active_theme == 'custom_support')
547
+ {
548
+ if(get_option("plus_rss_skin"))
549
+ {
550
+ $icon = get_option("plus_rss_skin");
551
+ }
552
+ else
553
+ {
554
+ $active_theme = 'default';
555
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
556
+ $icon = $icons_baseUrl.$active_theme."_rss.png";
557
+ }
558
+ }
559
+ else
560
+ {
561
+ $icon = $icons_baseUrl.$active_theme."_rss.png";
562
+ }
563
+ break;
564
+
565
+ case "email" :
566
+ $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
567
+ $hoverdiv = '';
568
+ $sfsi_plus_section2_options['sfsi_plus_email_url'];
569
+ $url = (isset($sfsi_plus_section2_options['sfsi_plus_email_url'])) ? $sfsi_plus_section2_options['sfsi_plus_email_url'] : 'javascript:void(0);';
570
+ $toolClass = "email_tool_bdr";
571
+ $arsfsiplus_row_class = "bot_eamil_arow";
572
+
573
+ /* fecth no of counts if active in admin section */
574
+ if($sfsi_plus_section4_options['sfsi_plus_email_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
575
+ {
576
+ if($sfsi_plus_section4_options['sfsi_plus_email_countsFrom']=="manual")
577
+ {
578
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_email_manualCounts']);
579
+ }
580
+ else
581
+ {
582
+ $counts= $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_plus_feed_id',false)));
583
+ }
584
+ }
585
+
586
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_email_MouseOverText']))
587
+ {
588
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_email_MouseOverText'];
589
+ }
590
+ else
591
+ {
592
+ $alt_text = 'EMAIL';
593
+ }
594
+
595
+ //Custom Skin Support {Monad}
596
+ if($active_theme == 'custom_support')
597
+ {
598
+ if(get_option("plus_email_skin"))
599
+ {
600
+ $icon = get_option("plus_email_skin");
601
+ }
602
+ else
603
+ {
604
+ $active_theme = 'default';
605
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
606
+ //$icon=($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
607
+ if($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi")
608
+ {
609
+ $icon = $icons_baseUrl.$active_theme."_sf.png";
610
+ }
611
+ elseif($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="email")
612
+ {
613
+ $icon = $icons_baseUrl.$active_theme."_email.png";
614
+ }
615
+ else
616
+ {
617
+ $icon = $icons_baseUrl.$active_theme."_subscribe.png";
618
+ }
619
+ }
620
+ }
621
+ else
622
+ {
623
+ //$icon=($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
624
+ if($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="sfsi")
625
+ {
626
+ $icon = $icons_baseUrl.$active_theme."_sf.png";
627
+ }
628
+ elseif($sfsi_plus_section2_options['sfsi_plus_rss_icons']=="email")
629
+ {
630
+ $icon = $icons_baseUrl.$active_theme."_email.png";
631
+ }
632
+ else
633
+ {
634
+ $icon = $icons_baseUrl.$active_theme."_subscribe.png";
635
+ }
636
+ }
637
+ break;
638
+
639
+ case "facebook" :
640
+ $socialObj = new sfsi_plus_SocialHelper();
641
+ $width = 62;
642
+ $totwith = $width+28+$icons_space;
643
+ $twt_margin = $totwith /2;
644
+ $toolClass = "sfsi_plus_fb_tool_bdr";
645
+ $arsfsiplus_row_class = "bot_fb_arow";
646
+
647
+ /* check for the over section */
648
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_facebook_MouseOverText']))
649
+ {
650
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_facebook_MouseOverText'];
651
+ }
652
+ else
653
+ {
654
+ $alt_text = "FACEBOOK";
655
+ }
656
+
657
+ $facebook_icons_lang = $sfsi_plus_section5_options['sfsi_plus_facebook_icons_language'];
658
+ // return $facebook_icons_lang;die();wp_die();
659
+ $visit_icon = SFSI_PLUS_DOCROOT.'/images/visit_icons/Visit_us_fb/icon_'.$facebook_icons_lang.'.png';
660
+ if(file_exists($visit_icon))
661
+ {
662
+ $visit_icon = $visit_iconsUrl."Visit_us_fb/icon_".$facebook_icons_lang.".png";
663
+ }
664
+ else
665
+ {
666
+ $visit_icon = $visit_iconsUrl."fb.png";
667
+ }
668
+
669
+ //$visit_iconDefault = $visit_iconsUrl."facebook.png";
670
+
671
+
672
+ $url = ($sfsi_plus_section2_options['sfsi_plus_facebookPage_url']) ? $sfsi_plus_section2_options['sfsi_plus_facebookPage_url']:'javascript:void(0);';
673
+
674
+ if($sfsi_plus_section2_options['sfsi_plus_facebookLike_option']=="yes" || $sfsi_plus_section2_options['sfsi_plus_facebookShare_option']=="yes" )
675
+ {
676
+ $url=($sfsi_plus_section2_options['sfsi_plus_facebookPage_url']) ? $sfsi_plus_section2_options['sfsi_plus_facebookPage_url']:'javascript:void(0);';
677
+ $hoverSHow=1;
678
+ $hoverdiv='';
679
+ if($sfsi_plus_section2_options['sfsi_plus_facebookPage_option']=="yes")
680
+ {
681
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
682
+ }
683
+ if($sfsi_plus_section2_options['sfsi_plus_facebookLike_option']=="yes")
684
+ {
685
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_plus_FBlike($current_url)."</div>";
686
+ }
687
+ if($sfsi_plus_section2_options['sfsi_plus_facebookShare_option']=="yes")
688
+ {
689
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsiFB_Share($current_url)."</div>";
690
+ }
691
+
692
+ }
693
+
694
+ /* fecth no of counts if active in admin section */
695
+ if(
696
+ $fromPost == 'yes' && !empty($post) &&
697
+ $sfsi_plus_section4_options['sfsi_plus_facebook_countsDisplay']=="yes" &&
698
+ $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes"
699
+ )
700
+ {
701
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
702
+ $counts=$socialObj->format_num($fb_data['total_count']);
703
+ if(empty($counts))
704
+ {
705
+ $counts=(string) "0";
706
+ }
707
+ }
708
+ else
709
+ {
710
+ if(
711
+ $sfsi_plus_section4_options['sfsi_plus_facebook_countsDisplay']=="yes" &&
712
+ $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes"
713
+ )
714
+ {
715
+ if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="manual")
716
+ {
717
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_facebook_manualCounts']);
718
+ }
719
+ else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="likes")
720
+ {
721
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
722
+ $counts=$socialObj->format_num($fb_data);
723
+ if(empty($counts))
724
+ {
725
+ $counts=(string) "0";
726
+ }
727
+ }
728
+ else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="followers")
729
+ {
730
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
731
+ $counts=$socialObj->format_num($fb_data['share_count']);
732
+
733
+ }
734
+ else if($sfsi_plus_section4_options['sfsi_plus_facebook_countsFrom']=="mypage")
735
+ {
736
+ $current_url = $sfsi_plus_section4_options['sfsi_plus_facebook_mypageCounts'];
737
+ $fb_data=$socialObj->sfsi_get_fb_pagelike($current_url);
738
+ $counts=$socialObj->format_num($fb_data);
739
+ }
740
+ }
741
+ }
742
+
743
+ //Custom Skin Support {Monad}
744
+ if($active_theme == 'custom_support')
745
+ {
746
+ if(get_option("plus_facebook_skin"))
747
+ {
748
+ $icon = get_option("plus_facebook_skin");
749
+ }
750
+ else
751
+ {
752
+ $active_theme = 'default';
753
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
754
+ $icon=$icons_baseUrl.$active_theme."_fb.png";
755
+ }
756
+ }
757
+ else
758
+ {
759
+ $icon=$icons_baseUrl.$active_theme."_fb.png";
760
+ }
761
+ break;
762
+
763
+ case "twitter" :
764
+ $toolClass = "sfsi_plus_twt_tool_bdr";
765
+ $arsfsiplus_row_class = "bot_twt_arow";
766
+ $socialObj = new sfsi_plus_SocialHelper();
767
+ $url = ($sfsi_plus_section2_options['sfsi_plus_twitter_pageURL'])?$sfsi_plus_section2_options['sfsi_plus_twitter_pageURL'] : 'javascript:void(0);';
768
+ $twitter_user = $sfsi_plus_section2_options['sfsi_plus_twitter_followUserName'];
769
+ $twitter_text = __($sfsi_plus_section2_options['sfsi_plus_twitter_aboutPageText'],SFSI_PLUS_DOMAIN);
770
+ $width = 59;
771
+ $totwith = $width+28+$icons_space;
772
+ $twt_margin = $totwith /2;
773
+ /* check for icons to display */
774
+ $hoverdiv='';
775
+
776
+ $twitter_icons_lang = $sfsi_plus_section5_options['sfsi_plus_twitter_icons_language'];
777
+ $visit_icon = SFSI_PLUS_DOCROOT.'/images/visit_icons/Visit_us_twitter/icon_'.$twitter_icons_lang.'.png';
778
+ if(file_exists($visit_icon))
779
+ {
780
+ $visit_icon = $visit_iconsUrl."Visit_us_twitter/icon_".$twitter_icons_lang.".png";
781
+ }
782
+ else
783
+ {
784
+ $visit_icon = $visit_iconsUrl."twitter.png";
785
+ }
786
+ //$visit_icon = $visit_iconsUrl."twitter.png";
787
+
788
+ if($icons_language == 'nn_NO')
789
+ {
790
+ $icons_language = 'no';
791
+ }
792
+
793
+ if($sfsi_plus_section2_options['sfsi_plus_twitter_followme']=="yes" || $sfsi_plus_section2_options['sfsi_plus_twitter_aboutPage']=="yes")
794
+ {
795
+ $hoverSHow=1;
796
+ //Visit twitter page {Monad}
797
+ if($sfsi_plus_section2_options['sfsi_plus_twitter_page']=="yes")
798
+ {
799
+ $hoverdiv.="<div class='cstmicon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='Visit Us' title='Visit Us' src='".$visit_icon."' /></a></div>";
800
+ }
801
+ if($sfsi_plus_section2_options['sfsi_plus_twitter_followme']=="yes" && !empty($twitter_user))
802
+ {
803
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_twitterFollow($twitter_user,$icons_language)."</div>";
804
+ }
805
+ if($sfsi_plus_section2_options['sfsi_plus_twitter_aboutPage']=="yes")
806
+ {
807
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_twitterShare($current_url,$twitter_text,$icons_language)."</div>";
808
+ }
809
+
810
+ }
811
+
812
+ /* fecth no of counts if active in admin section */
813
+ if($sfsi_plus_section4_options['sfsi_plus_twitter_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
814
+ {
815
+ if($sfsi_plus_section4_options['sfsi_plus_twitter_countsFrom']=="manual")
816
+ {
817
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_twitter_manualCounts']);
818
+ }
819
+ else if($sfsi_plus_section4_options['sfsi_plus_twitter_countsFrom']=="source")
820
+ {
821
+ $tw_settings=array('sfsiplus_tw_consumer_key'=>$sfsi_plus_section4_options['sfsiplus_tw_consumer_key'],
822
+ 'sfsiplus_tw_consumer_secret'=> $sfsi_plus_section4_options['sfsiplus_tw_consumer_secret'],
823
+ 'sfsiplus_tw_oauth_access_token'=> $sfsi_plus_section4_options['sfsiplus_tw_oauth_access_token'],
824
+ 'sfsiplus_tw_oauth_access_token_secret'=> $sfsi_plus_section4_options['sfsiplus_tw_oauth_access_token_secret']);
825
+
826
+ $followers=$socialObj->sfsi_get_tweets($twitter_user,$tw_settings);
827
+ $counts=$socialObj->format_num($followers);
828
+ if(empty($counts))
829
+ {
830
+ $counts=(string) "0";
831
+ }
832
+ }
833
+ }
834
+
835
+ //Giving alternative text to image
836
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_twitter_MouseOverText']))
837
+ {
838
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_twitter_MouseOverText'];
839
+ }
840
+ else
841
+ {
842
+ $alt_text = "TWITTER";
843
+ }
844
+
845
+ //Custom Skin Support {Monad}
846
+ if($active_theme == 'custom_support')
847
+ {
848
+ if(get_option("plus_twitter_skin"))
849
+ {
850
+ $icon = get_option("plus_twitter_skin");
851
+ }
852
+ else
853
+ {
854
+ $active_theme = 'default';
855
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
856
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
857
+ }
858
+ }
859
+ else
860
+ {
861
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
862
+ }
863
+ break;
864
+
865
+ case "youtube" :
866
+ $socialObj = new sfsi_plus_SocialHelper();
867
+ $toolClass = "utube_tool_bdr";
868
+ $arsfsiplus_row_class = "bot_utube_arow";
869
+ $socialObj = new sfsi_plus_SocialHelper();
870
+ $width = 96;
871
+ $totwith = $width+28+$icons_space;
872
+ $twt_margin = $totwith /2;
873
+ $youtube_user = (isset($sfsi_plus_section4_options['sfsi_plus_youtube_user']) && !empty($sfsi_plus_section4_options['sfsi_plus_youtube_user'])) ? $sfsi_plus_section4_options['sfsi_plus_youtube_user'] : 'SpecificFeeds';
874
+ $visit_icon = $visit_iconsUrl."youtube.png";
875
+
876
+ $url = ($sfsi_plus_section2_options['sfsi_plus_youtube_pageUrl'])? $sfsi_plus_section2_options['sfsi_plus_youtube_pageUrl'] : 'javascript:void(0);';
877
+
878
+ //Giving alternative text to image
879
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_youtube_MouseOverText']))
880
+ {
881
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_youtube_MouseOverText'];
882
+ }
883
+ else
884
+ {
885
+ $alt_text = "YOUTUBE";
886
+ }
887
+
888
+ /* check for icons to display */
889
+ $hoverdiv="";
890
+ if($sfsi_plus_section2_options['sfsi_plus_youtube_follow']=="yes" )
891
+ {
892
+ $hoverSHow=1;
893
+ if($sfsi_plus_section2_options['sfsi_plus_youtube_page']=="yes")
894
+ {
895
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
896
+ }
897
+ if($sfsi_plus_section2_options['sfsi_plus_youtube_follow']=="yes")
898
+ {
899
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_YouTubeSub($youtube_user)."</div>";
900
+ }
901
+ }
902
+
903
+ /* fecth no of counts if active in admin section */
904
+ if($sfsi_plus_section4_options['sfsi_plus_youtube_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
905
+ {
906
+ if($sfsi_plus_section4_options['sfsi_plus_youtube_countsFrom']=="manual")
907
+ {
908
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_youtube_manualCounts']);
909
+ }
910
+ else if($sfsi_plus_section4_options['sfsi_plus_youtube_countsFrom']=="subscriber")
911
+ {
912
+ $followers=$socialObj->sfsi_get_youtube($youtube_user);
913
+ $counts=$socialObj->format_num($followers);
914
+ if(empty($counts))
915
+ {
916
+ $counts=(string) "0";
917
+ }
918
+ }
919
+ }
920
+
921
+ //Custom Skin Support {Monad}
922
+ if($active_theme == 'custom_support')
923
+ {
924
+ if(get_option("plus_youtube_skin"))
925
+ {
926
+ $icon = get_option("plus_youtube_skin");
927
+ }
928
+ else
929
+ {
930
+ $active_theme = 'default';
931
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
932
+ $icon = $icons_baseUrl.$active_theme."_youtube.png";
933
+ }
934
+ }
935
+ else
936
+ {
937
+ $icon = $icons_baseUrl.$active_theme."_youtube.png";
938
+ }
939
+ break;
940
+
941
+ case "pinterest" :
942
+ $width = 73;
943
+ $totwith = $width+28+$icons_space;
944
+ $twt_margin = $totwith /2;
945
+ $socialObj = new sfsi_plus_SocialHelper();
946
+ $toolClass = "sfsi_plus_printst_tool_bdr";
947
+ $arsfsiplus_row_class = "bot_pintst_arow";
948
+
949
+ $pinterest_user = (isset($sfsi_plus_section4_options['sfsi_plus_pinterest_user']))
950
+ ? $sfsi_plus_section4_options['sfsi_plus_pinterest_user'] : '';
951
+
952
+ $pinterest_board = (isset($sfsi_plus_section4_options['sfsi_plus_pinterest_board']))
953
+ ? $sfsi_plus_section4_options['sfsi_plus_pinterest_board'] : '';
954
+
955
+ $visit_icon = $visit_iconsUrl."pinterest.png";
956
+
957
+ $url = (isset($sfsi_plus_section2_options['sfsi_plus_pinterest_pageUrl'])) ? $sfsi_plus_section2_options['sfsi_plus_pinterest_pageUrl'] : 'javascript:void(0);';
958
+
959
+ //Giving alternative text to image
960
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_pinterest_MouseOverText']))
961
+ {
962
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_pinterest_MouseOverText'];
963
+ }
964
+ else
965
+ {
966
+ $alt_text = "PINTEREST";
967
+ }
968
+
969
+ /* check for icons to display */
970
+ $hoverdiv="";
971
+ if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes" )
972
+ {
973
+ $hoverSHow=1;
974
+ if($sfsi_plus_section2_options['sfsi_plus_pinterest_page']=="yes")
975
+ {
976
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
977
+ }
978
+ if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes")
979
+ {
980
+ if($sfsi_plus_section2_options['sfsi_plus_pinterest_pingBlog']=="yes")
981
+ {
982
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_PinIt($current_url)."</div>";
983
+ }
984
+ }
985
+ }
986
+
987
+ /* fecth no of counts if active in admin section */
988
+ if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
989
+ {
990
+ if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsFrom']=="manual")
991
+ {
992
+ $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_pinterest_manualCounts']);
993
+ }
994
+ else if($sfsi_plus_section4_options['sfsi_plus_pinterest_countsFrom']=="pins")
995
+ {
996
+ $pins=$socialObj->sfsi_get_pinterest($current_url);
997
+ $counts=$pins;
998
+ if(empty($counts))
999
+ {
1000
+ $counts=(string) "0";
1001
+ }
1002
+ }
1003
+ }
1004
+
1005
+ //Custom Skin Support {Monad}
1006
+ if($active_theme == 'custom_support')
1007
+ {
1008
+ if(get_option("plus_pintrest_skin"))
1009
+ {
1010
+ $icon = get_option("plus_pintrest_skin");
1011
+ }
1012
+ else
1013
+ {
1014
+ $active_theme = 'default';
1015
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1016
+ $icon=$icons_baseUrl.$active_theme."_pinterest.png";
1017
+ }
1018
+ }
1019
+ else
1020
+ {
1021
+ $icon=$icons_baseUrl.$active_theme."_pinterest.png";
1022
+ }
1023
+ break;
1024
+
1025
+ case "instagram" :
1026
+ $toolClass = "instagram_tool_bdr";
1027
+ $arsfsiplus_row_class = "bot_pintst_arow";
1028
+ $socialObj = new sfsi_plus_SocialHelper();
1029
+ $url = (isset($sfsi_plus_section2_options['sfsi_plus_instagram_pageUrl'])) ? $sfsi_plus_section2_options['sfsi_plus_instagram_pageUrl'] : 'javascript:void(0);';
1030
+ $instagram_user_name = $sfsi_plus_section4_options['sfsi_plus_instagram_User'];
1031
+
1032
+ //Giving alternative text to image
1033
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_instagram_MouseOverText']))
1034
+ {
1035
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_instagram_MouseOverText'];
1036
+ }
1037
+ else
1038
+ {
1039
+ $alt_text = "INSTAGRAM";
1040
+ }
1041
+
1042
+ $hoverdiv="";
1043
+ /* fecth no of counts if active in admin section */
1044
+ if($sfsi_plus_section4_options['sfsi_plus_instagram_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1045
+ {
1046
+ if($sfsi_plus_section4_options['sfsi_plus_instagram_countsFrom']=="manual")
1047
+ {
1048
+ $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_instagram_manualCounts']);
1049
+ }
1050
+ else if($sfsi_plus_section4_options['sfsi_plus_instagram_countsFrom']=="followers")
1051
+ {
1052
+ $counts=$socialObj->sfsi_get_instagramFollowers($instagram_user_name);
1053
+ if(empty($counts))
1054
+ {
1055
+ $counts=(string) "0";
1056
+ }
1057
+ }
1058
+ }
1059
+
1060
+ //Custom Skin Support {Monad}
1061
+ if($active_theme == 'custom_support')
1062
+ {
1063
+ if(get_option("plus_instagram_skin"))
1064
+ {
1065
+ $icon = get_option("plus_instagram_skin");
1066
+ }
1067
+ else
1068
+ {
1069
+ $active_theme = 'default';
1070
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1071
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1072
+ }
1073
+ }
1074
+ else
1075
+ {
1076
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1077
+ }
1078
+ break;
1079
+
1080
+ case "houzz" :
1081
+ $socialObj = new sfsi_plus_SocialHelper(); /* global object to access 3rd party icon's actions */
1082
+ $url = ($sfsi_plus_section2_options['sfsi_plus_houzz_pageUrl'])? $sfsi_plus_section2_options['sfsi_plus_houzz_pageUrl'] : 'javascript:void(0);';
1083
+ $toolClass = "rss_tool_bdr";
1084
+ $hoverdiv = '';
1085
+ $arsfsiplus_row_class = "bot_rss_arow";
1086
+
1087
+ /* fecth no of counts if active in admin section */
1088
+ if(
1089
+ isset($sfsi_plus_section4_options['sfsi_plus_houzz_countsDisplay']) &&
1090
+ $sfsi_plus_section4_options['sfsi_plus_houzz_countsDisplay'] == "yes" &&
1091
+ $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1092
+ )
1093
+ {
1094
+ $counts=$socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_houzz_manualCounts']);
1095
+ }
1096
+
1097
+ if(
1098
+ isset($sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText']) &&
1099
+ !empty($sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText'])
1100
+ )
1101
+ {
1102
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_houzz_MouseOverText'];
1103
+ }
1104
+ else
1105
+ {
1106
+ $alt_text = 'Houzz';
1107
+ }
1108
+
1109
+ //Custom Skin Support {Monad}
1110
+ if($active_theme == 'custom_support')
1111
+ {
1112
+ if(get_option("plus_houzz_skin"))
1113
+ {
1114
+ $icon = get_option("plus_houzz_skin");
1115
+ }
1116
+ else
1117
+ {
1118
+ $active_theme = 'default';
1119
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1120
+ $icon = $icons_baseUrl.$active_theme."_houzz.png";
1121
+ }
1122
+ }
1123
+ else
1124
+ {
1125
+ $icon = $icons_baseUrl.$active_theme."_houzz.png";
1126
+ }
1127
+ break;
1128
+
1129
+ case "linkedin" :
1130
+ $width = 66;
1131
+ $socialObj = new sfsi_plus_SocialHelper();
1132
+ $toolClass = "sfsi_plus_linkedin_tool_bdr";
1133
+ $arsfsiplus_row_class = "bot_linkedin_arow";
1134
+ $linkedIn_compayId = $sfsi_plus_section2_options['sfsi_plus_linkedin_followCompany'];
1135
+ $linkedIn_compay = $sfsi_plus_section2_options['sfsi_plus_linkedin_followCompany'];
1136
+ $linkedIn_ProductId = $sfsi_plus_section2_options['sfsi_plus_linkedin_recommendProductId'];
1137
+ $visit_icon = $visit_iconsUrl."linkedIn.png";
1138
+
1139
+ /*check for icons to display */
1140
+ $url=($sfsi_plus_section2_options['sfsi_plus_linkedin_pageURL'])? $sfsi_plus_section2_options['sfsi_plus_linkedin_pageURL'] : 'javascript:void(0);';
1141
+
1142
+ if($sfsi_plus_section2_options['sfsi_plus_linkedin_follow']=="yes" || $sfsi_plus_section2_options['sfsi_plus_linkedin_SharePage']=="yes" || $sfsi_plus_section2_options['sfsi_plus_linkedin_recommendBusines']=="yes" )
1143
+ {
1144
+ $hoverSHow=1;
1145
+ $hoverdiv='';
1146
+ if($sfsi_plus_section2_options['sfsi_plus_linkedin_page']=="yes")
1147
+ {
1148
+ $hoverdiv.="<div class='icon4'><a href='".$url."' ".sfsi_plus_checkNewWindow($url)."><img alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
1149
+ }
1150
+ if($sfsi_plus_section2_options['sfsi_plus_linkedin_follow']=="yes")
1151
+ {
1152
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_LinkedInFollow($linkedIn_compayId)."</div>";
1153
+ }
1154
+ if($sfsi_plus_section2_options['sfsi_plus_linkedin_SharePage']=="yes")
1155
+ {
1156
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_LinkedInShare($current_url)."</div>";
1157
+ }
1158
+ if($sfsi_plus_section2_options['sfsi_plus_linkedin_recommendBusines']=="yes")
1159
+ {
1160
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsi_LinkedInRecommend($linkedIn_compay,$linkedIn_ProductId)."</div>";
1161
+ $width=99;
1162
+ }
1163
+ }
1164
+
1165
+
1166
+ if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsDisplay']=="yes" && $sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1167
+ {
1168
+ if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsFrom']=="manual")
1169
+ {
1170
+ $counts = $socialObj->format_num($sfsi_plus_section4_options['sfsi_plus_linkedIn_manualCounts']);
1171
+ }
1172
+ else if($sfsi_plus_section4_options['sfsi_plus_linkedIn_countsFrom']=="follower")
1173
+ {
1174
+ $linkedIn_compay=$sfsi_plus_section4_options['sfsi_plus_ln_company'];
1175
+ $ln_settings = array('sfsi_plus_ln_api_key'=>$sfsi_plus_section4_options['sfsi_plus_ln_api_key'],
1176
+ 'sfsi_plus_ln_secret_key'=>$sfsi_plus_section4_options['sfsi_plus_ln_secret_key'],
1177
+ 'sfsi_plus_ln_oAuth_user_token'=>$sfsi_plus_section4_options['sfsi_plus_ln_oAuth_user_token']);
1178
+
1179
+ $followers=$socialObj->sfsi_getlinkedin_follower($linkedIn_compay,$ln_settings);
1180
+ (int) $followers;
1181
+ $counts=$socialObj->format_num($followers);
1182
+ if(empty($counts))
1183
+ {
1184
+ $counts = (string) "0";
1185
+ }
1186
+ }
1187
+ }
1188
+
1189
+ $totwith = $width+28+$icons_space;
1190
+ $twt_margin = $totwith /2;
1191
+
1192
+ //Giving alternative text to image
1193
+ if(!empty($sfsi_plus_section5_options['sfsi_plus_linkedIn_MouseOverText']))
1194
+ {
1195
+ $alt_text = $sfsi_plus_section5_options['sfsi_plus_linkedIn_MouseOverText'];
1196
+ }
1197
+ else
1198
+ {
1199
+ $alt_text = "LINKEDIN";
1200
+ }
1201
+
1202
+ //Custom Skin Support {Monad}
1203
+ if($active_theme == 'custom_support')
1204
+ {
1205
+ if(get_option("plus_linkedin_skin"))
1206
+ {
1207
+ $icon = get_option("plus_linkedin_skin");
1208
+ }
1209
+ else
1210
+ {
1211
+ $active_theme = 'default';
1212
+ $icons_baseUrl = SFSI_PLUS_PLUGURL."images/icons_theme/default/";
1213
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1214
+ }
1215
+ }
1216
+ else
1217
+ {
1218
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1219
+ }
1220
+ break;
1221
+
1222
+ // MZ CODE START
1223
+
1224
+
1225
+
1226
+ case "ok":
1227
+
1228
+ $toolClass = "sfsi_plus_ok_tool_bdr";
1229
+ $hoverdiv = '';
1230
+ $arsfsiplus_row_class = "bot_rss_arow";
1231
+
1232
+ /* fecth no of counts if active in admin section */
1233
+ if(
1234
+ isset($sfsi_plus_section4_options['sfsi_plus_ok_countsDisplay']) &&
1235
+ "yes" == $sfsi_plus_section4_options['sfsi_plus_ok_countsDisplay'] &&
1236
+ "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']
1237
+ )
1238
+ {
1239
+ $counts = $sfsi_plus_section4_options['sfsi_plus_ok_manualCounts'];
1240
+ }
1241
+
1242
+ $alt_text = sfsi_plus_get_icon_mouseover_text("ok");
1243
+ // $icon=$icons_baseUrl.$active_theme."_ok.png";
1244
+ $icon = sfsi_plus_get_icon_image("ok");
1245
+ $like_icon = $share_iconsUrl.$icon_name.".svg";
1246
+ $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1247
+ $sub_icon = $visit_iconsUrl."ok_subscribe.svg";
1248
+ $url = "#";
1249
+
1250
+ $hoverSHow = 0;
1251
+ if(isset($sfsi_plus_section2_options['sfsi_plus_okVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_okVisit_url'])){
1252
+
1253
+ $url = $sfsi_plus_section2_options['sfsi_plus_okVisit_url'];
1254
+ }else{
1255
+ $url="#";
1256
+ $sfsi_onclick="event.preventDefault();";
1257
+ }
1258
+ if($active_theme == "glossy"){
1259
+ $glossy_theme_adjustment=4;
1260
+ }
1261
+ break;
1262
+
1263
+ case "telegram":
1264
+
1265
+ $toolClass = "sfsi_plus_telegram_tool_bdr";
1266
+ $hoverdiv = '';
1267
+ $arsfsiplus_row_class = "bot_rss_arow";
1268
+
1269
+ /* fecth no of counts if active in admin section */
1270
+ if(
1271
+ isset($sfsi_plus_section4_options['sfsi_plus_telegram_countsDisplay']) &&
1272
+ $sfsi_plus_section4_options['sfsi_plus_telegram_countsDisplay'] == "yes" &&
1273
+ $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1274
+ )
1275
+ {
1276
+ $counts = $sfsi_plus_section4_options['sfsi_plus_telegram_manualCounts'];
1277
+ }
1278
+
1279
+ $alt_text = sfsi_plus_get_icon_mouseover_text("telegram");
1280
+
1281
+ $icon = sfsi_plus_get_icon_image("telegram");
1282
+
1283
+ $messageus_icon = $visit_iconsUrl.$icon_name."_message.svg";
1284
+ $share_icon = $share_iconsUrl.$icon_name.".svg";
1285
+ $visit_icon = $visit_iconsUrl."telegram.png";
1286
+
1287
+ $url = "#";
1288
+ if(
1289
+ isset($sfsi_plus_section2_options['sfsi_plus_telegram_message']) && !empty($sfsi_plus_section2_options['sfsi_plus_telegram_message'])
1290
+ &&
1291
+ isset($sfsi_plus_section2_options['sfsi_plus_telegram_username']) && !empty($sfsi_plus_section2_options['sfsi_plus_telegram_username'])
1292
+
1293
+ ){
1294
+ $tg_username = $sfsi_plus_section2_options['sfsi_plus_telegram_username'];
1295
+ $tg_msg = stripslashes($sfsi_plus_section2_options['sfsi_plus_telegram_message']);
1296
+ $tg_msg = str_replace('"', '', str_replace("'", '', $tg_msg));
1297
+ $tg_msg = html_entity_decode(strip_tags($tg_msg), ENT_QUOTES,'UTF-8');
1298
+ $tg_msg = str_replace("%26%238230%3B", "...", $tg_msg);
1299
+ $tg_msg = rawurlencode($tg_msg);
1300
+ if(isMobileDevice()){
1301
+ $url = "tg://resolve?domain=".$tg_username;
1302
+ }
1303
+ else {
1304
+ $url = "https://web.telegram.im/?p=@".$tg_username;
1305
+ }
1306
+
1307
+ //$url = "https://t.me/".$tg_username;
1308
+ }else{
1309
+ $url="#";
1310
+ $sfsi_onclick="event.preventDefault();";
1311
+ }
1312
+
1313
+ if($active_theme == "glossy"){
1314
+ $glossy_theme_adjustment=4;
1315
+ }
1316
+ break;
1317
+
1318
+ case "vk":
1319
+
1320
+ $toolClass = "sfsi_plus_vk_tool_bdr";
1321
+ $hoverdiv = '';
1322
+ $arsfsiplus_row_class = "bot_rss_arow";
1323
+
1324
+ /* fecth no of counts if active in admin section */
1325
+ if(
1326
+ isset($sfsi_plus_section4_options['sfsi_plus_vk_countsDisplay']) &&
1327
+ $sfsi_plus_section4_options['sfsi_plus_vk_countsDisplay'] == "yes" &&
1328
+ $sfsi_plus_section4_options['sfsi_plus_display_counts'] == "yes"
1329
+ )
1330
+ {
1331
+ $counts = $sfsi_plus_section4_options['sfsi_plus_vk_manualCounts'];
1332
+ }
1333
+
1334
+ $alt_text = sfsi_plus_get_icon_mouseover_text("vk");
1335
+ $icon = sfsi_plus_get_icon_image("vk");
1336
+ // $icon=$icons_baseUrl.$active_theme."_vk.png";
1337
+ $share_icon = $share_iconsUrl.$icon_name.".svg";
1338
+ $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1339
+ $url = "#";
1340
+
1341
+ $hoverSHow = 0;
1342
+ if(isset($sfsi_plus_section2_options['sfsi_plus_vkVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_vkVisit_url'])){
1343
+
1344
+ $url = $sfsi_plus_section2_options['sfsi_plus_vkVisit_url'];
1345
+ }else{
1346
+ $url="#";
1347
+ $sfsi_onclick="event.preventDefault();";
1348
+ }
1349
+
1350
+ if($active_theme == "glossy"){
1351
+ $glossy_theme_adjustment=4;
1352
+ }
1353
+ break;
1354
+
1355
+ case "weibo":
1356
+
1357
+ $toolClass = "sfsi_plus_weibo_tool_bdr";
1358
+ $hoverdiv = '';
1359
+ $arsfsiplus_row_class = "bot_rss_arow";
1360
+
1361
+ /* fecth no of counts if active in admin section */
1362
+ if(isset($sfsi_plus_section4_options['sfsi_plus_weibo_countsDisplay']) && "yes" == $sfsi_plus_section4_options['sfsi_plus_weibo_countsDisplay'] && "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']){
1363
+
1364
+ $counts = $sfsi_plus_section4_options['sfsi_plus_weibo_manualCounts'];
1365
+ }
1366
+
1367
+ $alt_text = sfsi_plus_get_icon_mouseover_text($icon_name);
1368
+ $icon = sfsi_plus_get_icon_image($icon_name);
1369
+ // $icon=$icons_baseUrl.$active_theme."_weibo.png";
1370
+ $url = "#";
1371
+
1372
+ $hoverSHow = 0;
1373
+ if(isset($sfsi_plus_section2_options['sfsi_plus_weiboVisit_url']) && !empty($sfsi_plus_section2_options['sfsi_plus_weiboVisit_url'])){
1374
+
1375
+ $url = $sfsi_plus_section2_options['sfsi_plus_weiboVisit_url'];
1376
+ }else{
1377
+ $url="#";
1378
+ $sfsi_onclick="event.preventDefault();";
1379
+ }
1380
+
1381
+ if($active_theme == "glossy"){
1382
+ $glossy_theme_adjustment=4;
1383
+ }
1384
+ break;
1385
+
1386
+
1387
+ case "wechat":
1388
+
1389
+ $toolClass = "sfsi_plus_wechat_tool_bdr";
1390
+ $hoverdiv = '';
1391
+ $arsfsiplus_row_class = "bot_rss_arow";
1392
+
1393
+ /* fecth no of counts if active in admin section */
1394
+ if(isset($sfsi_plus_section4_options['sfsi_plus_wechat_countsDisplay']) && "yes" == $sfsi_plus_section4_options['sfsi_plus_wechat_countsDisplay'] && "yes" == $sfsi_plus_section4_options['sfsi_plus_display_counts']){
1395
+
1396
+ $counts = $sfsi_plus_section4_options['sfsi_plus_wechat_manualCounts'];
1397
+ }
1398
+
1399
+ $alt_text = sfsi_plus_get_icon_mouseover_text($icon_name);
1400
+ $icon = sfsi_plus_get_icon_image($icon_name);
1401
+ // $icon=$icons_baseUrl.$active_theme."_wechat.png";
1402
+
1403
+ $share_icon = $share_iconsUrl.$icon_name.".svg";
1404
+ $visit_icon = $visit_iconsUrl.$icon_name.".svg";
1405
+ $url = "#";
1406
+ // if(!wp_is_mobile()){
1407
+ $sfsi_onclick="event.preventDefault();sfsi_plus_wechat_share()" ;
1408
+ // }else{
1409
+ // $url = "weixin://dl/chat";
1410
+ // }
1411
+
1412
+ if($active_theme == "glossy"){
1413
+ $glossy_theme_adjustment=4;
1414
+ }
1415
+ break;
1416
+
1417
+
1418
+
1419
+ ///MZ CODE END
1420
+
1421
+ default:
1422
+ $border_radius = "";
1423
+ //$border_radius =" border-radius:48%;";
1424
+ $cmcls = "cmcls";
1425
+ $padding_top = "";
1426
+ if($active_theme=="badge")
1427
+ {
1428
+ //$border_radius="border-radius: 18%;";
1429
+ }
1430
+ if($active_theme=="cute")
1431
+ {
1432
+ //$border_radius="border-radius: 38%;";
1433
+ }
1434
+
1435
+ $custom_icon_urls = isset($sfsi_plus_section2_options['sfsi_plus_CustomIcon_links'])&& ""!==$sfsi_plus_section2_options['sfsi_plus_CustomIcon_links']?unserialize($sfsi_plus_section2_options['sfsi_plus_CustomIcon_links']):array();
1436
+ $url = (isset($custom_icon_urls[$icon_n]) && !empty($custom_icon_urls[$icon_n])) ? $custom_icon_urls[$icon_n]:'javascript:void(0);';
1437
+ $toolClass = "custom_lkn";
1438
+ $arsfsiplus_row_class = "";
1439
+ $custom_icons_hoverTxt = unserialize($sfsi_plus_section5_options['sfsi_plus_custom_MouseOverTexts']);
1440
+ $icons = isset($sfsi_plus_section1_options['sfsi_custom_files'])&& ""!==$sfsi_plus_section1_options['sfsi_custom_files']?unserialize($sfsi_plus_section1_options['sfsi_custom_files']):array();;
1441
+ // var_dump($icons,$custom_icon_urls,$icon_n,$sfsi_plus_section2_options);die();
1442
+ $icon = $icons[$icon_n];
1443
+
1444
+ //Giving alternative text to image
1445
+ if(!empty($custom_icons_hoverTxt[$icon_n]))
1446
+ {
1447
+ $alt_text = $custom_icons_hoverTxt[$icon_n];
1448
+ }
1449
+ else
1450
+ {
1451
+ $alt_text = "SOCIALICON";
1452
+ }
1453
+ break;
1454
+ }
1455
+
1456
+ $icons="";
1457
+
1458
+ /* apply size of icon */
1459
+ if($is_front==0)
1460
+ {
1461
+ $icons_size = $sfsi_plus_section5_options['sfsi_plus_icons_size'];
1462
+ }
1463
+ else
1464
+ {
1465
+ $icons_size = 51;
1466
+ }
1467
+
1468
+ /* spacing and no of icons per row */
1469
+ $icons_space = '';
1470
+ $icons_space = $sfsi_plus_section5_options['sfsi_plus_icons_spacing'];
1471
+ $icon_width = (int)$icons_size;
1472
+ /* check for mouse hover effect */
1473
+ $icon_opacity="1";
1474
+
1475
+ if($sfsi_plus_section3_options['sfsi_plus_mouseOver']=='yes')
1476
+ {
1477
+ $mouse_hover_effect=$sfsi_plus_section3_options["sfsi_plus_mouseOver_effect"];
1478
+ if($mouse_hover_effect=="fade_in" || $mouse_hover_effect=="combo")
1479
+ {
1480
+ $icon_opacity="0.6";
1481
+ }
1482
+ }
1483
+
1484
+ $toolT_cls='';
1485
+ if((int) $icon_width <=49 && (int) $icon_width >=30)
1486
+ {
1487
+ $bt_class="";
1488
+ $toolT_cls="sfsi_plus_Tlleft";
1489
+ }
1490
+ else if((int) $icon_width <=20)
1491
+ {
1492
+ $bt_class="sfsiSmBtn";
1493
+ $toolT_cls="sfsi_plus_Tlleft";
1494
+ }
1495
+ else
1496
+ {
1497
+ $bt_class="";
1498
+ $toolT_cls="sfsi_plus_Tlleft";
1499
+ }
1500
+
1501
+ if($toolClass=="rss_tool_bdr" || $toolClass=='email_tool_bdr' || $toolClass=="custom_lkn" || $toolClass=="instagram_tool_bdr" )
1502
+ {
1503
+ $new_window = sfsi_plus_checkNewWindow();
1504
+ }
1505
+ else if($hoverSHow)
1506
+ {
1507
+ if(!function_exists('wp_is_mobile')||!wp_is_mobile())
1508
+ {
1509
+ $new_window = sfsi_plus_checkNewWindow();
1510
+ }
1511
+ else
1512
+ {
1513
+ $new_window = '';
1514
+ $url = "javascript:void(0);";
1515
+ }
1516
+ }
1517
+ else
1518
+ {
1519
+ $new_window = sfsi_plus_checkNewWindow();
1520
+ }
1521
+
1522
+ if("javascript:void(0);" == $url){
1523
+ $new_window = "";
1524
+ }
1525
+ if(sanitize_text_field(get_option('sfsi_plus_feed_id',false)) == ""){
1526
+ $url = "https://specificfeeds.com/follow";
1527
+ }
1528
+ $margin_bot=(5+$glossy_theme_adjustment)."px;";
1529
+ if($sfsi_plus_section4_options['sfsi_plus_display_counts']=="yes")
1530
+ {
1531
+ $margin_bot = (30+($glossy_theme_adjustment>0?$glossy_theme_adjustment-1:$glossy_theme_adjustment))."px;";
1532
+ }
1533
+
1534
+ if(isset($icon) && !empty($icon) && filter_var($icon, FILTER_VALIDATE_URL))
1535
+ {
1536
+ $icons.= "<div style='width:".$icon_width."px; height:".$icon_width."px;margin-left:".$icons_space."px;margin-bottom:".$margin_bot."' class='sfsi_plus_wicons shuffeldiv ".$cmcls."'>";
1537
+
1538
+ $icons.= "<div class='sfsiplus_inerCnt'>";
1539
+
1540
+ $icons.= "<a class='".$class." sficn' data-effect='".$mouse_hover_effect."' $new_window href='".$url."' style='opacity:".$icon_opacity."' ".(isset($sfsi_onclick)?'onclick="'.$sfsi_onclick.'"':'').">";
1541
+
1542
+ $icons.= "<img alt='".$alt_text."' title='".$alt_text."' src='".$icon."' width='".$icons_size."' height='".$icons_size."' style='".$border_radius.$padding_top."' class='sfcm sfsi_wicon sfsiplusid_round_icon_".$icon_name."' data-effect='".$mouse_hover_effect."' />";
1543
+
1544
+ $icons.= '</a>';
1545
+
1546
+ if(isset($counts) && $counts!='' && $onpost == "no")
1547
+ {
1548
+ $icons.= '<span class="bot_no '.$bt_class.'">'.$counts.'</span>';
1549
+ }
1550
+
1551
+ if($hoverSHow && !empty($hoverdiv))
1552
+ {
1553
+ //$icons.= '<div class="sfsi_plus_tool_tip_2 '.$toolClass.' '.$toolT_cls.'" style="width:'.$width.'px ;opacity:0;z-index:-1;margin-left:-'.$twt_margin.'px;" id="sfsiplusid_'.$icon_name.'">';
1554
+
1555
+ $icons.= '<div class="sfsi_plus_tool_tip_2 '.$toolClass.' '.$toolT_cls.' sfsiplusid_'.$icon_name.'" style="display:block;'.(isset($width)?'width:'.$width.'px':'').';opacity:0;z-index:-1;">';
1556
+ $icons.= '<span class="bot_arow '.$arsfsiplus_row_class.'"></span>';
1557
+ $icons.= '<div class="sfsi_plus_inside">'.$hoverdiv."</div>";
1558
+ $icons.= "</div>";
1559
+ }
1560
+ $icons.="</div>";
1561
+ $icons.="</div>";
1562
+ }
1563
+ return $icons;
1564
+ }
1565
+
1566
+ /* make url for new window */
1567
+ function sfsi_plus_checkNewWindow()
1568
+ {
1569
+ global $wpdb;
1570
+ $sfsi_plus_section5_options= unserialize(get_option('sfsi_plus_section5_options',false));
1571
+ if($sfsi_plus_section5_options['sfsi_plus_icons_ClickPageOpen']=="yes")
1572
+ {
1573
+ return $new_window="target='_blank'";
1574
+ }
1575
+ else
1576
+ {
1577
+ return '';
1578
+ }
1579
+ }
1580
+
1581
+ function sfsi_plus_check_posts_visiblity($isFloter=0 , $fromPost = NULL)
1582
+ {
1583
+ global $wpdb;
1584
+ /* Access the saved settings in database */
1585
+ $sfsi_plus_section1_options= unserialize(get_option('sfsi_plus_section1_options',false));
1586
+ $sfsi_section3= unserialize(get_option('sfsi_plus_section3_options',false));
1587
+ $sfsi_section5= unserialize(get_option('sfsi_plus_section5_options',false));
1588
+
1589
+ //options that are added on the third question
1590
+ $sfsi_section8= unserialize(get_option('sfsi_plus_section8_options',false));
1591
+
1592
+ /* calculate the width and icons display alignments */
1593
+ $icons_space=$sfsi_section8['sfsi_plus_post_icons_spacing'];
1594
+ $icons_size=$sfsi_section8['sfsi_plus_post_icons_size'];
1595
+ $extra=0;
1596
+
1597
+
1598
+ /* magnage the icons in saved order in admin */
1599
+ $custom_icons_order = unserialize($sfsi_section5['sfsi_plus_CustomIcons_order']);
1600
+ $icons= unserialize($sfsi_plus_section1_options['sfsi_custom_files']);
1601
+ $icons_order = array(
1602
+ '0' => '',
1603
+ $sfsi_section5['sfsi_plus_rssIcon_order']=>'rss',
1604
+ $sfsi_section5['sfsi_plus_emailIcon_order']=>'email',
1605
+ $sfsi_section5['sfsi_plus_facebookIcon_order']=>'facebook',
1606
+ $sfsi_section5['sfsi_plus_twitterIcon_order']=>'twitter',
1607
+ $sfsi_section5['sfsi_plus_youtubeIcon_order']=>'youtube',
1608
+ $sfsi_section5['sfsi_plus_pinterestIcon_order']=>'pinterest',
1609
+ $sfsi_section5['sfsi_plus_linkedinIcon_order']=>'linkedin',
1610
+ $sfsi_section5['sfsi_plus_instagramIcon_order']=>'instagram',
1611
+ $sfsi_section5['sfsi_plus_okIcon_order']=>'ok',
1612
+ $sfsi_section5['sfsi_plus_telegramIcon_order']=>'telegram',
1613
+ $sfsi_section5['sfsi_plus_vkIcon_order']=>'vk',
1614
+ $sfsi_section5['sfsi_plus_weiboIcon_order']=>'weibo',
1615
+ $sfsi_section5['sfsi_plus_wechatIcon_order']=>'wechat',
1616
+ (isset($sfsi_section5['sfsi_plus_houzzIcon_order']))
1617
+ ? $sfsi_section5['sfsi_plus_houzzIcon_order']
1618
+ : 12 => 'houzz'
1619
+ );
1620
+ if(is_array($custom_icons_order) )
1621
+ {
1622
+ foreach($custom_icons_order as $data)
1623
+ {
1624
+ $icons_order[$data['order']] = $data;
1625
+ }
1626
+ }
1627
+ ksort($icons_order);
1628
+
1629
+ /* built the main widget div */
1630
+ $icons_main='<div class="sfsiplus_norm_row sfsi_plus_wDivothr">';
1631
+ $icons="";
1632
+
1633
+ // $icons .= '<style>.sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}</style>';
1634
+ // add_action('wp_head', function(){
1635
+ // echo '<style>.sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}</style>';
1636
+ // }, 100);
1637
+ add_action('wp_footer', function()use($icons_space,$icons_size){
1638
+ echo '<script>var css = ".sfsibeforpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons, .sfsiaftrpstwpr .sfsiplus_norm_row.sfsi_plus_wDivothr .sfsi_plus_wicons{width: '.$icons_size.'px !important;height: '.$icons_size.'px !important; margin-left: '.$icons_space.'px !important;}",
1639
+ head = document.head || document.getElementsByTagName("head")[0],
1640
+ style = document.createElement("style");
1641
+
1642
+ head.appendChild(style);
1643
+ if (style.styleSheet){
1644
+ // This is required for IE8 and below.
1645
+ style.styleSheet.cssText = css;
1646
+ } else {
1647
+ style.appendChild(document.createTextNode(css));
1648
+ }</script>';
1649
+ }, 100);
1650
+ /* loop through icons and bulit the icons with all settings applied in admin */
1651
+ foreach($icons_order as $index => $icn)
1652
+ {
1653
+ if(is_array($icn))
1654
+ {
1655
+ $icon_arry = $icn;
1656
+ $icn = "custom" ;
1657
+ }
1658
+ switch ($icn) :
1659
+ case 'rss' :
1660
+ if($sfsi_plus_section1_options['sfsi_plus_rss_display'] == 'yes')
1661
+ {
1662
+ $icons.= sfsi_plus_prepairIcons('rss');
1663
+ }
1664
+ break;
1665
+ case 'email' :
1666
+ if($sfsi_plus_section1_options['sfsi_plus_email_display']=='yes')
1667
+ {
1668
+ $icons.= sfsi_plus_prepairIcons('email');
1669
+ }
1670
+ break;
1671
+ case 'facebook' :
1672
+ if($sfsi_plus_section1_options['sfsi_plus_facebook_display'] == 'yes')
1673
+ {
1674
+ $icons.= sfsi_plus_prepairIcons('facebook', 0, "no", $fromPost);
1675
+ }
1676
+ break;
1677
+
1678
+
1679
+ case 'twitter' :
1680
+ if($sfsi_plus_section1_options['sfsi_plus_twitter_display']=='yes')
1681
+ {
1682
+ $icons.= sfsi_plus_prepairIcons('twitter', 0, "no", $fromPost);
1683
+ }
1684
+ break;
1685
+ case 'youtube' :
1686
+ if($sfsi_plus_section1_options['sfsi_plus_youtube_display']=='yes')
1687
+ {
1688
+ $icons.= sfsi_plus_prepairIcons('youtube');
1689
+ }
1690
+ break;
1691
+
1692
+ case 'pinterest' :
1693
+ if($sfsi_plus_section1_options['sfsi_plus_pinterest_display']=='yes')
1694
+ {
1695
+ $icons.= sfsi_plus_prepairIcons('pinterest');
1696
+ }
1697
+ break;
1698
+ case 'linkedin' :
1699
+ if($sfsi_plus_section1_options['sfsi_plus_linkedin_display']=='yes')
1700
+ {
1701
+ $icons.= sfsi_plus_prepairIcons('linkedin', 0, "no", $fromPost);
1702
+ }
1703
+ break;
1704
+ case 'instagram' :
1705
+ if($sfsi_plus_section1_options['sfsi_plus_instagram_display']=='yes')
1706
+ {
1707
+ $icons.= sfsi_plus_prepairIcons('instagram');
1708
+ }
1709
+ break;
1710
+ case 'houzz' :
1711
+ if(
1712
+ isset($sfsi_plus_section1_options['sfsi_plus_houzz_display']) &&
1713
+ $sfsi_plus_section1_options['sfsi_plus_houzz_display']=='yes'
1714
+ )
1715
+ {
1716
+ $icons.= sfsi_plus_prepairIcons('houzz');
1717
+ }
1718
+ break;
1719
+ case 'ok' :
1720
+ if(
1721
+ isset($sfsi_plus_section1_options['sfsi_plus_okdisplay']) &&
1722
+ $sfsi_plus_section1_options['sfsi_plus_ok_display']=='yes'
1723
+ )
1724
+ {
1725
+ $icons.= sfsi_plus_prepairIcons('ok');
1726
+
1727
+ }
1728
+ break;
1729
+ case 'telegram' :
1730
+ if(
1731
+ isset($sfsi_plus_section1_options['sfsi_plus_telegram_display']) &&
1732
+ $sfsi_plus_section1_options['sfsi_plus_telegram_display']=='yes'
1733
+ )
1734
+ {
1735
+ $icons.= sfsi_plus_prepairIcons('telegram');
1736
+
1737
+ }
1738
+ break;
1739
+ case 'vk' :
1740
+ if(
1741
+ isset($sfsi_plus_section1_options['sfsi_plus_vk_display']) &&
1742
+ $sfsi_plus_section1_options['sfsi_plus_vk_display']=='yes'
1743
+ )
1744
+ {
1745
+ $icons.= sfsi_plus_prepairIcons('vk');
1746
+
1747
+ }
1748
+ break;
1749
+ case 'weibo' :
1750
+ if(
1751
+ isset($sfsi_plus_section1_options['sfsi_plus_weibo_display']) &&
1752
+ $sfsi_plus_section1_options['sfsi_plus_weibo_display']=='yes'
1753
+ )
1754
+ {
1755
+ $icons.= sfsi_plus_prepairIcons('weibo');
1756
+
1757
+ }
1758
+ break;
1759
+ case 'wechat' :
1760
+ if(
1761
+ isset($sfsi_plus_section1_options['sfsi_plus_wechat_display']) &&
1762
+ $sfsi_plus_section1_options['sfsi_plus_wechat_display']=='yes'
1763
+ )
1764
+ {
1765
+ $icons.= sfsi_plus_prepairIcons('wechat');
1766
+
1767
+ }
1768
+ break;
1769
+ case 'custom' :
1770
+ $icons.= sfsi_plus_prepairIcons($icon_arry['ele']);
1771
+ break;
1772
+ endswitch;
1773
+ }
1774
+
1775
+ $icons.='</div >';
1776
+ $icons_main.=$icons;
1777
+
1778
+ /* if floating of icons is active create a floater div */
1779
+ $icons_float='';
1780
+ $icons_data=$icons_main.$icons_float;
1781
+ return $icons_data;
1782
+ }
1783
+
1784
+ // MZ CODE
1785
+
1786
+
1787
+ function sfsi_plus_get_icon_mouseover_text($icon_name){
1788
+
1789
+ $alt_text = '';
1790
+
1791
+ if(isset($icon_name) && !empty($icon_name)){
1792
+
1793
+ $icon_name = strtolower($icon_name);
1794
+
1795
+ $key = 'sfsi_plus_'.$icon_name.'_MouseOverText';
1796
+
1797
+ $sfsi_plus_section5_options = unserialize(get_option('sfsi_plus_section5_options',false));
1798
+
1799
+ if(isset($sfsi_plus_section5_options[$key]) && !empty($sfsi_plus_section5_options[$key]) )
1800
+ {
1801
+ $alt_text = $sfsi_plus_section5_options[$key];
1802
+ }
1803
+ }
1804
+
1805
+ return $alt_text;
1806
+ }
1807
+
1808
+
1809
+
1810
+ //MZ CODE END
1811
+
1812
+ function isMobileDevice() {
1813
+ return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
1814
+ }
1815
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: socialsharepro
3
  Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
- Stable tag: 3.2.2
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -446,6 +446,14 @@ The premium plugin offrs many more social buttons from other social media platfo
446
 
447
 
448
  == Changelog ==
 
 
 
 
 
 
 
 
449
  = 3.2.2 =
450
  * Update: Feedback system updated
451
 
@@ -904,5 +912,5 @@ The premium plugin offrs many more social buttons from other social media platfo
904
 
905
  == Upgrade Notice ==
906
 
907
- = 3.2.2 =
908
  * Please update
3
  Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
4
  Requires at least: 3.0
5
  Tested up to: 5.2
6
+ Stable tag: 3.2.4
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
446
 
447
 
448
  == Changelog ==
449
+ = 3.2.4 =
450
+ * Update: Text changes.
451
+
452
+ = 3.2.3 =
453
+ * Update: Text changes.
454
+ * Update: Link for email updated.
455
+
456
+
457
  = 3.2.2 =
458
  * Update: Feedback system updated
459
 
912
 
913
  == Upgrade Notice ==
914
 
915
+ = 3.2.4 =
916
  * Please update
ultimate_social_media_icons.php CHANGED
@@ -7,7 +7,7 @@ Author: social share pro
7
  Text Domain: ultimate-social-media-plus
8
  Domain Path: /languages
9
  Author URI: http://socialshare.pro/
10
- Version: 3.2.2
11
  License: GPLv2
12
  */
13
 
@@ -111,7 +111,7 @@ register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
111
  //register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
112
 
113
  /*Plugin version setup*/
114
- if (!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.22) {
115
  add_action("init", "sfsi_plus_update_plugin");
116
  }
117
 
7
  Text Domain: ultimate-social-media-plus
8
  Domain Path: /languages
9
  Author URI: http://socialshare.pro/
10
+ Version: 3.2.4
11
  License: GPLv2
12
  */
13
 
111
  //register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
112
 
113
  /*Plugin version setup*/
114
+ if (!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.24) {
115
  add_action("init", "sfsi_plus_update_plugin");
116
  }
117
 
views/sfsi_pop_content.php CHANGED
@@ -820,7 +820,7 @@ $pin_url=($option2['sfsi_plus_pinterest_pageUrl']!='') ? $option2['sfsi_plus_pi
820
  <ol style="padding: 15px 20px 10px 10px; font-size: 18px; letter-spacing: 0.5px; color: #000000;">
821
  <li>You‘ll get access to <a href="https://www.ultimatelysocial.com/usm-premium/" target="_black" style="color: #000000;">all premium features</a></li>
822
  <li>The plugin is <b>priced really fairly</b> starting at <del>44.98 USD</del> today: 40% off!</li>
823
- <li><b>Use it for lifetime:</b> Support and updates are limited to 1 year, however after that it will not be disabled, you can keep using the plugin (even if you don‘t renew)</li>
824
  <li>One license is valid for one the site (as support is included), but we <b>offer 20% discounts</b> for all future purchases</li>
825
  <li>We provide a <b>14 day money-back guarantee</b> if you‘re not satisfied for <u>any reason</u></li>
826
  </ol>
820
  <ol style="padding: 15px 20px 10px 10px; font-size: 18px; letter-spacing: 0.5px; color: #000000;">
821
  <li>You‘ll get access to <a href="https://www.ultimatelysocial.com/usm-premium/" target="_black" style="color: #000000;">all premium features</a></li>
822
  <li>The plugin is <b>priced really fairly</b> starting at <del>44.98 USD</del> today: 40% off!</li>
823
+ <li><b>Use it for lifetime:</b> Support and updates are limited to six months, however after that it will not be disabled, you can keep using the plugin (even if you don‘t renew)</li>
824
  <li>One license is valid for one the site (as support is included), but we <b>offer 20% discounts</b> for all future purchases</li>
825
  <li>We provide a <b>14 day money-back guarantee</b> if you‘re not satisfied for <u>any reason</u></li>
826
  </ol>
views/sfsi_section_for_premium.php CHANGED
@@ -1,322 +1,322 @@
1
- <style>
2
- .sfsi-footer-container {
3
- margin: 0 auto;
4
- text-align: center;
5
- width: 72%;
6
- }
7
- .sfsi-footer-pointing-to-premium-plugin{
8
- float: left;
9
- background: #fff;
10
- padding: 33px 0px;
11
- color: #414951 !important;
12
- }
13
- .sfsi-footer-pointing-heading{
14
- margin-top: 40px;
15
- text-align: center;
16
- padding-bottom: 15px;
17
- }
18
- .sfsi-footer-pointing-heading p{
19
- font-size: 23px;
20
- font-weight: 600;
21
- }
22
- .sfsi-footer-pointing-heading .sfsi-green-heading{
23
- color: #12a252;
24
- }
25
- .sfsi-footer-pointing-content{
26
- background: #fff;
27
- }
28
- .sfsi-footer-left-section{
29
- width: 57%;
30
- position: relative;
31
- min-height: 1px;
32
- float: left;
33
- padding-right: 15px;
34
- padding-left: 15px;
35
- margin-left: 15px;
36
- }
37
- .sfsi-footer-right-section{
38
- width: 38%;
39
- position: relative;
40
- min-height: 1px;
41
- float: left;
42
- padding-right: 15px;
43
- padding-left: 15px;
44
- text-align: center;
45
- }
46
- .sfsi-equal-col-md-6{
47
- width: 50%;
48
- position: relative;
49
- min-height: 1px;
50
- float: left;
51
- }
52
-
53
- .sfsi-left-image-section{
54
- width: 52px;
55
- display: inline-block;
56
- text-align: center;
57
- height: 43px;
58
- vertical-align: middle;
59
- }
60
- .sfsi-li-right-content{
61
- text-align: left;
62
- padding-left: 25px;
63
- font-size: 16px;
64
- font-weight: 600;
65
- vertical-align: middle;
66
- width: calc(100% - 95px);
67
- display: inline-block;
68
- }
69
- .sfsi-footer-left-section ul li:not(:last-child){
70
- margin-bottom: 20px;
71
- }
72
- .sfsi-checkout-premium-plugin-button{
73
- font-size: 18px;
74
- text-align: center;
75
- background: #12a252;
76
- color: #FFF!important;
77
- padding: 11px 30px;
78
- text-decoration: none;
79
- display: inline-block;
80
- margin-top: 15px;
81
- font-weight: 700;
82
- }
83
- .so-much-more{
84
- float: left;
85
- width: 100%;
86
- text-align: center;
87
- font-size: 17px;
88
- margin-top: 28px !important;
89
- font-weight: 700 !important;
90
- }
91
- .so-much-more a{
92
- color: #12a252;
93
- }
94
- .sfsi-footer-bottom-text{
95
- float: left;
96
- width: 99%;
97
- text-align: center;
98
- color: #414951 !important;
99
- padding-top: 15px !important;
100
- margin-bottom: 50px !important;
101
- }
102
- .sfsi-footer-bottom-text p{
103
- font-size: 18px;
104
- }
105
- @media(min-width: 320px) and (max-width: 480px){
106
- .sfsi-footer-container{
107
- width: 100% !important;
108
- }
109
- .sfsi-footer-bottom-text{
110
- display: inline-block;
111
- float: left !important;
112
- width: 100% !important;
113
- }
114
- }
115
- @media (min-width: 320px) and (max-width: 767px){
116
- .sfsi-equal-col-xs-12{
117
- width: 100%;
118
- }
119
- .sfsi-footer-left-section {
120
- width: 76%;
121
- }
122
- .sfsi-footer-right-section {
123
- width: 88%;
124
- padding-top: 30px;
125
- }
126
- .sfsi-right-video iframe{
127
- height: 125px;
128
- }
129
- .sfsi-checkout-premium-plugin-button {
130
- font-size: 16px;
131
- }
132
- .sfsi-footer-bottom-text {
133
- float: unset !important;
134
- width: 65%;
135
- margin-left: auto;
136
- margin-right: auto;
137
- }
138
- }
139
- @media(min-width: 768px) and (max-width: 1023px){
140
- .sfsi-footer-container{
141
- width: 100%;
142
- }
143
- .sfsi-footer-left-section {
144
- width: 95%;
145
- }
146
- .sfsi-footer-right-section {
147
- width: 95%;
148
- margin-top: 20px;
149
- }
150
- .sfsi-footer-pointing-heading p {
151
- font-size: 20px;
152
- }
153
- }
154
- @media(min-width: 1024px) and (max-width: 1032px){
155
- .sfsi-footer-container{
156
- width: 100%;
157
- }
158
- .sfsi-footer-left-section {
159
- width: 56%;
160
- margin-left: 0px !important;
161
- }
162
- .sfsi-footer-right-section {
163
- width: 34%;
164
- }
165
- }
166
- @media(min-width: 1033px) and (max-width: 1050px){
167
- .sfsi-footer-left-section {
168
- width: 56%;
169
- }
170
- .sfsi-footer-right-section {
171
- width: 35%;
172
- }
173
- }
174
- @media(min-width: 1051px) and (max-width: 1115px){
175
- .sfsi-footer-left-section {
176
- width: 52%;
177
- }
178
- .sfsi-footer-right-section {
179
- width: 39%;
180
- }
181
- }
182
- @media(min-width: 1116px) and (max-width: 1223px){
183
- .sfsi-footer-left-section {
184
- width: 52%;
185
- }
186
- .sfsi-footer-right-section {
187
- width: 40%;
188
- }
189
- }
190
- @media(min-width: 1224px) and (max-width: 1347px){
191
- .sfsi-footer-left-section {
192
- width: 50%;
193
- }
194
- .sfsi-footer-right-section {
195
- width: 43%;
196
- }
197
- }
198
- @media(min-width: 1348px) and (max-width: 2300px){
199
- .sfsi-footer-left-section {
200
- width: 51%;
201
- }
202
- .sfsi-footer-right-section {
203
- width: 41%;
204
- }
205
- }
206
-
207
- @media (max-width: 1023px) and (min-width: 768px){
208
- .welcometext {
209
- width: 100%;
210
- }
211
- }
212
- </style>
213
-
214
- <!-- Footer banner STARTS -->
215
- <div class="sfsi-footer-pointing-heading">
216
- <p>
217
- <span class="sfsi-green-heading">Like the free plugin?</span>
218
- <span class="sfsi-black-heading">See what the Premium Plugin has to offer...</span>
219
- </p>
220
- </div>
221
-
222
- <div class="sfsi-footer-container">
223
-
224
- <div class="sfsi-footer-pointing-to-premium-plugin">
225
- <div class="sfsi-footer-pointing-content clearfix">
226
- <div class="sfsi-footer-left-section">
227
- <div class="row">
228
- <div class="sfsi-equal-col-md-6 sfsi-equal-col-xs-12">
229
- <ul>
230
- <li>
231
- <span class="sfsi-left-image-section">
232
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_likes_shares.png">
233
- </span>
234
- <span class="sfsi-li-right-content">
235
- More Likes & Shares
236
- </span>
237
- </li>
238
- <li>
239
- <span class="sfsi-left-image-section">
240
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_icon_designs.png">
241
- </span>
242
- <span class="sfsi-li-right-content">
243
- More icon designs
244
- </span>
245
- </li>
246
- <li>
247
- <span class="sfsi-left-image-section">
248
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/themed_icons.png">
249
- </span>
250
- <span class="sfsi-li-right-content">
251
- Themed icons
252
- </span>
253
- </li>
254
- <li>
255
- <span class="sfsi-left-image-section">
256
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/better_icon_placement.png">
257
- </span>
258
- <span class="sfsi-li-right-content">
259
- Better icon placement
260
- </span>
261
- </li>
262
- </ul>
263
- </div>
264
- <div class="sfsi-equal-col-md-6 sfsi-equal-col-xs-12">
265
- <ul>
266
- <li>
267
- <span class="sfsi-left-image-section">
268
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/mobile_optimization.png">
269
- </span>
270
- <span class="sfsi-li-right-content">
271
- Mobile optimization
272
- </span>
273
- </li>
274
- <li>
275
- <span class="sfsi-left-image-section">
276
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/faster_loading.png">
277
- </span>
278
- <span class="sfsi-li-right-content">
279
- Faster loading
280
- </span>
281
- </li>
282
- <li>
283
- <span class="sfsi-left-image-section">
284
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/friendly_support.png">
285
- </span>
286
- <span class="sfsi-li-right-content">
287
- Friendly support
288
- </span>
289
- </li>
290
- <li>
291
- <span class="sfsi-left-image-section">
292
- <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_platforms.png">
293
- </span>
294
- <span class="sfsi-li-right-content">
295
- More platforms
296
- </span>
297
- </li>
298
- </ul>
299
- </div>
300
- </div>
301
- <div class="row">
302
- <div class="col-md-12">
303
- <p class="so-much-more">...and <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner">so much more</a></p>
304
- </div>
305
- </div>
306
- </div>
307
- <div class="sfsi-footer-right-section">
308
- <span class="sfsi-right-video">
309
- <iframe src="https://player.vimeo.com/video/269140798" width="100%" height="230" frameborder="0" allowfullscreen=""></iframe>
310
- </span>
311
- <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner" class="sfsi-checkout-premium-plugin-button">Check out the Premium Plugin >></a>
312
- </div>
313
- </div>
314
- </div>
315
-
316
- </div>
317
-
318
- <div class="sfsi-footer-bottom-text">
319
- <p>..only 24.98 USD (includes support and updates for 1 year, and after that it will not be deactivated, so you can just keep using it!)</p>
320
- </div>
321
-
322
  <!-- Footer banner CLOSES -->
1
+ <style>
2
+ .sfsi-footer-container {
3
+ margin: 0 auto;
4
+ text-align: center;
5
+ width: 72%;
6
+ }
7
+ .sfsi-footer-pointing-to-premium-plugin{
8
+ float: left;
9
+ background: #fff;
10
+ padding: 33px 0px;
11
+ color: #414951 !important;
12
+ }
13
+ .sfsi-footer-pointing-heading{
14
+ margin-top: 40px;
15
+ text-align: center;
16
+ padding-bottom: 15px;
17
+ }
18
+ .sfsi-footer-pointing-heading p{
19
+ font-size: 23px;
20
+ font-weight: 600;
21
+ }
22
+ .sfsi-footer-pointing-heading .sfsi-green-heading{
23
+ color: #12a252;
24
+ }
25
+ .sfsi-footer-pointing-content{
26
+ background: #fff;
27
+ }
28
+ .sfsi-footer-left-section{
29
+ width: 57%;
30
+ position: relative;
31
+ min-height: 1px;
32
+ float: left;
33
+ padding-right: 15px;
34
+ padding-left: 15px;
35
+ margin-left: 15px;
36
+ }
37
+ .sfsi-footer-right-section{
38
+ width: 38%;
39
+ position: relative;
40
+ min-height: 1px;
41
+ float: left;
42
+ padding-right: 15px;
43
+ padding-left: 15px;
44
+ text-align: center;
45
+ }
46
+ .sfsi-equal-col-md-6{
47
+ width: 50%;
48
+ position: relative;
49
+ min-height: 1px;
50
+ float: left;
51
+ }
52
+
53
+ .sfsi-left-image-section{
54
+ width: 52px;
55
+ display: inline-block;
56
+ text-align: center;
57
+ height: 43px;
58
+ vertical-align: middle;
59
+ }
60
+ .sfsi-li-right-content{
61
+ text-align: left;
62
+ padding-left: 25px;
63
+ font-size: 16px;
64
+ font-weight: 600;
65
+ vertical-align: middle;
66
+ width: calc(100% - 95px);
67
+ display: inline-block;
68
+ }
69
+ .sfsi-footer-left-section ul li:not(:last-child){
70
+ margin-bottom: 20px;
71
+ }
72
+ .sfsi-checkout-premium-plugin-button{
73
+ font-size: 18px;
74
+ text-align: center;
75
+ background: #12a252;
76
+ color: #FFF!important;
77
+ padding: 11px 30px;
78
+ text-decoration: none;
79
+ display: inline-block;
80
+ margin-top: 15px;
81
+ font-weight: 700;
82
+ }
83
+ .so-much-more{
84
+ float: left;
85
+ width: 100%;
86
+ text-align: center;
87
+ font-size: 17px;
88
+ margin-top: 28px !important;
89
+ font-weight: 700 !important;
90
+ }
91
+ .so-much-more a{
92
+ color: #12a252;
93
+ }
94
+ .sfsi-footer-bottom-text{
95
+ float: left;
96
+ width: 99%;
97
+ text-align: center;
98
+ color: #414951 !important;
99
+ padding-top: 15px !important;
100
+ margin-bottom: 50px !important;
101
+ }
102
+ .sfsi-footer-bottom-text p{
103
+ font-size: 18px;
104
+ }
105
+ @media(min-width: 320px) and (max-width: 480px){
106
+ .sfsi-footer-container{
107
+ width: 100% !important;
108
+ }
109
+ .sfsi-footer-bottom-text{
110
+ display: inline-block;
111
+ float: left !important;
112
+ width: 100% !important;
113
+ }
114
+ }
115
+ @media (min-width: 320px) and (max-width: 767px){
116
+ .sfsi-equal-col-xs-12{
117
+ width: 100%;
118
+ }
119
+ .sfsi-footer-left-section {
120
+ width: 76%;
121
+ }
122
+ .sfsi-footer-right-section {
123
+ width: 88%;
124
+ padding-top: 30px;
125
+ }
126
+ .sfsi-right-video iframe{
127
+ height: 125px;
128
+ }
129
+ .sfsi-checkout-premium-plugin-button {
130
+ font-size: 16px;
131
+ }
132
+ .sfsi-footer-bottom-text {
133
+ float: unset !important;
134
+ width: 65%;
135
+ margin-left: auto;
136
+ margin-right: auto;
137
+ }
138
+ }
139
+ @media(min-width: 768px) and (max-width: 1023px){
140
+ .sfsi-footer-container{
141
+ width: 100%;
142
+ }
143
+ .sfsi-footer-left-section {
144
+ width: 95%;
145
+ }
146
+ .sfsi-footer-right-section {
147
+ width: 95%;
148
+ margin-top: 20px;
149
+ }
150
+ .sfsi-footer-pointing-heading p {
151
+ font-size: 20px;
152
+ }
153
+ }
154
+ @media(min-width: 1024px) and (max-width: 1032px){
155
+ .sfsi-footer-container{
156
+ width: 100%;
157
+ }
158
+ .sfsi-footer-left-section {
159
+ width: 56%;
160
+ margin-left: 0px !important;
161
+ }
162
+ .sfsi-footer-right-section {
163
+ width: 34%;
164
+ }
165
+ }
166
+ @media(min-width: 1033px) and (max-width: 1050px){
167
+ .sfsi-footer-left-section {
168
+ width: 56%;
169
+ }
170
+ .sfsi-footer-right-section {
171
+ width: 35%;
172
+ }
173
+ }
174
+ @media(min-width: 1051px) and (max-width: 1115px){
175
+ .sfsi-footer-left-section {
176
+ width: 52%;
177
+ }
178
+ .sfsi-footer-right-section {
179
+ width: 39%;
180
+ }
181
+ }
182
+ @media(min-width: 1116px) and (max-width: 1223px){
183
+ .sfsi-footer-left-section {
184
+ width: 52%;
185
+ }
186
+ .sfsi-footer-right-section {
187
+ width: 40%;
188
+ }
189
+ }
190
+ @media(min-width: 1224px) and (max-width: 1347px){
191
+ .sfsi-footer-left-section {
192
+ width: 50%;
193
+ }
194
+ .sfsi-footer-right-section {
195
+ width: 43%;
196
+ }
197
+ }
198
+ @media(min-width: 1348px) and (max-width: 2300px){
199
+ .sfsi-footer-left-section {
200
+ width: 51%;
201
+ }
202
+ .sfsi-footer-right-section {
203
+ width: 41%;
204
+ }
205
+ }
206
+
207
+ @media (max-width: 1023px) and (min-width: 768px){
208
+ .welcometext {
209
+ width: 100%;
210
+ }
211
+ }
212
+ </style>
213
+
214
+ <!-- Footer banner STARTS -->
215
+ <div class="sfsi-footer-pointing-heading">
216
+ <p>
217
+ <span class="sfsi-green-heading">Like the free plugin?</span>
218
+ <span class="sfsi-black-heading">See what the Premium Plugin has to offer...</span>
219
+ </p>
220
+ </div>
221
+
222
+ <div class="sfsi-footer-container">
223
+
224
+ <div class="sfsi-footer-pointing-to-premium-plugin">
225
+ <div class="sfsi-footer-pointing-content clearfix">
226
+ <div class="sfsi-footer-left-section">
227
+ <div class="row">
228
+ <div class="sfsi-equal-col-md-6 sfsi-equal-col-xs-12">
229
+ <ul>
230
+ <li>
231
+ <span class="sfsi-left-image-section">
232
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_likes_shares.png">
233
+ </span>
234
+ <span class="sfsi-li-right-content">
235
+ More Likes & Shares
236
+ </span>
237
+ </li>
238
+ <li>
239
+ <span class="sfsi-left-image-section">
240
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_icon_designs.png">
241
+ </span>
242
+ <span class="sfsi-li-right-content">
243
+ More icon designs
244
+ </span>
245
+ </li>
246
+ <li>
247
+ <span class="sfsi-left-image-section">
248
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/themed_icons.png">
249
+ </span>
250
+ <span class="sfsi-li-right-content">
251
+ Themed icons
252
+ </span>
253
+ </li>
254
+ <li>
255
+ <span class="sfsi-left-image-section">
256
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/better_icon_placement.png">
257
+ </span>
258
+ <span class="sfsi-li-right-content">
259
+ Better icon placement
260
+ </span>
261
+ </li>
262
+ </ul>
263
+ </div>
264
+ <div class="sfsi-equal-col-md-6 sfsi-equal-col-xs-12">
265
+ <ul>
266
+ <li>
267
+ <span class="sfsi-left-image-section">
268
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/mobile_optimization.png">
269
+ </span>
270
+ <span class="sfsi-li-right-content">
271
+ Mobile optimization
272
+ </span>
273
+ </li>
274
+ <li>
275
+ <span class="sfsi-left-image-section">
276
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/faster_loading.png">
277
+ </span>
278
+ <span class="sfsi-li-right-content">
279
+ Faster loading
280
+ </span>
281
+ </li>
282
+ <li>
283
+ <span class="sfsi-left-image-section">
284
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/friendly_support.png">
285
+ </span>
286
+ <span class="sfsi-li-right-content">
287
+ Friendly support
288
+ </span>
289
+ </li>
290
+ <li>
291
+ <span class="sfsi-left-image-section">
292
+ <img src="<?php echo SFSI_PLUS_PLUGURL ?>images/footer_banner/more_platforms.png">
293
+ </span>
294
+ <span class="sfsi-li-right-content">
295
+ More platforms
296
+ </span>
297
+ </li>
298
+ </ul>
299
+ </div>
300
+ </div>
301
+ <div class="row">
302
+ <div class="col-md-12">
303
+ <p class="so-much-more">...and <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner">so much more</a></p>
304
+ </div>
305
+ </div>
306
+ </div>
307
+ <div class="sfsi-footer-right-section">
308
+ <span class="sfsi-right-video">
309
+ <iframe src="https://player.vimeo.com/video/269140798" width="100%" height="230" frameborder="0" allowfullscreen=""></iframe>
310
+ </span>
311
+ <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner" class="sfsi-checkout-premium-plugin-button">Check out the Premium Plugin >></a>
312
+ </div>
313
+ </div>
314
+ </div>
315
+
316
+ </div>
317
+
318
+ <div class="sfsi-footer-bottom-text">
319
+ <p>..only 24.98 USD (includes support and updates for six months, and after that it will not be deactivated, so you can just keep using it!)</p>
320
+ </div>
321
+
322
  <!-- Footer banner CLOSES -->