Social Media Share Buttons & Social Sharing Icons - Version 2.3.3

Version Description

Please upgrade

Download this release

Release Info

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

Code changes from version 2.3.2 to 2.3.3

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 = ABSPATH . 'wp-content/plugins';
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,606 +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
- wp_send_json_success();
237
- }
238
-
239
- /**
240
- * Will fire when admin deactivates plugin
241
- *
242
- * @return void
243
- */
244
- public function onDeactivatePluginListener()
245
- {
246
- if (!$this->isAllowingLogging()) return;
247
-
248
- $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
249
- $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
250
-
251
- $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
252
- ->execute($this->requestor);
253
-
254
- // Exit if request failed
255
- if (!$response->isSuccess()) {
256
- wp_send_json_error($response->body);
257
- }
258
-
259
- $this->setIsInstalled(false);
260
-
261
- AccountDataFactory::syncData();
262
-
263
- wp_send_json_success();
264
- }
265
-
266
- /**
267
- * Will fire when user opted in
268
- *
269
- * @return void
270
- */
271
- public function onOptInListener()
272
- {
273
- $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
274
-
275
- // Exit if request failed
276
- if (!$response->isSuccess()) {
277
- wp_send_json_error($response->body);
278
- }
279
-
280
- $this->setIsOptedIn(true);
281
-
282
- AccountDataFactory::syncData();
283
-
284
- wp_die();
285
- }
286
-
287
- /**
288
- * Will fire when user opted out
289
- *
290
- * @return void
291
- */
292
- public function onOptOutListener()
293
- {
294
- $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
295
-
296
- // Exit if request failed
297
- if (!$response->isSuccess()) {
298
- wp_send_json_error($response->body);
299
- }
300
-
301
- $this->setIsOptedIn(false);
302
-
303
- AccountDataFactory::syncData();
304
-
305
- wp_send_json_success();
306
- }
307
-
308
- /**
309
- * Will fire when user accept opt-in
310
- * at first time
311
- *
312
- * @return void
313
- */
314
- public function onInstallListener()
315
- {
316
- $cache = DatabaseCache::getInstance();
317
-
318
- // Set flag to true which indicates that install is resolved
319
- // also remove install plugin id from cache
320
- $this->setIsInstallResolved(true);
321
- $cache->delete('plugin_to_install');
322
-
323
- $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
324
-
325
- // Exit if request failed
326
- if (!$response->isSuccess()) {
327
- wp_send_json_error($response->body);
328
- }
329
-
330
- $this->setIsSigned(true);
331
-
332
- $this->setIsOptedIn(true);
333
-
334
- $factory = NoticeFactory::instance();
335
-
336
- $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());
337
-
338
- $notificationId = uniqid();
339
-
340
- $notice = Notice::make(
341
- $notificationId,
342
- $this->getId(),
343
- $message,
344
- $this->collector->getPluginName($this->path)
345
- );
346
-
347
- $factory->addNotice($notice);
348
-
349
- AccountDataFactory::syncData();
350
-
351
- // Set email confirmation notification id to cache
352
- // se we can extract and remove it when user confirmed email
353
- $cache->put(
354
- sprintf('account_email_confirmation_%s', $this->getId()),
355
- $notificationId
356
- );
357
-
358
- wp_send_json_success();
359
- }
360
-
361
- /**
362
- * Will fire when user skipped installation
363
- *
364
- * @return void
365
- */
366
- public function onSkipInstallListener()
367
- {
368
- // Set flag to true which indicates that install is resolved
369
- // also remove install plugin id from cache
370
- $this->setIsInstallResolved(true);
371
- DatabaseCache::getInstance()->delete('plugin_to_install');
372
- }
373
-
374
- /**
375
- * Will fire when user delete plugin through admin panel.
376
- * This action will happen if admin at least once
377
- * activated the plugin.
378
- *
379
- * @return void
380
- * @throws \Exception
381
- */
382
- public static function onUninstallPluginListener()
383
- {
384
- $factory = AccountDataFactory::instance();
385
-
386
- $pluginFile = substr(current_filter(), strlen( 'uninstall_' ));
387
-
388
- $account = $factory->getAccountDataByBasePath($pluginFile);
389
-
390
- // If account somehow is not found, exit the execution
391
- if (!$account) return;
392
-
393
- $analyst = Analyst::getInstance();
394
-
395
- $collector = new Collector($analyst);
396
-
397
- $requestor = new ApiRequestor($account->getId(), $account->getSecret(), $analyst->getApiBase());
398
-
399
- // Just send request to log uninstall event not caring about response
400
- UninstallRequest::make($collector, $account->getId(), $account->getPath())->execute($requestor);
401
-
402
- $factory->sync();
403
- }
404
-
405
- /**
406
- * Fires when used verified his account
407
- */
408
- public function onInstallVerifiedListener()
409
- {
410
- $factory = NoticeFactory::instance();
411
-
412
- $notice = Notice::make(
413
- uniqid(),
414
- $this->getId(),
415
- 'Thank you for confirming your email.',
416
- $this->collector->getPluginName($this->path)
417
- );
418
-
419
- $factory->addNotice($notice);
420
-
421
- // Remove confirmation notification
422
- $confirmationNotificationId = DatabaseCache::getInstance()->pop(sprintf('account_email_confirmation_%s', $this->getId()));
423
- $factory->remove($confirmationNotificationId);
424
-
425
- AccountDataFactory::syncData();
426
-
427
- wp_send_json_success();
428
- }
429
-
430
- /**
431
- * Will fire when wp renders plugin
432
- * action buttons
433
- *
434
- * @param $defaultLinks
435
- * @return array
436
- */
437
- public function onRenderActionLinksHook($defaultLinks)
438
- {
439
- $customLinks = [];
440
-
441
- $customLinks[] = $this->isOptedIn()
442
- ? '<a class="analyst-action-opt analyst-opt-out" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt Out</a>'
443
- : '<a class="analyst-action-opt analyst-opt-in" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt In</a>';
444
-
445
- // Append anchor to find specific deactivation link
446
- if (isset($defaultLinks['deactivate'])) {
447
- $defaultLinks['deactivate'] .= '<span analyst-plugin-id="' . $this->getId() . '" analyst-plugin-opted-in="' . (int) $this->isOptedIn() . '"></span>';
448
- }
449
-
450
- return array_merge($customLinks, $defaultLinks);
451
- }
452
-
453
- /**
454
- * @return AccountData
455
- */
456
- public function getData()
457
- {
458
- return $this->data;
459
- }
460
-
461
- /**
462
- * @param AccountData $data
463
- */
464
- public function setData(AccountData $data)
465
- {
466
- $this->data = $data;
467
-
468
- $this->setIsOptedIn($data->isOptedIn());
469
- $this->setIsInstalled($data->isInstalled());
470
- $this->setIsSigned($data->isSigned());
471
- $this->setIsInstallResolved($data->isInstallResolved());
472
- }
473
-
474
- /**
475
- * Resolves valid action name
476
- * based on client id
477
- *
478
- * @param $action
479
- * @return string
480
- */
481
- private function resolveActionName($action)
482
- {
483
- return sprintf('%s_%s', $action, $this->id);
484
- }
485
-
486
- /**
487
- * Register action for current plugin
488
- *
489
- * @param $action
490
- * @param $callback
491
- */
492
- private function addFilter($action, $callback)
493
- {
494
- $validAction = sprintf('%s_%s', $action, $this->basePluginPath);
495
-
496
- add_filter($validAction, $callback, 10);
497
- }
498
-
499
- /**
500
- * Add ajax action for current plugin
501
- *
502
- * @param $action
503
- * @param $callback
504
- * @param bool $raw Format action ??
505
- */
506
- private function addAjax($action, $callback, $raw = false)
507
- {
508
- $validAction = $raw ? $action : sprintf('%s%s', 'wp_ajax_', $this->resolveActionName($action));
509
-
510
- add_action($validAction, $callback);
511
- }
512
-
513
- /**
514
- * @return bool
515
- */
516
- public function isSigned()
517
- {
518
- return $this->isSigned;
519
- }
520
-
521
- /**
522
- * @param bool $isSigned
523
- */
524
- public function setIsSigned($isSigned)
525
- {
526
- $this->data->setIsSigned($isSigned);
527
-
528
- $this->isSigned = $isSigned;
529
- }
530
-
531
- /**
532
- * @return RequestorContract
533
- */
534
- public function getRequestor()
535
- {
536
- return $this->requestor;
537
- }
538
-
539
- /**
540
- * @param RequestorContract $requestor
541
- */
542
- public function setRequestor(RequestorContract $requestor)
543
- {
544
- $this->requestor = $requestor;
545
- }
546
-
547
- /**
548
- * @return string
549
- */
550
- public function getClientSecret()
551
- {
552
- return $this->clientSecret;
553
- }
554
-
555
- /**
556
- * @return Collector
557
- */
558
- public function getCollector()
559
- {
560
- return $this->collector;
561
- }
562
-
563
- /**
564
- * @param Collector $collector
565
- */
566
- public function setCollector(Collector $collector)
567
- {
568
- $this->collector = $collector;
569
- }
570
-
571
- /**
572
- * Do we allowing logging
573
- *
574
- * @return bool
575
- */
576
- public function isAllowingLogging()
577
- {
578
- return $this->isOptedIn;
579
- }
580
-
581
- /**
582
- * @return string
583
- */
584
- public function getBasePluginPath()
585
- {
586
- return $this->basePluginPath;
587
- }
588
-
589
- /**
590
- * @return bool
591
- */
592
- public function isInstallResolved()
593
- {
594
- return $this->isInstallResolved;
595
- }
596
-
597
- /**
598
- * @param bool $isInstallResolved
599
- */
600
- public function setIsInstallResolved($isInstallResolved)
601
- {
602
- $this->data->setIsInstallResolved($isInstallResolved);
603
-
604
- $this->isInstallResolved = $isInstallResolved;
605
- }
606
- }
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('custom', analyst_assets_url('/css/customize.css'));
88
- wp_enqueue_script('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.23',
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/sfsi_install_uninstall.php CHANGED
@@ -34,7 +34,7 @@ function sfsi_update_plugin()
34
  update_option("sfsi_custom_icons", "yes");
35
  }
36
  //Install version
37
- update_option("sfsi_pluginVersion", "2.32");
38
 
39
  if (!get_option('sfsi_serverphpVersionnotification')) {
40
  add_option("sfsi_serverphpVersionnotification", "yes");
34
  update_option("sfsi_custom_icons", "yes");
35
  }
36
  //Install version
37
+ update_option("sfsi_pluginVersion", "2.33");
38
 
39
  if (!get_option('sfsi_serverphpVersionnotification')) {
40
  add_option("sfsi_serverphpVersionnotification", "yes");
libs/sfsi_subscribe_widget.php CHANGED
@@ -46,11 +46,12 @@ class subscriber_widget extends WP_Widget {
46
  $title = '';
47
  }
48
  ?>
49
- <p>
50
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label>
51
- <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 ); ?>" />
52
- </p>
53
- <?php
 
54
  }
55
 
56
  // Updating widget replacing old instances with new
@@ -75,9 +76,15 @@ function sfsi_get_subscriberForm()
75
  {
76
  $option8 = unserialize(get_option('sfsi_section8_options',false));
77
  $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
78
- $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
 
 
 
 
 
 
 
79
  $return = '';
80
- $url = $url.$sfsi_feediid.'/8/';
81
  $return .= '<div class="sfsi_subscribe_Popinner">
82
  <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="'.$url.'">
83
  <h5>'.trim(sanitize_text_field($option8['sfsi_form_heading_text'])).'</h5>
46
  $title = '';
47
  }
48
  ?>
49
+ <p>
50
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label>
51
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
52
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
53
+ </p>
54
+ <?php
55
  }
56
 
57
  // Updating widget replacing old instances with new
76
  {
77
  $option8 = unserialize(get_option('sfsi_section8_options',false));
78
  $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
79
+ if($sfsi_feediid == ""){
80
+ $url = "https://www.specificfeeds.com/subscribe?pub=boTZa2n0OIjC4D8PkiyzByH-uKEJSZgqMW-sJiFwbuEnoxENjKva2A";
81
+ }else{
82
+ $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
83
+ $url = $url.$sfsi_feediid.'/8/';
84
+
85
+ }
86
+
87
  $return = '';
 
88
  $return .= '<div class="sfsi_subscribe_Popinner">
89
  <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="'.$url.'">
90
  <h5>'.trim(sanitize_text_field($option8['sfsi_form_heading_text'])).'</h5>
libs/sfsi_widget.php CHANGED
@@ -1,1621 +1,1624 @@
1
- <?php
2
- /* create SFSI widget */
3
- class Sfsi_Widget extends WP_Widget
4
- {
5
-
6
- function __construct()
7
- {
8
- $widget_ops = array( 'classname' => 'sfsi', 'description' => __('Ultimate Social Media Icons widgets', 'Ultimate Social Media Icons ') );
9
- $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-widget' );
10
-
11
- parent::__construct(
12
- // Base ID of your widget
13
- 'sfsi-widget',
14
-
15
- // Widget name will appear in UI
16
- __('Ultimate Social Media Icons', 'Ultimate Social Media Icons'),
17
-
18
- // Widget description
19
- $widget_ops,
20
-
21
- $control_ops
22
- );
23
- }
24
-
25
- function widget( $args, $instance )
26
- {
27
- extract( $args );
28
- /*Our variables from the widget settings. */
29
- $title = isset( $instance['title'] ) ? apply_filters('widget_title', $instance['title'] ) : '';
30
- // var_dump($title,'ldfjgkdfj');
31
- $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false;
32
-
33
- global $is_floter;
34
- echo $before_widget;
35
-
36
- /* Display the widget title */
37
- if ( $title ) echo $before_title . $title . $after_title;
38
- ?>
39
- <div class="sfsi_widget" data-position="widget">
40
- <div id='sfsi_wDiv'></div>
41
- <?php
42
- /* Link the main icons function */
43
- echo sfsi_check_visiblity(0);
44
- ?>
45
- <div style="clear: both;"></div>
46
- </div>
47
- <?php
48
- if ( is_active_widget( false, false, $this->id_base, true ) ) { }
49
- echo $after_widget;
50
- }
51
-
52
- /*Update the widget */
53
- function update( $new_instance, $old_instance )
54
- {
55
- $instance = $old_instance;
56
- //Strip tags from title and name to remove HTML
57
- if($new_instance['showf']==0)
58
- {
59
- $instance['showf']=1;
60
- }
61
- else
62
- {
63
- $instance['showf']=0;
64
- }
65
- $instance['title'] = strip_tags( $new_instance['title'] );
66
- return $instance;
67
- }
68
-
69
- /* Set up some default widget settings. */
70
- function form( $instance )
71
- {
72
- $defaults = array( 'title' =>"" );
73
- $instance = wp_parse_args( (array) $instance, $defaults );
74
- if(isset($instance['showf']) && !empty($instance['showf']))
75
- {
76
- if( $instance['showf'] == 0 && empty($instance['title']))
77
- {
78
- $instance['title']='Please follow & like us :)';
79
- }
80
- else
81
- {
82
- $instance['title'];
83
- }
84
- }
85
- else
86
- {
87
- $instance['title']='Please follow & like us :)';
88
- }
89
- ?>
90
- <p>
91
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title</label>
92
- <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%;" />
93
- <input type="hidden" value="<?php echo $instance['showf'] ?>" id="<?php echo $this->get_field_id( 'showf' ); ?>" name="<?php echo $this->get_field_name( 'showf' ); ?>" />
94
- </p>
95
- <p>
96
- Please go to the <a href="admin.php?page=sfsi-options">plugin page</a> to set your preferences
97
- </p>
98
- <?php
99
- }
100
- }
101
- /* END OF widget Class */
102
- /* register widget to wordpress */
103
- function register_sfsi_widgets()
104
- {
105
- register_widget( 'sfsi_widget' );
106
- }
107
- add_action( 'widgets_init', 'register_sfsi_widgets' );
108
-
109
- /* check the icons visiblity */
110
- function sfsi_check_visiblity($isFloter=0)
111
- {
112
- global $wpdb;
113
- /* Access the saved settings in database */
114
- $sfsi_section1_options = unserialize(get_option('sfsi_section1_options',false));
115
- $sfsi_section3 = unserialize(get_option('sfsi_section3_options',false));
116
- $sfsi_section5 = unserialize(get_option('sfsi_section5_options',false));
117
- $sfsi_section9 = unserialize(get_option('sfsi_section9_options',false));
118
-
119
- /* calculate the width and icons display alignments */
120
- $icons_space = $sfsi_section5['sfsi_icons_spacing'];
121
- $icons_size = $sfsi_section5['sfsi_icons_size'];
122
- $icons_per_row = ($sfsi_section5['sfsi_icons_perRow'])? $sfsi_section5['sfsi_icons_perRow'] : '';
123
-
124
- $icons_alignment = $sfsi_section5['sfsi_icons_Alignment'];
125
- $position = 'position:absolute;';
126
- $position1 = 'position:absolute;';
127
- $jquery ='<script>';
128
-
129
- $jquery .= 'jQuery(".sfsi_widget").each(function( index ) {
130
- if(jQuery(this).attr("data-position") == "widget")
131
- {
132
- var wdgt_hght = jQuery(this).children(".norm_row.sfsi_wDiv").height();
133
- var title_hght = jQuery(this).parent(".widget.sfsi").children(".widget-title").height();
134
- var totl_hght = parseInt( title_hght ) + parseInt( wdgt_hght );
135
- jQuery(this).parent(".widget.sfsi").css("min-height", totl_hght+"px");
136
- }
137
- });';
138
-
139
- /* check if icons shuffling is activated in admin or not */
140
- if($sfsi_section5['sfsi_icons_stick']=="yes")
141
- {
142
- if(is_admin_bar_showing())
143
- {
144
- $Ictop = "30px";
145
- }
146
- else
147
- {
148
- $Ictop = "0";
149
- }
150
-
151
- $jquery.='var s = jQuery(".sfsi_widget");
152
- var pos = s.position();
153
- jQuery(window).scroll(function(){
154
- sfsi_stick_widget("'.$Ictop.'");
155
- }); ';
156
- }
157
-
158
- /* check if icons floating is activated in admin */
159
- if($sfsi_section9['sfsi_icons_float']=="yes")
160
- {
161
- $top = "15";
162
- switch($sfsi_section9['sfsi_icons_floatPosition'])
163
- {
164
- case "top-left" : if(is_admin_bar_showing()) : $position.="position:absolute;left:30px;top:35px;"; $top="35"; else : $position.="position:absolute;left:10px;top:2%"; $top="10"; endif;
165
- break;
166
- case "top-right" : if(is_admin_bar_showing()) : $position.="position:absolute;right:30px;top:35px;"; $top="35"; else : $position.="position:absolute;right:10px;top:2%"; $top="10"; endif;
167
- break;
168
- case "center-right" : $position.="position:absolute;right:30px;top:50%"; $top="center";
169
- break;
170
- case "center-left" : $position.="position:absolute;left:30px;top:50%"; $top="center";
171
- break;
172
- case "center-top" :
173
- if(is_admin_bar_showing())
174
- {
175
- $position .= "left:50%;top:35px;"; $top="35";
176
- }
177
- else
178
- {
179
- $position .= "left:50%;top:10px;"; $top="10";
180
- }
181
- break;
182
- case "center-bottom" :
183
- $position .= "left:50%;bottom:0px"; $top="bottom";
184
- break;
185
-
186
- case "bottom-right" : $position.="position:absolute;right:30px;bottom:0px"; $top="bottom";
187
- break;
188
- case "bottom-left" : $position.="position:absolute;left:30px;bottom:0px"; $top="bottom";
189
- break;
190
- }
191
- //$jquery.="jQuery( document ).ready(function( $ ) { sfsi_float_widget('".$top."')});";
192
- if($sfsi_section9['sfsi_icons_floatPosition'] == 'center-right' || $sfsi_section9['sfsi_icons_floatPosition'] == 'center-left')
193
- {
194
- $jquery.="jQuery( document ).ready(function( $ )
195
- {
196
- var topalign = ( jQuery(window).height() - jQuery('#sfsi_floater').height() ) / 2;
197
- jQuery('#sfsi_floater').css('top',topalign);
198
- sfsi_float_widget('".$top."');
199
- });";
200
- }
201
- else if($sfsi_section9['sfsi_icons_floatPosition'] == 'center-top' || $sfsi_section9['sfsi_icons_floatPosition'] == 'center-bottom'){
202
-
203
- $jquery.="jQuery(document).ready(function( $ )
204
- {
205
- var leftalign = ( jQuery(window).width() - jQuery('#sfsi_floater').width() ) / 2;
206
- jQuery('#sfsi_floater').css('left',leftalign);
207
- sfsi_float_widget('".$top."');
208
- });";
209
- }
210
- else
211
- {
212
- $jquery.="jQuery( document ).ready(function( $ ) { sfsi_float_widget('".$top."')});";
213
- }
214
- }
215
-
216
- $extra=0;
217
- if($sfsi_section3['sfsi_shuffle_icons']=="yes")
218
- {
219
- if($sfsi_section3['sfsi_shuffle_Firstload']=="yes" && $sfsi_section3['sfsi_shuffle_interval']=="yes")
220
- {
221
- $shuffle_time=(isset($sfsi_section3['sfsi_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_shuffle_intervalTime'] : 3;
222
- $shuffle_time=$shuffle_time*1000;
223
- $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
224
- }
225
- else if($sfsi_section3['sfsi_shuffle_Firstload']=="no" && $sfsi_section3['sfsi_shuffle_interval']=="yes")
226
- {
227
- $shuffle_time=(isset($sfsi_section3['sfsi_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_shuffle_intervalTime'] : 3;
228
- $shuffle_time=$shuffle_time*1000;
229
- $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
230
- }
231
- else
232
- {
233
- $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
234
- }
235
- }
236
-
237
- /* magnage the icons in saved order in admin */
238
- $custom_icons_order = unserialize($sfsi_section5['sfsi_CustomIcons_order']);
239
- $icons = unserialize($sfsi_section1_options['sfsi_custom_files']);
240
- if(!isset($sfsi_section5['sfsi_telegramIcon_order'])){
241
- $sfsi_section5['sfsi_telegramIcon_order'] = '11';
242
- }
243
- if(!isset($sfsi_section5['sfsi_vkIcon_order'])){
244
- $sfsi_section5['sfsi_vkIcon_order'] = '12';
245
- }
246
- if(!isset($sfsi_section5['sfsi_okIcon_order'])){
247
- $sfsi_section5['sfsi_okIcon_order'] = '13';
248
- }
249
- if(!isset($sfsi_section5['sfsi_weiboIcon_order'])){
250
- $sfsi_section5['sfsi_weiboIcon_order'] = '14';
251
- }
252
- if(!isset($sfsi_section5['sfsi_wechatIcon_order'])){
253
- $sfsi_section5['sfsi_wechatIcon_order'] = '15';
254
- }
255
- $icons_order = array(
256
- '0' => '',
257
- $sfsi_section5['sfsi_rssIcon_order']=>'rss',
258
- $sfsi_section5['sfsi_emailIcon_order']=>'email',
259
- $sfsi_section5['sfsi_facebookIcon_order']=>'facebook',
260
- $sfsi_section5['sfsi_twitterIcon_order']=>'twitter',
261
- $sfsi_section5['sfsi_youtubeIcon_order']=>'youtube',
262
- $sfsi_section5['sfsi_pinterestIcon_order']=>'pinterest',
263
- $sfsi_section5['sfsi_linkedinIcon_order']=>'linkedin',
264
- $sfsi_section5['sfsi_instagramIcon_order']=>'instagram',
265
- $sfsi_section5['sfsi_telegramIcon_order']=>'telegram',
266
- $sfsi_section5['sfsi_vkIcon_order']=>'vk',
267
- $sfsi_section5['sfsi_okIcon_order']=>'ok',
268
- $sfsi_section5['sfsi_weiboIcon_order']=>'weibo',
269
- $sfsi_section5['sfsi_wechatIcon_order']=>'wechat',
270
- ) ;
271
- if(is_array($custom_icons_order) )
272
- {
273
- foreach($custom_icons_order as $data)
274
- {
275
- $icons_order[$data['order']] = $data;
276
- }
277
- }
278
- ksort($icons_order);
279
-
280
- /* calculate the total width of widget according to icons */
281
- if(!empty($icons_per_row))
282
- {
283
- $width = ((int)$icons_space+(int)$icons_size)*(int)$icons_per_row;
284
- $main_width = $width = $width+$extra;
285
- $main_width = $main_width."px";
286
- }
287
- else
288
- {
289
- $width = ((int)$icons_space+(int)$icons_size);
290
- $main_width = "35%";
291
- }
292
-
293
- /* built the main widget div */
294
- $icons_main = '<div class="norm_row sfsi_wDiv" style="width:'.$main_width.';text-align:'.$icons_alignment.';'.$position1.'">';
295
- $icons = "";
296
- /* loop through icons and bulit the icons with all settings applied in admin */
297
- foreach($icons_order as $index => $icn) :
298
- if(is_array($icn)) { $icon_arry=$icn; $icn="custom" ; }
299
- switch ($icn) :
300
- case 'rss' : if($sfsi_section1_options['sfsi_rss_display']=='yes') $icons.= sfsi_prepairIcons('rss');
301
- break;
302
- case 'email' : if($sfsi_section1_options['sfsi_email_display']=='yes') $icons.= sfsi_prepairIcons('email');
303
- break;
304
- case 'facebook' : if($sfsi_section1_options['sfsi_facebook_display']=='yes') $icons.= sfsi_prepairIcons('facebook');
305
- break;
306
- case 'twitter' : if($sfsi_section1_options['sfsi_twitter_display']=='yes') $icons.= sfsi_prepairIcons('twitter');
307
- break;
308
- case 'youtube' : if($sfsi_section1_options['sfsi_youtube_display']=='yes') $icons.= sfsi_prepairIcons('youtube');
309
- break;
310
- case 'pinterest' : if($sfsi_section1_options['sfsi_pinterest_display']=='yes') $icons.= sfsi_prepairIcons('pinterest');
311
- break;
312
- case 'linkedin' : if($sfsi_section1_options['sfsi_linkedin_display']=='yes') $icons.= sfsi_prepairIcons('linkedin');
313
- break;
314
- case 'instagram' : if($sfsi_section1_options['sfsi_instagram_display']=='yes') $icons.= sfsi_prepairIcons('instagram');
315
- break;
316
- case 'telegram' : if($sfsi_section1_options['sfsi_telegram_display']=='yes') $icons.= sfsi_prepairIcons('telegram');
317
- break;
318
- case 'vk' : if($sfsi_section1_options['sfsi_vk_display']=='yes') $icons.= sfsi_prepairIcons('vk');
319
- break;
320
- case 'ok' : if($sfsi_section1_options['sfsi_ok_display']=='yes') $icons.= sfsi_prepairIcons('ok');
321
- break;
322
- case 'weibo' : if($sfsi_section1_options['sfsi_weibo_display']=='yes') $icons.= sfsi_prepairIcons('weibo');
323
- break;
324
- case 'wechat' : if($sfsi_section1_options['sfsi_wechat_display']=='yes') $icons.= sfsi_prepairIcons('wechat');
325
- break;
326
- case 'custom' : $icons.= sfsi_prepairIcons($icon_arry['ele']);
327
- break;
328
- endswitch;
329
- endforeach;
330
-
331
- $jquery.="</script>";
332
- $icons.='</div >';
333
-
334
- $margin = $width+11;
335
-
336
- $icons_main.=$icons.'<div id="sfsi_holder" class="sfsi_holders" style="position: relative; float: left;width:100%;z-index:-1;"></div >'.$jquery;
337
- /* if floating of icons is active create a floater div */
338
- $icons_float='';
339
-
340
- if($sfsi_section9['sfsi_icons_float']=="yes" && $isFloter==1)
341
- {
342
- if($sfsi_section9['sfsi_icons_floatPosition'] == "top-left")
343
- {
344
- $styleMargin = "margin-top:".$sfsi_section9['sfsi_icons_floatMargin_top']."px;margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
345
- }
346
- elseif($sfsi_section9['sfsi_icons_floatPosition'] == "top-right")
347
- {
348
- $styleMargin = "margin-top:".$sfsi_section9['sfsi_icons_floatMargin_top']."px;margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
349
- }
350
- elseif($sfsi_section9['sfsi_icons_floatPosition'] == "center-left")
351
- {
352
- $styleMargin = "margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
353
- }
354
- elseif($sfsi_section9['sfsi_icons_floatPosition'] == "center-right")
355
- {
356
- $styleMargin = "margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
357
- }
358
- elseif($sfsi_section9['sfsi_icons_floatPosition'] == "bottom-left")
359
- {
360
- $styleMargin = "margin-bottom:".$sfsi_section9['sfsi_icons_floatMargin_bottom']."px;margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
361
- }
362
- elseif($sfsi_section9['sfsi_icons_floatPosition'] == "bottom-right")
363
- {
364
- $styleMargin = "margin-bottom:".$sfsi_section9['sfsi_icons_floatMargin_bottom']."px;margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
365
- }
366
-
367
- $icons_float = isset($styleMargin) && !empty($styleMargin) ? '<style type="text/css">#sfsi_floater { '.$styleMargin.' }</style>' : '';
368
- $icons_float .= '<div class="norm_row sfsi_wDiv" id="sfsi_floater" style="z-index: 9999;width:'.$width.'px;text-align:'.$icons_alignment.';'.$position.'">';
369
- $icons_float .= $icons;
370
- $icons_float .= "<input type='hidden' id='sfsi_floater_sec' value='".$sfsi_section9['sfsi_icons_floatPosition']."' />";
371
- $icons_float.="</div>".$jquery;
372
- return $icons_float; exit;
373
- }
374
- $icons_data=$icons_main.$icons_float;
375
- return $icons_data;
376
- }
377
-
378
- /* make all icons with saved settings in admin */
379
- function sfsi_prepairIcons($icon_name,$is_front=0)
380
- {
381
- global $wpdb; global $socialObj;
382
- $mouse_hover_effect = '';
383
- $active_theme = 'official';
384
- $sfsi_shuffle_Firstload = 'no';
385
- $sfsi_display_counts = "no";
386
- $icon = '';
387
- $url = '';
388
- $alt_text = '';
389
- $new_window = '';
390
- $class = '';
391
-
392
- /* access all saved settings in admin */
393
- $sfsi_section1_options = unserialize(get_option('sfsi_section1_options',false));
394
- $sfsi_section2_options = unserialize(get_option('sfsi_section2_options',false));
395
- $sfsi_section3_options = unserialize(get_option('sfsi_section3_options',false));
396
- $sfsi_section4_options = unserialize(get_option('sfsi_section4_options',false));
397
- $sfsi_section5_options = unserialize(get_option('sfsi_section5_options',false));
398
- $sfsi_section6_options = unserialize(get_option('sfsi_section6_options',false));
399
- $sfsi_section7_options = unserialize(get_option('sfsi_section7_options',false));
400
- /* get active theme */
401
- $border_radius='';
402
- $active_theme = $sfsi_section3_options['sfsi_actvite_theme'];
403
- if(!isset($sfsi_section2_options['sfsi_wechatShare_option'])){
404
- $sfsi_section2_options['sfsi_wechatShare_option']="yes";
405
- }
406
- /* shuffle effect */
407
- if($sfsi_section3_options['sfsi_shuffle_icons']=='yes')
408
- {
409
- $sfsi_shuffle_Firstload=$sfsi_section3_options["sfsi_shuffle_Firstload"];
410
- if($sfsi_section3_options["sfsi_shuffle_interval"]=="yes")
411
- {
412
- $sfsi_shuffle_interval = $sfsi_section3_options["sfsi_shuffle_intervalTime"];
413
- }
414
- }
415
-
416
- /* define the main url for icon access */
417
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/".$active_theme."/";
418
- $visit_iconsUrl = SFSI_PLUGURL."images/visit_icons/";
419
- $hoverSHow = 0;
420
-
421
- /* check is icon is a custom icon or default icon */
422
- if(is_numeric($icon_name)) { $icon_n=$icon_name; $icon_name="custom" ; }
423
- $counts = '';
424
- $twit_tolCls = "";
425
- $twt_margin = "";
426
- $icons_space = $sfsi_section5_options['sfsi_icons_spacing'];
427
- $padding_top = '';
428
-
429
- // $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
430
- // $current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
431
-
432
- $current_url = sfsi_get_current_page_url();
433
-
434
- $url = "#";
435
- $cmcls = '';
436
- $toolClass = '';
437
-
438
- $socialObj = new sfsi_SocialHelper(); /* global object to access 3rd party icon's actions */
439
-
440
- switch($icon_name)
441
- {
442
- case "rss" :
443
-
444
- $url = isset($sfsi_section2_options['sfsi_rss_url']) && !empty($sfsi_section2_options['sfsi_rss_url'])? $sfsi_section2_options['sfsi_rss_url'] : '';
445
-
446
- $toolClass = "rss_tool_bdr";
447
- $hoverdiv = '';
448
- $arrow_class = "bot_rss_arow";
449
-
450
- /* fecth no of counts if active in admin section */
451
- if($sfsi_section4_options['sfsi_rss_countsDisplay']=="yes" && $sfsi_section4_options['sfsi_display_counts']=="yes")
452
- {
453
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_rss_manualCounts']);
454
- }
455
-
456
- if(!empty($sfsi_section5_options['sfsi_rss_MouseOverText']))
457
- {
458
- $alt_text = $sfsi_section5_options['sfsi_rss_MouseOverText'];
459
- }
460
- else
461
- {
462
- $alt_text = 'RSS';
463
- }
464
-
465
- //Custom Skin Support {Monad}
466
- if($active_theme == 'custom_support')
467
- {
468
- if(get_option("rss_skin"))
469
- {
470
- $icon = get_option("rss_skin");
471
- }
472
- else
473
- {
474
- $active_theme = 'default';
475
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
476
- $icon=$icons_baseUrl.$active_theme."_rss.png";
477
- }
478
- }
479
- else
480
- {
481
- $icon=$icons_baseUrl.$active_theme."_rss.png";
482
- }
483
- break;
484
-
485
- case "email" :
486
-
487
- $hoverdiv = '';
488
-
489
- $sfsi_section2_options['sfsi_email_url'];
490
-
491
- $url = (isset($sfsi_section2_options['sfsi_email_url'])) ? $sfsi_section2_options['sfsi_email_url'] : '';
492
-
493
- $toolClass = "email_tool_bdr";
494
- $arrow_class = "bot_eamil_arow";
495
-
496
- /* fecth no of counts if active in admin section */
497
- if(
498
- $sfsi_section4_options['sfsi_email_countsDisplay']=="yes" &&
499
- $sfsi_section4_options['sfsi_display_counts']=="yes"
500
- )
501
- {
502
- if($sfsi_section4_options['sfsi_email_countsFrom']=="manual")
503
- {
504
- $counts=$socialObj->format_num($sfsi_section4_options['sfsi_email_manualCounts']);
505
- }
506
- else
507
- {
508
- $counts = $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_feed_id',false)));
509
- }
510
- }
511
-
512
- if(!empty($sfsi_section5_options['sfsi_email_MouseOverText']))
513
- {
514
- $alt_text = $sfsi_section5_options['sfsi_email_MouseOverText'];
515
- }
516
- else
517
- {
518
- $alt_text = 'EMAIL';
519
- }
520
-
521
- //Custom Skin Support {Monad}
522
- if($active_theme == 'custom_support')
523
- {
524
- if(get_option("email_skin"))
525
- {
526
- $icon = get_option("email_skin");
527
- }
528
- else
529
- {
530
- $active_theme = 'default';
531
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
532
- //$icon=($sfsi_section2_options['sfsi_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
533
- if($sfsi_section2_options['sfsi_rss_icons']=="sfsi")
534
- {
535
- $icon = $icons_baseUrl.$active_theme."_sf.png";
536
- }
537
- elseif($sfsi_section2_options['sfsi_rss_icons']=="email")
538
- {
539
- $icon = $icons_baseUrl.$active_theme."_email.png";
540
- }
541
- else
542
- {
543
- $icon = $icons_baseUrl.$active_theme."_subscribe.png";
544
- }
545
- }
546
- }
547
- else
548
- {
549
-
550
- $rss_icons = isset($sfsi_section2_options['sfsi_rss_icons']) && !empty($sfsi_section2_options['sfsi_rss_icons']) ? $sfsi_section2_options['sfsi_rss_icons'] : false;
551
-
552
- switch ($rss_icons) {
553
-
554
- case 'email':
555
- $image = "_email.png";
556
- break;
557
-
558
- case 'subscribe':
559
- $image = "_subscribe.png";
560
- break;
561
-
562
- case 'sfsi':
563
- $image = "_sf.png";
564
- break;
565
-
566
- default:
567
- $image = "_subscribe.png";
568
- break;
569
- }
570
-
571
- $icon = $icons_baseUrl.$active_theme.$image;
572
- }
573
- break;
574
-
575
- case "facebook" :
576
-
577
- $width = 62;
578
- $totwith = $width+28+$icons_space;
579
- $twt_margin = $totwith/2;
580
- $toolClass = "fb_tool_bdr";
581
- $arrow_class = "bot_fb_arow";
582
-
583
- /* check for the over section */
584
- if(!empty($sfsi_section5_options['sfsi_facebook_MouseOverText']))
585
- {
586
- $alt_text = $sfsi_section5_options['sfsi_facebook_MouseOverText'];
587
- }
588
- else
589
- {
590
- $alt_text = "FACEBOOK";
591
- }
592
-
593
- $visit_icon = $visit_iconsUrl."facebook.png";
594
-
595
- $url = isset($sfsi_section2_options['sfsi_facebookPage_url']) && !empty($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url'] : false;
596
-
597
- $url = false != $url ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
598
-
599
- $like_option = isset($sfsi_section2_options['sfsi_facebookLike_option']) && !empty($sfsi_section2_options['sfsi_facebookLike_option']) ? $sfsi_section2_options['sfsi_facebookLike_option'] : false;
600
-
601
- $page_option = isset($sfsi_section2_options['sfsi_facebookPage_option']) && !empty($sfsi_section2_options['sfsi_facebookPage_option']) ? $sfsi_section2_options['sfsi_facebookPage_option'] : false;
602
-
603
- $share_option = isset($sfsi_section2_options['sfsi_facebookShare_option']) && !empty($sfsi_section2_options['sfsi_facebookShare_option']) ? $sfsi_section2_options['sfsi_facebookShare_option'] : false;
604
-
605
- if((false != $like_option && $like_option=="yes") || (false != $share_option && $share_option=="yes"))
606
- {
607
- $url=($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
608
- $hoverSHow = 1;
609
- $hoverdiv = '';
610
-
611
- if(false != $page_option && $page_option=="yes")
612
- {
613
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
614
- }
615
- if(false!= $like_option && $like_option=="yes")
616
- {
617
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_FBlike($current_url)."</div>";
618
- }
619
- if(false!= $share_option && $share_option=="yes")
620
- {
621
- $hoverdiv.="<div class='icon3'>".$socialObj->sfsiFB_Share($current_url)."</div>";
622
- }
623
-
624
- }
625
-
626
- /* fecth no of counts if active in admin section */
627
- if(
628
- $sfsi_section4_options['sfsi_facebook_countsDisplay']=="yes" &&
629
- $sfsi_section4_options['sfsi_display_counts']=="yes"
630
- )
631
- {
632
- if($sfsi_section4_options['sfsi_facebook_countsFrom']=="manual")
633
- {
634
- $counts=$socialObj->format_num($sfsi_section4_options['sfsi_facebook_manualCounts']);
635
- }
636
- else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="likes")
637
- {
638
- $fb_data=$socialObj->sfsi_get_fb($current_url);
639
- $counts=$socialObj->format_num($fb_data['like_count']);
640
- if(empty($counts))
641
- {
642
- $counts=(string) "0";
643
- }
644
- }
645
- else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="followers")
646
- {
647
- $fb_data=$socialObj->sfsi_get_fb($current_url);
648
- $counts=$socialObj->format_num($fb_data['share_count']);
649
-
650
- }
651
- else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="mypage")
652
- {
653
- $current_url = $sfsi_section4_options['sfsi_facebook_mypageCounts'];
654
- $fb_data=$socialObj->sfsi_get_fb_pagelike($current_url);
655
- $counts=$socialObj->format_num($fb_data);
656
- }
657
- }
658
-
659
- //Custom Skin Support {Monad}
660
- if($active_theme == 'custom_support')
661
- {
662
- if(get_option("facebook_skin"))
663
- {
664
- $icon = get_option("facebook_skin");
665
- }
666
- else
667
- {
668
- $active_theme = 'default';
669
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
670
- $icon=$icons_baseUrl.$active_theme."_facebook.png";
671
- }
672
- }
673
- else
674
- {
675
- $icon=$icons_baseUrl.$active_theme."_facebook.png";
676
- }
677
- break;
678
- case "twitter" :
679
- $toolClass = "twt_tool_bdr";
680
- $arrow_class = "bot_twt_arow";
681
-
682
- $url = isset($sfsi_section2_options['sfsi_twitter_pageURL']) && !empty($sfsi_section2_options['sfsi_twitter_pageURL']) ? $sfsi_section2_options['sfsi_twitter_pageURL'] : '';
683
-
684
- $twitter_user = isset($sfsi_section2_options['sfsi_twitter_followUserName']) && !empty($sfsi_section2_options['sfsi_twitter_followUserName']) ? $sfsi_section2_options['sfsi_twitter_followUserName'] : false;
685
-
686
- $twitter_text = isset($sfsi_section2_options['sfsi_twitter_aboutPageText']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPageText']) ? $sfsi_section2_options['sfsi_twitter_aboutPageText'] : false;
687
-
688
- $visit_icon = $visit_iconsUrl."twitter.png";
689
-
690
- $width = 59;
691
- $totwith = $width+28+$icons_space;
692
- $twt_margin = $totwith/2;
693
- /* check for icons to display */
694
- $hoverdiv='';
695
-
696
- $follow_me = isset($sfsi_section2_options['sfsi_twitter_followme']) && !empty($sfsi_section2_options['sfsi_twitter_followme']) ? $sfsi_section2_options['sfsi_twitter_followme'] : false;
697
-
698
- $about_page = isset($sfsi_section2_options['sfsi_twitter_aboutPage']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPage']) ? $sfsi_section2_options['sfsi_twitter_aboutPage'] : false;
699
-
700
- if($follow_me=="yes" ||$about_page=="yes")
701
- {
702
- $hoverSHow=1;
703
- //Visit twitter page {Monad}
704
- if(isset($sfsi_section2_options['sfsi_twitter_page']) && !empty($sfsi_section2_options['sfsi_twitter_page']) && $sfsi_section2_options['sfsi_twitter_page']=="yes")
705
- {
706
- $hoverdiv.="<div class='cstmicon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='Visit Us' title='Visit Us' src='".$visit_icon."' /></a></div>";
707
- }
708
- if($follow_me=="yes" && !empty($twitter_user))
709
- {
710
- $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_twitterFollow($twitter_user)."</div>";
711
- }
712
- if($about_page=="yes")
713
- {
714
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_twitterShare($current_url,$twitter_text)."</div>";
715
- }
716
-
717
- }
718
-
719
- /* fecth no of counts if active in admin section */
720
- if(
721
- $sfsi_section4_options['sfsi_twitter_countsDisplay']=="yes" &&
722
- $sfsi_section4_options['sfsi_display_counts']=="yes"
723
- )
724
- {
725
- if($sfsi_section4_options['sfsi_twitter_countsFrom']=="manual")
726
- {
727
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_twitter_manualCounts']);
728
- }
729
- else if($sfsi_section4_options['sfsi_twitter_countsFrom']=="source")
730
- {
731
- $tw_settings = array('tw_consumer_key'=>$sfsi_section4_options['tw_consumer_key'],
732
- 'tw_consumer_secret'=> $sfsi_section4_options['tw_consumer_secret'],
733
- 'tw_oauth_access_token'=> $sfsi_section4_options['tw_oauth_access_token'],
734
- 'tw_oauth_access_token_secret'=> $sfsi_section4_options['tw_oauth_access_token_secret']);
735
-
736
- $followers = $socialObj->sfsi_get_tweets($twitter_user,$tw_settings);
737
- $counts = $socialObj->format_num($followers);
738
- if(empty($counts))
739
- {
740
- $counts=(string) "0";
741
- }
742
- }
743
- }
744
-
745
- //Giving alternative text to image
746
- if(!empty($sfsi_section5_options['sfsi_twitter_MouseOverText']))
747
- {
748
- $alt_text = $sfsi_section5_options['sfsi_twitter_MouseOverText'];
749
- }
750
- else
751
- {
752
- $alt_text = "TWITTER";
753
- }
754
-
755
- //Custom Skin Support {Monad}
756
- if($active_theme == 'custom_support')
757
- {
758
- if(get_option("twitter_skin"))
759
- {
760
- $icon = get_option("twitter_skin");
761
- }
762
- else
763
- {
764
- $active_theme = 'default';
765
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
766
- $icon=$icons_baseUrl.$active_theme."_twitter.png";
767
- }
768
- }
769
- else
770
- {
771
- $icon=$icons_baseUrl.$active_theme."_twitter.png";
772
- }
773
- break;
774
-
775
- case "youtube" :
776
- $toolClass = "utube_tool_bdr";
777
- $arrow_class = "bot_utube_arow";
778
- $width = 96;
779
- $totwith = $width+28+$icons_space;
780
- $twt_margin = $totwith/2;
781
- $youtube_user = (isset($sfsi_section4_options['sfsi_youtube_user']) && !empty($sfsi_section4_options['sfsi_youtube_user'])) ? $sfsi_section4_options['sfsi_youtube_user'] : 'SpecificFeeds';
782
- $visit_icon = $visit_iconsUrl."youtube.png";
783
-
784
- $url = isset($sfsi_section2_options['sfsi_youtube_pageUrl']) && !empty($sfsi_section2_options['sfsi_youtube_pageUrl']) ? $sfsi_section2_options['sfsi_youtube_pageUrl'] : '';
785
-
786
- //Giving alternative text to image
787
- if(!empty($sfsi_section5_options['sfsi_youtube_MouseOverText']))
788
- {
789
- $alt_text = $sfsi_section5_options['sfsi_youtube_MouseOverText'];
790
- }
791
- else
792
- {
793
- $alt_text = "YOUTUBE";
794
- }
795
-
796
- /* check for icons to display */
797
- $hoverdiv="";
798
-
799
- $follow = isset($sfsi_section2_options['sfsi_youtube_follow']) && !empty($sfsi_section2_options['sfsi_youtube_follow']) ? $sfsi_section2_options['sfsi_youtube_follow'] : false;
800
-
801
- $ypage = isset($sfsi_section2_options['sfsi_youtube_page']) && !empty($sfsi_section2_options['sfsi_youtube_page']) ? $sfsi_section2_options['sfsi_youtube_page'] : false;
802
-
803
- if(false != $follow && $follow=="yes")
804
- {
805
- $hoverSHow = 1;
806
-
807
- if($ypage =="yes")
808
- {
809
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
810
- }
811
- if($follow =="yes")
812
- {
813
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_YouTubeSub($youtube_user)."</div>";
814
- }
815
- }
816
-
817
- /* fecth no of counts if active in admin section */
818
- if(
819
- $sfsi_section4_options['sfsi_youtube_countsDisplay']=="yes" &&
820
- $sfsi_section4_options['sfsi_display_counts']=="yes"
821
- )
822
- {
823
- if($sfsi_section4_options['sfsi_youtube_countsFrom']=="manual")
824
- {
825
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_youtube_manualCounts']);
826
- }
827
- else if($sfsi_section4_options['sfsi_youtube_countsFrom']=="subscriber")
828
- {
829
- $followers = $socialObj->sfsi_get_youtube($youtube_user);
830
- $counts = $socialObj->format_num($followers);
831
- if(empty($counts))
832
- {
833
- $counts = (string) "0";
834
- }
835
- }
836
- }
837
-
838
- //Custom Skin Support {Monad}
839
- if($active_theme == 'custom_support')
840
- {
841
- if(get_option("youtube_skin"))
842
- {
843
- $icon = get_option("youtube_skin");
844
- }
845
- else
846
- {
847
- $active_theme = 'default';
848
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
849
- $icon=$icons_baseUrl.$active_theme."_youtube.png";
850
- }
851
- }
852
- else
853
- {
854
- $icon=$icons_baseUrl.$active_theme."_youtube.png";
855
- }
856
- break;
857
-
858
- case "pinterest" :
859
-
860
- $width = 73;
861
- $totwith = $width+28+$icons_space;
862
- $twt_margin = $totwith/2;
863
- $toolClass = "printst_tool_bdr";
864
- $arrow_class = "bot_pintst_arow";
865
-
866
- $pinterest_user = (isset($sfsi_section4_options['sfsi_pinterest_user']))
867
- ? $sfsi_section4_options['sfsi_pinterest_user'] : '';
868
- $pinterest_board = (isset($sfsi_section4_options['sfsi_pinterest_board']))
869
- ? $sfsi_section4_options['sfsi_pinterest_board'] : '';
870
-
871
- $visit_icon = $visit_iconsUrl."pinterest.png";
872
- $url = (isset($sfsi_section2_options['sfsi_pinterest_pageUrl'])) ? $sfsi_section2_options['sfsi_pinterest_pageUrl'] : '';
873
-
874
- //Giving alternative text to image
875
- if(isset($sfsi_section5_options['sfsi_pinterest_MouseOverText']) && !empty($sfsi_section5_options['sfsi_pinterest_MouseOverText']))
876
- {
877
- $alt_text = $sfsi_section5_options['sfsi_pinterest_MouseOverText'];
878
- }
879
- else
880
- {
881
- $alt_text = "PINTEREST";
882
- }
883
-
884
- /* check for icons to display */
885
- $hoverdiv="";
886
-
887
- $pingblog = isset($sfsi_section2_options['sfsi_pinterest_pingBlog']) && !empty($sfsi_section2_options['sfsi_pinterest_pingBlog']) ? $sfsi_section2_options['sfsi_pinterest_pingBlog'] : false;
888
-
889
- $page = isset($sfsi_section2_options['sfsi_pinterest_page']) && !empty($sfsi_section2_options['sfsi_pinterest_page']) ? $sfsi_section2_options['sfsi_pinterest_page'] : false;
890
-
891
- $cDisplay = isset($sfsi_section4_options['sfsi_pinterest_countsDisplay']) && !empty($sfsi_section4_options['sfsi_pinterest_countsDisplay']) ? $sfsi_section4_options['sfsi_pinterest_countsDisplay'] : false;
892
-
893
- $displayC = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
894
-
895
- $cFrom = isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && !empty($sfsi_section4_options['sfsi_pinterest_countsFrom']) ? $sfsi_section4_options['sfsi_pinterest_countsFrom'] : false;
896
- // var_dump($sfsi_section4_options['sfsi_pinterest_countsFrom'],$cFrom);die();
897
-
898
- if($pingblog=="yes" )
899
- {
900
- $hoverSHow = 1;
901
-
902
- if($page =="yes")
903
- {
904
- $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
905
- }
906
- if($pingblog=="yes")
907
- {
908
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_PinIt($current_url)."</div>";
909
- }
910
- }
911
-
912
- /* fecth no of counts if active in admin section */
913
- if($cDisplay == "yes" && $displayC=="yes")
914
- {
915
- if($cFrom=="manual")
916
- {
917
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_pinterest_manualCounts']);
918
- }
919
- else if($cFrom=="pins")
920
- {
921
- $pins = $socialObj->sfsi_get_pinterest($current_url);
922
- $counts = $pins;
923
- if(empty($counts))
924
- {
925
- $counts=(string) "0";
926
- }
927
- }
928
- }
929
-
930
- //Custom Skin Support {Monad}
931
- if($active_theme == 'custom_support')
932
- {
933
- if(get_option("pintrest_skin"))
934
- {
935
- $icon = get_option("pintrest_skin");
936
- }
937
- else
938
- {
939
- $active_theme = 'default';
940
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
941
- $icon = $icons_baseUrl.$active_theme."_pinterest.png";
942
- }
943
- }
944
- else
945
- {
946
- $icon=$icons_baseUrl.$active_theme."_pinterest.png";
947
- }
948
- break;
949
-
950
- case "instagram" :
951
- $toolClass = "instagram_tool_bdr";
952
- $arrow_class = "bot_pintst_arow";
953
-
954
- $url = (isset($sfsi_section2_options['sfsi_instagram_pageUrl'])) ? $sfsi_section2_options['sfsi_instagram_pageUrl'] : '';
955
-
956
- $instagram_user_name = isset($sfsi_section4_options['sfsi_instagram_User']) && !empty($sfsi_section4_options['sfsi_instagram_User']) ? $sfsi_section4_options['sfsi_instagram_User'] : false;
957
-
958
- //Giving alternative text to image
959
- if(isset($sfsi_section5_options['sfsi_instagram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_instagram_MouseOverText']))
960
- {
961
- $alt_text = $sfsi_section5_options['sfsi_instagram_MouseOverText'];
962
- }
963
- else
964
- {
965
- $alt_text = "INSTAGRAM";
966
- }
967
-
968
- $hoverdiv="";
969
-
970
- $cDisplay = isset($sfsi_section4_options['sfsi_instagram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_instagram_countsDisplay']) ? $sfsi_section4_options['sfsi_instagram_countsDisplay']: false;
971
-
972
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
973
-
974
- $cFrom = isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && !empty($sfsi_section4_options['sfsi_instagram_countsFrom']) ? $sfsi_section4_options['sfsi_instagram_countsFrom']: false;
975
-
976
- /* fecth no of counts if active in admin section */
977
- if($cDisplay=="yes" && $Displayc=="yes")
978
- {
979
- if($cFrom=="manual")
980
- {
981
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_instagram_manualCounts']);
982
- }
983
- else if($cFrom=="followers")
984
- {
985
- $counts = $socialObj->sfsi_get_instagramFollowers($instagram_user_name);
986
- if(empty($counts))
987
- {
988
- $counts=(string) "0";
989
- }
990
- }
991
- }
992
-
993
- //Custom Skin Support {Monad}
994
- if($active_theme == 'custom_support')
995
- {
996
- if(get_option("instagram_skin"))
997
- {
998
- $icon = get_option("instagram_skin");
999
- }
1000
- else
1001
- {
1002
- $active_theme = 'default';
1003
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1004
- $icon=$icons_baseUrl.$active_theme."_instagram.png";
1005
- }
1006
- }
1007
- else
1008
- {
1009
- $icon=$icons_baseUrl.$active_theme."_instagram.png";
1010
- }
1011
- break;
1012
-
1013
- case "telegram" :
1014
- $toolClass = "telegram_tool_bdr";
1015
- $arrow_class = "bot_pintst_arow";
1016
- $hoverdiv = '';
1017
-
1018
- // $url = (isset($sfsi_section4_options['sfsi_telegram_pageURL'])) ? $sfsi_section4_options['sfsi_telegram_pageURL'] : '';
1019
-
1020
- // $telegram_user_name = isset($sfsi_section4_options['sfsi_telegram_User']) && !empty($sfsi_section4_options['sfsi_telegram_User']) ? $sfsi_section4_options['sfsi_telegram_User'] : false;
1021
-
1022
- //Giving alternative text to image
1023
- if(isset($sfsi_section5_options['sfsi_telegram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_telegram_MouseOverText']))
1024
- {
1025
- $alt_text = $sfsi_section5_options['sfsi_telegram_MouseOverText'];
1026
-
1027
- }
1028
- else
1029
- {
1030
- $alt_text = "telegram";
1031
- }
1032
- $messageus_icon = $visit_iconsUrl.$icon_name."_message.svg";
1033
- $hoverdiv="";
1034
- $cDisplay = isset($sfsi_section4_options['sfsi_telegram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_telegram_countsDisplay']) ? $sfsi_section4_options['sfsi_telegram_countsDisplay']: false;
1035
-
1036
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1037
- /* fecth no of counts if active in admin section */
1038
- if($cDisplay=="yes" && $Displayc=="yes")
1039
- {
1040
-
1041
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_telegram_manualCounts']);
1042
- }
1043
-
1044
- //Custom Skin Support {Monad}
1045
- if($active_theme == 'custom_support')
1046
- {
1047
- if(get_option("telegram_skin"))
1048
- {
1049
- $icon = get_option("telegram_skin");
1050
- }
1051
- else
1052
- {
1053
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1054
- $icon=$icons_baseUrl."default_telegram.png";
1055
- }
1056
- }
1057
- else
1058
- {
1059
- $icon=$icons_baseUrl.$active_theme."_telegram.png";
1060
- }
1061
- if(
1062
- isset($sfsi_section2_options['sfsi_telegram_message']) && !empty($sfsi_section2_options['sfsi_telegram_message'])
1063
- &&
1064
- isset($sfsi_section2_options['sfsi_telegram_username']) && !empty($sfsi_section2_options['sfsi_telegram_username'])
1065
-
1066
- ){
1067
- $tg_username = $sfsi_section2_options['sfsi_telegram_username'];
1068
- $tg_msg = stripslashes($sfsi_section2_options['sfsi_telegram_message']);
1069
- $tg_msg = str_replace('"', '', str_replace("'", '', $tg_msg));
1070
- $tg_msg = html_entity_decode(strip_tags($tg_msg), ENT_QUOTES,'UTF-8');
1071
- $tg_msg = str_replace("%26%238230%3B", "...", $tg_msg);
1072
- $tg_msg = rawurlencode($tg_msg);
1073
-
1074
- $tele_url = "https://t.me/".$tg_username;
1075
- $url = $tele_url."?&text=".urlencode($tg_msg);
1076
- // var_dump($url);
1077
- // die();
1078
- // file_get_contents($url);
1079
- }else{
1080
- $url="#";
1081
- $sfsi_onclick="event.preventDefault();";
1082
- }
1083
- if($active_theme=="glossy"){
1084
- $sfsi_new_icons = "yes";
1085
- }
1086
- break;
1087
- case "vk" :
1088
- $toolClass = "vk_tool_bdr";
1089
- $arrow_class = "bot_pintst_arow";
1090
-
1091
- $url = (isset($sfsi_section2_options['sfsi_vk_pageURL'])) ? $sfsi_section2_options['sfsi_vk_pageURL'] : '';
1092
-
1093
- // $vk_user_name = isset($sfsi_section4_options['sfsi_vk_User']) && !empty($sfsi_section4_options['sfsi_vk_User']) ? $sfsi_section4_options['sfsi_vk_User'] : false;
1094
-
1095
- //Giving alternative text to image
1096
- if(isset($sfsi_section5_options['sfsi_vk_MouseOverText']) && !empty($sfsi_section5_options['sfsi_vk_MouseOverText']))
1097
- {
1098
- $alt_text = $sfsi_section5_options['sfsi_vk_MouseOverText'];
1099
- }
1100
- else
1101
- {
1102
- $alt_text = "vk";
1103
- }
1104
-
1105
- $hoverdiv="";
1106
-
1107
- $cDisplay = isset($sfsi_section4_options['sfsi_vk_countsDisplay']) && !empty($sfsi_section4_options['sfsi_vk_countsDisplay']) ? $sfsi_section4_options['sfsi_vk_countsDisplay']: false;
1108
-
1109
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1110
-
1111
- /* fecth no of counts if active in admin section */
1112
- if($cDisplay=="yes" && $Displayc=="yes")
1113
- {
1114
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_vk_manualCounts']);
1115
- }
1116
-
1117
- //Custom Skin Support {Monad}
1118
- if($active_theme == 'custom_support')
1119
- {
1120
- if(get_option("vk_skin"))
1121
- {
1122
- $icon = get_option("vk_skin");
1123
- }
1124
- else
1125
- {
1126
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1127
- $icon=$icons_baseUrl."default_vk.png";
1128
- }
1129
- }
1130
- else
1131
- {
1132
- $icon=$icons_baseUrl.$active_theme."_vk.png";
1133
- }
1134
- if($active_theme=="glossy"){
1135
- $sfsi_new_icons = "yes";
1136
- }
1137
-
1138
- break;
1139
- case "ok" :
1140
- $toolClass = "ok_tool_bdr";
1141
- $arrow_class = "bot_pintst_arow";
1142
-
1143
- $url = (isset($sfsi_section2_options['sfsi_ok_pageURL'])) ? $sfsi_section2_options['sfsi_ok_pageURL'] : '';
1144
-
1145
- // $ok_user_name = isset($sfsi_section4_options['sfsi_ok_User']) && !empty($sfsi_section4_options['sfsi_ok_User']) ? $sfsi_section4_options['sfsi_ok_User'] : false;
1146
-
1147
- //Giving alternative text to image
1148
- if(isset($sfsi_section5_options['sfsi_ok_MouseOverText']) && !empty($sfsi_section5_options['sfsi_ok_MouseOverText']))
1149
- {
1150
- $alt_text = $sfsi_section5_options['sfsi_ok_MouseOverText'];
1151
- }
1152
- else
1153
- {
1154
- $alt_text = "ok";
1155
- }
1156
-
1157
- $hoverdiv="";
1158
-
1159
- $cDisplay = isset($sfsi_section4_options['sfsi_ok_countsDisplay']) && !empty($sfsi_section4_options['sfsi_ok_countsDisplay']) ? $sfsi_section4_options['sfsi_ok_countsDisplay']: false;
1160
-
1161
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1162
- /* fecth no of counts if active in admin section */
1163
- if($cDisplay=="yes" && $Displayc=="yes")
1164
- {
1165
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_ok_manualCounts']);
1166
- }
1167
-
1168
- //Custom Skin Support {Monad}
1169
- if($active_theme == 'custom_support')
1170
- {
1171
- if(get_option("ok_skin"))
1172
- {
1173
- $icon = get_option("ok_skin");
1174
- }
1175
- else
1176
- {
1177
-
1178
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1179
- $icon=$icons_baseUrl."default_ok.png";
1180
- }
1181
- }
1182
- else
1183
- {
1184
- $icon=$icons_baseUrl.$active_theme."_ok.png";
1185
- }
1186
- if($active_theme=="glossy"){
1187
- $sfsi_new_icons = "yes";
1188
- }
1189
-
1190
- break;
1191
- case "weibo" :
1192
- $toolClass = "weibo_tool_bdr";
1193
- $arrow_class = "bot_pintst_arow";
1194
-
1195
- $url = (isset($sfsi_section2_options['sfsi_weibo_pageURL'])) ? $sfsi_section2_options['sfsi_weibo_pageURL'] : '';
1196
-
1197
- // $weibo_user_name = isset($sfsi_section4_options['sfsi_weibo_User']) && !empty($sfsi_section4_options['sfsi_weibo_User']) ? $sfsi_section4_options['sfsi_weibo_User'] : false;
1198
-
1199
- //Giving alternative text to image
1200
- if(isset($sfsi_section5_options['sfsi_weibo_MouseOverText']) && !empty($sfsi_section5_options['sfsi_weibo_MouseOverText']))
1201
- {
1202
- $alt_text = $sfsi_section5_options['sfsi_weibo_MouseOverText'];
1203
- }
1204
- else
1205
- {
1206
- $alt_text = "weibo";
1207
- }
1208
-
1209
- $hoverdiv="";
1210
-
1211
- $cDisplay = isset($sfsi_section4_options['sfsi_weibo_countsDisplay']) && !empty($sfsi_section4_options['sfsi_weibo_countsDisplay']) ? $sfsi_section4_options['sfsi_weibo_countsDisplay']: false;
1212
-
1213
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1214
-
1215
- /* fecth no of counts if active in admin section */
1216
- if($cDisplay=="yes" && $Displayc=="yes")
1217
- {
1218
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_weibo_manualCounts']);
1219
- }
1220
-
1221
- //Custom Skin Support {Monad}
1222
- if($active_theme == 'custom_support')
1223
- {
1224
- if(get_option("weibo_skin"))
1225
- {
1226
- $icon = get_option("weibo_skin");
1227
- }
1228
- else
1229
- {
1230
-
1231
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1232
- $icon=$icons_baseUrl."default_weibo.png";
1233
- }
1234
- }
1235
- else
1236
- {
1237
- $icon=$icons_baseUrl.$active_theme."_weibo.png";
1238
- }
1239
- if($active_theme=="glossy"){
1240
- $sfsi_new_icons = "yes";
1241
- }
1242
-
1243
- break;
1244
- case "wechat" :
1245
- $toolClass = "wechat_tool_bdr";
1246
- $arrow_class = "bot_pintst_arow";
1247
-
1248
- // $url = (isset($sfsi_section2_options['sfsi_wechat_pageURL'])) ? $sfsi_section2_options['sfsi_wechat_pageURL'] : '';
1249
-
1250
- // $wechat_user_name = isset($sfsi_section4_options['sfsi_wechat_User']) && !empty($sfsi_section4_options['sfsi_wechat_User']) ? $sfsi_section4_options['sfsi_wechat_User'] : false;
1251
-
1252
- //Giving alternative text to image
1253
- if(isset($sfsi_section5_options['sfsi_wechat_MouseOverText']) && !empty($sfsi_section5_options['sfsi_wechat_MouseOverText']))
1254
- {
1255
- $alt_text = $sfsi_section5_options['sfsi_wechat_MouseOverText'];
1256
- }
1257
- else
1258
- {
1259
- $alt_text = "wechat";
1260
- }
1261
-
1262
- $hoverdiv="";
1263
-
1264
- $cDisplay = isset($sfsi_section4_options['sfsi_wechat_countsDisplay']) && !empty($sfsi_section4_options['sfsi_wechat_countsDisplay']) ? $sfsi_section4_options['sfsi_wechat_countsDisplay']: false;
1265
-
1266
- $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1267
-
1268
- /* fecth no of counts if active in admin section */
1269
- if($cDisplay=="yes" && $Displayc=="yes")
1270
- {
1271
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_wechat_manualCounts']);
1272
- }
1273
- $url = "weixin://dl/chat";
1274
- if(
1275
- (isset($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']) &&
1276
-
1277
- (isset($sfsi_section2_options['sfsi_wechatShare_option']) && "yes" == $sfsi_section2_options['sfsi_wechatShare_option'])
1278
- ){
1279
- $hoverSHow = 1;
1280
- $hoverdiv = "";
1281
-
1282
- if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $option2['sfsi_wechatFollow_option']
1283
-
1284
- && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1285
-
1286
- $image_url = $sfsi_section2_options['sfsi_wechat_scan_image'];
1287
-
1288
- $hoverdiv.="<div class='icon1' style='text-align:center'><a href='' onclick='event.preventDefault();sfsi_wechat_follow(\"".$sfsi_section2_options['sfsi_wechat_scan_image']."\")' ><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' style='height:25px' /></a></div>";
1289
- }
1290
-
1291
- if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && !empty($sfsi_section2_options['sfsi_wechatShare_option'])
1292
- && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1293
-
1294
- $hoverdiv.="<div class='icon2' style='text-align:center' ><a href='".$url."' ".sfsi_checkNewWindow($url)." onclick='event.preventDefault();sfsi_wechat_share(\"".$sfsi_section2_options['sfsi_wechat_scan_image']."\")' ><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$share_icon."' style='height:25px' /></a></div>";
1295
- }
1296
- }else{
1297
-
1298
-
1299
- if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']
1300
-
1301
- && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1302
-
1303
- $sfsi_onclick="event.preventDefault();sfsi_wechat_follow(\'".$sfsi_section2_options['sfsi_wechat_scan_image']."\')" ;
1304
- }
1305
-
1306
- if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && 'yes'==($sfsi_section2_options['sfsi_wechatShare_option'])
1307
- && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1308
- if(!wp_is_mobile()){
1309
- $sfsi_onclick="event.preventDefault();sfsi_wechat_share('".trim($current_url)."')" ;
1310
- }else{
1311
- $sfsi_onclick='';
1312
- if(wp_is_mobile()){
1313
- $sfsi_onclick = "console.log(event);event.stopPropagation&&event.stopPropagation();";
1314
- }
1315
- $sfsi_onclick.="event.preventDefault();sfsi_mobile_wechat_share('".trim($current_url)."')" ;
1316
- }
1317
- }
1318
- $hoverSHow = 0;
1319
- }
1320
- //Custom Skin Support {Monad}
1321
- if($active_theme == 'custom_support')
1322
- {
1323
- if(get_option("wechat_skin"))
1324
- {
1325
- $icon = get_option("wechat_skin");
1326
- }
1327
- else
1328
- {
1329
-
1330
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1331
- $icon=$icons_baseUrl."default_wechat.png";
1332
- }
1333
- }
1334
- else
1335
- {
1336
- $icon=$icons_baseUrl.$active_theme."_wechat.png";
1337
- }
1338
- if($active_theme=="glossy"){
1339
- $sfsi_new_icons = "yes";
1340
- }
1341
-
1342
- break;
1343
-
1344
-
1345
- case "linkedin" :
1346
- $width = 66;
1347
- $toolClass = "linkedin_tool_bdr";
1348
- $arrow_class = "bot_linkedin_arow";
1349
-
1350
- $linkedIn_compayId = isset($sfsi_section2_options['sfsi_linkedin_followCompany']) && !empty($sfsi_section2_options['sfsi_linkedin_followCompany']) ? $sfsi_section2_options['sfsi_linkedin_followCompany'] : false;
1351
-
1352
- $page = isset($sfsi_section2_options['sfsi_linkedin_page']) && !empty($sfsi_section2_options['sfsi_linkedin_page']) ? $sfsi_section2_options['sfsi_linkedin_page'] : false;
1353
-
1354
- $follow = isset($sfsi_section2_options['sfsi_linkedin_follow']) && !empty($sfsi_section2_options['sfsi_linkedin_follow']) ? $sfsi_section2_options['sfsi_linkedin_follow'] : false;
1355
-
1356
- $share = isset($sfsi_section2_options['sfsi_linkedin_SharePage']) && !empty($sfsi_section2_options['sfsi_linkedin_SharePage']) ? $sfsi_section2_options['sfsi_linkedin_SharePage'] : false;
1357
-
1358
- $reBusiness = isset($sfsi_section2_options['sfsi_linkedin_recommendBusines']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendBusines']) ? $sfsi_section2_options['sfsi_linkedin_recommendBusines'] : false;
1359
-
1360
- $linkedIn_compay = $linkedIn_compayId;
1361
- $linkedIn_ProductId = isset($sfsi_section2_options['sfsi_linkedin_recommendProductId']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendProductId']) ? $sfsi_section2_options['sfsi_linkedin_recommendProductId'] : false;
1362
-
1363
- $visit_icon = $visit_iconsUrl."linkedIn.png";
1364
-
1365
- /*check for icons to display */
1366
- $url = isset($sfsi_section2_options['sfsi_linkedin_pageURL']) && !empty($sfsi_section2_options['sfsi_linkedin_pageURL']) ? $sfsi_section2_options['sfsi_linkedin_pageURL'] : '';
1367
-
1368
- if($follow =="yes" || $share =="yes" || $reBusiness =="yes")
1369
- {
1370
- $hoverSHow = 1;
1371
- $hoverdiv = '';
1372
-
1373
- if($page=="yes")
1374
- {
1375
- $hoverdiv.="<div class='icon4'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
1376
- }
1377
- if($follow=="yes")
1378
- {
1379
- $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_LinkedInFollow($linkedIn_compayId)."</div>";
1380
- }
1381
- if($share=="yes")
1382
- {
1383
- $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_LinkedInShare()."</div>";
1384
- }
1385
- if($reBusiness=="yes")
1386
- {
1387
- $hoverdiv.="<div class='icon3'>".$socialObj->sfsi_LinkedInRecommend($linkedIn_compay,$linkedIn_ProductId)."</div>";
1388
- $width=99;
1389
- }
1390
- }
1391
-
1392
- $cFrom = isset($sfsi_section4_options['sfsi_linkedIn_countsFrom']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsFrom']) ? $sfsi_section4_options['sfsi_linkedIn_countsFrom'] : false;
1393
-
1394
- $disp = isset($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) ? $sfsi_section4_options['sfsi_linkedIn_countsDisplay'] : false;
1395
-
1396
- $dcount = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1397
-
1398
- /* fecth no of counts if active in admin section */
1399
- if($disp=="yes" &&$dcount=="yes")
1400
- {
1401
- if($cFrom=="manual")
1402
- {
1403
- $counts = $socialObj->format_num($sfsi_section4_options['sfsi_linkedIn_manualCounts']);
1404
- }
1405
- else if($cFrom=="follower")
1406
- {
1407
- $linkedIn_compay = $sfsi_section4_options['ln_company'];
1408
- $ln_settings = array(
1409
- 'ln_api_key'=>$sfsi_section4_options['ln_api_key'],
1410
- 'ln_secret_key'=>$sfsi_section4_options['ln_secret_key'],
1411
- 'ln_oAuth_user_token'=>$sfsi_section4_options['ln_oAuth_user_token']
1412
- );
1413
-
1414
- $followers=$socialObj->sfsi_getlinkedin_follower($linkedIn_compay,$ln_settings);
1415
- (int) $followers;
1416
- $counts=$socialObj->format_num($followers);
1417
- if(empty($counts))
1418
- {
1419
- $counts = (string) "0";
1420
- }
1421
- }
1422
- }
1423
- $totwith = $width+28+$icons_space;
1424
- $twt_margin = $totwith/2;
1425
-
1426
- //Giving alternative text to image
1427
- if(isset($sfsi_section5_options['sfsi_linkedIn_MouseOverText']) && !empty($sfsi_section5_options['sfsi_linkedIn_MouseOverText']))
1428
- {
1429
- $alt_text = $sfsi_section5_options['sfsi_linkedIn_MouseOverText'];
1430
- }
1431
- else
1432
- {
1433
- $alt_text = "LINKEDIN";
1434
- }
1435
-
1436
- //Custom Skin Support {Monad}
1437
- if($active_theme == 'custom_support')
1438
- {
1439
- if(get_option("linkedin_skin"))
1440
- {
1441
- $icon = get_option("linkedin_skin");
1442
- }
1443
- else
1444
- {
1445
- $active_theme = 'default';
1446
- $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1447
- $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1448
- }
1449
- }
1450
- else
1451
- {
1452
- $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1453
- }
1454
- break;
1455
-
1456
- default:
1457
- $border_radius = "";
1458
- //$border_radius =" border-radius:48%;";
1459
- $cmcls = "cmcls";
1460
- $padding_top = "";
1461
- if($active_theme=="badge")
1462
- {
1463
- //$border_radius="border-radius: 18%;";
1464
- }
1465
- if($active_theme=="cute")
1466
- {
1467
- //$border_radius="border-radius: 38%;";
1468
- }
1469
-
1470
- $custom_icon_urls = unserialize($sfsi_section2_options['sfsi_CustomIcon_links']);
1471
- $url = (isset($custom_icon_urls[$icon_n]) && !empty($custom_icon_urls[$icon_n])) ? $custom_icon_urls[$icon_n]:'';
1472
- $toolClass = "custom_lkn";
1473
- $arrow_class = "";
1474
- $custom_icons_hoverTxt = unserialize($sfsi_section5_options['sfsi_custom_MouseOverTexts']);
1475
- $icons = unserialize($sfsi_section1_options['sfsi_custom_files']);
1476
- $icon = isset($icons[$icon_n])?$icons[$icon_n]:'';
1477
-
1478
- //Giving alternative text to image
1479
- if(!empty($custom_icons_hoverTxt[$icon_n]))
1480
- {
1481
- $alt_text = $custom_icons_hoverTxt[$icon_n];
1482
- }
1483
- else
1484
- {
1485
- $alt_text = "SOCIALICON";
1486
- }
1487
- break;
1488
- }
1489
- $icons="";
1490
- /* apply size of icon */
1491
- if($is_front==0)
1492
- {
1493
- $icons_size = $sfsi_section5_options['sfsi_icons_size'];
1494
- $itemselector = "sfsi_wicons shuffeldiv";
1495
- $innrselector = "inerCnt";
1496
- }
1497
- else
1498
- {
1499
- $icons_size = 51;
1500
- $itemselector = "sfsi_wicons";
1501
- $innrselector = "inerCnt";
1502
- }
1503
-
1504
- /* spacing and no of icons per row */
1505
- $icons_space = '';
1506
- $icons_space = $sfsi_section5_options['sfsi_icons_spacing'];
1507
- $icon_width = (int)$icons_size;
1508
- /* check for mouse hover effect */
1509
- $icon_opacity="1";
1510
-
1511
- if($sfsi_section3_options['sfsi_mouseOver']=='yes')
1512
- {
1513
- $mouse_hover_effect=$sfsi_section3_options["sfsi_mouseOver_effect"];
1514
- if($mouse_hover_effect=="fade_in" || $mouse_hover_effect=="combo")
1515
- {
1516
- $icon_opacity="0.6";
1517
- }
1518
- }
1519
-
1520
- $toolT_cls='';
1521
- if((int) $icon_width <=49 && (int) $icon_width >=30)
1522
- {
1523
- $bt_class="";
1524
- $toolT_cls="sfsiTlleft";
1525
- }
1526
- else if((int) $icon_width <=20)
1527
- {
1528
- $bt_class="sfsiSmBtn";
1529
- $toolT_cls="sfsiTlleft";
1530
- }
1531
- else
1532
- {
1533
- $bt_class="";
1534
- $toolT_cls="sfsiTlleft";
1535
- }
1536
-
1537
- if($toolClass=="rss_tool_bdr" || $toolClass=='email_tool_bdr' || $toolClass=="custom_lkn" || $toolClass=="instagram_tool_bdr" )
1538
- {
1539
- $new_window = sfsi_checkNewWindow();
1540
- $url = $url;
1541
- }
1542
- else if($hoverSHow)
1543
- {
1544
- if(!wp_is_mobile())
1545
- {
1546
- $new_window = sfsi_checkNewWindow();
1547
- $url = $url;
1548
- }
1549
- else
1550
- {
1551
- $new_window = '';
1552
- $url = "javascript:void(0)";
1553
- }
1554
- }
1555
- else
1556
- {
1557
- $new_window = sfsi_checkNewWindow();
1558
- $url = $url;
1559
- }
1560
-
1561
- if(isset($sfsi_onclick)){
1562
- $new_window ="";
1563
- }
1564
-
1565
- if(!isset($sfsi_new_icons)){
1566
- $sfsi_new_icons =false;
1567
- }
1568
- if($sfsi_new_icons){
1569
- $margin_bot="4px;";
1570
- }else{
1571
- $margin_bot="5px;";
1572
- }
1573
- if($sfsi_section4_options['sfsi_display_counts']=="yes")
1574
- {
1575
- if($sfsi_new_icons){
1576
- $margin_bot = "29px;";
1577
- }else{
1578
- $margin_bot = "30px;";
1579
- }
1580
- }
1581
- if(isset($icon) && !empty($icon) && filter_var($icon, FILTER_VALIDATE_URL))
1582
- {
1583
- $icons.= "<div style='width:".$icon_width."px; height:".$icon_width."px;margin-left:".$icons_space."px;margin-bottom:".$margin_bot." ".($sfsi_new_icons?'padding:0px':'')."' class='".$itemselector." ".$cmcls."' >";
1584
-
1585
- $icons.= "<div class='".$innrselector."'>";
1586
-
1587
- $icons.= "<a class='".$class." sficn' data-effect='".$mouse_hover_effect."' $new_window href='".$url."' ".(('vk'!==$icon_name)?"id='sfsiid_".$icon_name."'":'')." style='opacity:".$icon_opacity."' ".(isset($sfsi_onclick)?'onclick="'.$sfsi_onclick.'"':'')." >";
1588
- $icons.= "<img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$icon."' width='".$icons_size."' height='".$icons_size."' style='".$border_radius.$padding_top."' class='sfcm sfsi_wicon ".(in_array($icon_name,array('telegram','wechat'))?('sfsi_'.$icon_name.'_wicon sfsi_click_wicon'):(''))."' data-effect='".$mouse_hover_effect."' />";
1589
- $icons.= '</a>';
1590
- if(isset($counts) && $counts!='')
1591
- {
1592
- $icons.= '<span class="bot_no '.$bt_class.'">'.$counts.'</span>';
1593
- }
1594
- if($hoverSHow && !empty($hoverdiv))
1595
- {
1596
- $icons.= '<div class="sfsi_tool_tip_2 '.$toolClass.' '.$toolT_cls.'" style="width:'.$width.'px ;opacity:0;z-index:-1;margin-left:-'.$twt_margin.'px;" id="sfsiid_'.$icon_name.'">';
1597
- $icons.= '<span class="bot_arow '.$arrow_class.'"></span>';
1598
- $icons.= '<div class="sfsi_inside">'.$hoverdiv."</div>";
1599
- $icons.= "</div>";
1600
- }
1601
- $icons.="</div>";
1602
- $icons.="</div>";
1603
- }
1604
- return $icons;
1605
- }
1606
-
1607
- /* make url for new window */
1608
- function sfsi_checkNewWindow()
1609
- {
1610
- global $wpdb;
1611
- $sfsi_section5_options= unserialize(get_option('sfsi_section5_options',false));
1612
- if($sfsi_section5_options['sfsi_icons_ClickPageOpen']=="yes")
1613
- {
1614
- return $new_window="target='_blank'";
1615
- }
1616
- else
1617
- {
1618
- return '';
1619
- }
1620
- }
 
 
 
1621
  ?>
1
+ <?php
2
+ /* create SFSI widget */
3
+ class Sfsi_Widget extends WP_Widget
4
+ {
5
+
6
+ function __construct()
7
+ {
8
+ $widget_ops = array( 'classname' => 'sfsi', 'description' => __('Ultimate Social Media Icons widgets', 'Ultimate Social Media Icons ') );
9
+ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-widget' );
10
+
11
+ parent::__construct(
12
+ // Base ID of your widget
13
+ 'sfsi-widget',
14
+
15
+ // Widget name will appear in UI
16
+ __('Ultimate Social Media Icons', 'Ultimate Social Media Icons'),
17
+
18
+ // Widget description
19
+ $widget_ops,
20
+
21
+ $control_ops
22
+ );
23
+ }
24
+
25
+ function widget( $args, $instance )
26
+ {
27
+ extract( $args );
28
+ /*Our variables from the widget settings. */
29
+ $title = isset( $instance['title'] ) ? apply_filters('widget_title', $instance['title'] ) : '';
30
+ // var_dump($title,'ldfjgkdfj');
31
+ $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false;
32
+
33
+ global $is_floter;
34
+ echo $before_widget;
35
+
36
+ /* Display the widget title */
37
+ if ( $title ) echo $before_title . $title . $after_title;
38
+ ?>
39
+ <div class="sfsi_widget" data-position="widget">
40
+ <div id='sfsi_wDiv'></div>
41
+ <?php
42
+ /* Link the main icons function */
43
+ echo sfsi_check_visiblity(0);
44
+ ?>
45
+ <div style="clear: both;"></div>
46
+ </div>
47
+ <?php
48
+ if ( is_active_widget( false, false, $this->id_base, true ) ) { }
49
+ echo $after_widget;
50
+ }
51
+
52
+ /*Update the widget */
53
+ function update( $new_instance, $old_instance )
54
+ {
55
+ $instance = $old_instance;
56
+ //Strip tags from title and name to remove HTML
57
+ if($new_instance['showf']==0)
58
+ {
59
+ $instance['showf']=1;
60
+ }
61
+ else
62
+ {
63
+ $instance['showf']=0;
64
+ }
65
+ $instance['title'] = strip_tags( $new_instance['title'] );
66
+ return $instance;
67
+ }
68
+
69
+ /* Set up some default widget settings. */
70
+ function form( $instance )
71
+ {
72
+ $defaults = array( 'title' =>"" );
73
+ $instance = wp_parse_args( (array) $instance, $defaults );
74
+ if(isset($instance['showf']) && !empty($instance['showf']))
75
+ {
76
+ if( $instance['showf'] == 0 && empty($instance['title']))
77
+ {
78
+ $instance['title']='Please follow & like us :)';
79
+ }
80
+ else
81
+ {
82
+ $instance['title'];
83
+ }
84
+ }
85
+ else
86
+ {
87
+ $instance['title']='Please follow & like us :)';
88
+ }
89
+ ?>
90
+ <p>
91
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title</label>
92
+ <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%;" />
93
+ <input type="hidden" value="<?php echo $instance['showf'] ?>" id="<?php echo $this->get_field_id( 'showf' ); ?>" name="<?php echo $this->get_field_name( 'showf' ); ?>" />
94
+ </p>
95
+ <p>
96
+ Please go to the <a href="admin.php?page=sfsi-options">plugin page</a> to set your preferences
97
+ </p>
98
+ <?php
99
+ }
100
+ }
101
+ /* END OF widget Class */
102
+ /* register widget to wordpress */
103
+ function register_sfsi_widgets()
104
+ {
105
+ register_widget( 'sfsi_widget' );
106
+ }
107
+ add_action( 'widgets_init', 'register_sfsi_widgets' );
108
+
109
+ /* check the icons visiblity */
110
+ function sfsi_check_visiblity($isFloter=0)
111
+ {
112
+ global $wpdb;
113
+ /* Access the saved settings in database */
114
+ $sfsi_section1_options = unserialize(get_option('sfsi_section1_options',false));
115
+ $sfsi_section3 = unserialize(get_option('sfsi_section3_options',false));
116
+ $sfsi_section5 = unserialize(get_option('sfsi_section5_options',false));
117
+ $sfsi_section9 = unserialize(get_option('sfsi_section9_options',false));
118
+
119
+ /* calculate the width and icons display alignments */
120
+ $icons_space = $sfsi_section5['sfsi_icons_spacing'];
121
+ $icons_size = $sfsi_section5['sfsi_icons_size'];
122
+ $icons_per_row = ($sfsi_section5['sfsi_icons_perRow'])? $sfsi_section5['sfsi_icons_perRow'] : '';
123
+
124
+ $icons_alignment = $sfsi_section5['sfsi_icons_Alignment'];
125
+ $position = 'position:absolute;';
126
+ $position1 = 'position:absolute;';
127
+ $jquery ='<script>';
128
+
129
+ $jquery .= 'jQuery(".sfsi_widget").each(function( index ) {
130
+ if(jQuery(this).attr("data-position") == "widget")
131
+ {
132
+ var wdgt_hght = jQuery(this).children(".norm_row.sfsi_wDiv").height();
133
+ var title_hght = jQuery(this).parent(".widget.sfsi").children(".widget-title").height();
134
+ var totl_hght = parseInt( title_hght ) + parseInt( wdgt_hght );
135
+ jQuery(this).parent(".widget.sfsi").css("min-height", totl_hght+"px");
136
+ }
137
+ });';
138
+
139
+ /* check if icons shuffling is activated in admin or not */
140
+ if($sfsi_section5['sfsi_icons_stick']=="yes")
141
+ {
142
+ if(is_admin_bar_showing())
143
+ {
144
+ $Ictop = "30px";
145
+ }
146
+ else
147
+ {
148
+ $Ictop = "0";
149
+ }
150
+
151
+ $jquery.='var s = jQuery(".sfsi_widget");
152
+ var pos = s.position();
153
+ jQuery(window).scroll(function(){
154
+ sfsi_stick_widget("'.$Ictop.'");
155
+ }); ';
156
+ }
157
+
158
+ /* check if icons floating is activated in admin */
159
+ if($sfsi_section9['sfsi_icons_float']=="yes")
160
+ {
161
+ $top = "15";
162
+ switch($sfsi_section9['sfsi_icons_floatPosition'])
163
+ {
164
+ case "top-left" : if(is_admin_bar_showing()) : $position.="position:absolute;left:30px;top:35px;"; $top="35"; else : $position.="position:absolute;left:10px;top:2%"; $top="10"; endif;
165
+ break;
166
+ case "top-right" : if(is_admin_bar_showing()) : $position.="position:absolute;right:30px;top:35px;"; $top="35"; else : $position.="position:absolute;right:10px;top:2%"; $top="10"; endif;
167
+ break;
168
+ case "center-right" : $position.="position:absolute;right:30px;top:50%"; $top="center";
169
+ break;
170
+ case "center-left" : $position.="position:absolute;left:30px;top:50%"; $top="center";
171
+ break;
172
+ case "center-top" :
173
+ if(is_admin_bar_showing())
174
+ {
175
+ $position .= "left:50%;top:35px;"; $top="35";
176
+ }
177
+ else
178
+ {
179
+ $position .= "left:50%;top:10px;"; $top="10";
180
+ }
181
+ break;
182
+ case "center-bottom" :
183
+ $position .= "left:50%;bottom:0px"; $top="bottom";
184
+ break;
185
+
186
+ case "bottom-right" : $position.="position:absolute;right:30px;bottom:0px"; $top="bottom";
187
+ break;
188
+ case "bottom-left" : $position.="position:absolute;left:30px;bottom:0px"; $top="bottom";
189
+ break;
190
+ }
191
+ //$jquery.="jQuery( document ).ready(function( $ ) { sfsi_float_widget('".$top."')});";
192
+ if($sfsi_section9['sfsi_icons_floatPosition'] == 'center-right' || $sfsi_section9['sfsi_icons_floatPosition'] == 'center-left')
193
+ {
194
+ $jquery.="jQuery( document ).ready(function( $ )
195
+ {
196
+ var topalign = ( jQuery(window).height() - jQuery('#sfsi_floater').height() ) / 2;
197
+ jQuery('#sfsi_floater').css('top',topalign);
198
+ sfsi_float_widget('".$top."');
199
+ });";
200
+ }
201
+ else if($sfsi_section9['sfsi_icons_floatPosition'] == 'center-top' || $sfsi_section9['sfsi_icons_floatPosition'] == 'center-bottom'){
202
+
203
+ $jquery.="jQuery(document).ready(function( $ )
204
+ {
205
+ var leftalign = ( jQuery(window).width() - jQuery('#sfsi_floater').width() ) / 2;
206
+ jQuery('#sfsi_floater').css('left',leftalign);
207
+ sfsi_float_widget('".$top."');
208
+ });";
209
+ }
210
+ else
211
+ {
212
+ $jquery.="jQuery( document ).ready(function( $ ) { sfsi_float_widget('".$top."')});";
213
+ }
214
+ }
215
+
216
+ $extra=0;
217
+ if($sfsi_section3['sfsi_shuffle_icons']=="yes")
218
+ {
219
+ if($sfsi_section3['sfsi_shuffle_Firstload']=="yes" && $sfsi_section3['sfsi_shuffle_interval']=="yes")
220
+ {
221
+ $shuffle_time=(isset($sfsi_section3['sfsi_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_shuffle_intervalTime'] : 3;
222
+ $shuffle_time=$shuffle_time*1000;
223
+ $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
224
+ }
225
+ else if($sfsi_section3['sfsi_shuffle_Firstload']=="no" && $sfsi_section3['sfsi_shuffle_interval']=="yes")
226
+ {
227
+ $shuffle_time=(isset($sfsi_section3['sfsi_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_shuffle_intervalTime'] : 3;
228
+ $shuffle_time=$shuffle_time*1000;
229
+ $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},".$shuffle_time."); });";
230
+ }
231
+ else
232
+ {
233
+ $jquery.="jQuery( document ).ready(function( $ ) { jQuery('.sfsi_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
234
+ }
235
+ }
236
+
237
+ /* magnage the icons in saved order in admin */
238
+ $custom_icons_order = unserialize($sfsi_section5['sfsi_CustomIcons_order']);
239
+ $icons = unserialize($sfsi_section1_options['sfsi_custom_files']);
240
+ if(!isset($sfsi_section5['sfsi_telegramIcon_order'])){
241
+ $sfsi_section5['sfsi_telegramIcon_order'] = '11';
242
+ }
243
+ if(!isset($sfsi_section5['sfsi_vkIcon_order'])){
244
+ $sfsi_section5['sfsi_vkIcon_order'] = '12';
245
+ }
246
+ if(!isset($sfsi_section5['sfsi_okIcon_order'])){
247
+ $sfsi_section5['sfsi_okIcon_order'] = '13';
248
+ }
249
+ if(!isset($sfsi_section5['sfsi_weiboIcon_order'])){
250
+ $sfsi_section5['sfsi_weiboIcon_order'] = '14';
251
+ }
252
+ if(!isset($sfsi_section5['sfsi_wechatIcon_order'])){
253
+ $sfsi_section5['sfsi_wechatIcon_order'] = '15';
254
+ }
255
+ $icons_order = array(
256
+ '0' => '',
257
+ $sfsi_section5['sfsi_rssIcon_order']=>'rss',
258
+ $sfsi_section5['sfsi_emailIcon_order']=>'email',
259
+ $sfsi_section5['sfsi_facebookIcon_order']=>'facebook',
260
+ $sfsi_section5['sfsi_twitterIcon_order']=>'twitter',
261
+ $sfsi_section5['sfsi_youtubeIcon_order']=>'youtube',
262
+ $sfsi_section5['sfsi_pinterestIcon_order']=>'pinterest',
263
+ $sfsi_section5['sfsi_linkedinIcon_order']=>'linkedin',
264
+ $sfsi_section5['sfsi_instagramIcon_order']=>'instagram',
265
+ $sfsi_section5['sfsi_telegramIcon_order']=>'telegram',
266
+ $sfsi_section5['sfsi_vkIcon_order']=>'vk',
267
+ $sfsi_section5['sfsi_okIcon_order']=>'ok',
268
+ $sfsi_section5['sfsi_weiboIcon_order']=>'weibo',
269
+ $sfsi_section5['sfsi_wechatIcon_order']=>'wechat',
270
+ ) ;
271
+ if(is_array($custom_icons_order) )
272
+ {
273
+ foreach($custom_icons_order as $data)
274
+ {
275
+ $icons_order[$data['order']] = $data;
276
+ }
277
+ }
278
+ ksort($icons_order);
279
+
280
+ /* calculate the total width of widget according to icons */
281
+ if(!empty($icons_per_row))
282
+ {
283
+ $width = ((int)$icons_space+(int)$icons_size)*(int)$icons_per_row;
284
+ $main_width = $width = $width+$extra;
285
+ $main_width = $main_width."px";
286
+ }
287
+ else
288
+ {
289
+ $width = ((int)$icons_space+(int)$icons_size);
290
+ $main_width = "35%";
291
+ }
292
+
293
+ /* built the main widget div */
294
+ $icons_main = '<div class="norm_row sfsi_wDiv" style="width:'.$main_width.';text-align:'.$icons_alignment.';'.$position1.'">';
295
+ $icons = "";
296
+ /* loop through icons and bulit the icons with all settings applied in admin */
297
+ foreach($icons_order as $index => $icn) :
298
+ if(is_array($icn)) { $icon_arry=$icn; $icn="custom" ; }
299
+ switch ($icn) :
300
+ case 'rss' : if($sfsi_section1_options['sfsi_rss_display']=='yes') $icons.= sfsi_prepairIcons('rss');
301
+ break;
302
+ case 'email' : if($sfsi_section1_options['sfsi_email_display']=='yes') $icons.= sfsi_prepairIcons('email');
303
+ break;
304
+ case 'facebook' : if($sfsi_section1_options['sfsi_facebook_display']=='yes') $icons.= sfsi_prepairIcons('facebook');
305
+ break;
306
+ case 'twitter' : if($sfsi_section1_options['sfsi_twitter_display']=='yes') $icons.= sfsi_prepairIcons('twitter');
307
+ break;
308
+ case 'youtube' : if($sfsi_section1_options['sfsi_youtube_display']=='yes') $icons.= sfsi_prepairIcons('youtube');
309
+ break;
310
+ case 'pinterest' : if($sfsi_section1_options['sfsi_pinterest_display']=='yes') $icons.= sfsi_prepairIcons('pinterest');
311
+ break;
312
+ case 'linkedin' : if($sfsi_section1_options['sfsi_linkedin_display']=='yes') $icons.= sfsi_prepairIcons('linkedin');
313
+ break;
314
+ case 'instagram' : if($sfsi_section1_options['sfsi_instagram_display']=='yes') $icons.= sfsi_prepairIcons('instagram');
315
+ break;
316
+ case 'telegram' : if($sfsi_section1_options['sfsi_telegram_display']=='yes') $icons.= sfsi_prepairIcons('telegram');
317
+ break;
318
+ case 'vk' : if($sfsi_section1_options['sfsi_vk_display']=='yes') $icons.= sfsi_prepairIcons('vk');
319
+ break;
320
+ case 'ok' : if($sfsi_section1_options['sfsi_ok_display']=='yes') $icons.= sfsi_prepairIcons('ok');
321
+ break;
322
+ case 'weibo' : if($sfsi_section1_options['sfsi_weibo_display']=='yes') $icons.= sfsi_prepairIcons('weibo');
323
+ break;
324
+ case 'wechat' : if($sfsi_section1_options['sfsi_wechat_display']=='yes') $icons.= sfsi_prepairIcons('wechat');
325
+ break;
326
+ case 'custom' : $icons.= sfsi_prepairIcons($icon_arry['ele']);
327
+ break;
328
+ endswitch;
329
+ endforeach;
330
+
331
+ $jquery.="</script>";
332
+ $icons.='</div >';
333
+
334
+ $margin = $width+11;
335
+
336
+ $icons_main.=$icons.'<div id="sfsi_holder" class="sfsi_holders" style="position: relative; float: left;width:100%;z-index:-1;"></div >'.$jquery;
337
+ /* if floating of icons is active create a floater div */
338
+ $icons_float='';
339
+
340
+ if($sfsi_section9['sfsi_icons_float']=="yes" && $isFloter==1)
341
+ {
342
+ if($sfsi_section9['sfsi_icons_floatPosition'] == "top-left")
343
+ {
344
+ $styleMargin = "margin-top:".$sfsi_section9['sfsi_icons_floatMargin_top']."px;margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
345
+ }
346
+ elseif($sfsi_section9['sfsi_icons_floatPosition'] == "top-right")
347
+ {
348
+ $styleMargin = "margin-top:".$sfsi_section9['sfsi_icons_floatMargin_top']."px;margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
349
+ }
350
+ elseif($sfsi_section9['sfsi_icons_floatPosition'] == "center-left")
351
+ {
352
+ $styleMargin = "margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
353
+ }
354
+ elseif($sfsi_section9['sfsi_icons_floatPosition'] == "center-right")
355
+ {
356
+ $styleMargin = "margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
357
+ }
358
+ elseif($sfsi_section9['sfsi_icons_floatPosition'] == "bottom-left")
359
+ {
360
+ $styleMargin = "margin-bottom:".$sfsi_section9['sfsi_icons_floatMargin_bottom']."px;margin-left:".$sfsi_section9['sfsi_icons_floatMargin_left']."px;";
361
+ }
362
+ elseif($sfsi_section9['sfsi_icons_floatPosition'] == "bottom-right")
363
+ {
364
+ $styleMargin = "margin-bottom:".$sfsi_section9['sfsi_icons_floatMargin_bottom']."px;margin-right:".$sfsi_section9['sfsi_icons_floatMargin_right']."px;";
365
+ }
366
+
367
+ $icons_float = isset($styleMargin) && !empty($styleMargin) ? '<style type="text/css">#sfsi_floater { '.$styleMargin.' }</style>' : '';
368
+ $icons_float .= '<div class="norm_row sfsi_wDiv" id="sfsi_floater" style="z-index: 9999;width:'.$width.'px;text-align:'.$icons_alignment.';'.$position.'">';
369
+ $icons_float .= $icons;
370
+ $icons_float .= "<input type='hidden' id='sfsi_floater_sec' value='".$sfsi_section9['sfsi_icons_floatPosition']."' />";
371
+ $icons_float.="</div>".$jquery;
372
+ return $icons_float; exit;
373
+ }
374
+ $icons_data=$icons_main.$icons_float;
375
+ return $icons_data;
376
+ }
377
+
378
+ /* make all icons with saved settings in admin */
379
+ function sfsi_prepairIcons($icon_name,$is_front=0)
380
+ {
381
+ global $wpdb; global $socialObj;
382
+ $mouse_hover_effect = '';
383
+ $active_theme = 'official';
384
+ $sfsi_shuffle_Firstload = 'no';
385
+ $sfsi_display_counts = "no";
386
+ $icon = '';
387
+ $url = '';
388
+ $alt_text = '';
389
+ $new_window = '';
390
+ $class = '';
391
+
392
+ /* access all saved settings in admin */
393
+ $sfsi_section1_options = unserialize(get_option('sfsi_section1_options',false));
394
+ $sfsi_section2_options = unserialize(get_option('sfsi_section2_options',false));
395
+ $sfsi_section3_options = unserialize(get_option('sfsi_section3_options',false));
396
+ $sfsi_section4_options = unserialize(get_option('sfsi_section4_options',false));
397
+ $sfsi_section5_options = unserialize(get_option('sfsi_section5_options',false));
398
+ $sfsi_section6_options = unserialize(get_option('sfsi_section6_options',false));
399
+ $sfsi_section7_options = unserialize(get_option('sfsi_section7_options',false));
400
+ /* get active theme */
401
+ $border_radius='';
402
+ $active_theme = $sfsi_section3_options['sfsi_actvite_theme'];
403
+ if(!isset($sfsi_section2_options['sfsi_wechatShare_option'])){
404
+ $sfsi_section2_options['sfsi_wechatShare_option']="yes";
405
+ }
406
+ /* shuffle effect */
407
+ if($sfsi_section3_options['sfsi_shuffle_icons']=='yes')
408
+ {
409
+ $sfsi_shuffle_Firstload=$sfsi_section3_options["sfsi_shuffle_Firstload"];
410
+ if($sfsi_section3_options["sfsi_shuffle_interval"]=="yes")
411
+ {
412
+ $sfsi_shuffle_interval = $sfsi_section3_options["sfsi_shuffle_intervalTime"];
413
+ }
414
+ }
415
+
416
+ /* define the main url for icon access */
417
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/".$active_theme."/";
418
+ $visit_iconsUrl = SFSI_PLUGURL."images/visit_icons/";
419
+ $hoverSHow = 0;
420
+
421
+ /* check is icon is a custom icon or default icon */
422
+ if(is_numeric($icon_name)) { $icon_n=$icon_name; $icon_name="custom" ; }
423
+ $counts = '';
424
+ $twit_tolCls = "";
425
+ $twt_margin = "";
426
+ $icons_space = $sfsi_section5_options['sfsi_icons_spacing'];
427
+ $padding_top = '';
428
+
429
+ // $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
430
+ // $current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
431
+
432
+ $current_url = sfsi_get_current_page_url();
433
+
434
+ $url = "#";
435
+ $cmcls = '';
436
+ $toolClass = '';
437
+
438
+ $socialObj = new sfsi_SocialHelper(); /* global object to access 3rd party icon's actions */
439
+
440
+ switch($icon_name)
441
+ {
442
+ case "rss" :
443
+
444
+ $url = isset($sfsi_section2_options['sfsi_rss_url']) && !empty($sfsi_section2_options['sfsi_rss_url'])? $sfsi_section2_options['sfsi_rss_url'] : '';
445
+
446
+ $toolClass = "rss_tool_bdr";
447
+ $hoverdiv = '';
448
+ $arrow_class = "bot_rss_arow";
449
+
450
+ /* fecth no of counts if active in admin section */
451
+ if($sfsi_section4_options['sfsi_rss_countsDisplay']=="yes" && $sfsi_section4_options['sfsi_display_counts']=="yes")
452
+ {
453
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_rss_manualCounts']);
454
+ }
455
+
456
+ if(!empty($sfsi_section5_options['sfsi_rss_MouseOverText']))
457
+ {
458
+ $alt_text = $sfsi_section5_options['sfsi_rss_MouseOverText'];
459
+ }
460
+ else
461
+ {
462
+ $alt_text = 'RSS';
463
+ }
464
+
465
+ //Custom Skin Support {Monad}
466
+ if($active_theme == 'custom_support')
467
+ {
468
+ if(get_option("rss_skin"))
469
+ {
470
+ $icon = get_option("rss_skin");
471
+ }
472
+ else
473
+ {
474
+ $active_theme = 'default';
475
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
476
+ $icon=$icons_baseUrl.$active_theme."_rss.png";
477
+ }
478
+ }
479
+ else
480
+ {
481
+ $icon=$icons_baseUrl.$active_theme."_rss.png";
482
+ }
483
+ break;
484
+
485
+ case "email" :
486
+
487
+ $hoverdiv = '';
488
+
489
+ $sfsi_section2_options['sfsi_email_url'];
490
+
491
+ $url = (isset($sfsi_section2_options['sfsi_email_url'])) ? $sfsi_section2_options['sfsi_email_url'] : '';
492
+
493
+ $toolClass = "email_tool_bdr";
494
+ $arrow_class = "bot_eamil_arow";
495
+
496
+ /* fecth no of counts if active in admin section */
497
+ if(
498
+ $sfsi_section4_options['sfsi_email_countsDisplay']=="yes" &&
499
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
500
+ )
501
+ {
502
+ if($sfsi_section4_options['sfsi_email_countsFrom']=="manual")
503
+ {
504
+ $counts=$socialObj->format_num($sfsi_section4_options['sfsi_email_manualCounts']);
505
+ }
506
+ else
507
+ {
508
+ $counts = $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_feed_id',false)));
509
+ }
510
+ }
511
+
512
+ if(!empty($sfsi_section5_options['sfsi_email_MouseOverText']))
513
+ {
514
+ $alt_text = $sfsi_section5_options['sfsi_email_MouseOverText'];
515
+ }
516
+ else
517
+ {
518
+ $alt_text = 'EMAIL';
519
+ }
520
+
521
+ //Custom Skin Support {Monad}
522
+ if($active_theme == 'custom_support')
523
+ {
524
+ if(get_option("email_skin"))
525
+ {
526
+ $icon = get_option("email_skin");
527
+ }
528
+ else
529
+ {
530
+ $active_theme = 'default';
531
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
532
+ //$icon=($sfsi_section2_options['sfsi_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
533
+ if($sfsi_section2_options['sfsi_rss_icons']=="sfsi")
534
+ {
535
+ $icon = $icons_baseUrl.$active_theme."_sf.png";
536
+ }
537
+ elseif($sfsi_section2_options['sfsi_rss_icons']=="email")
538
+ {
539
+ $icon = $icons_baseUrl.$active_theme."_email.png";
540
+ }
541
+ else
542
+ {
543
+ $icon = $icons_baseUrl.$active_theme."_subscribe.png";
544
+ }
545
+ }
546
+ }
547
+ else
548
+ {
549
+
550
+ $rss_icons = isset($sfsi_section2_options['sfsi_rss_icons']) && !empty($sfsi_section2_options['sfsi_rss_icons']) ? $sfsi_section2_options['sfsi_rss_icons'] : false;
551
+
552
+ switch ($rss_icons) {
553
+
554
+ case 'email':
555
+ $image = "_email.png";
556
+ break;
557
+
558
+ case 'subscribe':
559
+ $image = "_subscribe.png";
560
+ break;
561
+
562
+ case 'sfsi':
563
+ $image = "_sf.png";
564
+ break;
565
+
566
+ default:
567
+ $image = "_subscribe.png";
568
+ break;
569
+ }
570
+
571
+ $icon = $icons_baseUrl.$active_theme.$image;
572
+ }
573
+ break;
574
+
575
+ case "facebook" :
576
+
577
+ $width = 62;
578
+ $totwith = $width+28+$icons_space;
579
+ $twt_margin = $totwith/2;
580
+ $toolClass = "fb_tool_bdr";
581
+ $arrow_class = "bot_fb_arow";
582
+
583
+ /* check for the over section */
584
+ if(!empty($sfsi_section5_options['sfsi_facebook_MouseOverText']))
585
+ {
586
+ $alt_text = $sfsi_section5_options['sfsi_facebook_MouseOverText'];
587
+ }
588
+ else
589
+ {
590
+ $alt_text = "FACEBOOK";
591
+ }
592
+
593
+ $visit_icon = $visit_iconsUrl."facebook.png";
594
+
595
+ $url = isset($sfsi_section2_options['sfsi_facebookPage_url']) && !empty($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url'] : false;
596
+
597
+ $url = false != $url ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
598
+
599
+ $like_option = isset($sfsi_section2_options['sfsi_facebookLike_option']) && !empty($sfsi_section2_options['sfsi_facebookLike_option']) ? $sfsi_section2_options['sfsi_facebookLike_option'] : false;
600
+
601
+ $page_option = isset($sfsi_section2_options['sfsi_facebookPage_option']) && !empty($sfsi_section2_options['sfsi_facebookPage_option']) ? $sfsi_section2_options['sfsi_facebookPage_option'] : false;
602
+
603
+ $share_option = isset($sfsi_section2_options['sfsi_facebookShare_option']) && !empty($sfsi_section2_options['sfsi_facebookShare_option']) ? $sfsi_section2_options['sfsi_facebookShare_option'] : false;
604
+
605
+ if((false != $like_option && $like_option=="yes") || (false != $share_option && $share_option=="yes"))
606
+ {
607
+ $url=($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
608
+ $hoverSHow = 1;
609
+ $hoverdiv = '';
610
+
611
+ if(false != $page_option && $page_option=="yes")
612
+ {
613
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
614
+ }
615
+ if(false!= $like_option && $like_option=="yes")
616
+ {
617
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_FBlike($current_url)."</div>";
618
+ }
619
+ if(false!= $share_option && $share_option=="yes")
620
+ {
621
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsiFB_Share($current_url)."</div>";
622
+ }
623
+
624
+ }
625
+
626
+ /* fecth no of counts if active in admin section */
627
+ if(
628
+ $sfsi_section4_options['sfsi_facebook_countsDisplay']=="yes" &&
629
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
630
+ )
631
+ {
632
+ if($sfsi_section4_options['sfsi_facebook_countsFrom']=="manual")
633
+ {
634
+ $counts=$socialObj->format_num($sfsi_section4_options['sfsi_facebook_manualCounts']);
635
+ }
636
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="likes")
637
+ {
638
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
639
+ $counts=$socialObj->format_num($fb_data['like_count']);
640
+ if(empty($counts))
641
+ {
642
+ $counts=(string) "0";
643
+ }
644
+ }
645
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="followers")
646
+ {
647
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
648
+ $counts=$socialObj->format_num($fb_data['share_count']);
649
+
650
+ }
651
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="mypage")
652
+ {
653
+ $current_url = $sfsi_section4_options['sfsi_facebook_mypageCounts'];
654
+ $fb_data=$socialObj->sfsi_get_fb_pagelike($current_url);
655
+ $counts=$socialObj->format_num($fb_data);
656
+ }
657
+ }
658
+
659
+ //Custom Skin Support {Monad}
660
+ if($active_theme == 'custom_support')
661
+ {
662
+ if(get_option("facebook_skin"))
663
+ {
664
+ $icon = get_option("facebook_skin");
665
+ }
666
+ else
667
+ {
668
+ $active_theme = 'default';
669
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
670
+ $icon=$icons_baseUrl.$active_theme."_facebook.png";
671
+ }
672
+ }
673
+ else
674
+ {
675
+ $icon=$icons_baseUrl.$active_theme."_facebook.png";
676
+ }
677
+ break;
678
+ case "twitter" :
679
+ $toolClass = "twt_tool_bdr";
680
+ $arrow_class = "bot_twt_arow";
681
+
682
+ $url = isset($sfsi_section2_options['sfsi_twitter_pageURL']) && !empty($sfsi_section2_options['sfsi_twitter_pageURL']) ? $sfsi_section2_options['sfsi_twitter_pageURL'] : '';
683
+
684
+ $twitter_user = isset($sfsi_section2_options['sfsi_twitter_followUserName']) && !empty($sfsi_section2_options['sfsi_twitter_followUserName']) ? $sfsi_section2_options['sfsi_twitter_followUserName'] : false;
685
+
686
+ $twitter_text = isset($sfsi_section2_options['sfsi_twitter_aboutPageText']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPageText']) ? $sfsi_section2_options['sfsi_twitter_aboutPageText'] : false;
687
+
688
+ $visit_icon = $visit_iconsUrl."twitter.png";
689
+
690
+ $width = 59;
691
+ $totwith = $width+28+$icons_space;
692
+ $twt_margin = $totwith/2;
693
+ /* check for icons to display */
694
+ $hoverdiv='';
695
+
696
+ $follow_me = isset($sfsi_section2_options['sfsi_twitter_followme']) && !empty($sfsi_section2_options['sfsi_twitter_followme']) ? $sfsi_section2_options['sfsi_twitter_followme'] : false;
697
+
698
+ $about_page = isset($sfsi_section2_options['sfsi_twitter_aboutPage']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPage']) ? $sfsi_section2_options['sfsi_twitter_aboutPage'] : false;
699
+
700
+ if($follow_me=="yes" ||$about_page=="yes")
701
+ {
702
+ $hoverSHow=1;
703
+ //Visit twitter page {Monad}
704
+ if(isset($sfsi_section2_options['sfsi_twitter_page']) && !empty($sfsi_section2_options['sfsi_twitter_page']) && $sfsi_section2_options['sfsi_twitter_page']=="yes")
705
+ {
706
+ $hoverdiv.="<div class='cstmicon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='Visit Us' title='Visit Us' src='".$visit_icon."' /></a></div>";
707
+ }
708
+ if($follow_me=="yes" && !empty($twitter_user))
709
+ {
710
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_twitterFollow($twitter_user)."</div>";
711
+ }
712
+ if($about_page=="yes")
713
+ {
714
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_twitterShare($current_url,$twitter_text)."</div>";
715
+ }
716
+
717
+ }
718
+
719
+ /* fecth no of counts if active in admin section */
720
+ if(
721
+ $sfsi_section4_options['sfsi_twitter_countsDisplay']=="yes" &&
722
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
723
+ )
724
+ {
725
+ if($sfsi_section4_options['sfsi_twitter_countsFrom']=="manual")
726
+ {
727
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_twitter_manualCounts']);
728
+ }
729
+ else if($sfsi_section4_options['sfsi_twitter_countsFrom']=="source")
730
+ {
731
+ $tw_settings = array('tw_consumer_key'=>$sfsi_section4_options['tw_consumer_key'],
732
+ 'tw_consumer_secret'=> $sfsi_section4_options['tw_consumer_secret'],
733
+ 'tw_oauth_access_token'=> $sfsi_section4_options['tw_oauth_access_token'],
734
+ 'tw_oauth_access_token_secret'=> $sfsi_section4_options['tw_oauth_access_token_secret']);
735
+
736
+ $followers = $socialObj->sfsi_get_tweets($twitter_user,$tw_settings);
737
+ $counts = $socialObj->format_num($followers);
738
+ if(empty($counts))
739
+ {
740
+ $counts=(string) "0";
741
+ }
742
+ }
743
+ }
744
+
745
+ //Giving alternative text to image
746
+ if(!empty($sfsi_section5_options['sfsi_twitter_MouseOverText']))
747
+ {
748
+ $alt_text = $sfsi_section5_options['sfsi_twitter_MouseOverText'];
749
+ }
750
+ else
751
+ {
752
+ $alt_text = "TWITTER";
753
+ }
754
+
755
+ //Custom Skin Support {Monad}
756
+ if($active_theme == 'custom_support')
757
+ {
758
+ if(get_option("twitter_skin"))
759
+ {
760
+ $icon = get_option("twitter_skin");
761
+ }
762
+ else
763
+ {
764
+ $active_theme = 'default';
765
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
766
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
767
+ }
768
+ }
769
+ else
770
+ {
771
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
772
+ }
773
+ break;
774
+
775
+ case "youtube" :
776
+ $toolClass = "utube_tool_bdr";
777
+ $arrow_class = "bot_utube_arow";
778
+ $width = 96;
779
+ $totwith = $width+28+$icons_space;
780
+ $twt_margin = $totwith/2;
781
+ $youtube_user = (isset($sfsi_section4_options['sfsi_youtube_user']) && !empty($sfsi_section4_options['sfsi_youtube_user'])) ? $sfsi_section4_options['sfsi_youtube_user'] : 'SpecificFeeds';
782
+ $visit_icon = $visit_iconsUrl."youtube.png";
783
+
784
+ $url = isset($sfsi_section2_options['sfsi_youtube_pageUrl']) && !empty($sfsi_section2_options['sfsi_youtube_pageUrl']) ? $sfsi_section2_options['sfsi_youtube_pageUrl'] : '';
785
+
786
+ //Giving alternative text to image
787
+ if(!empty($sfsi_section5_options['sfsi_youtube_MouseOverText']))
788
+ {
789
+ $alt_text = $sfsi_section5_options['sfsi_youtube_MouseOverText'];
790
+ }
791
+ else
792
+ {
793
+ $alt_text = "YOUTUBE";
794
+ }
795
+
796
+ /* check for icons to display */
797
+ $hoverdiv="";
798
+
799
+ $follow = isset($sfsi_section2_options['sfsi_youtube_follow']) && !empty($sfsi_section2_options['sfsi_youtube_follow']) ? $sfsi_section2_options['sfsi_youtube_follow'] : false;
800
+
801
+ $ypage = isset($sfsi_section2_options['sfsi_youtube_page']) && !empty($sfsi_section2_options['sfsi_youtube_page']) ? $sfsi_section2_options['sfsi_youtube_page'] : false;
802
+
803
+ if(false != $follow && $follow=="yes")
804
+ {
805
+ $hoverSHow = 1;
806
+
807
+ if($ypage =="yes")
808
+ {
809
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
810
+ }
811
+ if($follow =="yes")
812
+ {
813
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_YouTubeSub($youtube_user)."</div>";
814
+ }
815
+ }
816
+
817
+ /* fecth no of counts if active in admin section */
818
+ if(
819
+ $sfsi_section4_options['sfsi_youtube_countsDisplay']=="yes" &&
820
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
821
+ )
822
+ {
823
+ if($sfsi_section4_options['sfsi_youtube_countsFrom']=="manual")
824
+ {
825
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_youtube_manualCounts']);
826
+ }
827
+ else if($sfsi_section4_options['sfsi_youtube_countsFrom']=="subscriber")
828
+ {
829
+ $followers = $socialObj->sfsi_get_youtube($youtube_user);
830
+ $counts = $socialObj->format_num($followers);
831
+ if(empty($counts))
832
+ {
833
+ $counts = (string) "0";
834
+ }
835
+ }
836
+ }
837
+
838
+ //Custom Skin Support {Monad}
839
+ if($active_theme == 'custom_support')
840
+ {
841
+ if(get_option("youtube_skin"))
842
+ {
843
+ $icon = get_option("youtube_skin");
844
+ }
845
+ else
846
+ {
847
+ $active_theme = 'default';
848
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
849
+ $icon=$icons_baseUrl.$active_theme."_youtube.png";
850
+ }
851
+ }
852
+ else
853
+ {
854
+ $icon=$icons_baseUrl.$active_theme."_youtube.png";
855
+ }
856
+ break;
857
+
858
+ case "pinterest" :
859
+
860
+ $width = 73;
861
+ $totwith = $width+28+$icons_space;
862
+ $twt_margin = $totwith/2;
863
+ $toolClass = "printst_tool_bdr";
864
+ $arrow_class = "bot_pintst_arow";
865
+
866
+ $pinterest_user = (isset($sfsi_section4_options['sfsi_pinterest_user']))
867
+ ? $sfsi_section4_options['sfsi_pinterest_user'] : '';
868
+ $pinterest_board = (isset($sfsi_section4_options['sfsi_pinterest_board']))
869
+ ? $sfsi_section4_options['sfsi_pinterest_board'] : '';
870
+
871
+ $visit_icon = $visit_iconsUrl."pinterest.png";
872
+ $url = (isset($sfsi_section2_options['sfsi_pinterest_pageUrl'])) ? $sfsi_section2_options['sfsi_pinterest_pageUrl'] : '';
873
+
874
+ //Giving alternative text to image
875
+ if(isset($sfsi_section5_options['sfsi_pinterest_MouseOverText']) && !empty($sfsi_section5_options['sfsi_pinterest_MouseOverText']))
876
+ {
877
+ $alt_text = $sfsi_section5_options['sfsi_pinterest_MouseOverText'];
878
+ }
879
+ else
880
+ {
881
+ $alt_text = "PINTEREST";
882
+ }
883
+
884
+ /* check for icons to display */
885
+ $hoverdiv="";
886
+
887
+ $pingblog = isset($sfsi_section2_options['sfsi_pinterest_pingBlog']) && !empty($sfsi_section2_options['sfsi_pinterest_pingBlog']) ? $sfsi_section2_options['sfsi_pinterest_pingBlog'] : false;
888
+
889
+ $page = isset($sfsi_section2_options['sfsi_pinterest_page']) && !empty($sfsi_section2_options['sfsi_pinterest_page']) ? $sfsi_section2_options['sfsi_pinterest_page'] : false;
890
+
891
+ $cDisplay = isset($sfsi_section4_options['sfsi_pinterest_countsDisplay']) && !empty($sfsi_section4_options['sfsi_pinterest_countsDisplay']) ? $sfsi_section4_options['sfsi_pinterest_countsDisplay'] : false;
892
+
893
+ $displayC = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
894
+
895
+ $cFrom = isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && !empty($sfsi_section4_options['sfsi_pinterest_countsFrom']) ? $sfsi_section4_options['sfsi_pinterest_countsFrom'] : false;
896
+ // var_dump($sfsi_section4_options['sfsi_pinterest_countsFrom'],$cFrom);die();
897
+
898
+ if($pingblog=="yes" )
899
+ {
900
+ $hoverSHow = 1;
901
+
902
+ if($page =="yes")
903
+ {
904
+ $hoverdiv.="<div class='icon1'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
905
+ }
906
+ if($pingblog=="yes")
907
+ {
908
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_PinIt($current_url)."</div>";
909
+ }
910
+ }
911
+
912
+ /* fecth no of counts if active in admin section */
913
+ if($cDisplay == "yes" && $displayC=="yes")
914
+ {
915
+ if($cFrom=="manual")
916
+ {
917
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_pinterest_manualCounts']);
918
+ }
919
+ else if($cFrom=="pins")
920
+ {
921
+ $pins = $socialObj->sfsi_get_pinterest($current_url);
922
+ $counts = $pins;
923
+ if(empty($counts))
924
+ {
925
+ $counts=(string) "0";
926
+ }
927
+ }
928
+ }
929
+
930
+ //Custom Skin Support {Monad}
931
+ if($active_theme == 'custom_support')
932
+ {
933
+ if(get_option("pintrest_skin"))
934
+ {
935
+ $icon = get_option("pintrest_skin");
936
+ }
937
+ else
938
+ {
939
+ $active_theme = 'default';
940
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
941
+ $icon = $icons_baseUrl.$active_theme."_pinterest.png";
942
+ }
943
+ }
944
+ else
945
+ {
946
+ $icon=$icons_baseUrl.$active_theme."_pinterest.png";
947
+ }
948
+ break;
949
+
950
+ case "instagram" :
951
+ $toolClass = "instagram_tool_bdr";
952
+ $arrow_class = "bot_pintst_arow";
953
+
954
+ $url = (isset($sfsi_section2_options['sfsi_instagram_pageUrl'])) ? $sfsi_section2_options['sfsi_instagram_pageUrl'] : '';
955
+
956
+ $instagram_user_name = isset($sfsi_section4_options['sfsi_instagram_User']) && !empty($sfsi_section4_options['sfsi_instagram_User']) ? $sfsi_section4_options['sfsi_instagram_User'] : false;
957
+
958
+ //Giving alternative text to image
959
+ if(isset($sfsi_section5_options['sfsi_instagram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_instagram_MouseOverText']))
960
+ {
961
+ $alt_text = $sfsi_section5_options['sfsi_instagram_MouseOverText'];
962
+ }
963
+ else
964
+ {
965
+ $alt_text = "INSTAGRAM";
966
+ }
967
+
968
+ $hoverdiv="";
969
+
970
+ $cDisplay = isset($sfsi_section4_options['sfsi_instagram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_instagram_countsDisplay']) ? $sfsi_section4_options['sfsi_instagram_countsDisplay']: false;
971
+
972
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
973
+
974
+ $cFrom = isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && !empty($sfsi_section4_options['sfsi_instagram_countsFrom']) ? $sfsi_section4_options['sfsi_instagram_countsFrom']: false;
975
+
976
+ /* fecth no of counts if active in admin section */
977
+ if($cDisplay=="yes" && $Displayc=="yes")
978
+ {
979
+ if($cFrom=="manual")
980
+ {
981
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_instagram_manualCounts']);
982
+ }
983
+ else if($cFrom=="followers")
984
+ {
985
+ $counts = $socialObj->sfsi_get_instagramFollowers($instagram_user_name);
986
+ if(empty($counts))
987
+ {
988
+ $counts=(string) "0";
989
+ }
990
+ }
991
+ }
992
+
993
+ //Custom Skin Support {Monad}
994
+ if($active_theme == 'custom_support')
995
+ {
996
+ if(get_option("instagram_skin"))
997
+ {
998
+ $icon = get_option("instagram_skin");
999
+ }
1000
+ else
1001
+ {
1002
+ $active_theme = 'default';
1003
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1004
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1005
+ }
1006
+ }
1007
+ else
1008
+ {
1009
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1010
+ }
1011
+ break;
1012
+
1013
+ case "telegram" :
1014
+ $toolClass = "telegram_tool_bdr";
1015
+ $arrow_class = "bot_pintst_arow";
1016
+ $hoverdiv = '';
1017
+
1018
+ // $url = (isset($sfsi_section4_options['sfsi_telegram_pageURL'])) ? $sfsi_section4_options['sfsi_telegram_pageURL'] : '';
1019
+
1020
+ // $telegram_user_name = isset($sfsi_section4_options['sfsi_telegram_User']) && !empty($sfsi_section4_options['sfsi_telegram_User']) ? $sfsi_section4_options['sfsi_telegram_User'] : false;
1021
+
1022
+ //Giving alternative text to image
1023
+ if(isset($sfsi_section5_options['sfsi_telegram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_telegram_MouseOverText']))
1024
+ {
1025
+ $alt_text = $sfsi_section5_options['sfsi_telegram_MouseOverText'];
1026
+
1027
+ }
1028
+ else
1029
+ {
1030
+ $alt_text = "telegram";
1031
+ }
1032
+ $messageus_icon = $visit_iconsUrl.$icon_name."_message.svg";
1033
+ $hoverdiv="";
1034
+ $cDisplay = isset($sfsi_section4_options['sfsi_telegram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_telegram_countsDisplay']) ? $sfsi_section4_options['sfsi_telegram_countsDisplay']: false;
1035
+
1036
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1037
+ /* fecth no of counts if active in admin section */
1038
+ if($cDisplay=="yes" && $Displayc=="yes")
1039
+ {
1040
+
1041
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_telegram_manualCounts']);
1042
+ }
1043
+
1044
+ //Custom Skin Support {Monad}
1045
+ if($active_theme == 'custom_support')
1046
+ {
1047
+ if(get_option("telegram_skin"))
1048
+ {
1049
+ $icon = get_option("telegram_skin");
1050
+ }
1051
+ else
1052
+ {
1053
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1054
+ $icon=$icons_baseUrl."default_telegram.png";
1055
+ }
1056
+ }
1057
+ else
1058
+ {
1059
+ $icon=$icons_baseUrl.$active_theme."_telegram.png";
1060
+ }
1061
+ if(
1062
+ isset($sfsi_section2_options['sfsi_telegram_message']) && !empty($sfsi_section2_options['sfsi_telegram_message'])
1063
+ &&
1064
+ isset($sfsi_section2_options['sfsi_telegram_username']) && !empty($sfsi_section2_options['sfsi_telegram_username'])
1065
+
1066
+ ){
1067
+ $tg_username = $sfsi_section2_options['sfsi_telegram_username'];
1068
+ $tg_msg = stripslashes($sfsi_section2_options['sfsi_telegram_message']);
1069
+ $tg_msg = str_replace('"', '', str_replace("'", '', $tg_msg));
1070
+ $tg_msg = html_entity_decode(strip_tags($tg_msg), ENT_QUOTES,'UTF-8');
1071
+ $tg_msg = str_replace("%26%238230%3B", "...", $tg_msg);
1072
+ $tg_msg = rawurlencode($tg_msg);
1073
+
1074
+ $tele_url = "https://t.me/".$tg_username;
1075
+ $url = $tele_url."?&text=".urlencode($tg_msg);
1076
+ // var_dump($url);
1077
+ // die();
1078
+ // file_get_contents($url);
1079
+ }else{
1080
+ $url="#";
1081
+ $sfsi_onclick="event.preventDefault();";
1082
+ }
1083
+ if($active_theme=="glossy"){
1084
+ $sfsi_new_icons = "yes";
1085
+ }
1086
+ break;
1087
+ case "vk" :
1088
+ $toolClass = "vk_tool_bdr";
1089
+ $arrow_class = "bot_pintst_arow";
1090
+
1091
+ $url = (isset($sfsi_section2_options['sfsi_vk_pageURL'])) ? $sfsi_section2_options['sfsi_vk_pageURL'] : '';
1092
+
1093
+ // $vk_user_name = isset($sfsi_section4_options['sfsi_vk_User']) && !empty($sfsi_section4_options['sfsi_vk_User']) ? $sfsi_section4_options['sfsi_vk_User'] : false;
1094
+
1095
+ //Giving alternative text to image
1096
+ if(isset($sfsi_section5_options['sfsi_vk_MouseOverText']) && !empty($sfsi_section5_options['sfsi_vk_MouseOverText']))
1097
+ {
1098
+ $alt_text = $sfsi_section5_options['sfsi_vk_MouseOverText'];
1099
+ }
1100
+ else
1101
+ {
1102
+ $alt_text = "vk";
1103
+ }
1104
+
1105
+ $hoverdiv="";
1106
+
1107
+ $cDisplay = isset($sfsi_section4_options['sfsi_vk_countsDisplay']) && !empty($sfsi_section4_options['sfsi_vk_countsDisplay']) ? $sfsi_section4_options['sfsi_vk_countsDisplay']: false;
1108
+
1109
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1110
+
1111
+ /* fecth no of counts if active in admin section */
1112
+ if($cDisplay=="yes" && $Displayc=="yes")
1113
+ {
1114
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_vk_manualCounts']);
1115
+ }
1116
+
1117
+ //Custom Skin Support {Monad}
1118
+ if($active_theme == 'custom_support')
1119
+ {
1120
+ if(get_option("vk_skin"))
1121
+ {
1122
+ $icon = get_option("vk_skin");
1123
+ }
1124
+ else
1125
+ {
1126
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1127
+ $icon=$icons_baseUrl."default_vk.png";
1128
+ }
1129
+ }
1130
+ else
1131
+ {
1132
+ $icon=$icons_baseUrl.$active_theme."_vk.png";
1133
+ }
1134
+ if($active_theme=="glossy"){
1135
+ $sfsi_new_icons = "yes";
1136
+ }
1137
+
1138
+ break;
1139
+ case "ok" :
1140
+ $toolClass = "ok_tool_bdr";
1141
+ $arrow_class = "bot_pintst_arow";
1142
+
1143
+ $url = (isset($sfsi_section2_options['sfsi_ok_pageURL'])) ? $sfsi_section2_options['sfsi_ok_pageURL'] : '';
1144
+
1145
+ // $ok_user_name = isset($sfsi_section4_options['sfsi_ok_User']) && !empty($sfsi_section4_options['sfsi_ok_User']) ? $sfsi_section4_options['sfsi_ok_User'] : false;
1146
+
1147
+ //Giving alternative text to image
1148
+ if(isset($sfsi_section5_options['sfsi_ok_MouseOverText']) && !empty($sfsi_section5_options['sfsi_ok_MouseOverText']))
1149
+ {
1150
+ $alt_text = $sfsi_section5_options['sfsi_ok_MouseOverText'];
1151
+ }
1152
+ else
1153
+ {
1154
+ $alt_text = "ok";
1155
+ }
1156
+
1157
+ $hoverdiv="";
1158
+
1159
+ $cDisplay = isset($sfsi_section4_options['sfsi_ok_countsDisplay']) && !empty($sfsi_section4_options['sfsi_ok_countsDisplay']) ? $sfsi_section4_options['sfsi_ok_countsDisplay']: false;
1160
+
1161
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1162
+ /* fecth no of counts if active in admin section */
1163
+ if($cDisplay=="yes" && $Displayc=="yes")
1164
+ {
1165
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_ok_manualCounts']);
1166
+ }
1167
+
1168
+ //Custom Skin Support {Monad}
1169
+ if($active_theme == 'custom_support')
1170
+ {
1171
+ if(get_option("ok_skin"))
1172
+ {
1173
+ $icon = get_option("ok_skin");
1174
+ }
1175
+ else
1176
+ {
1177
+
1178
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1179
+ $icon=$icons_baseUrl."default_ok.png";
1180
+ }
1181
+ }
1182
+ else
1183
+ {
1184
+ $icon=$icons_baseUrl.$active_theme."_ok.png";
1185
+ }
1186
+ if($active_theme=="glossy"){
1187
+ $sfsi_new_icons = "yes";
1188
+ }
1189
+
1190
+ break;
1191
+ case "weibo" :
1192
+ $toolClass = "weibo_tool_bdr";
1193
+ $arrow_class = "bot_pintst_arow";
1194
+
1195
+ $url = (isset($sfsi_section2_options['sfsi_weibo_pageURL'])) ? $sfsi_section2_options['sfsi_weibo_pageURL'] : '';
1196
+
1197
+ // $weibo_user_name = isset($sfsi_section4_options['sfsi_weibo_User']) && !empty($sfsi_section4_options['sfsi_weibo_User']) ? $sfsi_section4_options['sfsi_weibo_User'] : false;
1198
+
1199
+ //Giving alternative text to image
1200
+ if(isset($sfsi_section5_options['sfsi_weibo_MouseOverText']) && !empty($sfsi_section5_options['sfsi_weibo_MouseOverText']))
1201
+ {
1202
+ $alt_text = $sfsi_section5_options['sfsi_weibo_MouseOverText'];
1203
+ }
1204
+ else
1205
+ {
1206
+ $alt_text = "weibo";
1207
+ }
1208
+
1209
+ $hoverdiv="";
1210
+
1211
+ $cDisplay = isset($sfsi_section4_options['sfsi_weibo_countsDisplay']) && !empty($sfsi_section4_options['sfsi_weibo_countsDisplay']) ? $sfsi_section4_options['sfsi_weibo_countsDisplay']: false;
1212
+
1213
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1214
+
1215
+ /* fecth no of counts if active in admin section */
1216
+ if($cDisplay=="yes" && $Displayc=="yes")
1217
+ {
1218
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_weibo_manualCounts']);
1219
+ }
1220
+
1221
+ //Custom Skin Support {Monad}
1222
+ if($active_theme == 'custom_support')
1223
+ {
1224
+ if(get_option("weibo_skin"))
1225
+ {
1226
+ $icon = get_option("weibo_skin");
1227
+ }
1228
+ else
1229
+ {
1230
+
1231
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1232
+ $icon=$icons_baseUrl."default_weibo.png";
1233
+ }
1234
+ }
1235
+ else
1236
+ {
1237
+ $icon=$icons_baseUrl.$active_theme."_weibo.png";
1238
+ }
1239
+ if($active_theme=="glossy"){
1240
+ $sfsi_new_icons = "yes";
1241
+ }
1242
+
1243
+ break;
1244
+ case "wechat" :
1245
+ $toolClass = "wechat_tool_bdr";
1246
+ $arrow_class = "bot_pintst_arow";
1247
+
1248
+ // $url = (isset($sfsi_section2_options['sfsi_wechat_pageURL'])) ? $sfsi_section2_options['sfsi_wechat_pageURL'] : '';
1249
+
1250
+ // $wechat_user_name = isset($sfsi_section4_options['sfsi_wechat_User']) && !empty($sfsi_section4_options['sfsi_wechat_User']) ? $sfsi_section4_options['sfsi_wechat_User'] : false;
1251
+
1252
+ //Giving alternative text to image
1253
+ if(isset($sfsi_section5_options['sfsi_wechat_MouseOverText']) && !empty($sfsi_section5_options['sfsi_wechat_MouseOverText']))
1254
+ {
1255
+ $alt_text = $sfsi_section5_options['sfsi_wechat_MouseOverText'];
1256
+ }
1257
+ else
1258
+ {
1259
+ $alt_text = "wechat";
1260
+ }
1261
+
1262
+ $hoverdiv="";
1263
+
1264
+ $cDisplay = isset($sfsi_section4_options['sfsi_wechat_countsDisplay']) && !empty($sfsi_section4_options['sfsi_wechat_countsDisplay']) ? $sfsi_section4_options['sfsi_wechat_countsDisplay']: false;
1265
+
1266
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1267
+
1268
+ /* fecth no of counts if active in admin section */
1269
+ if($cDisplay=="yes" && $Displayc=="yes")
1270
+ {
1271
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_wechat_manualCounts']);
1272
+ }
1273
+ $url = "weixin://dl/chat";
1274
+ if(
1275
+ (isset($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']) &&
1276
+
1277
+ (isset($sfsi_section2_options['sfsi_wechatShare_option']) && "yes" == $sfsi_section2_options['sfsi_wechatShare_option'])
1278
+ ){
1279
+ $hoverSHow = 1;
1280
+ $hoverdiv = "";
1281
+
1282
+ if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $option2['sfsi_wechatFollow_option']
1283
+
1284
+ && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1285
+
1286
+ $image_url = $sfsi_section2_options['sfsi_wechat_scan_image'];
1287
+
1288
+ $hoverdiv.="<div class='icon1' style='text-align:center'><a href='' onclick='event.preventDefault();sfsi_wechat_follow(\"".$sfsi_section2_options['sfsi_wechat_scan_image']."\")' ><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' style='height:25px' /></a></div>";
1289
+ }
1290
+
1291
+ if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && !empty($sfsi_section2_options['sfsi_wechatShare_option'])
1292
+ && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1293
+
1294
+ $hoverdiv.="<div class='icon2' style='text-align:center' ><a href='".$url."' ".sfsi_checkNewWindow($url)." onclick='event.preventDefault();sfsi_wechat_share(\"".$sfsi_section2_options['sfsi_wechat_scan_image']."\")' ><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$share_icon."' style='height:25px' /></a></div>";
1295
+ }
1296
+ }else{
1297
+
1298
+
1299
+ if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']
1300
+
1301
+ && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1302
+
1303
+ $sfsi_onclick="event.preventDefault();sfsi_wechat_follow(\'".$sfsi_section2_options['sfsi_wechat_scan_image']."\')" ;
1304
+ }
1305
+
1306
+ if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && 'yes'==($sfsi_section2_options['sfsi_wechatShare_option'])
1307
+ && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1308
+ if(!wp_is_mobile()){
1309
+ $sfsi_onclick="event.preventDefault();sfsi_wechat_share('".trim($current_url)."')" ;
1310
+ }else{
1311
+ $sfsi_onclick='';
1312
+ if(wp_is_mobile()){
1313
+ $sfsi_onclick = "console.log(event);event.stopPropagation&&event.stopPropagation();";
1314
+ }
1315
+ $sfsi_onclick.="event.preventDefault();sfsi_mobile_wechat_share('".trim($current_url)."')" ;
1316
+ }
1317
+ }
1318
+ $hoverSHow = 0;
1319
+ }
1320
+ //Custom Skin Support {Monad}
1321
+ if($active_theme == 'custom_support')
1322
+ {
1323
+ if(get_option("wechat_skin"))
1324
+ {
1325
+ $icon = get_option("wechat_skin");
1326
+ }
1327
+ else
1328
+ {
1329
+
1330
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1331
+ $icon=$icons_baseUrl."default_wechat.png";
1332
+ }
1333
+ }
1334
+ else
1335
+ {
1336
+ $icon=$icons_baseUrl.$active_theme."_wechat.png";
1337
+ }
1338
+ if($active_theme=="glossy"){
1339
+ $sfsi_new_icons = "yes";
1340
+ }
1341
+
1342
+ break;
1343
+
1344
+
1345
+ case "linkedin" :
1346
+ $width = 66;
1347
+ $toolClass = "linkedin_tool_bdr";
1348
+ $arrow_class = "bot_linkedin_arow";
1349
+
1350
+ $linkedIn_compayId = isset($sfsi_section2_options['sfsi_linkedin_followCompany']) && !empty($sfsi_section2_options['sfsi_linkedin_followCompany']) ? $sfsi_section2_options['sfsi_linkedin_followCompany'] : false;
1351
+
1352
+ $page = isset($sfsi_section2_options['sfsi_linkedin_page']) && !empty($sfsi_section2_options['sfsi_linkedin_page']) ? $sfsi_section2_options['sfsi_linkedin_page'] : false;
1353
+
1354
+ $follow = isset($sfsi_section2_options['sfsi_linkedin_follow']) && !empty($sfsi_section2_options['sfsi_linkedin_follow']) ? $sfsi_section2_options['sfsi_linkedin_follow'] : false;
1355
+
1356
+ $share = isset($sfsi_section2_options['sfsi_linkedin_SharePage']) && !empty($sfsi_section2_options['sfsi_linkedin_SharePage']) ? $sfsi_section2_options['sfsi_linkedin_SharePage'] : false;
1357
+
1358
+ $reBusiness = isset($sfsi_section2_options['sfsi_linkedin_recommendBusines']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendBusines']) ? $sfsi_section2_options['sfsi_linkedin_recommendBusines'] : false;
1359
+
1360
+ $linkedIn_compay = $linkedIn_compayId;
1361
+ $linkedIn_ProductId = isset($sfsi_section2_options['sfsi_linkedin_recommendProductId']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendProductId']) ? $sfsi_section2_options['sfsi_linkedin_recommendProductId'] : false;
1362
+
1363
+ $visit_icon = $visit_iconsUrl."linkedIn.png";
1364
+
1365
+ /*check for icons to display */
1366
+ $url = isset($sfsi_section2_options['sfsi_linkedin_pageURL']) && !empty($sfsi_section2_options['sfsi_linkedin_pageURL']) ? $sfsi_section2_options['sfsi_linkedin_pageURL'] : '';
1367
+
1368
+ if($follow =="yes" || $share =="yes" || $reBusiness =="yes")
1369
+ {
1370
+ $hoverSHow = 1;
1371
+ $hoverdiv = '';
1372
+
1373
+ if($page=="yes")
1374
+ {
1375
+ $hoverdiv.="<div class='icon4'><a href='".$url."' ".sfsi_checkNewWindow($url)."><img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$visit_icon."' /></a></div>";
1376
+ }
1377
+ if($follow=="yes")
1378
+ {
1379
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_LinkedInFollow($linkedIn_compayId)."</div>";
1380
+ }
1381
+ if($share=="yes")
1382
+ {
1383
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_LinkedInShare()."</div>";
1384
+ }
1385
+ if($reBusiness=="yes")
1386
+ {
1387
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsi_LinkedInRecommend($linkedIn_compay,$linkedIn_ProductId)."</div>";
1388
+ $width=99;
1389
+ }
1390
+ }
1391
+
1392
+ $cFrom = isset($sfsi_section4_options['sfsi_linkedIn_countsFrom']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsFrom']) ? $sfsi_section4_options['sfsi_linkedIn_countsFrom'] : false;
1393
+
1394
+ $disp = isset($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) ? $sfsi_section4_options['sfsi_linkedIn_countsDisplay'] : false;
1395
+
1396
+ $dcount = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1397
+
1398
+ /* fecth no of counts if active in admin section */
1399
+ if($disp=="yes" &&$dcount=="yes")
1400
+ {
1401
+ if($cFrom=="manual")
1402
+ {
1403
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_linkedIn_manualCounts']);
1404
+ }
1405
+ else if($cFrom=="follower")
1406
+ {
1407
+ $linkedIn_compay = $sfsi_section4_options['ln_company'];
1408
+ $ln_settings = array(
1409
+ 'ln_api_key'=>$sfsi_section4_options['ln_api_key'],
1410
+ 'ln_secret_key'=>$sfsi_section4_options['ln_secret_key'],
1411
+ 'ln_oAuth_user_token'=>$sfsi_section4_options['ln_oAuth_user_token']
1412
+ );
1413
+
1414
+ $followers=$socialObj->sfsi_getlinkedin_follower($linkedIn_compay,$ln_settings);
1415
+ (int) $followers;
1416
+ $counts=$socialObj->format_num($followers);
1417
+ if(empty($counts))
1418
+ {
1419
+ $counts = (string) "0";
1420
+ }
1421
+ }
1422
+ }
1423
+ $totwith = $width+28+$icons_space;
1424
+ $twt_margin = $totwith/2;
1425
+
1426
+ //Giving alternative text to image
1427
+ if(isset($sfsi_section5_options['sfsi_linkedIn_MouseOverText']) && !empty($sfsi_section5_options['sfsi_linkedIn_MouseOverText']))
1428
+ {
1429
+ $alt_text = $sfsi_section5_options['sfsi_linkedIn_MouseOverText'];
1430
+ }
1431
+ else
1432
+ {
1433
+ $alt_text = "LINKEDIN";
1434
+ }
1435
+
1436
+ //Custom Skin Support {Monad}
1437
+ if($active_theme == 'custom_support')
1438
+ {
1439
+ if(get_option("linkedin_skin"))
1440
+ {
1441
+ $icon = get_option("linkedin_skin");
1442
+ }
1443
+ else
1444
+ {
1445
+ $active_theme = 'default';
1446
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1447
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1448
+ }
1449
+ }
1450
+ else
1451
+ {
1452
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1453
+ }
1454
+ break;
1455
+
1456
+ default:
1457
+ $border_radius = "";
1458
+ //$border_radius =" border-radius:48%;";
1459
+ $cmcls = "cmcls";
1460
+ $padding_top = "";
1461
+ if($active_theme=="badge")
1462
+ {
1463
+ //$border_radius="border-radius: 18%;";
1464
+ }
1465
+ if($active_theme=="cute")
1466
+ {
1467
+ //$border_radius="border-radius: 38%;";
1468
+ }
1469
+
1470
+ $custom_icon_urls = unserialize($sfsi_section2_options['sfsi_CustomIcon_links']);
1471
+ $url = (isset($custom_icon_urls[$icon_n]) && !empty($custom_icon_urls[$icon_n])) ? $custom_icon_urls[$icon_n]:'';
1472
+ $toolClass = "custom_lkn";
1473
+ $arrow_class = "";
1474
+ $custom_icons_hoverTxt = unserialize($sfsi_section5_options['sfsi_custom_MouseOverTexts']);
1475
+ $icons = unserialize($sfsi_section1_options['sfsi_custom_files']);
1476
+ $icon = isset($icons[$icon_n])?$icons[$icon_n]:'';
1477
+
1478
+ //Giving alternative text to image
1479
+ if(!empty($custom_icons_hoverTxt[$icon_n]))
1480
+ {
1481
+ $alt_text = $custom_icons_hoverTxt[$icon_n];
1482
+ }
1483
+ else
1484
+ {
1485
+ $alt_text = "SOCIALICON";
1486
+ }
1487
+ break;
1488
+ }
1489
+ $icons="";
1490
+ /* apply size of icon */
1491
+ if($is_front==0)
1492
+ {
1493
+ $icons_size = $sfsi_section5_options['sfsi_icons_size'];
1494
+ $itemselector = "sfsi_wicons shuffeldiv";
1495
+ $innrselector = "inerCnt";
1496
+ }
1497
+ else
1498
+ {
1499
+ $icons_size = 51;
1500
+ $itemselector = "sfsi_wicons";
1501
+ $innrselector = "inerCnt";
1502
+ }
1503
+
1504
+ /* spacing and no of icons per row */
1505
+ $icons_space = '';
1506
+ $icons_space = $sfsi_section5_options['sfsi_icons_spacing'];
1507
+ $icon_width = (int)$icons_size;
1508
+ /* check for mouse hover effect */
1509
+ $icon_opacity="1";
1510
+
1511
+ if($sfsi_section3_options['sfsi_mouseOver']=='yes')
1512
+ {
1513
+ $mouse_hover_effect=$sfsi_section3_options["sfsi_mouseOver_effect"];
1514
+ if($mouse_hover_effect=="fade_in" || $mouse_hover_effect=="combo")
1515
+ {
1516
+ $icon_opacity="0.6";
1517
+ }
1518
+ }
1519
+
1520
+ $toolT_cls='';
1521
+ if((int) $icon_width <=49 && (int) $icon_width >=30)
1522
+ {
1523
+ $bt_class="";
1524
+ $toolT_cls="sfsiTlleft";
1525
+ }
1526
+ else if((int) $icon_width <=20)
1527
+ {
1528
+ $bt_class="sfsiSmBtn";
1529
+ $toolT_cls="sfsiTlleft";
1530
+ }
1531
+ else
1532
+ {
1533
+ $bt_class="";
1534
+ $toolT_cls="sfsiTlleft";
1535
+ }
1536
+
1537
+ if($toolClass=="rss_tool_bdr" || $toolClass=='email_tool_bdr' || $toolClass=="custom_lkn" || $toolClass=="instagram_tool_bdr" )
1538
+ {
1539
+ $new_window = sfsi_checkNewWindow();
1540
+ $url = $url;
1541
+ }
1542
+ else if($hoverSHow)
1543
+ {
1544
+ if(!wp_is_mobile())
1545
+ {
1546
+ $new_window = sfsi_checkNewWindow();
1547
+ $url = $url;
1548
+ }
1549
+ else
1550
+ {
1551
+ $new_window = '';
1552
+ $url = "javascript:void(0)";
1553
+ }
1554
+ }
1555
+ else
1556
+ {
1557
+ $new_window = sfsi_checkNewWindow();
1558
+ $url = $url;
1559
+ }
1560
+ if( sanitize_text_field(get_option('sfsi_feed_id', false)) == ""){
1561
+ $url = "https://specificfeeds.com/follow";
1562
+ }
1563
+
1564
+ if(isset($sfsi_onclick)){
1565
+ $new_window ="";
1566
+ }
1567
+
1568
+ if(!isset($sfsi_new_icons)){
1569
+ $sfsi_new_icons =false;
1570
+ }
1571
+ if($sfsi_new_icons){
1572
+ $margin_bot="4px;";
1573
+ }else{
1574
+ $margin_bot="5px;";
1575
+ }
1576
+ if($sfsi_section4_options['sfsi_display_counts']=="yes")
1577
+ {
1578
+ if($sfsi_new_icons){
1579
+ $margin_bot = "29px;";
1580
+ }else{
1581
+ $margin_bot = "30px;";
1582
+ }
1583
+ }
1584
+ if(isset($icon) && !empty($icon) && filter_var($icon, FILTER_VALIDATE_URL))
1585
+ {
1586
+ $icons.= "<div style='width:".$icon_width."px; height:".$icon_width."px;margin-left:".$icons_space."px;margin-bottom:".$margin_bot." ".($sfsi_new_icons?'padding:0px':'')."' class='".$itemselector." ".$cmcls."' >";
1587
+
1588
+ $icons.= "<div class='".$innrselector."'>";
1589
+
1590
+ $icons.= "<a class='".$class." sficn' data-effect='".$mouse_hover_effect."' $new_window href='".$url."' ".(('vk'!==$icon_name)?"id='sfsiid_".$icon_name."'":'')." style='opacity:".$icon_opacity."' ".(isset($sfsi_onclick)?'onclick="'.$sfsi_onclick.'"':'')." >";
1591
+ $icons.= "<img data-pin-nopin='true' alt='".$alt_text."' title='".$alt_text."' src='".$icon."' width='".$icons_size."' height='".$icons_size."' style='".$border_radius.$padding_top."' class='sfcm sfsi_wicon ".(in_array($icon_name,array('telegram','wechat'))?('sfsi_'.$icon_name.'_wicon sfsi_click_wicon'):(''))."' data-effect='".$mouse_hover_effect."' />";
1592
+ $icons.= '</a>';
1593
+ if(isset($counts) && $counts!='')
1594
+ {
1595
+ $icons.= '<span class="bot_no '.$bt_class.'">'.$counts.'</span>';
1596
+ }
1597
+ if($hoverSHow && !empty($hoverdiv))
1598
+ {
1599
+ $icons.= '<div class="sfsi_tool_tip_2 '.$toolClass.' '.$toolT_cls.'" style="width:'.$width.'px ;opacity:0;z-index:-1;margin-left:-'.$twt_margin.'px;" id="sfsiid_'.$icon_name.'">';
1600
+ $icons.= '<span class="bot_arow '.$arrow_class.'"></span>';
1601
+ $icons.= '<div class="sfsi_inside">'.$hoverdiv."</div>";
1602
+ $icons.= "</div>";
1603
+ }
1604
+ $icons.="</div>";
1605
+ $icons.="</div>";
1606
+ }
1607
+ return $icons;
1608
+ }
1609
+
1610
+ /* make url for new window */
1611
+ function sfsi_checkNewWindow()
1612
+ {
1613
+ global $wpdb;
1614
+ $sfsi_section5_options= unserialize(get_option('sfsi_section5_options',false));
1615
+ if($sfsi_section5_options['sfsi_icons_ClickPageOpen']=="yes")
1616
+ {
1617
+ return $new_window="target='_blank'";
1618
+ }
1619
+ else
1620
+ {
1621
+ return '';
1622
+ }
1623
+ }
1624
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: socialdude, socialtech
3
  Tags: social media, share, buttons, social widget, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 3.5
5
  Tested up to: 5.2
6
- Stable tag: 2.3.2
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -274,6 +274,9 @@ You cannot use the same plugin twice, however you can install both the USM as we
274
 
275
 
276
  == Changelog ==
 
 
 
277
  = 2.3.2
278
  * Solved: Updated feedback system.
279
 
@@ -830,5 +833,5 @@ You cannot use the same plugin twice, however you can install both the USM as we
830
 
831
  == Upgrade Notice ==
832
 
833
- = 2.3.2 =
834
  Please upgrade
3
  Tags: social media, share, buttons, social widget, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 3.5
5
  Tested up to: 5.2
6
+ Stable tag: 2.3.3
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
274
 
275
 
276
  == Changelog ==
277
+ = 2.3.3
278
+ * Solved: Updated the email link and subscription action.
279
+
280
  = 2.3.2
281
  * Solved: Updated feedback system.
282
 
833
 
834
  == Upgrade Notice ==
835
 
836
+ = 2.3.3 =
837
  Please upgrade
ultimate_social_media_icons.php CHANGED
@@ -6,7 +6,7 @@ Description: Easy to use and 100% FREE social media plugin which adds social med
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
- Version: 2.3.2
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
@@ -97,7 +97,7 @@ register_deactivation_hook(__FILE__, 'sfsi_deactivate_plugin');
97
 
98
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
99
 
100
- if(!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 2.32)
101
  {
102
 
103
  add_action("init", "sfsi_update_plugin");
@@ -467,287 +467,301 @@ function addStyleFunction()
467
 
468
  ?>
469
 
470
- <script>
 
471
 
472
- jQuery(document).ready(function(e) {
473
 
474
- jQuery("body").addClass("sfsi_<?php echo get_option("sfsi_pluginVersion");?>")
475
 
476
- });
477
-
478
- function sfsi_processfurther(ref) {
479
-
480
- var feed_id = '<?php echo $sfsi_feediid?>';
481
-
482
- var feedtype = 8;
483
-
484
- var email = jQuery(ref).find('input[name="data[Widget][email]"]').val();
485
-
486
- var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
487
-
488
- if ((email != "Enter your email") && (filter.test(email))) {
489
-
490
- if (feedtype == "8") {
491
-
492
- var url ="<?php echo $url; ?>"+feed_id+"/"+feedtype;
493
-
494
- window.open('', "popupwindow", "scrollbars=yes,width=1080,height=760");
495
-
496
- ref.action=url;
497
-
498
- ref.target="popupwindow";
499
-
500
- return true;
501
 
502
- }else{
 
503
 
504
- return false
505
 
506
- }
507
 
508
- } else {
 
509
 
510
- alert("Please enter email address");
511
 
512
- jQuery(ref).find('input[name="data[Widget][email]"]').focus();
513
 
514
- return false;
515
 
516
- }
517
 
518
- }
519
 
520
- </script>
521
 
522
- <style type="text/css" aria-selected="true">
523
 
524
- .sfsi_subscribe_Popinner
525
 
526
- {
 
 
527
 
528
- <?php if(sanitize_text_field($option8['sfsi_form_adjustment']) == 'yes') : ?>
529
 
530
- width: 100% !important;
531
 
532
- height: auto !important;
533
 
534
- <?php else: ?>
535
-
536
- width: <?php echo intval($option8['sfsi_form_width']) ?>px !important;
537
-
538
- height: <?php echo intval($option8['sfsi_form_height']) ?>px !important;
539
-
540
- <?php endif;?>
541
-
542
- <?php if(sanitize_text_field($option8['sfsi_form_border']) == 'yes') : ?>
543
-
544
- border: <?php echo intval($option8['sfsi_form_border_thickness'])."px solid ".sfsi_sanitize_hex_color($option8['sfsi_form_border_color']);?> !important;
545
-
546
- <?php endif;?>
547
-
548
- padding: 18px 0px !important;
549
-
550
- background-color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_background']) ?> !important;
551
-
552
- }
553
-
554
- .sfsi_subscribe_Popinner form
555
-
556
- {
557
 
558
- margin: 0 20px !important;
 
559
 
560
- }
 
561
 
562
- .sfsi_subscribe_Popinner h5
563
 
564
- {
565
 
566
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_heading_font']) ?> !important;
567
 
568
- <?php if(sanitize_text_field($option8['sfsi_form_heading_fontstyle']) != 'bold') {?>
569
 
570
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontstyle']) ?> !important;
 
 
571
 
572
- <?php } else{ ?>
 
573
 
574
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontstyle']) ?> !important;
575
 
576
- <?php }?>
577
 
578
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_heading_fontcolor']) ?> !important;
579
 
580
- font-size: <?php echo intval($option8['sfsi_form_heading_fontsize'])."px" ?> !important;
581
 
582
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontalign']) ?> !important;
583
 
584
- margin: 0 0 10px !important;
585
 
586
- padding: 0 !important;
587
 
588
- }
 
589
 
590
- .sfsi_subscription_form_field {
 
591
 
592
- margin: 5px 0 !important;
 
593
 
594
- width: 100% !important;
 
595
 
596
- display: inline-flex;
597
 
598
- display: -webkit-inline-flex;
599
 
600
- }
601
 
602
- .sfsi_subscription_form_field input {
603
 
604
- width: 100% !important;
605
 
606
- padding: 10px 0px !important;
607
 
608
- }
609
 
610
- .sfsi_subscribe_Popinner input[type=email]
611
 
612
- {
613
 
614
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']); ?> !important;
615
 
616
- <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) != 'bold') {?>
617
 
618
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
619
 
620
- <?php } else{ ?>
621
 
622
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
623
 
624
- <?php }?>
625
 
626
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']); ?> !important;
627
 
628
- font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px" ?> !important;
629
 
630
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']); ?> !important;
 
631
 
632
- }
 
633
 
634
- .sfsi_subscribe_Popinner input[type=email]::-webkit-input-placeholder {
 
635
 
636
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']); ?> !important;
 
637
 
638
- <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) != 'bold') {?>
 
639
 
640
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
 
641
 
642
- <?php } else{ ?>
643
 
644
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
 
645
 
646
- <?php }?>
647
 
648
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']); ?> !important;
649
 
650
- font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px" ?> !important;
 
651
 
652
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']); ?> !important;
 
653
 
654
- }
 
655
 
656
- .sfsi_subscribe_Popinner input[type=email]:-moz-placeholder { /* Firefox 18- */
 
657
 
658
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']); ?> !important;
 
659
 
660
- <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) != 'bold') {?>
 
661
 
662
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
663
 
664
- <?php } else{ ?>
 
665
 
666
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
667
 
668
- <?php }?>
 
669
 
670
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']); ?> !important;
 
671
 
672
- font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px" ?> !important;
 
673
 
674
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']); ?> !important;
 
675
 
676
- }
 
677
 
678
- .sfsi_subscribe_Popinner input[type=email]::-moz-placeholder { /* Firefox 19+ */
 
679
 
680
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']); ?> !important;
 
681
 
682
- <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) != 'bold') {?>
683
 
684
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
 
685
 
686
- <?php } else{ ?>
687
 
688
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
 
689
 
690
- <?php }?>
 
691
 
692
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']); ?> !important;
 
693
 
694
- font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px" ?> !important;
 
695
 
696
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']); ?> !important;
 
697
 
698
- }
 
699
 
700
- .sfsi_subscribe_Popinner input[type=email]:-ms-input-placeholder {
 
701
 
702
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']); ?> !important;
703
 
704
- <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) != 'bold') {?>
 
705
 
706
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
707
 
708
- <?php } else{ ?>
709
 
710
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
 
711
 
712
- <?php }?>
 
713
 
714
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']); ?> !important;
 
715
 
716
- font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px" ?> !important;
 
717
 
718
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']); ?> !important;
 
719
 
720
- }
 
721
 
722
- .sfsi_subscribe_Popinner input[type=submit]
723
 
724
- {
 
725
 
726
- font-family: <?php echo sanitize_text_field($option8['sfsi_form_button_font']); ?> !important;
727
 
728
- <?php if(sanitize_text_field($option8['sfsi_form_button_fontstyle']) != 'bold') {?>
729
 
730
- font-style: <?php echo sanitize_text_field($option8['sfsi_form_button_fontstyle']) ?> !important;
 
731
 
732
- <?php } else{ ?>
 
733
 
734
- font-weight: <?php echo sanitize_text_field($option8['sfsi_form_button_fontstyle']) ?> !important;
 
735
 
736
- <?php }?>
 
737
 
738
- color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_button_fontcolor']); ?> !important;
 
739
 
740
- font-size: <?php echo intval($option8['sfsi_form_button_fontsize'])."px" ?> !important;
 
741
 
742
- text-align: <?php echo sanitize_text_field($option8['sfsi_form_button_fontalign']); ?> !important;
743
 
744
- background-color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_button_background']); ?> !important;
 
745
 
746
- }
 
747
 
748
- </style>
 
749
 
750
- <?php
751
 
752
  }
753
 
@@ -838,7 +852,7 @@ function sfsi_admin_notice()
838
 
839
  // </div> -->
840
 
841
- <?php
842
 
843
  // }
844
  /**
@@ -877,84 +891,87 @@ function sfsi_admin_notice()
877
 
878
  ?>
879
 
880
- <style type="text/css">
881
- div.sfsi_show_premium_notification{
882
-
883
- float: none;
884
 
885
- display:block;
886
 
887
- margin-left: 15px;
888
 
889
- margin-top: 15px;
890
 
891
- padding: 8px;
892
 
893
- background-color: #38B54A;
894
 
895
- color: #fff;
896
 
897
- font-size: 18px;
898
 
899
- }
900
 
901
- .sfsi_show_premium_notification a{
902
 
903
- color: #fff;
904
 
905
- }
906
 
907
- form.sfsi_premiumNoticeDismiss {
908
 
909
- display: inline-block;
910
 
911
- margin: 5px 0 0;
912
 
913
- vertical-align: middle;
914
 
915
- }
916
 
917
- .sfsi_premiumNoticeDismiss input[type='submit']{
918
 
919
- background-color: transparent;
920
 
921
- border: medium none;
922
 
923
- color: #fff;
924
 
925
- margin: 0;
926
 
927
- padding: 0;
928
 
929
- cursor: pointer;
930
 
931
- }
932
 
933
- </style>
 
934
 
935
- <div class="updated sfsi_show_premium_notification" style="<?php echo isset($style)?$style:''; ?>">
936
 
937
- <div style="margin: 9px 0; ">
938
 
939
- BIG NEWS: There is now a <b><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank">Premium Ultimate Social Media Plugin</a></b> available with many more cool features: <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank">Check it out</a>
 
 
 
 
940
 
941
- </div>
942
 
943
- <div style="text-align:right;margin-top:-40px;">
944
 
945
- <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
946
 
947
- <input type="hidden" name="sfsi-dismiss-premiumNotice" value="true">
948
 
949
- <input type="submit" name="dismiss" value="Dismiss" />
950
 
951
- </form>
952
 
953
- </div>
954
 
955
- </div>
956
 
957
- <?php
958
 
959
  }
960
  if(is_ssl()){
@@ -964,88 +981,90 @@ function sfsi_admin_notice()
964
 
965
  ?>
966
 
967
- <style type="text/css">
968
-
969
- div.sfsi_show_premium_cumulative_count_notification{
970
 
971
- color: #fff;
972
 
973
- float: left;
974
 
975
- width: 94.2%;
976
 
977
- margin-left: 37px;
978
 
979
- margin-top: 15px;
980
 
981
- padding: 8px;
982
 
983
- background-color: #38B54A;
984
 
985
- color: #fff;
986
 
987
- font-size: 18px;
988
 
989
- }
990
-
991
- .sfsi_show_premium_cumulative_count_notification a{
992
 
993
- color: #fff;
994
- }
995
 
996
- form.sfsi_premiumCumulativeCountNoticeDismiss {
 
997
 
998
- display: inline-block;
999
 
1000
- margin: 5px 0 0;
1001
 
1002
- vertical-align: middle;
1003
 
1004
- }
1005
 
1006
- .sfsi_premiumCumulativeCountNoticeDismiss input[type='submit']{
1007
 
1008
- background-color: transparent;
1009
 
1010
- border: medium none;
1011
 
1012
- color: #fff;
1013
 
1014
- margin: 0;
1015
 
1016
- padding: 0;
1017
 
1018
- cursor: pointer;
1019
 
1020
- }
1021
 
1022
- </style>
 
1023
 
1024
- <div class="updated sfsi_show_premium_cumulative_count_notification">
1025
 
1026
- <div style="margin: 9px 0;">
1027
 
1028
- <b>Recently switched to https?</b> If you don’t want to lose the Facebook share & like counts <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=https_share_counts&utm_medium=banner" target="_blank">have a look at our Premium Plugin</a>, we found a fix for that: <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=https_share_counts&utm_medium=banner" target="_blank">Check it out</a>
 
 
 
 
1029
 
1030
- </div>
1031
 
1032
- <div style="text-align: right;margin-top:-30px" >
1033
 
1034
- <form method="post" class="sfsi_premiumCumulativeCountNoticeDismiss" style="padding:10px">
1035
 
1036
- <input type="hidden" name="sfsi-dismiss-premiumCumulativeCountNoticeDismiss" value="true">
1037
 
1038
- <input type="submit" name="dismiss" value="Dismiss" />
1039
 
1040
- </form>
1041
 
1042
- </div>
1043
 
1044
- <div style=”clear:both”></div>
1045
 
1046
- </div>
1047
 
1048
- <?php
1049
 
1050
  }
1051
 
@@ -1064,43 +1083,41 @@ function sfsi_admin_notice()
1064
 
1065
  ?>
1066
 
1067
- <style type="text/css">
 
1068
 
1069
- .sfsi_show_mobile_notification a{
1070
 
1071
- color: #fff;
1072
-
1073
- }
1074
-
1075
- form.sfsi_mobileNoticeDismiss {
1076
 
1077
- display: inline-block;
1078
 
1079
- margin: 5px 0 0;
1080
 
1081
- vertical-align: middle;
1082
 
1083
- }
1084
 
1085
- .sfsi_mobileNoticeDismiss input[type='submit']{
1086
 
1087
- background-color: transparent;
1088
 
1089
- border: medium none;
1090
 
1091
- color: #fff;
1092
 
1093
- margin: 0;
1094
 
1095
- padding: 0;
1096
 
1097
- cursor: pointer;
1098
 
1099
- }
1100
 
1101
- </style>
 
1102
 
1103
- <!-- <div class="updated sfsi_show_mobile_notification" style="<?php //echo $style; ?>background-color: #38B54A; color: #fff; font-size: 18px;">
1104
 
1105
  <div class="alignleft" style="margin: 9px 0;line-height: 24px;width: 95%;">
1106
 
@@ -1122,7 +1139,7 @@ function sfsi_admin_notice()
1122
 
1123
  </div> -->
1124
 
1125
- <?php
1126
 
1127
  }
1128
 
@@ -1143,81 +1160,86 @@ function sfsi_admin_notice()
1143
  {
1144
  ?>
1145
 
1146
-
1147
 
1148
- <style type="text/css">
1149
 
1150
- .sfsi_show_phperror_notification {
 
1151
 
1152
- color: #fff;
1153
 
1154
- text-decoration: underline;
1155
 
1156
- }
1157
 
1158
- form.sfsi_phperrorNoticeDismiss {
1159
 
1160
- display: inline-block;
1161
 
1162
- margin: 5px 0 0;
1163
 
1164
- vertical-align: middle;
1165
 
1166
- }
1167
 
1168
- .sfsi_phperrorNoticeDismiss input[type='submit']
1169
 
1170
- {
1171
 
1172
- background-color: transparent;
1173
 
1174
- border: medium none;
1175
 
1176
- color: #fff;
1177
 
1178
- margin: 0;
1179
 
1180
- padding: 0;
1181
 
1182
- cursor: pointer;
1183
 
1184
- }
 
 
1185
 
1186
- .sfsi_show_phperror_notification p{line-height: 22px;}
 
 
 
 
 
 
1187
 
1188
- p.sfsi_show_notifictaionpragraph{padding: 0 !important;font-size: 18px;}
1189
- </style>
1190
- <div class="updated sfsi_show_phperror_notification" style="<?php echo (isset($style)?$style:''); ?>background-color: #D22B2F; color: #fff; font-size: 18px; border-left-color: #D22B2F;">
1191
 
1192
- <div style="margin: 9px 0;">
1193
- <p class="sfsi_show_notifictaionpragraph">
 
1194
 
1195
- We noticed you are running your site on a PHP version older than 5.4. Please upgrade to a more recent version. This is not only important for running the Ultimate Social Media Plugin, but also for security reasons in general.
1196
 
1197
- <br>
1198
 
1199
- If you do not know how to do the upgrade, please ask your server team or hosting company to do it for you.'
 
1200
 
1201
- </p>
1202
- </div>
1203
 
1204
- <div style="text-align:right;margin-top:-30px" >
1205
 
1206
- <form method="post" class="sfsi_phperrorNoticeDismiss" style="padding-bottom:10px">
1207
 
1208
- <input type="hidden" name="sfsi-dismiss-phperrorNotice" value="true">
1209
 
1210
- <input type="submit" name="dismiss" value="Dismiss" />
1211
 
1212
- </form>
1213
 
1214
- </div>
1215
 
1216
- </div>
1217
 
1218
-
1219
 
1220
- <?php
1221
 
1222
  }
1223
 
@@ -1416,36 +1438,45 @@ function sfsi_get_language_detection_notice(){
1416
  && ("sfsi-options" == $_GET['page']) && ("yes" == get_option("sfsi_languageNotice") ) ) {
1417
 
1418
  ?>
1419
- <style type="text/css">
1420
-
1421
- form.sfsi_languageNoticeDismiss{display: inline-block;margin: 5px 0 0;vertical-align: middle;}
1422
-
1423
- .sfsi_languageNoticeDismiss input[type='submit']{background-color: transparent;border: medium none;margin: 0 5px 0 0px;padding: 0;cursor: pointer;font-size: 22px;}
 
1424
 
1425
- </style>
 
 
 
 
 
 
 
 
1426
 
1427
- <div class="notice notice-info" style="<?php echo isset($style)?$style:''; ?>">
1428
 
1429
- <div style="margin: 9px 0;">
1430
 
1431
- <?php echo $text; ?>
1432
 
1433
- </div>
1434
 
1435
- <div style="text-align: right;margin-top:-30px">
1436
 
1437
- <form method="post" class="sfsi_languageNoticeDismiss" style="padding-bottom:10px">
1438
 
1439
- <input type="hidden" name="sfsi-dismiss-languageNotice" value="true">
1440
 
1441
- <input type="submit" name="dismiss" value="&times;" />
1442
 
1443
- </form>
1444
 
1445
- </div>
1446
 
1447
- </div>
1448
- <?php }
1449
 
1450
  }
1451
  add_action('admin_init', 'sfsi_dismiss_admin_notice');
@@ -1557,61 +1588,58 @@ if( 'plugins.php' === $pagenow ){
1557
  add_action( 'admin_footer', '_sfsi_add_deactivation_feedback_dialog_box');
1558
  function _sfsi_add_deactivation_feedback_dialog_box(){
1559
  include_once(SFSI_DOCROOT.'/views/deactivation/sfsi_deactivation_popup.php'); ?>
1560
- <script type="text/javascript">
 
 
 
 
1561
 
1562
-
1563
 
1564
- jQuery(document).ready(function($){
1565
- var _deactivationLink = $('.sfsi-deactivate-slug').prev();
1566
- $('.sfsi-deactivation-reason-link').find('a').attr('href',_deactivationLink.attr('href'));
1567
- _deactivationLink.on('click',function(e){
1568
 
1569
- e.preventDefault();
 
1570
 
1571
- $('[data-popup="popup-1"]').fadeIn(350);
1572
 
1573
- });
1574
- //----- CLOSE
1575
 
1576
- $('[data-popup-close]').on('click', function(e) {
1577
 
1578
- e.preventDefault();
1579
 
1580
- var targeted_popup_class = jQuery(this).attr('data-popup-close');
 
1581
 
1582
- $('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
1583
 
1584
- });
1585
- //----- OPEN
1586
 
1587
- $('[data-popup-open]').on('click', function(e) {
1588
 
1589
- e.preventDefault();
1590
 
1591
- var targeted_popup_class = jQuery(this).attr('data-popup-open');
 
 
1592
 
1593
- $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
 
 
1594
 
1595
- });
1596
- $('.sfsi-deactivate-radio').on('click', function(e) {
1597
- $('.sfsi-deactivate-radio').attr('checked',false);
1598
 
1599
- $(this).attr('checked',true);
1600
- var val = $(this).val();
1601
- $('.sfsi-reason-section').removeClass('show').addClass('hide');
1602
 
1603
- $(this).parent().find('.sfsi-reason-section').addClass('show').removeClass('hide');
1604
 
1605
- });
1606
- $('.sfsi-deactivate-radio-text').on('click',function(e){
 
1607
 
1608
- $(this).prev().trigger('click');
1609
-
1610
- });
1611
- });
1612
- </script>
1613
-
1614
- <?php
1615
 
1616
  }
1617
 
@@ -1647,56 +1675,58 @@ function sfsi_curl_error_notification()
1647
 
1648
  ?>
1649
 
1650
- <script type="text/javascript">
 
1651
 
1652
- jQuery(document).ready(function(e) {
1653
 
1654
- jQuery(".sfsi_curlerror_cross").click(function(){
1655
 
1656
- SFSI.ajax({
1657
 
1658
- url:sfsi_icon_ajax_object.ajax_url,
1659
 
1660
- type:"post",
 
 
1661
 
1662
- data: {action: "sfsi_curlerrornotification"},
1663
 
1664
- success:function(msg)
1665
 
1666
- {
1667
 
1668
- jQuery(".sfsi_curlerror").hide("fast");
1669
 
1670
-
1671
 
1672
- }
1673
 
1674
- });
1675
 
1676
- });
1677
 
1678
- });
 
 
1679
 
1680
- </script>
1681
- <div class="sfsi_curlerror">
1682
 
1683
- We noticed that your site returns a cURL error («Error:
1684
 
1685
- <?php echo ucfirst(get_option("sfsi_curlErrorMessage")); ?>
 
 
1686
 
1687
- »). This means that it cannot send a notification to SpecificFeeds.com when a new post is published. Therefore this email-feature doesn’t work. However there are several solutions for this, please visit our FAQ to see the solutions («Perceived bugs» => «cURL error messages»):
1688
 
1689
- <a href="https://www.ultimatelysocial.com/faq/" target="new">
1690
 
1691
- www.ultimatelysocial.com/faq
1692
 
1693
- </a>
1694
 
1695
- <div class="sfsi_curlerror_cross">Dismiss</div>
1696
 
1697
- </div>
1698
-
1699
- <?php
1700
 
1701
  }
1702
 
@@ -1908,14 +1938,14 @@ function sfsi_language_notice(){
1908
  $isDismissed = get_option('sfsi_lang_notice_dismissed');
1909
  if(!empty($langText) && false == $isDismissed) { ?>
1910
 
1911
-
1912
 
1913
- <div id="sfsi_plus_langnotice" class="notice notice-info">
1914
- <p><?php echo $langText; ?></p>
1915
- <button type="button" class="sfsi-notice-dismiss notice-dismiss"></button>
1916
- </div>
1917
- <?php } ?>
1918
- <?php endif;
 
1919
 
1920
  }
1921
  function sfsi_dismiss_lang_notice(){
@@ -1946,14 +1976,14 @@ function sfsi_addThis_removal_notice(){
1946
  $isDismissed = get_option('sfsi_addThis_icon_removal_notice_dismissed',false);
1947
  if( false == $isDismissed) { ?>
1948
 
1949
-
1950
 
1951
- <div id="sfsi_plus_addThis_removal_notice" class="notice notice-info">
1952
- <p><?php echo $sfsi_addThis_removalText; ?></p>
1953
- <button type="button" class="sfsi-AddThis-notice-dismiss notice-dismiss"></button>
1954
- </div>
1955
- <?php } ?>
1956
- <?php endif;
 
1957
 
1958
  }
1959
  function sfsi_dismiss_addthhis_removal_notice(){
@@ -1975,10 +2005,11 @@ add_action( 'wp_ajax_sfsi_dismiss_addThis_icon_notice', 'sfsi_dismiss_addthhis_r
1975
  // ********************************* Notice for removal of AddThis option CLOSES *******************************//
1976
  // ********************************* Link to support forum left of every Save button STARTS *******************************//
1977
  function sfsi_ask_for_help($viewNumber){ ?>
1978
- <div class="sfsi_askforhelp askhelpInview<?php echo $viewNumber; ?>">
1979
- <img src="<?php echo SFSI_PLUGURL."images/questionmark.png";?>" alt="error"/>
1980
- <span>Questions? <a target="_blank" href="#" onclick="event.preventDefault();sfsi_open_chat(event)"><b>Ask us</b></a></span>
1981
- </div>
 
1982
  <?php }
1983
  // ********************************* Link to support forum left of every Save button CLOSES *******************************//
1984
  // ********************************* Notice for error reporting STARTS *******************************//
@@ -1993,51 +2024,53 @@ function sfsi_error_reporting_notice(){
1993
  $sfsi_icons_suppress_errors = isset($option5['sfsi_icons_suppress_errors']) && !empty($option5['sfsi_icons_suppress_errors']) ? $option5['sfsi_icons_suppress_errors']: false;
1994
  if(isset($isDismissed) && false == $isDismissed && defined('WP_DEBUG') && false != WP_DEBUG && "yes"== $sfsi_icons_suppress_errors) { ?>
1995
 
1996
-
1997
 
1998
- <div style="padding: 10px;margin-left: 0px;position: relative;" id="sfsi_error_reporting_notice" class="error notice">
1999
- <p><?php echo $sfsi_error_reporting_notice_txt; ?></p>
2000
- <button type="button" class="sfsi_error_reporting_notice-dismiss notice-dismiss"></button>
2001
- </div>
2002
- <script type="text/javascript">
2003
- if(typeof jQuery != 'undefined'){
2004
- (function sfsi_dismiss_notice(btnClass,ajaxAction,nonce){
2005
 
2006
-
 
 
 
 
 
 
 
2007
 
2008
- var btnClass = "."+btnClass;
2009
- var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
2010
- jQuery(document).on("click", btnClass, function(){
2011
 
2012
-
 
 
2013
 
2014
- jQuery.ajax({
2015
 
2016
- url:ajaxurl,
2017
 
2018
- type:"post",
2019
 
2020
- data:{action: ajaxAction},
2021
 
2022
- success:function(e) {
2023
 
2024
- if(false != e){
 
 
2025
 
2026
- jQuery(btnClass).parent().remove();
2027
 
2028
- }
2029
 
2030
- }
2031
 
2032
- });
2033
- });
2034
- }("sfsi_error_reporting_notice-dismiss","sfsi_dismiss_error_reporting_notice","<?php echo wp_create_nonce('sfsi_dismiss_error_reporting_notice'); ?>"));
2035
 
2036
- }
2037
 
2038
- </script>
2039
- <?php } ?>
2040
- <?php endif;
 
 
 
 
 
 
2041
 
2042
  }
2043
  function sfsi_dismiss_error_reporting_notice(){
@@ -2057,4 +2090,4 @@ function sfsi_dismiss_error_reporting_notice(){
2057
  }
2058
 
2059
  add_action( 'wp_ajax_sfsi_dismiss_error_reporting_notice', 'sfsi_dismiss_error_reporting_notice' );
2060
- // ********************************* Notice for error reporting CLOSE *******************************//
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
+ Version: 2.3.3
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
97
 
98
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
99
 
100
+ if(!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 2.33)
101
  {
102
 
103
  add_action("init", "sfsi_update_plugin");
467
 
468
  ?>
469
 
470
+ <script>
471
+ jQuery(document).ready(function(e) {
472
 
473
+ jQuery("body").addClass("sfsi_<?php echo get_option("sfsi_pluginVersion");?>")
474
 
475
+ });
476
 
477
+ function sfsi_processfurther(ref) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
 
479
+ var feed_id = '<?php echo $sfsi_feediid?>';
480
+ var feedtype = 8;
481
 
482
+ var email = jQuery(ref).find('input[name="data[Widget][email]"]').val();
483
 
484
+ var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
485
 
486
+ if ((email != "Enter your email") && (filter.test(email))) {
487
+ if (feed_id != "") {
488
 
489
+ if (feedtype == "8") {
490
 
491
+ var url = "<?php echo $url; ?>" + feed_id + "/" + feedtype;
492
 
493
+ window.open('', "popupwindow", "scrollbars=yes,width=1080,height=760");
494
 
495
+ ref.action = url;
496
 
497
+ ref.target = "popupwindow";
498
 
499
+ return true;
500
 
501
+ } else {
502
 
503
+ return false
504
 
505
+ }
506
+ }
507
+ } else {
508
 
509
+ alert("Please enter email address");
510
 
511
+ jQuery(ref).find('input[name="data[Widget][email]"]').focus();
512
 
513
+ return false;
514
 
515
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
+ }
518
+ </script>
519
 
520
+ <style type="text/css" aria-selected="true">
521
+ .sfsi_subscribe_Popinner {
522
 
523
+ <?php if(sanitize_text_field($option8['sfsi_form_adjustment'])=='yes'): ?> width: 100% !important;
524
 
525
+ height: auto !important;
526
 
527
+ <?php else: ?> width: <?php echo intval($option8['sfsi_form_width']) ?>px !important;
528
 
529
+ height: <?php echo intval($option8['sfsi_form_height']) ?>px !important;
530
 
531
+ <?php endif;
532
+ ?><?php if(sanitize_text_field($option8['sfsi_form_border'])=='yes'): ?> border: <?php echo intval($option8['sfsi_form_border_thickness'])."px solid ".sfsi_sanitize_hex_color($option8['sfsi_form_border_color']);
533
+ ?> !important;
534
 
535
+ <?php endif;
536
+ ?>padding: 18px 0px !important;
537
 
538
+ background-color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_background']) ?> !important;
539
 
540
+ }
541
 
542
+ .sfsi_subscribe_Popinner form {
543
 
544
+ margin: 0 20px !important;
545
 
546
+ }
547
 
548
+ .sfsi_subscribe_Popinner h5 {
549
 
550
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_heading_font']) ?> !important;
551
 
552
+ <?php if(sanitize_text_field($option8['sfsi_form_heading_fontstyle']) !='bold') {
553
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontstyle']) ?> !important;
554
 
555
+ <?php
556
+ }
557
 
558
+ else {
559
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontstyle']) ?> !important;
560
 
561
+ <?php
562
+ }
563
 
564
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_heading_fontcolor']) ?> !important;
565
 
566
+ font-size: <?php echo intval($option8['sfsi_form_heading_fontsize'])."px"?> !important;
567
 
568
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_heading_fontalign']) ?> !important;
569
 
570
+ margin: 0 0 10px !important;
571
 
572
+ padding: 0 !important;
573
 
574
+ }
575
 
576
+ .sfsi_subscription_form_field {
577
 
578
+ margin: 5px 0 !important;
579
 
580
+ width: 100% !important;
581
 
582
+ display: inline-flex;
583
 
584
+ display: -webkit-inline-flex;
585
 
586
+ }
587
 
588
+ .sfsi_subscription_form_field input {
589
 
590
+ width: 100% !important;
591
 
592
+ padding: 10px 0px !important;
593
 
594
+ }
595
 
596
+ .sfsi_subscribe_Popinner input[type=email] {
597
 
598
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']);
599
+ ?> !important;
600
 
601
+ <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) !='bold') {
602
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
603
 
604
+ <?php
605
+ }
606
 
607
+ else {
608
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
609
 
610
+ <?php
611
+ }
612
 
613
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']);
614
+ ?> !important;
615
 
616
+ font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px"?> !important;
617
 
618
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']);
619
+ ?> !important;
620
 
621
+ }
622
 
623
+ .sfsi_subscribe_Popinner input[type=email]::-webkit-input-placeholder {
624
 
625
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']);
626
+ ?> !important;
627
 
628
+ <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) !='bold') {
629
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
630
 
631
+ <?php
632
+ }
633
 
634
+ else {
635
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
636
 
637
+ <?php
638
+ }
639
 
640
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']);
641
+ ?> !important;
642
 
643
+ font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px"?> !important;
644
 
645
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']);
646
+ ?> !important;
647
 
648
+ }
649
 
650
+ .sfsi_subscribe_Popinner input[type=email]:-moz-placeholder {
651
+ /* Firefox 18- */
652
 
653
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']);
654
+ ?> !important;
655
 
656
+ <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) !='bold') {
657
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
658
 
659
+ <?php
660
+ }
661
 
662
+ else {
663
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
664
 
665
+ <?php
666
+ }
667
 
668
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']);
669
+ ?> !important;
670
 
671
+ font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px"?> !important;
672
 
673
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']);
674
+ ?> !important;
675
 
676
+ }
677
 
678
+ .sfsi_subscribe_Popinner input[type=email]::-moz-placeholder {
679
+ /* Firefox 19+ */
680
 
681
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']);
682
+ ?> !important;
683
 
684
+ <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) !='bold') {
685
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
686
 
687
+ <?php
688
+ }
689
 
690
+ else {
691
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
692
 
693
+ <?php
694
+ }
695
 
696
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']);
697
+ ?> !important;
698
 
699
+ font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px"?> !important;
700
 
701
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']);
702
+ ?> !important;
703
 
704
+ }
705
 
706
+ .sfsi_subscribe_Popinner input[type=email]:-ms-input-placeholder {
707
 
708
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_field_font']);
709
+ ?> !important;
710
 
711
+ <?php if(sanitize_text_field($option8['sfsi_form_field_fontstyle']) !='bold') {
712
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
713
 
714
+ <?php
715
+ }
716
 
717
+ else {
718
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_field_fontstyle']) ?> !important;
719
 
720
+ <?php
721
+ }
722
 
723
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']);
724
+ ?> !important;
725
 
726
+ font-size: <?php echo intval($option8['sfsi_form_field_fontsize'])."px"?> !important;
727
 
728
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_field_fontalign']);
729
+ ?> !important;
730
 
731
+ }
732
 
733
+ .sfsi_subscribe_Popinner input[type=submit] {
734
 
735
+ font-family: <?php echo sanitize_text_field($option8['sfsi_form_button_font']);
736
+ ?> !important;
737
 
738
+ <?php if(sanitize_text_field($option8['sfsi_form_button_fontstyle']) !='bold') {
739
+ ?>font-style: <?php echo sanitize_text_field($option8['sfsi_form_button_fontstyle']) ?> !important;
740
 
741
+ <?php
742
+ }
743
 
744
+ else {
745
+ ?>font-weight: <?php echo sanitize_text_field($option8['sfsi_form_button_fontstyle']) ?> !important;
746
 
747
+ <?php
748
+ }
749
 
750
+ ?>color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_button_fontcolor']);
751
+ ?> !important;
752
 
753
+ font-size: <?php echo intval($option8['sfsi_form_button_fontsize'])."px"?> !important;
754
 
755
+ text-align: <?php echo sanitize_text_field($option8['sfsi_form_button_fontalign']);
756
+ ?> !important;
757
 
758
+ background-color: <?php echo sfsi_sanitize_hex_color($option8['sfsi_form_button_background']);
759
+ ?> !important;
760
 
761
+ }
762
+ </style>
763
 
764
+ <?php
765
 
766
  }
767
 
852
 
853
  // </div> -->
854
 
855
+ <?php
856
 
857
  // }
858
  /**
891
 
892
  ?>
893
 
894
+ <style type="text/css">
895
+ div.sfsi_show_premium_notification {
 
 
896
 
897
+ float: none;
898
 
899
+ display: block;
900
 
901
+ margin-left: 15px;
902
 
903
+ margin-top: 15px;
904
 
905
+ padding: 8px;
906
 
907
+ background-color: #38B54A;
908
 
909
+ color: #fff;
910
 
911
+ font-size: 18px;
912
 
913
+ }
914
 
915
+ .sfsi_show_premium_notification a {
916
 
917
+ color: #fff;
918
 
919
+ }
920
 
921
+ form.sfsi_premiumNoticeDismiss {
922
 
923
+ display: inline-block;
924
 
925
+ margin: 5px 0 0;
926
 
927
+ vertical-align: middle;
928
 
929
+ }
930
 
931
+ .sfsi_premiumNoticeDismiss input[type='submit'] {
932
 
933
+ background-color: transparent;
934
 
935
+ border: medium none;
936
 
937
+ color: #fff;
938
 
939
+ margin: 0;
940
 
941
+ padding: 0;
942
 
943
+ cursor: pointer;
944
 
945
+ }
946
+ </style>
947
 
948
+ <div class="updated sfsi_show_premium_notification" style="<?php echo isset($style)?$style:''; ?>">
949
 
950
+ <div style="margin: 9px 0; ">
951
 
952
+ BIG NEWS: There is now a <b><a
953
+ href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner"
954
+ target="_blank">Premium Ultimate Social Media Plugin</a></b> available with many more cool features: <a
955
+ href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner"
956
+ target="_blank">Check it out</a>
957
 
958
+ </div>
959
 
960
+ <div style="text-align:right;margin-top:-40px;">
961
 
962
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
963
 
964
+ <input type="hidden" name="sfsi-dismiss-premiumNotice" value="true">
965
 
966
+ <input type="submit" name="dismiss" value="Dismiss" />
967
 
968
+ </form>
969
 
970
+ </div>
971
 
972
+ </div>
973
 
974
+ <?php
975
 
976
  }
977
  if(is_ssl()){
981
 
982
  ?>
983
 
984
+ <style type="text/css">
985
+ div.sfsi_show_premium_cumulative_count_notification {
 
986
 
987
+ color: #fff;
988
 
989
+ float: left;
990
 
991
+ width: 94.2%;
992
 
993
+ margin-left: 37px;
994
 
995
+ margin-top: 15px;
996
 
997
+ padding: 8px;
998
 
999
+ background-color: #38B54A;
1000
 
1001
+ color: #fff;
1002
 
1003
+ font-size: 18px;
1004
 
1005
+ }
 
 
1006
 
1007
+ .sfsi_show_premium_cumulative_count_notification a {
 
1008
 
1009
+ color: #fff;
1010
+ }
1011
 
1012
+ form.sfsi_premiumCumulativeCountNoticeDismiss {
1013
 
1014
+ display: inline-block;
1015
 
1016
+ margin: 5px 0 0;
1017
 
1018
+ vertical-align: middle;
1019
 
1020
+ }
1021
 
1022
+ .sfsi_premiumCumulativeCountNoticeDismiss input[type='submit'] {
1023
 
1024
+ background-color: transparent;
1025
 
1026
+ border: medium none;
1027
 
1028
+ color: #fff;
1029
 
1030
+ margin: 0;
1031
 
1032
+ padding: 0;
1033
 
1034
+ cursor: pointer;
1035
 
1036
+ }
1037
+ </style>
1038
 
1039
+ <div class="updated sfsi_show_premium_cumulative_count_notification">
1040
 
1041
+ <div style="margin: 9px 0;">
1042
 
1043
+ <b>Recently switched to https?</b> If you don’t want to lose the Facebook share & like counts <a
1044
+ href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=https_share_counts&utm_medium=banner"
1045
+ target="_blank">have a look at our Premium Plugin</a>, we found a fix for that: <a
1046
+ href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=https_share_counts&utm_medium=banner"
1047
+ target="_blank">Check it out</a>
1048
 
1049
+ </div>
1050
 
1051
+ <div style="text-align: right;margin-top:-30px">
1052
 
1053
+ <form method="post" class="sfsi_premiumCumulativeCountNoticeDismiss" style="padding:10px">
1054
 
1055
+ <input type="hidden" name="sfsi-dismiss-premiumCumulativeCountNoticeDismiss" value="true">
1056
 
1057
+ <input type="submit" name="dismiss" value="Dismiss" />
1058
 
1059
+ </form>
1060
 
1061
+ </div>
1062
 
1063
+ <div style=”clear:both”></div>
1064
 
1065
+ </div>
1066
 
1067
+ <?php
1068
 
1069
  }
1070
 
1083
 
1084
  ?>
1085
 
1086
+ <style type="text/css">
1087
+ .sfsi_show_mobile_notification a {
1088
 
1089
+ color: #fff;
1090
 
1091
+ }
 
 
 
 
1092
 
1093
+ form.sfsi_mobileNoticeDismiss {
1094
 
1095
+ display: inline-block;
1096
 
1097
+ margin: 5px 0 0;
1098
 
1099
+ vertical-align: middle;
1100
 
1101
+ }
1102
 
1103
+ .sfsi_mobileNoticeDismiss input[type='submit'] {
1104
 
1105
+ background-color: transparent;
1106
 
1107
+ border: medium none;
1108
 
1109
+ color: #fff;
1110
 
1111
+ margin: 0;
1112
 
1113
+ padding: 0;
1114
 
1115
+ cursor: pointer;
1116
 
1117
+ }
1118
+ </style>
1119
 
1120
+ <!-- <div class="updated sfsi_show_mobile_notification" style="<?php //echo $style; ?>background-color: #38B54A; color: #fff; font-size: 18px;">
1121
 
1122
  <div class="alignleft" style="margin: 9px 0;line-height: 24px;width: 95%;">
1123
 
1139
 
1140
  </div> -->
1141
 
1142
+ <?php
1143
 
1144
  }
1145
 
1160
  {
1161
  ?>
1162
 
 
1163
 
 
1164
 
1165
+ <style type="text/css">
1166
+ .sfsi_show_phperror_notification {
1167
 
1168
+ color: #fff;
1169
 
1170
+ text-decoration: underline;
1171
 
1172
+ }
1173
 
1174
+ form.sfsi_phperrorNoticeDismiss {
1175
 
1176
+ display: inline-block;
1177
 
1178
+ margin: 5px 0 0;
1179
 
1180
+ vertical-align: middle;
1181
 
1182
+ }
1183
 
1184
+ .sfsi_phperrorNoticeDismiss input[type='submit'] {
1185
 
1186
+ background-color: transparent;
1187
 
1188
+ border: medium none;
1189
 
1190
+ color: #fff;
1191
 
1192
+ margin: 0;
1193
 
1194
+ padding: 0;
1195
 
1196
+ cursor: pointer;
1197
 
1198
+ }
1199
 
1200
+ .sfsi_show_phperror_notification p {
1201
+ line-height: 22px;
1202
+ }
1203
 
1204
+ p.sfsi_show_notifictaionpragraph {
1205
+ padding: 0 !important;
1206
+ font-size: 18px;
1207
+ }
1208
+ </style>
1209
+ <div class="updated sfsi_show_phperror_notification"
1210
+ style="<?php echo (isset($style)?$style:''); ?>background-color: #D22B2F; color: #fff; font-size: 18px; border-left-color: #D22B2F;">
1211
 
1212
+ <div style="margin: 9px 0;">
1213
+ <p class="sfsi_show_notifictaionpragraph">
 
1214
 
1215
+ We noticed you are running your site on a PHP version older than 5.4. Please upgrade to a more recent
1216
+ version. This is not only important for running the Ultimate Social Media Plugin, but also for security
1217
+ reasons in general.
1218
 
1219
+ <br>
1220
 
1221
+ If you do not know how to do the upgrade, please ask your server team or hosting company to do it for you.'
1222
 
1223
+ </p>
1224
+ </div>
1225
 
1226
+ <div style="text-align:right;margin-top:-30px">
 
1227
 
1228
+ <form method="post" class="sfsi_phperrorNoticeDismiss" style="padding-bottom:10px">
1229
 
1230
+ <input type="hidden" name="sfsi-dismiss-phperrorNotice" value="true">
1231
 
1232
+ <input type="submit" name="dismiss" value="Dismiss" />
1233
 
1234
+ </form>
1235
 
1236
+ </div>
1237
 
1238
+ </div>
1239
 
 
1240
 
 
1241
 
1242
+ <?php
1243
 
1244
  }
1245
 
1438
  && ("sfsi-options" == $_GET['page']) && ("yes" == get_option("sfsi_languageNotice") ) ) {
1439
 
1440
  ?>
1441
+ <style type="text/css">
1442
+ form.sfsi_languageNoticeDismiss {
1443
+ display: inline-block;
1444
+ margin: 5px 0 0;
1445
+ vertical-align: middle;
1446
+ }
1447
 
1448
+ .sfsi_languageNoticeDismiss input[type='submit'] {
1449
+ background-color: transparent;
1450
+ border: medium none;
1451
+ margin: 0 5px 0 0px;
1452
+ padding: 0;
1453
+ cursor: pointer;
1454
+ font-size: 22px;
1455
+ }
1456
+ </style>
1457
 
1458
+ <div class="notice notice-info" style="<?php echo isset($style)?$style:''; ?>">
1459
 
1460
+ <div style="margin: 9px 0;">
1461
 
1462
+ <?php echo $text; ?>
1463
 
1464
+ </div>
1465
 
1466
+ <div style="text-align: right;margin-top:-30px">
1467
 
1468
+ <form method="post" class="sfsi_languageNoticeDismiss" style="padding-bottom:10px">
1469
 
1470
+ <input type="hidden" name="sfsi-dismiss-languageNotice" value="true">
1471
 
1472
+ <input type="submit" name="dismiss" value="&times;" />
1473
 
1474
+ </form>
1475
 
1476
+ </div>
1477
 
1478
+ </div>
1479
+ <?php }
1480
 
1481
  }
1482
  add_action('admin_init', 'sfsi_dismiss_admin_notice');
1588
  add_action( 'admin_footer', '_sfsi_add_deactivation_feedback_dialog_box');
1589
  function _sfsi_add_deactivation_feedback_dialog_box(){
1590
  include_once(SFSI_DOCROOT.'/views/deactivation/sfsi_deactivation_popup.php'); ?>
1591
+ <script type="text/javascript">
1592
+ jQuery(document).ready(function($) {
1593
+ var _deactivationLink = $('.sfsi-deactivate-slug').prev();
1594
+ $('.sfsi-deactivation-reason-link').find('a').attr('href', _deactivationLink.attr('href'));
1595
+ _deactivationLink.on('click', function(e) {
1596
 
1597
+ e.preventDefault();
1598
 
1599
+ $('[data-popup="popup-1"]').fadeIn(350);
 
 
 
1600
 
1601
+ });
1602
+ //----- CLOSE
1603
 
1604
+ $('[data-popup-close]').on('click', function(e) {
1605
 
1606
+ e.preventDefault();
 
1607
 
1608
+ var targeted_popup_class = jQuery(this).attr('data-popup-close');
1609
 
1610
+ $('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
1611
 
1612
+ });
1613
+ //----- OPEN
1614
 
1615
+ $('[data-popup-open]').on('click', function(e) {
1616
 
1617
+ e.preventDefault();
 
1618
 
1619
+ var targeted_popup_class = jQuery(this).attr('data-popup-open');
1620
 
1621
+ $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
1622
 
1623
+ });
1624
+ $('.sfsi-deactivate-radio').on('click', function(e) {
1625
+ $('.sfsi-deactivate-radio').attr('checked', false);
1626
 
1627
+ $(this).attr('checked', true);
1628
+ var val = $(this).val();
1629
+ $('.sfsi-reason-section').removeClass('show').addClass('hide');
1630
 
1631
+ $(this).parent().find('.sfsi-reason-section').addClass('show').removeClass('hide');
 
 
1632
 
1633
+ });
1634
+ $('.sfsi-deactivate-radio-text').on('click', function(e) {
 
1635
 
1636
+ $(this).prev().trigger('click');
1637
 
1638
+ });
1639
+ });
1640
+ </script>
1641
 
1642
+ <?php
 
 
 
 
 
 
1643
 
1644
  }
1645
 
1675
 
1676
  ?>
1677
 
1678
+ <script type="text/javascript">
1679
+ jQuery(document).ready(function(e) {
1680
 
1681
+ jQuery(".sfsi_curlerror_cross").click(function() {
1682
 
1683
+ SFSI.ajax({
1684
 
1685
+ url: sfsi_icon_ajax_object.ajax_url,
1686
 
1687
+ type: "post",
1688
 
1689
+ data: {
1690
+ action: "sfsi_curlerrornotification"
1691
+ },
1692
 
1693
+ success: function(msg)
1694
 
1695
+ {
1696
 
1697
+ jQuery(".sfsi_curlerror").hide("fast");
1698
 
 
1699
 
 
1700
 
1701
+ }
1702
 
1703
+ });
1704
 
1705
+ });
1706
 
1707
+ });
1708
+ </script>
1709
+ <div class="sfsi_curlerror">
1710
 
1711
+ We noticed that your site returns a cURL error («Error:
 
1712
 
1713
+ <?php echo ucfirst(get_option("sfsi_curlErrorMessage")); ?>
1714
 
1715
+ »). This means that it cannot send a notification to SpecificFeeds.com when a new post is published. Therefore this
1716
+ email-feature doesn’t work. However there are several solutions for this, please visit our FAQ to see the solutions
1717
+ («Perceived bugs» => «cURL error messages»):
1718
 
1719
+ <a href="https://www.ultimatelysocial.com/faq/" target="new">
1720
 
1721
+ www.ultimatelysocial.com/faq
1722
 
1723
+ </a>
1724
 
1725
+ <div class="sfsi_curlerror_cross">Dismiss</div>
1726
 
1727
+ </div>
1728
 
1729
+ <?php
 
 
1730
 
1731
  }
1732
 
1938
  $isDismissed = get_option('sfsi_lang_notice_dismissed');
1939
  if(!empty($langText) && false == $isDismissed) { ?>
1940
 
 
1941
 
1942
+
1943
+ <div id="sfsi_plus_langnotice" class="notice notice-info">
1944
+ <p><?php echo $langText; ?></p>
1945
+ <button type="button" class="sfsi-notice-dismiss notice-dismiss"></button>
1946
+ </div>
1947
+ <?php } ?>
1948
+ <?php endif;
1949
 
1950
  }
1951
  function sfsi_dismiss_lang_notice(){
1976
  $isDismissed = get_option('sfsi_addThis_icon_removal_notice_dismissed',false);
1977
  if( false == $isDismissed) { ?>
1978
 
 
1979
 
1980
+
1981
+ <div id="sfsi_plus_addThis_removal_notice" class="notice notice-info">
1982
+ <p><?php echo $sfsi_addThis_removalText; ?></p>
1983
+ <button type="button" class="sfsi-AddThis-notice-dismiss notice-dismiss"></button>
1984
+ </div>
1985
+ <?php } ?>
1986
+ <?php endif;
1987
 
1988
  }
1989
  function sfsi_dismiss_addthhis_removal_notice(){
2005
  // ********************************* Notice for removal of AddThis option CLOSES *******************************//
2006
  // ********************************* Link to support forum left of every Save button STARTS *******************************//
2007
  function sfsi_ask_for_help($viewNumber){ ?>
2008
+ <div class="sfsi_askforhelp askhelpInview<?php echo $viewNumber; ?>">
2009
+ <img src="<?php echo SFSI_PLUGURL."images/questionmark.png";?>" alt="error" />
2010
+ <span>Questions? <a target="_blank" href="#" onclick="event.preventDefault();sfsi_open_chat(event)"><b>Ask
2011
+ us</b></a></span>
2012
+ </div>
2013
  <?php }
2014
  // ********************************* Link to support forum left of every Save button CLOSES *******************************//
2015
  // ********************************* Notice for error reporting STARTS *******************************//
2024
  $sfsi_icons_suppress_errors = isset($option5['sfsi_icons_suppress_errors']) && !empty($option5['sfsi_icons_suppress_errors']) ? $option5['sfsi_icons_suppress_errors']: false;
2025
  if(isset($isDismissed) && false == $isDismissed && defined('WP_DEBUG') && false != WP_DEBUG && "yes"== $sfsi_icons_suppress_errors) { ?>
2026
 
 
2027
 
 
 
 
 
 
 
 
2028
 
2029
+ <div style="padding: 10px;margin-left: 0px;position: relative;" id="sfsi_error_reporting_notice" class="error notice">
2030
+ <p><?php echo $sfsi_error_reporting_notice_txt; ?></p>
2031
+ <button type="button" class="sfsi_error_reporting_notice-dismiss notice-dismiss"></button>
2032
+ </div>
2033
+ <script type="text/javascript">
2034
+ if (typeof jQuery != 'undefined') {
2035
+ (function sfsi_dismiss_notice(btnClass, ajaxAction, nonce) {
2036
+
2037
 
 
 
 
2038
 
2039
+ var btnClass = "." + btnClass;
2040
+ var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
2041
+ jQuery(document).on("click", btnClass, function() {
2042
 
 
2043
 
 
2044
 
2045
+ jQuery.ajax({
2046
 
2047
+ url: ajaxurl,
2048
 
2049
+ type: "post",
2050
 
2051
+ data: {
2052
+ action: ajaxAction
2053
+ },
2054
 
2055
+ success: function(e) {
2056
 
2057
+ if (false != e) {
2058
 
2059
+ jQuery(btnClass).parent().remove();
2060
 
2061
+ }
 
 
2062
 
2063
+ }
2064
 
2065
+ });
2066
+ });
2067
+ }("sfsi_error_reporting_notice-dismiss", "sfsi_dismiss_error_reporting_notice",
2068
+ "<?php echo wp_create_nonce('sfsi_dismiss_error_reporting_notice'); ?>"));
2069
+
2070
+ }
2071
+ </script>
2072
+ <?php } ?>
2073
+ <?php endif;
2074
 
2075
  }
2076
  function sfsi_dismiss_error_reporting_notice(){
2090
  }
2091
 
2092
  add_action( 'wp_ajax_sfsi_dismiss_error_reporting_notice', 'sfsi_dismiss_error_reporting_notice' );
2093
+ // ********************************* Notice for error reporting CLOSE *******************************//