Social Media Share Buttons & Social Sharing Icons - Version 2.3.7

Version Description

  • solved: Wrong link on icons when curl not installed.
Download this release

Release Info

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

Code changes from version 2.3.6 to 2.3.7

analyst/sdk_resolver.php CHANGED
@@ -1,79 +1,79 @@
1
- <?php
2
-
3
- if (!function_exists('analyst_resolve_sdk')) {
4
-
5
- /**
6
- * Resolve supported sdk versions and load latest supported one
7
- * also bootstrap sdk with autoloader
8
- *
9
- * @since 1.1.3
10
- *
11
- * @param null $thisPluginPath
12
- * @return void
13
- * @throws Exception
14
- */
15
- function analyst_resolve_sdk($thisPluginPath = null) {
16
- static $loaded = false;
17
-
18
- // Exit if we already resolved SDK
19
- if ($loaded) return;
20
-
21
- $plugins = get_option('active_plugins');
22
-
23
- if ($thisPluginPath) {
24
- array_push($plugins, plugin_basename($thisPluginPath));
25
- }
26
-
27
- $pluginsFolder = WP_PLUGIN_DIR;
28
-
29
- $possibleSDKs = array_map(function ($path) use ($pluginsFolder) {
30
- $sdkFolder = sprintf('%s/%s/analyst/', $pluginsFolder, dirname($path));
31
-
32
- $sdkFolder = str_replace('\\', '/', $sdkFolder);
33
-
34
- $versionPath = $sdkFolder . 'version.php';
35
-
36
- if (file_exists($versionPath)) {
37
- return require $versionPath;
38
- }
39
-
40
- return false;
41
- }, $plugins);
42
-
43
- global $wp_version;
44
-
45
- // Filter out plugins which has no SDK
46
- $SDKs = array_filter($possibleSDKs, function ($s) {return is_array($s);});
47
-
48
- // Filter SDKs which is supported by PHP and WP
49
- $supported = array_values(array_filter($SDKs, function ($sdk) use($wp_version) {
50
- $phpSupported = version_compare(PHP_VERSION, $sdk['php']) >= 0;
51
- $wpSupported = version_compare($wp_version, $sdk['wp']) >= 0;
52
-
53
- return $phpSupported && $wpSupported;
54
- }));
55
-
56
- // Sort SDK by version in descending order
57
- uasort($supported, function ($x, $y) {
58
- return version_compare($y['sdk'], $x['sdk']);
59
- });
60
-
61
- // Reset sorted values keys
62
- $supported = array_values($supported);
63
-
64
- if (!isset($supported[0])) {
65
- throw new Exception('There is no SDK which is support current PHP version and WP version');
66
- }
67
-
68
- // Autoload files for supported SDK
69
- $autoloaderPath = str_replace(
70
- '\\',
71
- '/',
72
- sprintf('%s/autoload.php', $supported[0]['path'])
73
- );
74
-
75
- require_once $autoloaderPath;
76
-
77
- $loaded = true;
78
- }
79
- }
1
+ <?php
2
+
3
+ if (!function_exists('analyst_resolve_sdk')) {
4
+
5
+ /**
6
+ * Resolve supported sdk versions and load latest supported one
7
+ * also bootstrap sdk with autoloader
8
+ *
9
+ * @since 1.1.3
10
+ *
11
+ * @param null $thisPluginPath
12
+ * @return void
13
+ * @throws Exception
14
+ */
15
+ function analyst_resolve_sdk($thisPluginPath = null) {
16
+ static $loaded = false;
17
+
18
+ // Exit if we already resolved SDK
19
+ if ($loaded) return;
20
+
21
+ $plugins = get_option('active_plugins');
22
+
23
+ if ($thisPluginPath) {
24
+ array_push($plugins, plugin_basename($thisPluginPath));
25
+ }
26
+
27
+ $pluginsFolder = WP_PLUGIN_DIR;
28
+
29
+ $possibleSDKs = array_map(function ($path) use ($pluginsFolder) {
30
+ $sdkFolder = sprintf('%s/%s/analyst/', $pluginsFolder, dirname($path));
31
+
32
+ $sdkFolder = str_replace('\\', '/', $sdkFolder);
33
+
34
+ $versionPath = $sdkFolder . 'version.php';
35
+
36
+ if (file_exists($versionPath)) {
37
+ return require $versionPath;
38
+ }
39
+
40
+ return false;
41
+ }, $plugins);
42
+
43
+ global $wp_version;
44
+
45
+ // Filter out plugins which has no SDK
46
+ $SDKs = array_filter($possibleSDKs, function ($s) {return is_array($s);});
47
+
48
+ // Filter SDKs which is supported by PHP and WP
49
+ $supported = array_values(array_filter($SDKs, function ($sdk) use($wp_version) {
50
+ $phpSupported = version_compare(PHP_VERSION, $sdk['php']) >= 0;
51
+ $wpSupported = version_compare($wp_version, $sdk['wp']) >= 0;
52
+
53
+ return $phpSupported && $wpSupported;
54
+ }));
55
+
56
+ // Sort SDK by version in descending order
57
+ uasort($supported, function ($x, $y) {
58
+ return version_compare($y['sdk'], $x['sdk']);
59
+ });
60
+
61
+ // Reset sorted values keys
62
+ $supported = array_values($supported);
63
+
64
+ if (!isset($supported[0])) {
65
+ throw new Exception('There is no SDK which is support current PHP version and WP version');
66
+ }
67
+
68
+ // Autoload files for supported SDK
69
+ $autoloaderPath = str_replace(
70
+ '\\',
71
+ '/',
72
+ sprintf('%s/autoload.php', $supported[0]['path'])
73
+ );
74
+
75
+ require_once $autoloaderPath;
76
+
77
+ $loaded = true;
78
+ }
79
+ }
analyst/src/Account/Account.php CHANGED
@@ -1,604 +1,604 @@
1
- <?php
2
-
3
- namespace Account;
4
-
5
- use Analyst\Analyst;
6
- use Analyst\ApiRequestor;
7
- use Analyst\Cache\DatabaseCache;
8
- use Analyst\Collector;
9
- use Analyst\Http\Requests\ActivateRequest;
10
- use Analyst\Http\Requests\DeactivateRequest;
11
- use Analyst\Http\Requests\InstallRequest;
12
- use Analyst\Http\Requests\OptInRequest;
13
- use Analyst\Http\Requests\OptOutRequest;
14
- use Analyst\Http\Requests\UninstallRequest;
15
- use Analyst\Notices\Notice;
16
- use Analyst\Notices\NoticeFactory;
17
- use Analyst\Contracts\TrackerContract;
18
- use Analyst\Contracts\RequestorContract;
19
-
20
- /**
21
- * Class Account
22
- *
23
- * This is plugin's account object
24
- */
25
- class Account implements TrackerContract
26
- {
27
- /**
28
- * Account id
29
- *
30
- * @var string
31
- */
32
- protected $id;
33
-
34
- /**
35
- * Basename of plugin
36
- *
37
- * @var string
38
- */
39
- protected $path;
40
-
41
- /**
42
- * Whether plugin is active or not
43
- *
44
- * @var bool
45
- */
46
- protected $isInstalled = false;
47
-
48
- /**
49
- * Is user sign in for data tracking
50
- *
51
- * @var bool
52
- */
53
- protected $isOptedIn = false;
54
-
55
- /**
56
- * Is user accepted permissions grant
57
- * for collection site data
58
- *
59
- * @var bool
60
- */
61
- protected $isSigned = false;
62
-
63
- /**
64
- * Is user ever resolved install modal window?
65
- *
66
- * @var bool
67
- */
68
- protected $isInstallResolved = false;
69
-
70
- /**
71
- * Public secret code
72
- *
73
- * @var string
74
- */
75
- protected $clientSecret;
76
-
77
- /**
78
- * @var AccountData
79
- */
80
- protected $data;
81
-
82
- /**
83
- * Base plugin path
84
- *
85
- * @var string
86
- */
87
- protected $basePluginPath;
88
-
89
- /**
90
- * @var RequestorContract
91
- */
92
- protected $requestor;
93
-
94
- /**
95
- * @var Collector
96
- */
97
- protected $collector;
98
-
99
- /**
100
- * Account constructor.
101
- * @param $id
102
- * @param $secret
103
- * @param $baseDir
104
- */
105
- public function __construct($id, $secret, $baseDir)
106
- {
107
- $this->id = $id;
108
- $this->clientSecret = $secret;
109
-
110
- $this->path = $baseDir;
111
-
112
- $this->basePluginPath = plugin_basename($baseDir);
113
- }
114
-
115
- /**
116
- * @return string
117
- */
118
- public function getPath()
119
- {
120
- return $this->path;
121
- }
122
-
123
- /**
124
- * @param string $path
125
- */
126
- public function setPath($path)
127
- {
128
- $this->data->setPath($path);
129
-
130
- $this->path = $path;
131
- }
132
-
133
- /**
134
- * @return bool
135
- */
136
- public function isOptedIn()
137
- {
138
- return $this->isOptedIn;
139
- }
140
-
141
- /**
142
- * @param bool $isOptedIn
143
- */
144
- public function setIsOptedIn($isOptedIn)
145
- {
146
- $this->data->setIsOptedIn($isOptedIn);
147
-
148
- $this->isOptedIn = $isOptedIn;
149
- }
150
-
151
- /**
152
- * Whether plugin is active
153
- *
154
- * @return bool
155
- */
156
- public function isActive()
157
- {
158
- return is_plugin_active($this->path);
159
- }
160
-
161
- /**
162
- * @param string $id
163
- */
164
- public function setId($id)
165
- {
166
- $this->id = $id;
167
- }
168
-
169
- /**
170
- * @return string
171
- */
172
- public function getId()
173
- {
174
- return $this->id;
175
- }
176
-
177
- /**
178
- * @return bool
179
- */
180
- public function isInstalled()
181
- {
182
- return $this->isInstalled;
183
- }
184
-
185
- /**
186
- * @param bool $isInstalled
187
- */
188
- public function setIsInstalled($isInstalled)
189
- {
190
- $this->data->setIsInstalled($isInstalled);
191
-
192
- $this->isInstalled = $isInstalled;
193
- }
194
-
195
- /**
196
- * Should register activation and deactivation
197
- * event hooks
198
- *
199
- * @return void
200
- */
201
- public function registerHooks()
202
- {
203
- register_activation_hook($this->basePluginPath, [&$this, 'onActivePluginListener']);
204
- register_uninstall_hook($this->basePluginPath, ['Account\Account', 'onUninstallPluginListener']);
205
-
206
- $this->addFilter('plugin_action_links', [&$this, 'onRenderActionLinksHook']);
207
-
208
- $this->addAjax('analyst_opt_in', [&$this, 'onOptInListener']);
209
- $this->addAjax('analyst_opt_out', [&$this, 'onOptOutListener']);
210
- $this->addAjax('analyst_plugin_deactivate', [&$this, 'onDeactivatePluginListener']);
211
- $this->addAjax('analyst_install', [&$this, 'onInstallListener']);
212
- $this->addAjax('analyst_skip_install', [&$this, 'onSkipInstallListener']);
213
- $this->addAjax('analyst_install_verified', [&$this, 'onInstallVerifiedListener']);
214
- }
215
-
216
- /**
217
- * Will fire when admin activates plugin
218
- *
219
- * @return void
220
- */
221
- public function onActivePluginListener()
222
- {
223
- if (!$this->isInstallResolved()) {
224
- DatabaseCache::getInstance()->put('plugin_to_install', $this->id);
225
- }
226
-
227
- if (!$this->isAllowingLogging()) return;
228
-
229
- ActivateRequest::make($this->collector, $this->id, $this->path)
230
- ->execute($this->requestor);
231
-
232
- $this->setIsInstalled(true);
233
-
234
- AccountDataFactory::syncData();
235
- }
236
-
237
- /**
238
- * Will fire when admin deactivates plugin
239
- *
240
- * @return void
241
- */
242
- public function onDeactivatePluginListener()
243
- {
244
- if (!$this->isAllowingLogging()) return;
245
-
246
- $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
- $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
-
249
- $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
- ->execute($this->requestor);
251
-
252
- // Exit if request failed
253
- if (!$response->isSuccess()) {
254
- wp_send_json_error($response->body);
255
- }
256
-
257
- $this->setIsInstalled(false);
258
-
259
- AccountDataFactory::syncData();
260
-
261
- wp_send_json_success();
262
- }
263
-
264
- /**
265
- * Will fire when user opted in
266
- *
267
- * @return void
268
- */
269
- public function onOptInListener()
270
- {
271
- $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
272
-
273
- // Exit if request failed
274
- if (!$response->isSuccess()) {
275
- wp_send_json_error($response->body);
276
- }
277
-
278
- $this->setIsOptedIn(true);
279
-
280
- AccountDataFactory::syncData();
281
-
282
- wp_die();
283
- }
284
-
285
- /**
286
- * Will fire when user opted out
287
- *
288
- * @return void
289
- */
290
- public function onOptOutListener()
291
- {
292
- $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
293
-
294
- // Exit if request failed
295
- if (!$response->isSuccess()) {
296
- wp_send_json_error($response->body);
297
- }
298
-
299
- $this->setIsOptedIn(false);
300
-
301
- AccountDataFactory::syncData();
302
-
303
- wp_send_json_success();
304
- }
305
-
306
- /**
307
- * Will fire when user accept opt-in
308
- * at first time
309
- *
310
- * @return void
311
- */
312
- public function onInstallListener()
313
- {
314
- $cache = DatabaseCache::getInstance();
315
-
316
- // Set flag to true which indicates that install is resolved
317
- // also remove install plugin id from cache
318
- $this->setIsInstallResolved(true);
319
- $cache->delete('plugin_to_install');
320
-
321
- $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
322
-
323
- // Exit if request failed
324
- if (!$response->isSuccess()) {
325
- wp_send_json_error($response->body);
326
- }
327
-
328
- $this->setIsSigned(true);
329
-
330
- $this->setIsOptedIn(true);
331
-
332
- $factory = NoticeFactory::instance();
333
-
334
- $message = sprintf('Please confirm your email by clicking on the link we sent to %s. This makes sure you’re not a bot.', $this->collector->getGeneralEmailAddress());
335
-
336
- $notificationId = uniqid();
337
-
338
- $notice = Notice::make(
339
- $notificationId,
340
- $this->getId(),
341
- $message,
342
- $this->collector->getPluginName($this->path)
343
- );
344
-
345
- $factory->addNotice($notice);
346
-
347
- AccountDataFactory::syncData();
348
-
349
- // Set email confirmation notification id to cache
350
- // se we can extract and remove it when user confirmed email
351
- $cache->put(
352
- sprintf('account_email_confirmation_%s', $this->getId()),
353
- $notificationId
354
- );
355
-
356
- wp_send_json_success();
357
- }
358
-
359
- /**
360
- * Will fire when user skipped installation
361
- *
362
- * @return void
363
- */
364
- public function onSkipInstallListener()
365
- {
366
- // Set flag to true which indicates that install is resolved
367
- // also remove install plugin id from cache
368
- $this->setIsInstallResolved(true);
369
- DatabaseCache::getInstance()->delete('plugin_to_install');
370
- }
371
-
372
- /**
373
- * Will fire when user delete plugin through admin panel.
374
- * This action will happen if admin at least once
375
- * activated the plugin.
376
- *
377
- * @return void
378
- * @throws \Exception
379
- */
380
- public static function onUninstallPluginListener()
381
- {
382
- $factory = AccountDataFactory::instance();
383
-
384
- $pluginFile = substr(current_filter(), strlen( 'uninstall_' ));
385
-
386
- $account = $factory->getAccountDataByBasePath($pluginFile);
387
-
388
- // If account somehow is not found, exit the execution
389
- if (!$account) return;
390
-
391
- $analyst = Analyst::getInstance();
392
-
393
- $collector = new Collector($analyst);
394
-
395
- $requestor = new ApiRequestor($account->getId(), $account->getSecret(), $analyst->getApiBase());
396
-
397
- // Just send request to log uninstall event not caring about response
398
- UninstallRequest::make($collector, $account->getId(), $account->getPath())->execute($requestor);
399
-
400
- $factory->sync();
401
- }
402
-
403
- /**
404
- * Fires when used verified his account
405
- */
406
- public function onInstallVerifiedListener()
407
- {
408
- $factory = NoticeFactory::instance();
409
-
410
- $notice = Notice::make(
411
- uniqid(),
412
- $this->getId(),
413
- 'Thank you for confirming your email.',
414
- $this->collector->getPluginName($this->path)
415
- );
416
-
417
- $factory->addNotice($notice);
418
-
419
- // Remove confirmation notification
420
- $confirmationNotificationId = DatabaseCache::getInstance()->pop(sprintf('account_email_confirmation_%s', $this->getId()));
421
- $factory->remove($confirmationNotificationId);
422
-
423
- AccountDataFactory::syncData();
424
-
425
- wp_send_json_success();
426
- }
427
-
428
- /**
429
- * Will fire when wp renders plugin
430
- * action buttons
431
- *
432
- * @param $defaultLinks
433
- * @return array
434
- */
435
- public function onRenderActionLinksHook($defaultLinks)
436
- {
437
- $customLinks = [];
438
-
439
- $customLinks[] = $this->isOptedIn()
440
- ? '<a class="analyst-action-opt analyst-opt-out" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt Out</a>'
441
- : '<a class="analyst-action-opt analyst-opt-in" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt In</a>';
442
-
443
- // Append anchor to find specific deactivation link
444
- if (isset($defaultLinks['deactivate'])) {
445
- $defaultLinks['deactivate'] .= '<span analyst-plugin-id="' . $this->getId() . '" analyst-plugin-opted-in="' . (int) $this->isOptedIn() . '"></span>';
446
- }
447
-
448
- return array_merge($customLinks, $defaultLinks);
449
- }
450
-
451
- /**
452
- * @return AccountData
453
- */
454
- public function getData()
455
- {
456
- return $this->data;
457
- }
458
-
459
- /**
460
- * @param AccountData $data
461
- */
462
- public function setData(AccountData $data)
463
- {
464
- $this->data = $data;
465
-
466
- $this->setIsOptedIn($data->isOptedIn());
467
- $this->setIsInstalled($data->isInstalled());
468
- $this->setIsSigned($data->isSigned());
469
- $this->setIsInstallResolved($data->isInstallResolved());
470
- }
471
-
472
- /**
473
- * Resolves valid action name
474
- * based on client id
475
- *
476
- * @param $action
477
- * @return string
478
- */
479
- private function resolveActionName($action)
480
- {
481
- return sprintf('%s_%s', $action, $this->id);
482
- }
483
-
484
- /**
485
- * Register action for current plugin
486
- *
487
- * @param $action
488
- * @param $callback
489
- */
490
- private function addFilter($action, $callback)
491
- {
492
- $validAction = sprintf('%s_%s', $action, $this->basePluginPath);
493
-
494
- add_filter($validAction, $callback, 10);
495
- }
496
-
497
- /**
498
- * Add ajax action for current plugin
499
- *
500
- * @param $action
501
- * @param $callback
502
- * @param bool $raw Format action ??
503
- */
504
- private function addAjax($action, $callback, $raw = false)
505
- {
506
- $validAction = $raw ? $action : sprintf('%s%s', 'wp_ajax_', $this->resolveActionName($action));
507
-
508
- add_action($validAction, $callback);
509
- }
510
-
511
- /**
512
- * @return bool
513
- */
514
- public function isSigned()
515
- {
516
- return $this->isSigned;
517
- }
518
-
519
- /**
520
- * @param bool $isSigned
521
- */
522
- public function setIsSigned($isSigned)
523
- {
524
- $this->data->setIsSigned($isSigned);
525
-
526
- $this->isSigned = $isSigned;
527
- }
528
-
529
- /**
530
- * @return RequestorContract
531
- */
532
- public function getRequestor()
533
- {
534
- return $this->requestor;
535
- }
536
-
537
- /**
538
- * @param RequestorContract $requestor
539
- */
540
- public function setRequestor(RequestorContract $requestor)
541
- {
542
- $this->requestor = $requestor;
543
- }
544
-
545
- /**
546
- * @return string
547
- */
548
- public function getClientSecret()
549
- {
550
- return $this->clientSecret;
551
- }
552
-
553
- /**
554
- * @return Collector
555
- */
556
- public function getCollector()
557
- {
558
- return $this->collector;
559
- }
560
-
561
- /**
562
- * @param Collector $collector
563
- */
564
- public function setCollector(Collector $collector)
565
- {
566
- $this->collector = $collector;
567
- }
568
-
569
- /**
570
- * Do we allowing logging
571
- *
572
- * @return bool
573
- */
574
- public function isAllowingLogging()
575
- {
576
- return $this->isOptedIn;
577
- }
578
-
579
- /**
580
- * @return string
581
- */
582
- public function getBasePluginPath()
583
- {
584
- return $this->basePluginPath;
585
- }
586
-
587
- /**
588
- * @return bool
589
- */
590
- public function isInstallResolved()
591
- {
592
- return $this->isInstallResolved;
593
- }
594
-
595
- /**
596
- * @param bool $isInstallResolved
597
- */
598
- public function setIsInstallResolved($isInstallResolved)
599
- {
600
- $this->data->setIsInstallResolved($isInstallResolved);
601
-
602
- $this->isInstallResolved = $isInstallResolved;
603
- }
604
- }
1
+ <?php
2
+
3
+ namespace Account;
4
+
5
+ use Analyst\Analyst;
6
+ use Analyst\ApiRequestor;
7
+ use Analyst\Cache\DatabaseCache;
8
+ use Analyst\Collector;
9
+ use Analyst\Http\Requests\ActivateRequest;
10
+ use Analyst\Http\Requests\DeactivateRequest;
11
+ use Analyst\Http\Requests\InstallRequest;
12
+ use Analyst\Http\Requests\OptInRequest;
13
+ use Analyst\Http\Requests\OptOutRequest;
14
+ use Analyst\Http\Requests\UninstallRequest;
15
+ use Analyst\Notices\Notice;
16
+ use Analyst\Notices\NoticeFactory;
17
+ use Analyst\Contracts\TrackerContract;
18
+ use Analyst\Contracts\RequestorContract;
19
+
20
+ /**
21
+ * Class Account
22
+ *
23
+ * This is plugin's account object
24
+ */
25
+ class Account implements TrackerContract
26
+ {
27
+ /**
28
+ * Account id
29
+ *
30
+ * @var string
31
+ */
32
+ protected $id;
33
+
34
+ /**
35
+ * Basename of plugin
36
+ *
37
+ * @var string
38
+ */
39
+ protected $path;
40
+
41
+ /**
42
+ * Whether plugin is active or not
43
+ *
44
+ * @var bool
45
+ */
46
+ protected $isInstalled = false;
47
+
48
+ /**
49
+ * Is user sign in for data tracking
50
+ *
51
+ * @var bool
52
+ */
53
+ protected $isOptedIn = false;
54
+
55
+ /**
56
+ * Is user accepted permissions grant
57
+ * for collection site data
58
+ *
59
+ * @var bool
60
+ */
61
+ protected $isSigned = false;
62
+
63
+ /**
64
+ * Is user ever resolved install modal window?
65
+ *
66
+ * @var bool
67
+ */
68
+ protected $isInstallResolved = false;
69
+
70
+ /**
71
+ * Public secret code
72
+ *
73
+ * @var string
74
+ */
75
+ protected $clientSecret;
76
+
77
+ /**
78
+ * @var AccountData
79
+ */
80
+ protected $data;
81
+
82
+ /**
83
+ * Base plugin path
84
+ *
85
+ * @var string
86
+ */
87
+ protected $basePluginPath;
88
+
89
+ /**
90
+ * @var RequestorContract
91
+ */
92
+ protected $requestor;
93
+
94
+ /**
95
+ * @var Collector
96
+ */
97
+ protected $collector;
98
+
99
+ /**
100
+ * Account constructor.
101
+ * @param $id
102
+ * @param $secret
103
+ * @param $baseDir
104
+ */
105
+ public function __construct($id, $secret, $baseDir)
106
+ {
107
+ $this->id = $id;
108
+ $this->clientSecret = $secret;
109
+
110
+ $this->path = $baseDir;
111
+
112
+ $this->basePluginPath = plugin_basename($baseDir);
113
+ }
114
+
115
+ /**
116
+ * @return string
117
+ */
118
+ public function getPath()
119
+ {
120
+ return $this->path;
121
+ }
122
+
123
+ /**
124
+ * @param string $path
125
+ */
126
+ public function setPath($path)
127
+ {
128
+ $this->data->setPath($path);
129
+
130
+ $this->path = $path;
131
+ }
132
+
133
+ /**
134
+ * @return bool
135
+ */
136
+ public function isOptedIn()
137
+ {
138
+ return $this->isOptedIn;
139
+ }
140
+
141
+ /**
142
+ * @param bool $isOptedIn
143
+ */
144
+ public function setIsOptedIn($isOptedIn)
145
+ {
146
+ $this->data->setIsOptedIn($isOptedIn);
147
+
148
+ $this->isOptedIn = $isOptedIn;
149
+ }
150
+
151
+ /**
152
+ * Whether plugin is active
153
+ *
154
+ * @return bool
155
+ */
156
+ public function isActive()
157
+ {
158
+ return is_plugin_active($this->path);
159
+ }
160
+
161
+ /**
162
+ * @param string $id
163
+ */
164
+ public function setId($id)
165
+ {
166
+ $this->id = $id;
167
+ }
168
+
169
+ /**
170
+ * @return string
171
+ */
172
+ public function getId()
173
+ {
174
+ return $this->id;
175
+ }
176
+
177
+ /**
178
+ * @return bool
179
+ */
180
+ public function isInstalled()
181
+ {
182
+ return $this->isInstalled;
183
+ }
184
+
185
+ /**
186
+ * @param bool $isInstalled
187
+ */
188
+ public function setIsInstalled($isInstalled)
189
+ {
190
+ $this->data->setIsInstalled($isInstalled);
191
+
192
+ $this->isInstalled = $isInstalled;
193
+ }
194
+
195
+ /**
196
+ * Should register activation and deactivation
197
+ * event hooks
198
+ *
199
+ * @return void
200
+ */
201
+ public function registerHooks()
202
+ {
203
+ register_activation_hook($this->basePluginPath, [&$this, 'onActivePluginListener']);
204
+ register_uninstall_hook($this->basePluginPath, ['Account\Account', 'onUninstallPluginListener']);
205
+
206
+ $this->addFilter('plugin_action_links', [&$this, 'onRenderActionLinksHook']);
207
+
208
+ $this->addAjax('analyst_opt_in', [&$this, 'onOptInListener']);
209
+ $this->addAjax('analyst_opt_out', [&$this, 'onOptOutListener']);
210
+ $this->addAjax('analyst_plugin_deactivate', [&$this, 'onDeactivatePluginListener']);
211
+ $this->addAjax('analyst_install', [&$this, 'onInstallListener']);
212
+ $this->addAjax('analyst_skip_install', [&$this, 'onSkipInstallListener']);
213
+ $this->addAjax('analyst_install_verified', [&$this, 'onInstallVerifiedListener']);
214
+ }
215
+
216
+ /**
217
+ * Will fire when admin activates plugin
218
+ *
219
+ * @return void
220
+ */
221
+ public function onActivePluginListener()
222
+ {
223
+ if (!$this->isInstallResolved()) {
224
+ DatabaseCache::getInstance()->put('plugin_to_install', $this->id);
225
+ }
226
+
227
+ if (!$this->isAllowingLogging()) return;
228
+
229
+ ActivateRequest::make($this->collector, $this->id, $this->path)
230
+ ->execute($this->requestor);
231
+
232
+ $this->setIsInstalled(true);
233
+
234
+ AccountDataFactory::syncData();
235
+ }
236
+
237
+ /**
238
+ * Will fire when admin deactivates plugin
239
+ *
240
+ * @return void
241
+ */
242
+ public function onDeactivatePluginListener()
243
+ {
244
+ if (!$this->isAllowingLogging()) return;
245
+
246
+ $question = isset($_POST['question']) ? stripslashes($_POST['question']) : null;
247
+ $reason = isset($_POST['reason']) ? stripslashes($_POST['reason']) : null;
248
+
249
+ $response = DeactivateRequest::make($this->collector, $this->id, $this->path, $question, $reason)
250
+ ->execute($this->requestor);
251
+
252
+ // Exit if request failed
253
+ if (!$response->isSuccess()) {
254
+ wp_send_json_error($response->body);
255
+ }
256
+
257
+ $this->setIsInstalled(false);
258
+
259
+ AccountDataFactory::syncData();
260
+
261
+ wp_send_json_success();
262
+ }
263
+
264
+ /**
265
+ * Will fire when user opted in
266
+ *
267
+ * @return void
268
+ */
269
+ public function onOptInListener()
270
+ {
271
+ $response = OptInRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
272
+
273
+ // Exit if request failed
274
+ if (!$response->isSuccess()) {
275
+ wp_send_json_error($response->body);
276
+ }
277
+
278
+ $this->setIsOptedIn(true);
279
+
280
+ AccountDataFactory::syncData();
281
+
282
+ wp_die();
283
+ }
284
+
285
+ /**
286
+ * Will fire when user opted out
287
+ *
288
+ * @return void
289
+ */
290
+ public function onOptOutListener()
291
+ {
292
+ $response = OptOutRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
293
+
294
+ // Exit if request failed
295
+ if (!$response->isSuccess()) {
296
+ wp_send_json_error($response->body);
297
+ }
298
+
299
+ $this->setIsOptedIn(false);
300
+
301
+ AccountDataFactory::syncData();
302
+
303
+ wp_send_json_success();
304
+ }
305
+
306
+ /**
307
+ * Will fire when user accept opt-in
308
+ * at first time
309
+ *
310
+ * @return void
311
+ */
312
+ public function onInstallListener()
313
+ {
314
+ $cache = DatabaseCache::getInstance();
315
+
316
+ // Set flag to true which indicates that install is resolved
317
+ // also remove install plugin id from cache
318
+ $this->setIsInstallResolved(true);
319
+ $cache->delete('plugin_to_install');
320
+
321
+ $response = InstallRequest::make($this->collector, $this->id, $this->path)->execute($this->requestor);
322
+
323
+ // Exit if request failed
324
+ if (!$response->isSuccess()) {
325
+ wp_send_json_error($response->body);
326
+ }
327
+
328
+ $this->setIsSigned(true);
329
+
330
+ $this->setIsOptedIn(true);
331
+
332
+ $factory = NoticeFactory::instance();
333
+
334
+ $message = sprintf('Please confirm your email by clicking on the link we sent to %s. This makes sure you’re not a bot.', $this->collector->getGeneralEmailAddress());
335
+
336
+ $notificationId = uniqid();
337
+
338
+ $notice = Notice::make(
339
+ $notificationId,
340
+ $this->getId(),
341
+ $message,
342
+ $this->collector->getPluginName($this->path)
343
+ );
344
+
345
+ $factory->addNotice($notice);
346
+
347
+ AccountDataFactory::syncData();
348
+
349
+ // Set email confirmation notification id to cache
350
+ // se we can extract and remove it when user confirmed email
351
+ $cache->put(
352
+ sprintf('account_email_confirmation_%s', $this->getId()),
353
+ $notificationId
354
+ );
355
+
356
+ wp_send_json_success();
357
+ }
358
+
359
+ /**
360
+ * Will fire when user skipped installation
361
+ *
362
+ * @return void
363
+ */
364
+ public function onSkipInstallListener()
365
+ {
366
+ // Set flag to true which indicates that install is resolved
367
+ // also remove install plugin id from cache
368
+ $this->setIsInstallResolved(true);
369
+ DatabaseCache::getInstance()->delete('plugin_to_install');
370
+ }
371
+
372
+ /**
373
+ * Will fire when user delete plugin through admin panel.
374
+ * This action will happen if admin at least once
375
+ * activated the plugin.
376
+ *
377
+ * @return void
378
+ * @throws \Exception
379
+ */
380
+ public static function onUninstallPluginListener()
381
+ {
382
+ $factory = AccountDataFactory::instance();
383
+
384
+ $pluginFile = substr(current_filter(), strlen( 'uninstall_' ));
385
+
386
+ $account = $factory->getAccountDataByBasePath($pluginFile);
387
+
388
+ // If account somehow is not found, exit the execution
389
+ if (!$account) return;
390
+
391
+ $analyst = Analyst::getInstance();
392
+
393
+ $collector = new Collector($analyst);
394
+
395
+ $requestor = new ApiRequestor($account->getId(), $account->getSecret(), $analyst->getApiBase());
396
+
397
+ // Just send request to log uninstall event not caring about response
398
+ UninstallRequest::make($collector, $account->getId(), $account->getPath())->execute($requestor);
399
+
400
+ $factory->sync();
401
+ }
402
+
403
+ /**
404
+ * Fires when used verified his account
405
+ */
406
+ public function onInstallVerifiedListener()
407
+ {
408
+ $factory = NoticeFactory::instance();
409
+
410
+ $notice = Notice::make(
411
+ uniqid(),
412
+ $this->getId(),
413
+ 'Thank you for confirming your email.',
414
+ $this->collector->getPluginName($this->path)
415
+ );
416
+
417
+ $factory->addNotice($notice);
418
+
419
+ // Remove confirmation notification
420
+ $confirmationNotificationId = DatabaseCache::getInstance()->pop(sprintf('account_email_confirmation_%s', $this->getId()));
421
+ $factory->remove($confirmationNotificationId);
422
+
423
+ AccountDataFactory::syncData();
424
+
425
+ wp_send_json_success();
426
+ }
427
+
428
+ /**
429
+ * Will fire when wp renders plugin
430
+ * action buttons
431
+ *
432
+ * @param $defaultLinks
433
+ * @return array
434
+ */
435
+ public function onRenderActionLinksHook($defaultLinks)
436
+ {
437
+ $customLinks = [];
438
+
439
+ $customLinks[] = $this->isOptedIn()
440
+ ? '<a class="analyst-action-opt analyst-opt-out" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt Out</a>'
441
+ : '<a class="analyst-action-opt analyst-opt-in" analyst-plugin-id="' . $this->getId() . '" analyst-plugin-signed="' . (int) $this->isSigned() . '">Opt In</a>';
442
+
443
+ // Append anchor to find specific deactivation link
444
+ if (isset($defaultLinks['deactivate'])) {
445
+ $defaultLinks['deactivate'] .= '<span analyst-plugin-id="' . $this->getId() . '" analyst-plugin-opted-in="' . (int) $this->isOptedIn() . '"></span>';
446
+ }
447
+
448
+ return array_merge($customLinks, $defaultLinks);
449
+ }
450
+
451
+ /**
452
+ * @return AccountData
453
+ */
454
+ public function getData()
455
+ {
456
+ return $this->data;
457
+ }
458
+
459
+ /**
460
+ * @param AccountData $data
461
+ */
462
+ public function setData(AccountData $data)
463
+ {
464
+ $this->data = $data;
465
+
466
+ $this->setIsOptedIn($data->isOptedIn());
467
+ $this->setIsInstalled($data->isInstalled());
468
+ $this->setIsSigned($data->isSigned());
469
+ $this->setIsInstallResolved($data->isInstallResolved());
470
+ }
471
+
472
+ /**
473
+ * Resolves valid action name
474
+ * based on client id
475
+ *
476
+ * @param $action
477
+ * @return string
478
+ */
479
+ private function resolveActionName($action)
480
+ {
481
+ return sprintf('%s_%s', $action, $this->id);
482
+ }
483
+
484
+ /**
485
+ * Register action for current plugin
486
+ *
487
+ * @param $action
488
+ * @param $callback
489
+ */
490
+ private function addFilter($action, $callback)
491
+ {
492
+ $validAction = sprintf('%s_%s', $action, $this->basePluginPath);
493
+
494
+ add_filter($validAction, $callback, 10);
495
+ }
496
+
497
+ /**
498
+ * Add ajax action for current plugin
499
+ *
500
+ * @param $action
501
+ * @param $callback
502
+ * @param bool $raw Format action ??
503
+ */
504
+ private function addAjax($action, $callback, $raw = false)
505
+ {
506
+ $validAction = $raw ? $action : sprintf('%s%s', 'wp_ajax_', $this->resolveActionName($action));
507
+
508
+ add_action($validAction, $callback);
509
+ }
510
+
511
+ /**
512
+ * @return bool
513
+ */
514
+ public function isSigned()
515
+ {
516
+ return $this->isSigned;
517
+ }
518
+
519
+ /**
520
+ * @param bool $isSigned
521
+ */
522
+ public function setIsSigned($isSigned)
523
+ {
524
+ $this->data->setIsSigned($isSigned);
525
+
526
+ $this->isSigned = $isSigned;
527
+ }
528
+
529
+ /**
530
+ * @return RequestorContract
531
+ */
532
+ public function getRequestor()
533
+ {
534
+ return $this->requestor;
535
+ }
536
+
537
+ /**
538
+ * @param RequestorContract $requestor
539
+ */
540
+ public function setRequestor(RequestorContract $requestor)
541
+ {
542
+ $this->requestor = $requestor;
543
+ }
544
+
545
+ /**
546
+ * @return string
547
+ */
548
+ public function getClientSecret()
549
+ {
550
+ return $this->clientSecret;
551
+ }
552
+
553
+ /**
554
+ * @return Collector
555
+ */
556
+ public function getCollector()
557
+ {
558
+ return $this->collector;
559
+ }
560
+
561
+ /**
562
+ * @param Collector $collector
563
+ */
564
+ public function setCollector(Collector $collector)
565
+ {
566
+ $this->collector = $collector;
567
+ }
568
+
569
+ /**
570
+ * Do we allowing logging
571
+ *
572
+ * @return bool
573
+ */
574
+ public function isAllowingLogging()
575
+ {
576
+ return $this->isOptedIn;
577
+ }
578
+
579
+ /**
580
+ * @return string
581
+ */
582
+ public function getBasePluginPath()
583
+ {
584
+ return $this->basePluginPath;
585
+ }
586
+
587
+ /**
588
+ * @return bool
589
+ */
590
+ public function isInstallResolved()
591
+ {
592
+ return $this->isInstallResolved;
593
+ }
594
+
595
+ /**
596
+ * @param bool $isInstallResolved
597
+ */
598
+ public function setIsInstallResolved($isInstallResolved)
599
+ {
600
+ $this->data->setIsInstallResolved($isInstallResolved);
601
+
602
+ $this->isInstallResolved = $isInstallResolved;
603
+ }
604
+ }
analyst/src/Mutator.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
-
3
- namespace Analyst;
4
-
5
- use Analyst\Cache\DatabaseCache;
6
- use Analyst\Contracts\CacheContract;
7
- use Analyst\Notices\NoticeFactory;
8
-
9
- /**
10
- * Class Mutator mutates (modifies) UX with additional
11
- * functional
12
- */
13
- class Mutator
14
- {
15
- protected $notices = [];
16
-
17
- /**
18
- * @var NoticeFactory
19
- */
20
- protected $factory;
21
-
22
- /**
23
- * @var CacheContract
24
- */
25
- protected $cache;
26
-
27
- public function __construct()
28
- {
29
- $this->factory = NoticeFactory::instance();
30
-
31
- $this->notices = $this->factory->getNotices();
32
-
33
- $this->cache = DatabaseCache::getInstance();
34
- }
35
-
36
- /**
37
- * Register filters all necessary stuff.
38
- * Can be invoked only once.
39
- *
40
- * @return void
41
- */
42
- public function initialize()
43
- {
44
- $this->registerLinks();
45
- $this->registerAssets();
46
- $this->registerHooks();
47
- }
48
-
49
- /**
50
- * Register all necessary filters and templates
51
- *
52
- * @return void
53
- */
54
- protected function registerLinks()
55
- {
56
- add_action('admin_footer', function () {
57
- analyst_require_template('optout.php', [
58
- 'shieldImage' => analyst_assets_url('img/shield_question.png')
59
- ]);
60
-
61
- analyst_require_template('optin.php');
62
-
63
- analyst_require_template('forms/deactivate.php', [
64
- 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
- 'smileImage' => analyst_assets_url('img/smile.png'),
66
- ]);
67
-
68
- analyst_require_template('forms/install.php', [
69
- 'pluginToInstall' => $this->cache->get('plugin_to_install'),
70
- 'shieldImage' => analyst_assets_url('img/shield_success.png'),
71
- ]);
72
- });
73
-
74
- add_action('admin_notices',function () {
75
- foreach ($this->notices as $notice) {
76
- analyst_require_template('notice.php', ['notice' => $notice]);
77
- }
78
- });
79
- }
80
-
81
- /**
82
- * Register all assets
83
- */
84
- public function registerAssets()
85
- {
86
- add_action('admin_enqueue_scripts', function () {
87
- wp_enqueue_style('analyst_custom', analyst_assets_url('/css/customize.css'));
88
- wp_enqueue_script('analyst_custom', analyst_assets_url('/js/customize.js'));
89
- });
90
- }
91
-
92
- /**
93
- * Register action hooks
94
- */
95
- public function registerHooks()
96
- {
97
- add_action('wp_ajax_analyst_notification_dismiss', function () {
98
- $this->factory->remove($_POST['id']);
99
-
100
- $this->factory->sync();
101
- });
102
- }
103
- }
1
+ <?php
2
+
3
+ namespace Analyst;
4
+
5
+ use Analyst\Cache\DatabaseCache;
6
+ use Analyst\Contracts\CacheContract;
7
+ use Analyst\Notices\NoticeFactory;
8
+
9
+ /**
10
+ * Class Mutator mutates (modifies) UX with additional
11
+ * functional
12
+ */
13
+ class Mutator
14
+ {
15
+ protected $notices = [];
16
+
17
+ /**
18
+ * @var NoticeFactory
19
+ */
20
+ protected $factory;
21
+
22
+ /**
23
+ * @var CacheContract
24
+ */
25
+ protected $cache;
26
+
27
+ public function __construct()
28
+ {
29
+ $this->factory = NoticeFactory::instance();
30
+
31
+ $this->notices = $this->factory->getNotices();
32
+
33
+ $this->cache = DatabaseCache::getInstance();
34
+ }
35
+
36
+ /**
37
+ * Register filters all necessary stuff.
38
+ * Can be invoked only once.
39
+ *
40
+ * @return void
41
+ */
42
+ public function initialize()
43
+ {
44
+ $this->registerLinks();
45
+ $this->registerAssets();
46
+ $this->registerHooks();
47
+ }
48
+
49
+ /**
50
+ * Register all necessary filters and templates
51
+ *
52
+ * @return void
53
+ */
54
+ protected function registerLinks()
55
+ {
56
+ add_action('admin_footer', function () {
57
+ analyst_require_template('optout.php', [
58
+ 'shieldImage' => analyst_assets_url('img/shield_question.png')
59
+ ]);
60
+
61
+ analyst_require_template('optin.php');
62
+
63
+ analyst_require_template('forms/deactivate.php', [
64
+ 'pencilImage' => analyst_assets_url('img/pencil.png'),
65
+ 'smileImage' => analyst_assets_url('img/smile.png'),
66
+ ]);
67
+
68
+ analyst_require_template('forms/install.php', [
69
+ 'pluginToInstall' => $this->cache->get('plugin_to_install'),
70
+ 'shieldImage' => analyst_assets_url('img/shield_success.png'),
71
+ ]);
72
+ });
73
+
74
+ add_action('admin_notices',function () {
75
+ foreach ($this->notices as $notice) {
76
+ analyst_require_template('notice.php', ['notice' => $notice]);
77
+ }
78
+ });
79
+ }
80
+
81
+ /**
82
+ * Register all assets
83
+ */
84
+ public function registerAssets()
85
+ {
86
+ add_action('admin_enqueue_scripts', function () {
87
+ wp_enqueue_style('analyst_custom', analyst_assets_url('/css/customize.css'));
88
+ wp_enqueue_script('analyst_custom', analyst_assets_url('/js/customize.js'));
89
+ });
90
+ }
91
+
92
+ /**
93
+ * Register action hooks
94
+ */
95
+ public function registerHooks()
96
+ {
97
+ add_action('wp_ajax_analyst_notification_dismiss', function () {
98
+ $this->factory->remove($_POST['id']);
99
+
100
+ $this->factory->sync();
101
+ });
102
+ }
103
+ }
analyst/version.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
-
3
- return array(
4
- // The sdk version
5
- 'sdk' => '1.3.26',
6
-
7
- // Minimum supported WordPress version
8
- 'wp' => '4.7',
9
-
10
- // Supported PHP version
11
- 'php' => '5.4',
12
-
13
- // Path to current SDK$
14
- 'path' => __DIR__,
15
- );
1
+ <?php
2
+
3
+ return array(
4
+ // The sdk version
5
+ 'sdk' => '1.3.26',
6
+
7
+ // Minimum supported WordPress version
8
+ 'wp' => '4.7',
9
+
10
+ // Supported PHP version
11
+ 'php' => '5.4',
12
+
13
+ // Path to current SDK$
14
+ 'path' => __DIR__,
15
+ );
js/custom-admin.js CHANGED
@@ -1,3298 +1,3298 @@
1
- function sfsi_update_index() {
2
- var s = 1;
3
- SFSI("ul.icn_listing li.custom").each(function () {
4
- SFSI(this).children("span.custom-txt").html("Custom " + s), s++;
5
- }), cntt = 1, SFSI("div.cm_lnk").each(function () {
6
- SFSI(this).find("h2.custom").find("span.sfsiCtxt").html("Custom " + cntt + ":"),
7
- cntt++;
8
- }), cntt = 1, SFSI("div.custom_m").find("div.custom_section").each(function () {
9
- SFSI(this).find("label").html("Custom " + cntt + ":"), cntt++;
10
- });
11
- }
12
-
13
- function sfsicollapse(s) {
14
- var i = !0,
15
- e = SFSI(s).closest("div.ui-accordion-content").prev("h3.ui-accordion-header"),
16
- t = SFSI(s).closest("div.ui-accordion-content").first();
17
- e.toggleClass("ui-corner-all", i).toggleClass("accordion-header-active ui-state-active ui-corner-top", !i).attr("aria-selected", (!i).toString()),
18
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", i).toggleClass("ui-icon-triangle-1-s", !i),
19
- t.toggleClass("accordion-content-active", !i), i ? t.slideUp() : t.slideDown();
20
- }
21
-
22
- function sfsi_delete_CusIcon(s, i) {
23
- beForeLoad();
24
- var e = {
25
- action: "deleteIcons",
26
- icon_name: i.attr("name"),
27
- nonce: SFSI(i).parents('.custom').find('input[name="nonce"]').val()
28
- };
29
- SFSI.ajax({
30
- url: sfsi_icon_ajax_object.ajax_url,
31
- type: "post",
32
- data: e,
33
- dataType: "json",
34
- success: function (e) {
35
- if ("success" == e.res) {
36
- showErrorSuc("success", "Saved !", 1);
37
- var t = e.last_index + 1;
38
- SFSI("#total_cusotm_icons").val(e.total_up), SFSI(s).closest(".custom").remove(),
39
- SFSI("li.custom:last-child").addClass("bdr_btm_non"), SFSI(".custom-links").find("div." + i.attr("name")).remove(),
40
- SFSI(".custom_m").find("div." + i.attr("name")).remove(), SFSI(".share_icon_order").children("li." + i.attr("name")).remove(),
41
- SFSI("ul.sfsi_sample_icons").children("li." + i.attr("name")).remove();
42
-
43
- if (e.total_up == 0) {
44
- SFSI(".notice_custom_icons_premium").hide();
45
- }
46
- var n = e.total_up + 1;
47
- 4 == e.total_up && SFSI(".icn_listing").append('<li id="c' + t + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + t + '_display" type="checkbox" value="yes" class="styled" style="display:none;" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + t + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + n + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>');
48
- } else showErrorSuc("error", "Unkown error , please try again", 1);
49
- return sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step5(),
50
- afterLoad(), "suc";
51
- }
52
- });
53
- }
54
-
55
- function update_Sec5Iconorder() {
56
- SFSI("ul.share_icon_order").children("li").each(function () {
57
- SFSI(this).attr("data-index", SFSI(this).index() + 1);
58
- });
59
- }
60
-
61
- function sfsi_section_Display(s, i) {
62
- "hide" == i ? (SFSI("." + s + " :input").prop("disabled", !0), SFSI("." + s + " :button").prop("disabled", !0),
63
- SFSI("." + s).hide()) : (SFSI("." + s + " :input").removeAttr("disabled", !0), SFSI("." + s + " :button").removeAttr("disabled", !0),
64
- SFSI("." + s).show());
65
- }
66
-
67
- function sfsi_depened_sections() {
68
- if ("sfsi" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
69
- for (i = 0; 16 > i; i++) {
70
- var s = i + 1,
71
- e = 74 * i;
72
- SFSI(".row_" + s + "_2").css("background-position", "-588px -" + e + "px");
73
- }
74
- var t = SFSI(".icon_img").attr("src");
75
- if (t) {
76
- if (t.indexOf("subscribe") != -1) {
77
- var n = t.replace("subscribe.png", "sf_arow_icn.png");
78
- } else {
79
- var n = t.replace("email.png", "sf_arow_icn.png");
80
- }
81
- SFSI(".icon_img").attr("src", n);
82
- }
83
- } else {
84
- if ("email" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
85
- for (SFSI(".row_1_2").css("background-position", "-58px 0"), i = 0; 16 > i; i++) {
86
- var s = i + 1,
87
- e = 74 * i;
88
- SFSI(".row_" + s + "_2").css("background-position", "-58px -" + e + "px");
89
- }
90
- var t = SFSI(".icon_img").attr("src");
91
- if (t) {
92
- if (t.indexOf("sf_arow_icn") != -1) {
93
- var n = t.replace("sf_arow_icn.png", "email.png");
94
- } else {
95
- var n = t.replace("subscribe.png", "email.png");
96
- }
97
- SFSI(".icon_img").attr("src", n);
98
- }
99
- } else {
100
- for (SFSI(".row_1_2").css("background-position", "-649px 0"), i = 0; 16 > i; i++) {
101
- var s = i + 1,
102
- e = 74 * i;
103
- SFSI(".row_" + s + "_2").css("background-position", "-649px -" + e + "px");
104
- }
105
- var t = SFSI(".icon_img").attr("src");
106
- if (t) {
107
- if (t.indexOf("email") != -1) {
108
- var n = t.replace("email.png", "subscribe.png");
109
- } else {
110
- var n = t.replace("sf_arow_icn.png", "subscribe.png");
111
- }
112
- SFSI(".icon_img").attr("src", n);
113
- }
114
- }
115
- }
116
- SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"),
117
- SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"),
118
- SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"),
119
- SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"),
120
- SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"),
121
- SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"),
122
- SFSI("input[name='sfsi_telegram_display']").prop("checked") ? sfsi_section_Display("telegram_section", "show") : sfsi_section_Display("telegram_section", "hide"),
123
- SFSI("input[name='sfsi_vk_display']").prop("checked") ? sfsi_section_Display("vk_section", "show") : sfsi_section_Display("vk_section", "hide"),
124
- SFSI("input[name='sfsi_ok_display']").prop("checked") ? sfsi_section_Display("ok_section", "show") : sfsi_section_Display("ok_section", "hide"),
125
- SFSI("input[name='sfsi_wechat_display']").prop("checked") ? sfsi_section_Display("wechat_section", "show") : sfsi_section_Display("wechat_section", "hide"),
126
- SFSI("input[name='sfsi_weibo_display']").prop("checked") ? sfsi_section_Display("weibo_section", "show") : sfsi_section_Display("weibo_section", "hide"),
127
- SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"),
128
- SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"),
129
- SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
130
- }
131
-
132
- function CustomIConSectionsUpdate() {
133
- sfsi_section_Display("counter".ele, show);
134
- }
135
-
136
- // Upload Custom Skin {Monad}
137
- function sfsi_customskin_upload(s, ref, nonce) {
138
- var ttl = jQuery(ref).attr("title");
139
- var i = s,
140
- e = {
141
- action: "UploadSkins",
142
- custom_imgurl: i,
143
- nonce: nonce
144
- };
145
- SFSI.ajax({
146
- url: sfsi_icon_ajax_object.ajax_url,
147
- type: "post",
148
- data: e,
149
- success: function (msg) {
150
- if (msg.res = "success") {
151
- var arr = s.split('=');
152
- jQuery(ref).prev('.imgskin').attr('src', arr[1]);
153
- jQuery(ref).prev('.imgskin').css("display", "block");
154
- jQuery(ref).text("Update");
155
- jQuery(ref).next('.dlt_btn').css("display", "block");
156
- }
157
- }
158
- });
159
- }
160
-
161
- // Delete Custom Skin {Monad}
162
- function deleteskin_icon(s) {
163
- var iconname = jQuery(s).attr("title");
164
- var nonce = jQuery(s).attr("data-nonce");
165
- var i = iconname,
166
- e = {
167
- action: "DeleteSkin",
168
- iconname: i,
169
- nonce: nonce
170
- };
171
- console.log('delete sin icon', i, iconname, nonce);
172
- SFSI.ajax({
173
- url: sfsi_icon_ajax_object.ajax_url,
174
- type: "post",
175
- data: e,
176
- dataType: "json",
177
- success: function (msg) {
178
- console.log(s, e, msg);
179
-
180
- if (msg.res === "success") {
181
- SFSI(s).prev("a").text("Upload");
182
- SFSI(s).prev("a").prev("img").attr("src", '');
183
- SFSI(s).prev("a").prev("img").css("display", "none");
184
- SFSI(s).css("display", "none");
185
- } else {
186
- alert("Whoops! something went wrong.")
187
- }
188
- }
189
- });
190
- }
191
-
192
- // Save Custom Skin {Monad}
193
- function SFSI_done(nonce) {
194
- e = {
195
- action: "Iamdone",
196
- nonce: nonce
197
- };
198
-
199
- SFSI.ajax({
200
- url: sfsi_icon_ajax_object.ajax_url,
201
- type: "post",
202
- data: e,
203
- success: function (msg) {
204
- if (msg.res === "success") {
205
-
206
-
207
- jQuery("li.cstomskins_upload").children(".icns_tab_3").html(msg);
208
- SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"), SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"), SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"), SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"), SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"), SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"), SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"), SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"), SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
209
- SFSI(".cstmskins-overlay").hide("slow");
210
- sfsi_update_step3() && sfsicollapse(this);
211
- }
212
- }
213
- });
214
- }
215
-
216
- // Upload Custom Icons {Monad}
217
- function sfsi_newcustomicon_upload(s, nonce, nonce2) {
218
- var i = s,
219
- e = {
220
- action: "UploadIcons",
221
- custom_imgurl: i,
222
- nonce: nonce
223
- };
224
- SFSI.ajax({
225
- url: sfsi_icon_ajax_object.ajax_url,
226
- type: "post",
227
- data: e,
228
- dataType: "json",
229
- async: !0,
230
- success: function (s) {
231
- if (s.res == 'success') {
232
- afterIconSuccess(s, nonce2);
233
- } else {
234
- SFSI(".upload-overlay").hide("slow");
235
- SFSI(".uperror").html(s.res);
236
- showErrorSuc("Error", "Some Error Occured During Upload Custom Icon", 1)
237
- }
238
- }
239
- });
240
- }
241
-
242
- function sfsi_update_step1() {
243
- var nonce = SFSI("#sfsi_save1").attr("data-nonce");
244
- global_error = 0, beForeLoad(), sfsi_depened_sections();
245
- var s = !1,
246
- i = SFSI("input[name='sfsi_rss_display']:checked").val(),
247
- e = SFSI("input[name='sfsi_email_display']:checked").val(),
248
- t = SFSI("input[name='sfsi_facebook_display']:checked").val(),
249
- n = SFSI("input[name='sfsi_twitter_display']:checked").val(),
250
- r = SFSI("input[name='sfsi_youtube_display']:checked").val(),
251
- c = SFSI("input[name='sfsi_pinterest_display']:checked").val(),
252
- p = SFSI("input[name='sfsi_linkedin_display']:checked").val(),
253
- tg = SFSI("input[name='sfsi_telegram_display']:checked").val(),
254
- vk = SFSI("input[name='sfsi_vk_display']:checked").val(),
255
- ok = SFSI("input[name='sfsi_ok_display']:checked").val(),
256
- wc = SFSI("input[name='sfsi_wechat_display']:checked").val(),
257
- wb = SFSI("input[name='sfsi_weibo_display']:checked").val(),
258
- _ = SFSI("input[name='sfsi_instagram_display']:checked").val(),
259
- l = SFSI("input[name='sfsi_custom1_display']:checked").val(),
260
- S = SFSI("input[name='sfsi_custom2_display']:checked").val(),
261
- u = SFSI("input[name='sfsi_custom3_display']:checked").val(),
262
- f = SFSI("input[name='sfsi_custom4_display']:checked").val(),
263
- d = SFSI("input[name='sfsi_custom5_display']:checked").val(),
264
- I = {
265
- action: "updateSrcn1",
266
- sfsi_rss_display: i,
267
- sfsi_email_display: e,
268
- sfsi_facebook_display: t,
269
- sfsi_twitter_display: n,
270
- sfsi_youtube_display: r,
271
- sfsi_pinterest_display: c,
272
- sfsi_linkedin_display: p,
273
- sfsi_telegram_display: tg,
274
- sfsi_vk_display: vk,
275
- sfsi_ok_display: ok,
276
- sfsi_wechat_display: wc,
277
- sfsi_weibo_display: wb,
278
- sfsi_instagram_display: _,
279
- sfsi_custom1_display: l,
280
- sfsi_custom2_display: S,
281
- sfsi_custom3_display: u,
282
- sfsi_custom4_display: f,
283
- sfsi_custom5_display: d,
284
- nonce: nonce
285
- };
286
- SFSI.ajax({
287
- url: sfsi_icon_ajax_object.ajax_url,
288
- type: "post",
289
- data: I,
290
- async: !0,
291
- dataType: "json",
292
- success: function (i) {
293
- if (i == "wrong_nonce") {
294
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 1);
295
- s = !1;
296
- afterLoad();
297
- } else {
298
- "success" == i ? (showErrorSuc("success", "Saved !", 1), sfsicollapse("#sfsi_save1"),
299
- sfsi_make_popBox()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 1),
300
- s = !1), afterLoad();
301
- }
302
- }
303
- });
304
- }
305
-
306
- function sfsi_update_step2() {
307
-
308
- var nonce = SFSI("#sfsi_save2").attr("data-nonce");
309
- var s = sfsi_validationStep2();
310
- if (!s) return global_error = 1, !1;
311
- beForeLoad();
312
- var i = 1 == SFSI("input[name='sfsi_rss_url']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_url']").val(),
313
- e = 1 == SFSI("input[name='sfsi_rss_icons']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_icons']:checked").val(),
314
-
315
- t = 1 == SFSI("input[name='sfsi_facebookPage_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookPage_option']:checked").val(),
316
- n = 1 == SFSI("input[name='sfsi_facebookLike_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookLike_option']:checked").val(),
317
- o = 1 == SFSI("input[name='sfsi_facebookShare_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookShare_option']:checked").val(),
318
- a = SFSI("input[name='sfsi_facebookPage_url']").val(),
319
- r = 1 == SFSI("input[name='sfsi_twitter_followme']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followme']:checked").val(),
320
- c = 1 == SFSI("input[name='sfsi_twitter_followUserName']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followUserName']").val(),
321
- p = 1 == SFSI("input[name='sfsi_twitter_aboutPage']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_aboutPage']:checked").val(),
322
- _ = 1 == SFSI("input[name='sfsi_twitter_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_page']:checked").val(),
323
- l = SFSI("input[name='sfsi_twitter_pageURL']").val(),
324
- S = SFSI("textarea[name='sfsi_twitter_aboutPageText']").val(),
325
- m = 1 == SFSI("input[name='sfsi_youtube_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_page']:checked").val(),
326
- F = 1 == SFSI("input[name='sfsi_youtube_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_pageUrl']").val(),
327
- h = 1 == SFSI("input[name='sfsi_youtube_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_follow']:checked").val(),
328
- cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val(),
329
- v = SFSI("input[name='sfsi_ytube_user']").val(),
330
- vchid = SFSI("input[name='sfsi_ytube_chnlid']").val(),
331
- g = 1 == SFSI("input[name='sfsi_pinterest_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_page']:checked").val(),
332
- k = 1 == SFSI("input[name='sfsi_pinterest_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pageUrl']").val(),
333
- y = 1 == SFSI("input[name='sfsi_pinterest_pingBlog']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pingBlog']:checked").val(),
334
- b = 1 == SFSI("input[name='sfsi_instagram_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_pageUrl']").val(),
335
- w = 1 == SFSI("input[name='sfsi_linkedin_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_page']:checked").val(),
336
- x = 1 == SFSI("input[name='sfsi_linkedin_pageURL']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_pageURL']").val(),
337
- C = 1 == SFSI("input[name='sfsi_linkedin_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_follow']:checked").val(),
338
- D = SFSI("input[name='sfsi_linkedin_followCompany']").val(),
339
- U = 1 == SFSI("input[name='sfsi_linkedin_SharePage']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_SharePage']:checked").val(),
340
- O = SFSI("input[name='sfsi_linkedin_recommendBusines']:checked").val(),
341
- T = SFSI("input[name='sfsi_linkedin_recommendProductId']").val(),
342
- j = SFSI("input[name='sfsi_linkedin_recommendCompany']").val(),
343
- tp = 1 == SFSI("input[name='sfsi_telegram_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_page']:checked").val(),
344
- tpu = SFSI("input[name='sfsi_telegram_pageURL']").val(),
345
- tm = SFSI("input[name='sfsi_telegram_message']").val(),
346
- tmn = SFSI("input[name='sfsi_telegram_username']").val(),
347
- wp = 1 == SFSI("input[name='sfsi_weibo_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_page']:checked").val(),
348
- wpu = SFSI("input[name='sfsi_weibo_pageURL']").val(),
349
- vp = 1 == SFSI("input[name='sfsi_vk_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_page']:checked").val(),
350
- vpu = SFSI("input[name='sfsi_vk_pageURL']").val(),
351
- op = 1 == SFSI("input[name='sfsi_ok_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_page']:checked").val(),
352
- opu = SFSI("input[name='sfsi_ok_pageURL']").val(),
353
- P = {};
354
- SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
355
- P[SFSI(this).attr("file-id")] = this.value;
356
- });
357
- var M = {
358
- action: "updateSrcn2",
359
- sfsi_rss_url: i,
360
- sfsi_rss_icons: e,
361
- sfsi_facebookPage_option: t,
362
- sfsi_facebookLike_option: n,
363
- sfsi_facebookShare_option: o,
364
- sfsi_facebookPage_url: a,
365
- sfsi_twitter_followme: r,
366
- sfsi_twitter_followUserName: c,
367
- sfsi_twitter_aboutPage: p,
368
- sfsi_twitter_page: _,
369
- sfsi_twitter_pageURL: l,
370
- sfsi_twitter_aboutPageText: S,
371
- sfsi_youtube_page: m,
372
- sfsi_youtube_pageUrl: F,
373
- sfsi_youtube_follow: h,
374
- sfsi_youtubeusernameorid: cls,
375
- sfsi_ytube_user: v,
376
- sfsi_ytube_chnlid: vchid,
377
- sfsi_pinterest_page: g,
378
- sfsi_pinterest_pageUrl: k,
379
- sfsi_instagram_pageUrl: b,
380
- sfsi_pinterest_pingBlog: y,
381
- sfsi_linkedin_page: w,
382
- sfsi_linkedin_pageURL: x,
383
- sfsi_linkedin_follow: C,
384
- sfsi_linkedin_followCompany: D,
385
- sfsi_linkedin_SharePage: U,
386
- sfsi_linkedin_recommendBusines: O,
387
- sfsi_linkedin_recommendCompany: j,
388
- sfsi_linkedin_recommendProductId: T,
389
- sfsi_custom_links: P,
390
- sfsi_telegram_page: tp,
391
- sfsi_telegram_pageURL: tpu,
392
- sfsi_telegram_message: tm,
393
- sfsi_telegram_username: tmn,
394
- sfsi_weibo_page: wp,
395
- sfsi_weibo_pageURL: wpu,
396
- sfsi_vk_page: vp,
397
- sfsi_vk_pageURL: vpu,
398
- sfsi_ok_page: op,
399
- sfsi_ok_pageURL: opu,
400
- nonce: nonce
401
- };
402
- SFSI.ajax({
403
- url: sfsi_icon_ajax_object.ajax_url,
404
- type: "post",
405
- data: M,
406
- async: !0,
407
- dataType: "json",
408
- success: function (s) {
409
- if (s == "wrong_nonce") {
410
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 2);
411
- return_value = !1;
412
- afterLoad();
413
- } else {
414
- "success" == s ? (showErrorSuc("success", "Saved !", 2), sfsicollapse("#sfsi_save2"),
415
- sfsi_depened_sections()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 2),
416
- return_value = !1), afterLoad();
417
- }
418
- }
419
- });
420
- }
421
-
422
- function sfsi_update_step3() {
423
- var nonce = SFSI("#sfsi_save3").attr("data-nonce");
424
- var s = sfsi_validationStep3();
425
- if (!s) return global_error = 1, !1;
426
- beForeLoad();
427
- var i = SFSI("input[name='sfsi_actvite_theme']:checked").val(),
428
- e = SFSI("input[name='sfsi_mouseOver']:checked").val(),
429
- t = SFSI("input[name='sfsi_shuffle_icons']:checked").val(),
430
- n = SFSI("input[name='sfsi_shuffle_Firstload']:checked").val(),
431
- o = SFSI("input[name='sfsi_same_icons_mouseOver_effect']:checked").val(),
432
- a = SFSI("input[name='sfsi_shuffle_interval']:checked").val(),
433
- r = SFSI("input[name='sfsi_shuffle_intervalTime']").val(),
434
- c = SFSI("input[name='sfsi_specialIcon_animation']:checked").val(),
435
- p = SFSI("input[name='sfsi_specialIcon_MouseOver']:checked").val(),
436
- _ = SFSI("input[name='sfsi_specialIcon_Firstload']:checked").val(),
437
- l = SFSI("#sfsi_specialIcon_Firstload_Icons option:selected").val(),
438
- S = SFSI("input[name='sfsi_specialIcon_interval']:checked").val(),
439
- u = SFSI("input[name='sfsi_specialIcon_intervalTime']").val(),
440
- f = SFSI("#sfsi_specialIcon_intervalIcons option:selected").val();
441
-
442
- var mouseover_effect_type = 'same_icons'; //SFSI("input[name='sfsi_mouseOver_effect_type']:checked").val();
443
-
444
- d = {
445
- action: "updateSrcn3",
446
- sfsi_actvite_theme: i,
447
- sfsi_mouseOver: e,
448
- sfsi_shuffle_icons: t,
449
- sfsi_shuffle_Firstload: n,
450
- sfsi_mouseOver_effect: o,
451
- sfsi_mouseover_effect_type: mouseover_effect_type,
452
- sfsi_shuffle_interval: a,
453
- sfsi_shuffle_intervalTime: r,
454
- sfsi_specialIcon_animation: c,
455
- sfsi_specialIcon_MouseOver: p,
456
- sfsi_specialIcon_Firstload: _,
457
- sfsi_specialIcon_Firstload_Icons: l,
458
- sfsi_specialIcon_interval: S,
459
- sfsi_specialIcon_intervalTime: u,
460
- sfsi_specialIcon_intervalIcons: f,
461
- nonce: nonce
462
- };
463
- SFSI.ajax({
464
- url: sfsi_icon_ajax_object.ajax_url,
465
- type: "post",
466
- data: d,
467
- async: !0,
468
- dataType: "json",
469
- success: function (s) {
470
- if (s == "wrong_nonce") {
471
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 3);
472
- return_value = !1;
473
- afterLoad();
474
- } else {
475
- "success" == s ? (showErrorSuc("success", "Saved !", 3), sfsicollapse("#sfsi_save3")) : (showErrorSuc("error", "Unkown error , please try again", 3),
476
- return_value = !1), afterLoad();
477
- }
478
- }
479
- });
480
- }
481
-
482
- function sfsi_show_counts() {
483
- "yes" == SFSI("input[name='sfsi_display_counts']:checked").val() ? (SFSI(".count_sections").slideDown(),
484
- sfsi_showPreviewCounts()) : (SFSI(".count_sections").slideUp(), sfsi_showPreviewCounts());
485
- }
486
-
487
- function sfsi_showPreviewCounts() {
488
- var s = 0;
489
- 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("checked") ? (SFSI("#sfsi_rss_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_rss_countsDisplay").css("opacity", 0),
490
- 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("checked") ? (SFSI("#sfsi_email_countsDisplay").css("opacity", 1),
491
- s = 1) : SFSI("#sfsi_email_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("checked") ? (SFSI("#sfsi_facebook_countsDisplay").css("opacity", 1),
492
- s = 1) : SFSI("#sfsi_facebook_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("checked") ? (SFSI("#sfsi_twitter_countsDisplay").css("opacity", 1),
493
- s = 1) : SFSI("#sfsi_twitter_countsDisplay").css("opacity", 0),
494
- 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("checked") ? (SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 0),
495
- 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("checked") ? (SFSI("#sfsi_youtube_countsDisplay").css("opacity", 1),
496
- s = 1) : SFSI("#sfsi_youtube_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("checked") ? (SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 1),
497
- s = 1) : SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_instagram_countsDisplay").css("opacity", 1),
498
- s = 1) : SFSI("#sfsi_instagram_countsDisplay").css("opacity", 0),
499
- 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0),
500
- 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("checked") ? (SFSI("#sfsi_vk_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_vk_countsDisplay").css("opacity", 0),
501
- 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("checked") ? (SFSI("#sfsi_ok_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_ok_countsDisplay").css("opacity", 0),
502
- 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("checked") ? (SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0),
503
- 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("checked") ? (SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0),
504
-
505
- 0 == s || "no" == SFSI("input[name='sfsi_display_counts']:checked").val() ? SFSI(".sfsi_Cdisplay").hide() : SFSI(".sfsi_Cdisplay").show();
506
- }
507
-
508
- function sfsi_show_OnpostsDisplay() {
509
- //"yes" == SFSI("input[name='sfsi_show_Onposts']:checked").val() ? SFSI(".PostsSettings_section").slideDown() :SFSI(".PostsSettings_section").slideUp();
510
- }
511
-
512
- function sfsi_update_step4() {
513
- var nonce = SFSI("#sfsi_save4").attr("data-nonce");
514
- var s = !1,
515
- i = sfsi_validationStep4();
516
- if (!i) return global_error = 1, !1;
517
- beForeLoad();
518
- var e = SFSI("input[name='sfsi_display_counts']:checked").val(),
519
- t = 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsDisplay']:checked").val(),
520
- n = 1 == SFSI("input[name='sfsi_email_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsFrom']:checked").val(),
521
- o = SFSI("input[name='sfsi_email_manualCounts']").val(),
522
- r = 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_countsDisplay']:checked").val(),
523
- c = SFSI("input[name='sfsi_rss_manualCounts']").val(),
524
- p = 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsDisplay']:checked").val(),
525
- _ = 1 == SFSI("input[name='sfsi_facebook_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsFrom']:checked").val(),
526
- mp = SFSI("input[name='sfsi_facebook_mypageCounts']").val(),
527
- l = SFSI("input[name='sfsi_facebook_manualCounts']").val(),
528
- S = 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsDisplay']:checked").val(),
529
- u = 1 == SFSI("input[name='sfsi_twitter_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsFrom']:checked").val(),
530
- f = SFSI("input[name='sfsi_twitter_manualCounts']").val(),
531
- d = SFSI("input[name='tw_consumer_key']").val(),
532
- I = SFSI("input[name='tw_consumer_secret']").val(),
533
- m = SFSI("input[name='tw_oauth_access_token']").val(),
534
- F = SFSI("input[name='tw_oauth_access_token_secret']").val(),
535
- k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
536
- y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
537
- b = SFSI("input[name='ln_company']").val(),
538
- w = SFSI("input[name='ln_api_key']").val(),
539
- x = SFSI("input[name='ln_secret_key']").val(),
540
- C = SFSI("input[name='ln_oAuth_user_token']").val(),
541
- D = 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsDisplay']:checked").val(),
542
- k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
543
- y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
544
- U = 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsDisplay']:checked").val(),
545
- O = 1 == SFSI("input[name='sfsi_youtube_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsFrom']:checked").val(),
546
- T = SFSI("input[name='sfsi_youtube_manualCounts']").val(),
547
- j = SFSI("input[name='sfsi_youtube_user']").val(),
548
- P = 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsDisplay']:checked").val(),
549
- M = 1 == SFSI("input[name='sfsi_pinterest_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsFrom']:checked").val(),
550
- L = SFSI("input[name='sfsi_pinterest_manualCounts']").val(),
551
- B = SFSI("input[name='sfsi_pinterest_user']").val(),
552
- E = SFSI("input[name='sfsi_pinterest_board']").val(),
553
- z = 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsDisplay']:checked").val(),
554
- A = 1 == SFSI("input[name='sfsi_instagram_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsFrom']:checked").val(),
555
- N = SFSI("input[name='sfsi_instagram_manualCounts']").val(),
556
- H = SFSI("input[name='sfsi_instagram_User']").val(),
557
- ha = SFSI("input[name='sfsi_instagram_clientid']").val(),
558
- ia = SFSI("input[name='sfsi_instagram_appurl']").val(),
559
- ja = SFSI("input[name='sfsi_instagram_token']").val(),
560
-
561
- tc = 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_countsDisplay']:checked").val(),
562
- tm = SFSI("input[name='sfsi_telegram_manualCounts']").val(),
563
-
564
- vc = 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_countsDisplay']:checked").val(),
565
- vm = SFSI("input[name='sfsi_vk_manualCounts']").val(),
566
-
567
-
568
- oc = 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_countsDisplay']:checked").val(),
569
- om = SFSI("input[name='sfsi_ok_manualCounts']").val(),
570
-
571
-
572
- wc = 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_countsDisplay']:checked").val(),
573
- wm = SFSI("input[name='sfsi_weibo_manualCounts']").val(),
574
-
575
- wcc = 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_countsDisplay']:checked").val(),
576
- wcm = SFSI("input[name='sfsi_wechat_manualCounts']").val(),
577
- $ = {
578
- action: "updateSrcn4",
579
- sfsi_display_counts: e,
580
- sfsi_email_countsDisplay: t,
581
- sfsi_email_countsFrom: n,
582
- sfsi_email_manualCounts: o,
583
- sfsi_rss_countsDisplay: r,
584
- sfsi_rss_manualCounts: c,
585
- sfsi_facebook_countsDisplay: p,
586
- sfsi_facebook_countsFrom: _,
587
- sfsi_facebook_mypageCounts: mp,
588
- sfsi_facebook_manualCounts: l,
589
- sfsi_twitter_countsDisplay: S,
590
- sfsi_twitter_countsFrom: u,
591
- sfsi_twitter_manualCounts: f,
592
- tw_consumer_key: d,
593
- tw_consumer_secret: I,
594
- tw_oauth_access_token: m,
595
- tw_oauth_access_token_secret: F,
596
- sfsi_linkedIn_countsDisplay: D,
597
- sfsi_linkedIn_countsFrom: k,
598
- sfsi_linkedIn_manualCounts: y,
599
- ln_company: b,
600
- ln_api_key: w,
601
- ln_secret_key: x,
602
- ln_oAuth_user_token: C,
603
- sfsi_youtube_countsDisplay: U,
604
- sfsi_youtube_countsFrom: O,
605
- sfsi_youtube_manualCounts: T,
606
- sfsi_youtube_user: j,
607
- sfsi_youtube_channelId: SFSI("input[name='sfsi_youtube_channelId']").val(),
608
- sfsi_pinterest_countsDisplay: P,
609
- sfsi_pinterest_countsFrom: M,
610
- sfsi_pinterest_manualCounts: L,
611
- sfsi_pinterest_user: B,
612
- sfsi_pinterest_board: E,
613
- sfsi_instagram_countsDisplay: z,
614
- sfsi_instagram_countsFrom: A,
615
- sfsi_instagram_manualCounts: N,
616
- sfsi_instagram_User: H,
617
- sfsi_instagram_clientid: ha,
618
- sfsi_instagram_appurl: ia,
619
- sfsi_instagram_token: ja,
620
- sfsi_telegram_countsDisplay: tc,
621
- sfsi_telegram_manualCounts: tm,
622
- sfsi_vk_countsDisplay: vc,
623
- sfsi_vk_manualCounts: vm,
624
- sfsi_ok_countsDisplay: oc,
625
- sfsi_ok_manualCounts: om,
626
- sfsi_weibo_countsDisplay: wc,
627
- sfsi_weibo_manualCounts: wm,
628
- sfsi_wechat_countsDisplay: wcc,
629
- sfsi_wechat_manualCounts: wcm,
630
- nonce: nonce
631
- };
632
- console.log($);
633
- return SFSI.ajax({
634
- url: sfsi_icon_ajax_object.ajax_url,
635
- type: "post",
636
- data: $,
637
- dataType: "json",
638
- async: !0,
639
- success: function (s) {
640
- if (s == "wrong_nonce") {
641
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 4);
642
- global_error = 1;
643
- afterLoad();
644
- } else {
645
- "success" == s.res ? (showErrorSuc("success", "Saved !", 4), sfsicollapse("#sfsi_save4"),
646
- sfsi_showPreviewCounts()) : (showErrorSuc("error", "Unkown error , please try again", 4),
647
- global_error = 1), afterLoad();
648
- }
649
- }
650
- }), s;
651
- }
652
-
653
- function sfsi_update_step5() {
654
- var nonce = SFSI("#sfsi_save5").attr("data-nonce");
655
- sfsi_update_step3();
656
-
657
- var s = sfsi_validationStep5();
658
-
659
- if (!s) return global_error = 1, !1;
660
-
661
- beForeLoad();
662
-
663
- var i = SFSI("input[name='sfsi_icons_size']").val(),
664
- e = SFSI("input[name='sfsi_icons_perRow']").val(),
665
- t = SFSI("input[name='sfsi_icons_spacing']").val(),
666
- n = SFSI("#sfsi_icons_Alignment").val(),
667
- o = SFSI("input[name='sfsi_icons_ClickPageOpen']:checked").val(),
668
-
669
- se = SFSI("input[name='sfsi_icons_suppress_errors']:checked").val(),
670
- c = SFSI("input[name='sfsi_icons_stick']:checked").val(),
671
- p = SFSI("#sfsi_rssIcon_order").attr("data-index"),
672
- _ = SFSI("#sfsi_emailIcon_order").attr("data-index"),
673
- S = SFSI("#sfsi_facebookIcon_order").attr("data-index"),
674
- u = SFSI("#sfsi_twitterIcon_order").attr("data-index"),
675
- f = SFSI("#sfsi_youtubeIcon_order").attr("data-index"),
676
- d = SFSI("#sfsi_pinterestIcon_order").attr("data-index"),
677
- I = SFSI("#sfsi_instagramIcon_order").attr("data-index"),
678
- F = SFSI("#sfsi_linkedinIcon_order").attr("data-index"),
679
- tgi = SFSI("#sfsi_telegramIcon_order").attr("data-index"),
680
- vki = SFSI("#sfsi_vkIcon_order").attr("data-index"),
681
- oki = SFSI("#sfsi_okIcon_order").attr("data-index"),
682
- wbi = SFSI("#sfsi_weiboIcon_order").attr("data-index"),
683
- wci = SFSI("#sfsi_wechatIcon_order").attr("data-index"),
684
-
685
- h = new Array();
686
-
687
- SFSI(".custom_iconOrder").each(function () {
688
- h.push({
689
- order: SFSI(this).attr("data-index"),
690
- ele: SFSI(this).attr("element-id")
691
- });
692
- });
693
-
694
- var v = 1 == SFSI("input[name='sfsi_rss_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_MouseOverText']").val(),
695
- g = 1 == SFSI("input[name='sfsi_email_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_MouseOverText']").val(),
696
- k = 1 == SFSI("input[name='sfsi_twitter_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_MouseOverText']").val(),
697
- y = 1 == SFSI("input[name='sfsi_facebook_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_MouseOverText']").val(),
698
- w = 1 == SFSI("input[name='sfsi_linkedIn_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_MouseOverText']").val(),
699
- x = 1 == SFSI("input[name='sfsi_youtube_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_MouseOverText']").val(),
700
- C = 1 == SFSI("input[name='sfsi_pinterest_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_MouseOverText']").val(),
701
- D = 1 == SFSI("input[name='sfsi_instagram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_MouseOverText']").val(),
702
- tg = 1 == SFSI("input[name='sfsi_telegram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_MouseOverText']").val(),
703
- vk = 1 == SFSI("input[name='sfsi_vk_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_MouseOverText']").val(),
704
- ok = 1 == SFSI("input[name='sfsi_ok_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_MouseOverText']").val(),
705
- wb = 1 == SFSI("input[name='sfsi_weibo_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_MouseOverText']").val(),
706
- wc = 1 == SFSI("input[name='sfsi_wechat_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_MouseOverText']").val(),
707
-
708
- O = {};
709
- SFSI("input[name='sfsi_custom_MouseOverTexts[]']").each(function () {
710
- O[SFSI(this).attr("file-id")] = this.value;
711
- });
712
-
713
- var sfsi_custom_social_hide = SFSI("input[name='sfsi_custom_social_hide']").val();
714
-
715
- var T = {
716
- action: "updateSrcn5",
717
- sfsi_icons_size: i,
718
- sfsi_icons_Alignment: n,
719
- sfsi_icons_perRow: e,
720
- sfsi_icons_spacing: t,
721
- sfsi_icons_ClickPageOpen: o,
722
- sfsi_icons_suppress_errors: se,
723
- sfsi_icons_stick: c,
724
- sfsi_rss_MouseOverText: v,
725
- sfsi_email_MouseOverText: g,
726
- sfsi_twitter_MouseOverText: k,
727
- sfsi_facebook_MouseOverText: y,
728
- sfsi_youtube_MouseOverText: x,
729
- sfsi_linkedIn_MouseOverText: w,
730
- sfsi_pinterest_MouseOverText: C,
731
- sfsi_instagram_MouseOverText: D,
732
- sfsi_telegram_MouseOverText: tg,
733
- sfsi_vk_MouseOverText: vk,
734
- sfsi_ok_MouseOverText: ok,
735
- sfsi_weibo_MouseOverText: wb,
736
- sfsi_wechat_MouseOverText: wc,
737
- sfsi_custom_MouseOverTexts: O,
738
- sfsi_rssIcon_order: p,
739
- sfsi_emailIcon_order: _,
740
- sfsi_facebookIcon_order: S,
741
- sfsi_twitterIcon_order: u,
742
- sfsi_youtubeIcon_order: f,
743
- sfsi_pinterestIcon_order: d,
744
- sfsi_instagramIcon_order: I,
745
- sfsi_linkedinIcon_order: F,
746
- sfsi_telegramIcon_order: tgi,
747
- sfsi_vkIcon_order: vki,
748
- sfsi_okIcon_order: oki,
749
- sfsi_weiboIcon_order: wbi,
750
- sfsi_wechatIcon_order: wci,
751
-
752
- sfsi_custom_orders: h,
753
- sfsi_custom_social_hide: sfsi_custom_social_hide,
754
- nonce: nonce
755
- };
756
- console.log(T);
757
- SFSI.ajax({
758
- url: sfsi_icon_ajax_object.ajax_url,
759
- type: "post",
760
- data: T,
761
- dataType: "json",
762
- async: !0,
763
- success: function (s) {
764
- if (s == "wrong_nonce") {
765
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 5);
766
- global_error = 1;
767
- afterLoad();
768
- } else {
769
- "success" == s ? (showErrorSuc("success", "Saved !", 5), sfsicollapse("#sfsi_save5")) : (global_error = 1,
770
- showErrorSuc("error", "Unkown error , please try again", 5)), afterLoad();
771
- }
772
- }
773
- });
774
- }
775
-
776
- function sfsi_update_step6() {
777
- var nonce = SFSI("#sfsi_save6").attr("data-nonce");
778
- beForeLoad();
779
- var s = SFSI("input[name='sfsi_show_Onposts']:checked").val(),
780
- i = SFSI("input[name='sfsi_textBefor_icons']").val(),
781
- e = SFSI("#sfsi_icons_alignment").val(),
782
- t = SFSI("#sfsi_icons_DisplayCounts").val(),
783
- rsub = SFSI("input[name='sfsi_rectsub']:checked").val(),
784
- rfb = SFSI("input[name='sfsi_rectfb']:checked").val(),
785
- rpin = SFSI("input[name='sfsi_rectpinit']:checked").val(),
786
- rshr = SFSI("input[name='sfsi_rectshr']:checked").val(),
787
- rtwr = SFSI("input[name='sfsi_recttwtr']:checked").val(),
788
- rfbshare = SFSI("input[name='sfsi_rectfbshare']:checked").val(),
789
- a = SFSI("input[name='sfsi_display_button_type']:checked").val();
790
- countshare = SFSI("input[name='sfsi_share_count']:checked").val();
791
- endpost = SFSI("input[name='sfsi_responsive_icons_end_post']:checked").val();
792
-
793
- var responsive_icons = {
794
- "default_icons": {},
795
- "settings": {}
796
- };
797
- SFSI('.sfsi_responsive_default_icon_container input[type="checkbox"]').each(function (index, obj) {
798
- var data_obj = {};
799
- data_obj.active = ('checked' == SFSI(obj).attr('checked')) ? 'yes' : 'no';
800
- var iconname = SFSI(obj).attr('data-icon');
801
- var next_section = SFSI(obj).parent().parent();
802
- data_obj.text = next_section.find('input[name="sfsi_responsive_' + iconname + '_input"]').val();
803
- data_obj.url = next_section.find('input[name="sfsi_responsive_' + iconname + '_url_input"]').val();
804
- responsive_icons.default_icons[iconname] = data_obj;
805
- });
806
- SFSI('.sfsi_responsive_custom_icon_container input[type="checkbox"]').each(function (index, obj) {
807
- if (SFSI(obj).attr('id') != "sfsi_responsive_custom_new_display") {
808
- var data_obj = {};
809
- data_obj.active = 'checked' == SFSI(obj).attr('checked') ? 'yes' : 'no';
810
- var icon_index = SFSI(obj).attr('data-custom-index');
811
- var next_section = SFSI(obj).parent().parent();
812
- data_obj['added'] = SFSI('input[name="sfsi_responsive_custom_' + index + '_added"]').val();
813
- data_obj.icon = next_section.find('img').attr('src');
814
- data_obj["bg-color"] = next_section.find('.sfsi_bg-color-picker').val();
815
-
816
- data_obj.text = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_input"]').val();
817
- data_obj.url = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_url_input"]').val();
818
- responsive_icons.custom_icons[index] = data_obj;
819
- }
820
- });
821
- responsive_icons.settings.icon_size = SFSI('select[name="sfsi_responsive_icons_settings_icon_size"]').val();
822
- responsive_icons.settings.icon_width_type = SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val();
823
- responsive_icons.settings.icon_width_size = SFSI('input[name="sfsi_responsive_icons_sttings_icon_width_size"]').val();
824
- responsive_icons.settings.edge_type = SFSI('select[name="sfsi_responsive_icons_settings_edge_type"]').val();
825
- responsive_icons.settings.edge_radius = SFSI('select[name="sfsi_responsive_icons_settings_edge_radius"]').val();
826
- responsive_icons.settings.style = SFSI('select[name="sfsi_responsive_icons_settings_style"]').val();
827
- responsive_icons.settings.margin = SFSI('input[name="sfsi_responsive_icons_settings_margin"]').val();
828
- responsive_icons.settings.text_align = SFSI('select[name="sfsi_responsive_icons_settings_text_align"]').val();
829
- responsive_icons.settings.show_count = SFSI('input[name="sfsi_responsive_icon_show_count"]:checked').val();
830
- responsive_icons.settings.counter_color = SFSI('input[name="sfsi_responsive_counter_color"]').val();
831
- responsive_icons.settings.counter_bg_color = SFSI('input[name="sfsi_responsive_counter_bg_color"]').val();
832
- responsive_icons.settings.share_count_text = SFSI('input[name="sfsi_responsive_counter_share_count_text"]').val();
833
- responsive_icons.settings.show_count = countshare;
834
- n = {
835
- action: "updateSrcn6",
836
- sfsi_show_Onposts: s,
837
- sfsi_icons_DisplayCounts: t,
838
- sfsi_icons_alignment: e,
839
- sfsi_textBefor_icons: i,
840
- sfsi_rectsub: rsub,
841
- sfsi_rectfb: rfb,
842
- sfsi_rectpinit: rpin,
843
- sfsi_rectshr: rshr,
844
- sfsi_recttwtr: rtwr,
845
- sfsi_rectfbshare: rfbshare,
846
- sfsi_responsive_icons: responsive_icons,
847
- sfsi_display_button_type: a,
848
- sfsi_responsive_icons_end_post:endpost,
849
- sfsi_share_count: countshare,
850
- nonce: nonce
851
- };
852
- SFSI.ajax({
853
- url: sfsi_icon_ajax_object.ajax_url,
854
- type: "post",
855
- data: n,
856
- dataType: "json",
857
- async: !0,
858
- success: function (s) {
859
- if (s == "wrong_nonce") {
860
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
861
- global_error = 1;
862
- afterLoad();
863
- } else {
864
- "success" == s ? (showErrorSuc("success", "Saved !", 6), sfsicollapse("#sfsi_save6")) : (global_error = 1,
865
- showErrorSuc("error", "Unkown error , please try again", 6)), afterLoad();
866
- }
867
- }
868
- });
869
- }
870
-
871
- function sfsi_update_step7() {
872
- var nonce = SFSI("#sfsi_save7").attr("data-nonce");
873
- var s = sfsi_validationStep7();
874
- if (!s) return global_error = 1, !1;
875
- beForeLoad();
876
- var i = SFSI("input[name='sfsi_popup_text']").val(),
877
- e = SFSI("#sfsi_popup_font option:selected").val(),
878
- t = SFSI("#sfsi_popup_fontStyle option:selected").val(),
879
- color = SFSI("input[name='sfsi_popup_fontColor']").val(),
880
- n = SFSI("input[name='sfsi_popup_fontSize']").val(),
881
- o = SFSI("input[name='sfsi_popup_background_color']").val(),
882
- a = SFSI("input[name='sfsi_popup_border_color']").val(),
883
- r = SFSI("input[name='sfsi_popup_border_thickness']").val(),
884
- c = SFSI("input[name='sfsi_popup_border_shadow']:checked").val(),
885
- p = SFSI("input[name='sfsi_Show_popupOn']:checked").val(),
886
- _ = [];
887
- SFSI("#sfsi_Show_popupOn_PageIDs :selected").each(function (s, i) {
888
- _[s] = SFSI(i).val();
889
- });
890
- var l = SFSI("input[name='sfsi_Shown_pop']:checked").val(),
891
- S = SFSI("input[name='sfsi_Shown_popupOnceTime']").val(),
892
- u = SFSI("#sfsi_Shown_popuplimitPerUserTime").val(),
893
- f = {
894
- action: "updateSrcn7",
895
- sfsi_popup_text: i,
896
- sfsi_popup_font: e,
897
- sfsi_popup_fontColor: color,
898
- /*sfsi_popup_fontStyle: t,*/
899
- sfsi_popup_fontSize: n,
900
- sfsi_popup_background_color: o,
901
- sfsi_popup_border_color: a,
902
- sfsi_popup_border_thickness: r,
903
- sfsi_popup_border_shadow: c,
904
- sfsi_Show_popupOn: p,
905
- sfsi_Show_popupOn_PageIDs: _,
906
- sfsi_Shown_pop: l,
907
- sfsi_Shown_popupOnceTime: S,
908
- sfsi_Shown_popuplimitPerUserTime: u,
909
- nonce: nonce
910
- };
911
- SFSI.ajax({
912
- url: sfsi_icon_ajax_object.ajax_url,
913
- type: "post",
914
- data: f,
915
- dataType: "json",
916
- async: !0,
917
- success: function (s) {
918
- if (s == "wrong_nonce") {
919
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
920
- afterLoad();
921
- } else {
922
- "success" == s ? (showErrorSuc("success", "Saved !", 7), sfsicollapse("#sfsi_save7")) : showErrorSuc("error", "Unkown error , please try again", 7),
923
- afterLoad();
924
- }
925
- }
926
- });
927
- }
928
-
929
- function sfsi_update_step8() {
930
- var nonce = SFSI("#sfsi_save8").attr("data-nonce");
931
- beForeLoad();
932
- var ie = SFSI("input[name='sfsi_form_adjustment']:checked").val(),
933
- je = SFSI("input[name='sfsi_form_height']").val(),
934
- ke = SFSI("input[name='sfsi_form_width']").val(),
935
- le = SFSI("input[name='sfsi_form_border']:checked").val(),
936
- me = SFSI("input[name='sfsi_form_border_thickness']").val(),
937
- ne = SFSI("input[name='sfsi_form_border_color']").val(),
938
- oe = SFSI("input[name='sfsi_form_background']").val(),
939
-
940
- ae = SFSI("input[name='sfsi_form_heading_text']").val(),
941
- be = SFSI("#sfsi_form_heading_font option:selected").val(),
942
- ce = SFSI("#sfsi_form_heading_fontstyle option:selected").val(),
943
- de = SFSI("input[name='sfsi_form_heading_fontcolor']").val(),
944
- ee = SFSI("input[name='sfsi_form_heading_fontsize']").val(),
945
- fe = SFSI("#sfsi_form_heading_fontalign option:selected").val(),
946
-
947
- ue = SFSI("input[name='sfsi_form_field_text']").val(),
948
- ve = SFSI("#sfsi_form_field_font option:selected").val(),
949
- we = SFSI("#sfsi_form_field_fontstyle option:selected").val(),
950
- xe = SFSI("input[name='sfsi_form_field_fontcolor']").val(),
951
- ye = SFSI("input[name='sfsi_form_field_fontsize']").val(),
952
- ze = SFSI("#sfsi_form_field_fontalign option:selected").val(),
953
-
954
- i = SFSI("input[name='sfsi_form_button_text']").val(),
955
- j = SFSI("#sfsi_form_button_font option:selected").val(),
956
- k = SFSI("#sfsi_form_button_fontstyle option:selected").val(),
957
- l = SFSI("input[name='sfsi_form_button_fontcolor']").val(),
958
- m = SFSI("input[name='sfsi_form_button_fontsize']").val(),
959
- n = SFSI("#sfsi_form_button_fontalign option:selected").val(),
960
- o = SFSI("input[name='sfsi_form_button_background']").val();
961
-
962
- var f = {
963
- action: "updateSrcn8",
964
- sfsi_form_adjustment: ie,
965
- sfsi_form_height: je,
966
- sfsi_form_width: ke,
967
- sfsi_form_border: le,
968
- sfsi_form_border_thickness: me,
969
- sfsi_form_border_color: ne,
970
- sfsi_form_background: oe,
971
-
972
- sfsi_form_heading_text: ae,
973
- sfsi_form_heading_font: be,
974
- sfsi_form_heading_fontstyle: ce,
975
- sfsi_form_heading_fontcolor: de,
976
- sfsi_form_heading_fontsize: ee,
977
- sfsi_form_heading_fontalign: fe,
978
-
979
- sfsi_form_field_text: ue,
980
- sfsi_form_field_font: ve,
981
- sfsi_form_field_fontstyle: we,
982
- sfsi_form_field_fontcolor: xe,
983
- sfsi_form_field_fontsize: ye,
984
- sfsi_form_field_fontalign: ze,
985
-
986
- sfsi_form_button_text: i,
987
- sfsi_form_button_font: j,
988
- sfsi_form_button_fontstyle: k,
989
- sfsi_form_button_fontcolor: l,
990
- sfsi_form_button_fontsize: m,
991
- sfsi_form_button_fontalign: n,
992
- sfsi_form_button_background: o,
993
-
994
- nonce: nonce
995
- };
996
- SFSI.ajax({
997
- url: sfsi_icon_ajax_object.ajax_url,
998
- type: "post",
999
- data: f,
1000
- dataType: "json",
1001
- async: !0,
1002
- success: function (s) {
1003
- if (s == "wrong_nonce") {
1004
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
1005
- afterLoad();
1006
- } else {
1007
- "success" == s ? (showErrorSuc("success", "Saved !", 8), sfsicollapse("#sfsi_save8"), create_suscriber_form()) : showErrorSuc("error", "Unkown error , please try again", 8),
1008
- afterLoad();
1009
- }
1010
- }
1011
- });
1012
- }
1013
-
1014
- // Queestion 3
1015
- function sfsi_update_step9() {
1016
- var nonce = SFSI("#sfsi_save9").attr("data-nonce");
1017
- beForeLoad();
1018
-
1019
- var i_float = SFSI("input[name='sfsi_icons_float']:checked").val(),
1020
- i_floatP = SFSI("input[name='sfsi_icons_floatPosition']:checked").val(),
1021
- i_floatMt = SFSI("input[name='sfsi_icons_floatMargin_top']").val(),
1022
- i_floatMb = SFSI("input[name='sfsi_icons_floatMargin_bottom']").val(),
1023
- i_floatMl = SFSI("input[name='sfsi_icons_floatMargin_left']").val(),
1024
- i_floatMr = SFSI("input[name='sfsi_icons_floatMargin_right']").val(),
1025
- i_disableFloat = SFSI("input[name='sfsi_disable_floaticons']:checked").val(),
1026
-
1027
- show_via_widget = SFSI("input[name='sfsi_show_via_widget']").val(),
1028
- show_via__shortcode = SFSI("input[name='sfsi_show_via_shortcode']:checked").length==0?"no":"yes",
1029
- sfsi_show_via_afterposts = SFSI("input[name='sfsi_show_via_afterposts']").val();
1030
-
1031
- var f = {
1032
-
1033
- action: "updateSrcn9",
1034
-
1035
- sfsi_icons_float: i_float,
1036
- sfsi_icons_floatPosition: i_floatP,
1037
- sfsi_icons_floatMargin_top: i_floatMt,
1038
- sfsi_icons_floatMargin_bottom: i_floatMb,
1039
- sfsi_icons_floatMargin_left: i_floatMl,
1040
- sfsi_icons_floatMargin_right: i_floatMr,
1041
- sfsi_disable_floaticons: i_disableFloat,
1042
-
1043
- sfsi_show_via_widget: show_via_widget,
1044
- sfsi_show_via_shortcode: show_via__shortcode,
1045
- sfsi_show_via_afterposts: sfsi_show_via_afterposts,
1046
- nonce: nonce
1047
- };
1048
- SFSI.ajax({
1049
- url: sfsi_icon_ajax_object.ajax_url,
1050
- type: "post",
1051
- data: f,
1052
- dataType: "json",
1053
- async: !0,
1054
- success: function (s) {
1055
- if (s == "wrong_nonce") {
1056
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 9);
1057
- afterLoad();
1058
- } else {
1059
- "success" == s ? (showErrorSuc("success", "Saved !", 9), sfsicollapse("#sfsi_save9")) : showErrorSuc("error", "Unkown error , please try again", 9),
1060
- afterLoad();
1061
- }
1062
- }
1063
- });
1064
- }
1065
-
1066
- function sfsi_validationStep2() {
1067
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1068
- SFSI('input').removeClass('inputError'); // remove previous error
1069
- if (sfsi_validator(SFSI('input[name="sfsi_rss_display"]'), 'checked')) {
1070
- if (!sfsi_validator(SFSI('input[name="sfsi_rss_url"]'), 'url')) {
1071
- showErrorSuc("error", "Error : Invalid Rss url ", 2);
1072
- SFSI('input[name="sfsi_rss_url"]').addClass('inputError');
1073
-
1074
- return false;
1075
- }
1076
- }
1077
- /* validate facebook */
1078
- if (sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'checked')) {
1079
- if (!sfsi_validator(SFSI('input[name="sfsi_facebookPage_url"]'), 'blank')) {
1080
- showErrorSuc("error", "Error : Invalid Facebook page url ", 2);
1081
- SFSI('input[name="sfsi_facebookPage_url"]').addClass('inputError');
1082
-
1083
- return false;
1084
- }
1085
- }
1086
- /* validate twitter user name */
1087
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'checked')) {
1088
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_followUserName"]'), 'blank')) {
1089
- showErrorSuc("error", "Error : Invalid Twitter UserName ", 2);
1090
- SFSI('input[name="sfsi_twitter_followUserName"]').addClass('inputError');
1091
- return false;
1092
- }
1093
- }
1094
- /* validate twitter about page */
1095
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'checked')) {
1096
- if (!sfsi_validator(SFSI('#sfsi_twitter_aboutPageText'), 'blank')) {
1097
- showErrorSuc("error", "Error : Tweet about my page is blank ", 2);
1098
- SFSI('#sfsi_twitter_aboutPageText').addClass('inputError');
1099
- return false;
1100
- }
1101
- }
1102
- /* twitter validation */
1103
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'checked')) {
1104
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_pageURL"]'), 'blank')) {
1105
- showErrorSuc("error", "Error : Invalid twitter page Url ", 2);
1106
- SFSI('input[name="sfsi_twitter_pageURL"]').addClass('inputError');
1107
- return false;
1108
- }
1109
- }
1110
-
1111
- /* youtube validation */
1112
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'checked')) {
1113
- if (!sfsi_validator(SFSI('input[name="sfsi_youtube_pageUrl"]'), 'blank')) {
1114
- showErrorSuc("error", "Error : Invalid youtube Url ", 2);
1115
- SFSI('input[name="sfsi_youtube_pageUrl"]').addClass('inputError');
1116
- return false;
1117
- }
1118
- }
1119
- /* youtube validation */
1120
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_follow"]'), 'checked')) {
1121
- cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val();
1122
- if (cls == 'name' && !sfsi_validator(SFSI('input[name="sfsi_ytube_user"]'), 'blank')) {
1123
- showErrorSuc("error", "Error : Invalid youtube user name", 2);
1124
- SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1125
- return false;
1126
- }
1127
-
1128
- if (cls == 'id' && !sfsi_validator(SFSI('input[name="sfsi_ytube_chnlid"]'), 'blank')) {
1129
- showErrorSuc("error", "Error : Invalid youtube Channel ID ", 2);
1130
- SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1131
- return false;
1132
- }
1133
- }
1134
- /* pinterest validation */
1135
- if (sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'checked')) {
1136
- if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_pageUrl"]'), 'blank')) {
1137
- showErrorSuc("error", "Error : Invalid pinterest page url ", 2);
1138
- SFSI('input[name="sfsi_pinterest_pageUrl"]').addClass('inputError');
1139
- return false;
1140
- }
1141
- }
1142
- /* instagram validation */
1143
- if (sfsi_validator(SFSI('input[name="sfsi_instagram_display"]'), 'checked')) {
1144
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_pageUrl"]'), 'blank')) {
1145
- showErrorSuc("error", "Error : Invalid Instagram url ", 2);
1146
- SFSI('input[name="sfsi_instagram_pageUrl"]').addClass('inputError');
1147
- return false;
1148
- }
1149
- }
1150
- /* telegram validation */
1151
- if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1152
- if (!sfsi_validator(SFSI('input[name="sfsi_telegram_username"]'), 'blank')) {
1153
- showErrorSuc("error", "Error : Invalid telegram username ", 2);
1154
- SFSI('input[name="sfsi_telegram_username"]').addClass('inputError');
1155
- return false;
1156
- }
1157
- }
1158
- /* telegram validation */
1159
- if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1160
- if (!sfsi_validator(SFSI('input[name="sfsi_telegram_message"]'), 'blank')) {
1161
- showErrorSuc("error", "Error : Invalid Message ", 2);
1162
- SFSI('input[name="sfsi_telegram_message"]').addClass('inputError');
1163
- return false;
1164
- }
1165
- }
1166
- /* vk validation */
1167
- if (sfsi_validator(SFSI('input[name="sfsi_vk_display"]'), 'checked')) {
1168
- if (!sfsi_validator(SFSI('input[name="sfsi_vk_pageURL"]'), 'blank')) {
1169
- showErrorSuc("error", "Error : Invalid vk url ", 2);
1170
- SFSI('input[name="sfsi_vk_pageURL"]').addClass('inputError');
1171
- return false;
1172
- }
1173
- }
1174
- /* ok validation */
1175
- if (sfsi_validator(SFSI('input[name="sfsi_ok_display"]'), 'checked')) {
1176
- if (!sfsi_validator(SFSI('input[name="sfsi_ok_pageURL"]'), 'blank')) {
1177
- showErrorSuc("error", "Error : Invalid ok url ", 2);
1178
- SFSI('input[name="sfsi_ok_pageURL"]').addClass('inputError');
1179
- return false;
1180
- }
1181
- }
1182
- /* weibo validation */
1183
- if (sfsi_validator(SFSI('input[name="sfsi_weibo_display"]'), 'checked')) {
1184
- if (!sfsi_validator(SFSI('input[name="sfsi_weibo_pageURL"]'), 'blank')) {
1185
- showErrorSuc("error", "Error : Invalid weibo url ", 2);
1186
- SFSI('input[name="sfsi_weibo_pageURL"]').addClass('inputError');
1187
- return false;
1188
- }
1189
- }
1190
- /* LinkedIn validation */
1191
- if (sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'checked')) {
1192
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_pageURL"]'), 'blank')) {
1193
- showErrorSuc("error", "Error : Invalid LinkedIn page url ", 2);
1194
- SFSI('input[name="sfsi_linkedin_pageURL"]').addClass('inputError');
1195
- return false;
1196
- }
1197
- }
1198
- if (sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'checked')) {
1199
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendProductId"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendCompany"]'), 'blank')) {
1200
- showErrorSuc("error", "Error : Please Enter Product Id and Company for LinkedIn Recommendation ", 2);
1201
- SFSI('input[name="sfsi_linkedin_recommendProductId"]').addClass('inputError');
1202
- SFSI('input[name="sfsi_linkedin_recommendCompany"]').addClass('inputError');
1203
- return false;
1204
- }
1205
- }
1206
- /* validate custom links */
1207
- var er = 0;
1208
- SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
1209
-
1210
- //if(!sfsi_validator(SFSI(this),'blank') || !sfsi_validator(SFSI(SFSI(this)),'url') )
1211
- if (!sfsi_validator(SFSI(this), 'blank')) {
1212
- showErrorSuc("error", "Error : Please Enter a valid Custom link ", 2);
1213
- SFSI(this).addClass('inputError');
1214
- er = 1;
1215
- }
1216
- });
1217
- if (!er) return true;
1218
- else return false;
1219
- }
1220
-
1221
- function sfsi_validationStep3() {
1222
- SFSI('input').removeClass('inputError'); // remove previous error
1223
- /* validate shuffle effect */
1224
- if (sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked')) {
1225
- if ((!sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked')) && (!sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1226
- showErrorSuc("error", "Error : Please Chose a Shuffle option ", 3);
1227
- SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1228
- SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1229
- return false;
1230
- }
1231
- }
1232
- if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked') && (sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked') || sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1233
- showErrorSuc("error", "Error : Please check \"Shuffle them automatically\" option also ", 3);
1234
- SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1235
- SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1236
- return false;
1237
- }
1238
-
1239
- /* validate twitter user name */
1240
- if (sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked')) {
1241
-
1242
- if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'int')) {
1243
- showErrorSuc("error", "Error : Invalid shuffle time interval", 3);
1244
- SFSI('input[name="sfsi_shuffle_intervalTime"]').addClass('inputError');
1245
- return false;
1246
- }
1247
- }
1248
- return true;
1249
- }
1250
-
1251
- function sfsi_validationStep4() {
1252
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1253
- /* validate email */
1254
- if (sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'checked')) {
1255
- if (SFSI('input[name="sfsi_email_countsFrom"]:checked').val() == 'manual') {
1256
- if (!sfsi_validator(SFSI('input[name="sfsi_email_manualCounts"]'), 'blank')) {
1257
- showErrorSuc("error", "Error : Please Enter manual counts for Email icon ", 4);
1258
- SFSI('input[name="sfsi_email_manualCounts"]').addClass('inputError');
1259
- return false;
1260
- }
1261
- }
1262
- }
1263
- /* validate RSS count */
1264
- if (sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'checked')) {
1265
- if (!sfsi_validator(SFSI('input[name="sfsi_rss_manualCounts"]'), 'blank')) {
1266
- showErrorSuc("error", "Error : Please Enter manual counts for Rss icon ", 4);
1267
- SFSI('input[name="sfsi_rss_countsDisplay"]').addClass('inputError');
1268
- return false;
1269
- }
1270
- }
1271
- /* validate facebook */
1272
- if (sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'checked')) {
1273
- /*if(SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val()=='likes' )
1274
- {
1275
- if(!sfsi_validator(SFSI('input[name="sfsi_facebook_PageLink"]'),'blank'))
1276
- { showErrorSuc("error","Error : Please Enter facebook page Url ",4);
1277
- SFSI('input[name="sfsi_facebook_PageLink"]').addClass('inputError');
1278
- return false;
1279
- }
1280
- } */
1281
- if (SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val() == 'manual') {
1282
- if (!sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'url')) {
1283
- showErrorSuc("error", "Error : Please Enter a valid facebook manual counts ", 4);
1284
- SFSI('input[name="sfsi_facebook_manualCounts"]').addClass('inputError');
1285
- return false;
1286
- }
1287
- }
1288
- }
1289
-
1290
- /* validate twitter */
1291
- if (sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'checked')) {
1292
- if (SFSI('input[name="sfsi_twitter_countsFrom"]:checked').val() == 'source') {
1293
- if (!sfsi_validator(SFSI('input[name="tw_consumer_key"]'), 'blank')) {
1294
- showErrorSuc("error", "Error : Please Enter a valid consumer key", 4);
1295
- SFSI('input[name="tw_consumer_key"]').addClass('inputError');
1296
- return false;
1297
- }
1298
- if (!sfsi_validator(SFSI('input[name="tw_consumer_secret"]'), 'blank')) {
1299
- showErrorSuc("error", "Error : Please Enter a valid consume secret ", 4);
1300
- SFSI('input[name="tw_consumer_secret"]').addClass('inputError');
1301
- return false;
1302
- }
1303
- if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token"]'), 'blank')) {
1304
- showErrorSuc("error", "Error : Please Enter a valid oauth access token", 4);
1305
- SFSI('input[name="tw_oauth_access_token"]').addClass('inputError');
1306
- return false;
1307
- }
1308
- if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token_secret"]'), 'blank')) {
1309
- showErrorSuc("error", "Error : Please Enter a oAuth access token secret", 4);
1310
- SFSI('input[name="tw_oauth_access_token_secret"]').addClass('inputError');
1311
- return false;
1312
- }
1313
- }
1314
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1315
-
1316
- if (!sfsi_validator(SFSI('input[name="sfsi_twitter_manualCounts"]'), 'blank')) {
1317
- showErrorSuc("error", "Error : Please Enter Twitter manual counts ", 4);
1318
- SFSI('input[name="sfsi_twitter_manualCounts"]').addClass('inputError');
1319
- return false;
1320
- }
1321
- }
1322
- }
1323
- /* validate LinkedIn */
1324
- if (sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'checked')) {
1325
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'follower') {
1326
- if (!sfsi_validator(SFSI('input[name="ln_company"]'), 'blank')) {
1327
- showErrorSuc("error", "Error : Please Enter a valid company name", 4);
1328
- SFSI('input[name="ln_company"]').addClass('inputError');
1329
- return false;
1330
- }
1331
- if (!sfsi_validator(SFSI('input[name="ln_api_key"]'), 'blank')) {
1332
- showErrorSuc("error", "Error : Please Enter a valid API key ", 4);
1333
- SFSI('input[name="ln_api_key"]').addClass('inputError');
1334
- return false;
1335
- }
1336
- if (!sfsi_validator(SFSI('input[name="ln_secret_key"]'), 'blank')) {
1337
- showErrorSuc("error", "Error : Please Enter a valid secret ", 4);
1338
- SFSI('input[name="ln_secret_key"]').addClass('inputError');
1339
- return false;
1340
- }
1341
- if (!sfsi_validator(SFSI('input[name="ln_oAuth_user_token"]'), 'blank')) {
1342
- showErrorSuc("error", "Error : Please Enter a oAuth Access Token", 4);
1343
- SFSI('input[name="ln_oAuth_user_token"]').addClass('inputError');
1344
- return false;
1345
- }
1346
- }
1347
- if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1348
- if (!sfsi_validator(SFSI('input[name="sfsi_linkedIn_manualCounts"]'), 'blank')) {
1349
- showErrorSuc("error", "Error : Please Enter LinkedIn manual counts ", 4);
1350
- SFSI('input[name="sfsi_linkedIn_manualCounts"]').addClass('inputError');
1351
- return false;
1352
- }
1353
- }
1354
- }
1355
- /* validate youtube */
1356
- if (sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'checked')) {
1357
- if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'subscriber') {
1358
- if (
1359
- !sfsi_validator(SFSI('input[name="sfsi_youtube_user"]'), 'blank') &&
1360
- !sfsi_validator(SFSI('input[name="sfsi_youtube_channelId"]'), 'blank')
1361
- ) {
1362
- showErrorSuc("error", "Error : Please Enter a youtube user name or channel id", 4);
1363
- SFSI('input[name="sfsi_youtube_user"]').addClass('inputError');
1364
- SFSI('input[name="sfsi_youtube_channelId"]').addClass('inputError');
1365
- return false;
1366
- }
1367
- }
1368
- if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'manual') {
1369
- if (!sfsi_validator(SFSI('input[name="sfsi_youtube_manualCounts"]'), 'blank')) {
1370
- showErrorSuc("error", "Error : Please Enter youtube manual counts ", 4);
1371
- SFSI('input[name="sfsi_youtube_manualCounts"]').addClass('inputError');
1372
- return false;
1373
- }
1374
- }
1375
- }
1376
- /* validate pinterest */
1377
- if (sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'checked')) {
1378
- if (SFSI('input[name="sfsi_pinterest_countsFrom"]:checked').val() == 'manual') {
1379
- if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_manualCounts"]'), 'blank')) {
1380
- showErrorSuc("error", "Error : Please Enter Pinterest manual counts ", 4);
1381
- SFSI('input[name="sfsi_pinterest_manualCounts"]').addClass('inputError');
1382
- return false;
1383
- }
1384
- }
1385
- }
1386
- /* validate instagram */
1387
- if (sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'checked')) {
1388
- if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'manual') {
1389
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_manualCounts"]'), 'blank')) {
1390
- showErrorSuc("error", "Error : Please Enter Instagram manual counts ", 4);
1391
- SFSI('input[name="sfsi_instagram_manualCounts"]').addClass('inputError');
1392
- return false;
1393
- }
1394
- }
1395
- if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'followers') {
1396
- if (!sfsi_validator(SFSI('input[name="sfsi_instagram_User"]'), 'blank')) {
1397
- showErrorSuc("error", "Error : Please Enter a instagram user name", 4);
1398
- SFSI('input[name="sfsi_instagram_User"]').addClass('inputError');
1399
- return false;
1400
- }
1401
- }
1402
- }
1403
- return true;
1404
- }
1405
-
1406
- function sfsi_validationStep5() {
1407
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1408
- /* validate size */
1409
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_size"]'), 'int')) {
1410
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1411
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1412
- return false;
1413
- }
1414
- if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) > 100) {
1415
- showErrorSuc("error", "Error : Icons Size allow 100px maximum ", 5);
1416
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1417
- return false;
1418
- }
1419
- if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) <= 0) {
1420
- showErrorSuc("error", "Error : Icons Size should be more than 0 ", 5);
1421
- SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1422
- return false;
1423
- }
1424
- /* validate spacing */
1425
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1426
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1427
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1428
- return false;
1429
- }
1430
- if (parseInt(SFSI('input[name="sfsi_icons_spacing"]').val()) < 0) {
1431
- showErrorSuc("error", "Error : Icons Spacing should be 0 or more", 5);
1432
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1433
- return false;
1434
- }
1435
- /* icons per row spacing */
1436
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1437
- showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1438
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1439
- return false;
1440
- }
1441
- if (parseInt(SFSI('input[name="sfsi_icons_perRow"]').val()) <= 0) {
1442
- showErrorSuc("error", "Error : Icons Per row should be more than 0", 5);
1443
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1444
- return false;
1445
- }
1446
- /* validate icons effects */
1447
- // if(SFSI('input[name="sfsi_icons_float"]:checked').val()=="yes" && SFSI('input[name="sfsi_icons_stick"]:checked').val()=="yes")
1448
- // {
1449
- // showErrorSuc("error","Error : Only one allow from Sticking & floating ",5);
1450
- // SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", true);
1451
- // return false;
1452
- // }
1453
- return true;
1454
- }
1455
-
1456
- function sfsi_validationStep7() {
1457
- //var class_name= SFSI(element).hasAttr('sfsi_validate');
1458
- /* validate border thikness */
1459
- if (!sfsi_validator(SFSI('input[name="sfsi_popup_border_thickness"]'), 'int')) {
1460
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1461
- SFSI('input[name="sfsi_popup_border_thickness"]').addClass('inputError');
1462
- return false;
1463
- }
1464
- /* validate fotn size */
1465
- if (!sfsi_validator(SFSI('input[name="sfsi_popup_fontSize"]'), 'int')) {
1466
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1467
- SFSI('input[name="sfsi_popup_fontSize"]').addClass('inputError');
1468
- return false;
1469
- }
1470
- /* validate pop up shown */
1471
- if (SFSI('input[name="sfsi_Shown_pop"]:checked').val() == 'once') {
1472
-
1473
- if (!sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'url')) {
1474
- showErrorSuc("error", "Error : Please Enter a valid pop up shown time ", 7);
1475
- SFSI('input[name="sfsi_Shown_popupOnceTime"]').addClass('inputError');
1476
- return false;
1477
- }
1478
- }
1479
- /* validate page ids */
1480
- if (SFSI('input[name="sfsi_Show_popupOn"]:checked').val() == 'selectedpage') {
1481
- if (!sfsi_validator(SFSI('input[name="sfsi_Show_popupOn"]'), 'blank')) {
1482
- showErrorSuc("error", "Error : Please Enter page ids with comma ", 7);
1483
- SFSI('input[name="sfsi_Show_popupOn"]').addClass('inputError');
1484
- return false;
1485
- }
1486
- }
1487
- /* validate spacing */
1488
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1489
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1490
- SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1491
- return false;
1492
- }
1493
- /* icons per row spacing */
1494
- if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1495
- showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1496
- SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1497
- return false;
1498
- }
1499
- return true;
1500
- }
1501
-
1502
- function sfsi_validator(element, valType) {
1503
- var Vurl = new RegExp("^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\@\?\'\\\+&amp;%\$#\=~_\-]+))*$");
1504
- //var Vurl = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;
1505
-
1506
- switch (valType) {
1507
- case "blank":
1508
- if (!element.val().trim()) return false;
1509
- else return true;
1510
- break;
1511
- case "url":
1512
- if (!Vurl.test(element.val().trim())) return false;
1513
- else return true;
1514
- break;
1515
- case "checked":
1516
- if (!element.attr('checked') === true) return false;
1517
- else return true;
1518
- break;
1519
- case "activte":
1520
- if (!element.attr('disabled')) return true;
1521
- else return false;
1522
- break;
1523
- case "int":
1524
- if (!isNaN(element.val())) return true;
1525
- else return false;
1526
- break;
1527
-
1528
- }
1529
- }
1530
-
1531
- function afterIconSuccess(s, nonce) {
1532
- if (s.res = "success") {
1533
- var i = s.key + 1,
1534
- e = s.element,
1535
- t = e + 1;
1536
- SFSI("#total_cusotm_icons").val(s.element);
1537
- SFSI(".upload-overlay").hide("slow");
1538
- SFSI(".uperror").html("");
1539
- showErrorSuc("success", "Custom Icon updated successfully", 1);
1540
- d = new Date();
1541
-
1542
- var ele = SFSI(".notice_custom_icons_premium");
1543
-
1544
- SFSI("li.custom:last-child").removeClass("bdr_btm_non");
1545
- SFSI("li.custom:last-child").children("span.custom-img").children("img").attr("src", s.img_path + "?" + d.getTime());
1546
- SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("ele-type");
1547
- SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("isnew");
1548
- icons_name = SFSI("li.custom:last-child").find("input.styled").attr("name");
1549
- var n = icons_name.split("_");
1550
- s.key = s.key, s.img_path += "?" + d.getTime(), 5 > e && SFSI(".icn_listing").append('<li id="c' + i + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + i + '" type="checkbox" value="yes" class="styled" style="display:none;" element-type="cusotm-icon" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + i + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + t + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>'),
1551
- SFSI(".custom_section").show(),
1552
- SFSI('<div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" alt="error" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>').insertBefore('.notice_custom_icons_premium');
1553
- //SFSI(".custom-links").append(' <div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>');
1554
- SFSI(".notice_custom_icons_premium").show();
1555
- SFSI("#c" + s.key).append('<input type="hidden" name="nonce" value="' + nonce + '">');
1556
- var o = SFSI("div.custom_m").find("div.mouseover_field").length;
1557
- SFSI("div.custom_m").append(0 == o % 2 ? '<div class="clear"> </div> <div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>' : '<div class="cHover " ><div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>'),
1558
- SFSI("ul.share_icon_order").append('<li class="custom_iconOrder sfsiICON_' + s.key + '" data-index="" element-id="' + s.key + '" id=""><a href="#" title="Custom Icon" ><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/></a></li>'),
1559
- SFSI("ul.sfsi_sample_icons").append('<li class="sfsiICON_' + s.key + '" element-id="' + s.key + '" ><div><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/><span class="sfsi_Cdisplay">12k</span></div></li>'),
1560
- sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step2(),
1561
- sfsi_update_step5(), SFSI(".upload-overlay").css("pointer-events", "auto"), sfsi_showPreviewCounts(),
1562
- afterLoad();
1563
- }
1564
- }
1565
-
1566
- function beforeIconSubmit(s) {
1567
- if (SFSI(".uperror").html("Uploading....."), window.File && window.FileReader && window.FileList && window.Blob) {
1568
- SFSI(s).val() || SFSI(".uperror").html("File is empty");
1569
- var i = s.files[0].size,
1570
- e = s.files[0].type;
1571
- switch (e) {
1572
- case "image/png":
1573
- case "image/gif":
1574
- case "image/jpeg":
1575
- case "image/pjpeg":
1576
- break;
1577
-
1578
- default:
1579
- return SFSI(".uperror").html("Unsupported file"), !1;
1580
- }
1581
- return i > 1048576 ? (SFSI(".uperror").html("Image should be less than 1 MB"), !1) : !0;
1582
- }
1583
- return !0;
1584
- }
1585
-
1586
- function bytesToSize(s) {
1587
- var i = ["Bytes", "KB", "MB", "GB", "TB"];
1588
- if (0 == s) return "0 Bytes";
1589
- var e = parseInt(Math.floor(Math.log(s) / Math.log(1024)));
1590
- return Math.round(s / Math.pow(1024, e), 2) + " " + i[e];
1591
- }
1592
-
1593
- function showErrorSuc(s, i, e) {
1594
- if ("error" == s) var t = "errorMsg";
1595
- else var t = "sucMsg";
1596
- return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
1597
- SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
1598
- SFSI("." + t).slideUp("slow");
1599
- }, 5e3), !1;
1600
- }
1601
-
1602
- function beForeLoad() {
1603
- SFSI(".loader-img").show(), SFSI(".save_button >a").html("Saving..."), SFSI(".save_button >a").css("pointer-events", "none");
1604
- }
1605
-
1606
- function afterLoad() {
1607
- SFSI("input").removeClass("inputError"), SFSI(".save_button >a").html("Save"), SFSI(".tab10>div.save_button >a").html("Save All Settings"),
1608
- SFSI(".save_button >a").css("pointer-events", "auto"), SFSI(".save_button >a").removeAttr("onclick"),
1609
- SFSI(".loader-img").hide();
1610
- }
1611
-
1612
- function sfsi_make_popBox() {
1613
- var s = 0;
1614
- SFSI(".sfsi_sample_icons >li").each(function () {
1615
- "none" != SFSI(this).css("display") && (s = 1);
1616
- }),
1617
- 0 == s ? SFSI(".sfsi_Popinner").hide() : SFSI(".sfsi_Popinner").show(),
1618
- "" != SFSI('input[name="sfsi_popup_text"]').val() ? (SFSI(".sfsi_Popinner >h2").html(SFSI('input[name="sfsi_popup_text"]').val()),
1619
- SFSI(".sfsi_Popinner >h2").show()) : SFSI(".sfsi_Popinner >h2").hide(), SFSI(".sfsi_Popinner").css({
1620
- "border-color": SFSI('input[name="sfsi_popup_border_color"]').val(),
1621
- "border-width": SFSI('input[name="sfsi_popup_border_thickness"]').val(),
1622
- "border-style": "solid"
1623
- }),
1624
- SFSI(".sfsi_Popinner").css("background-color", SFSI('input[name="sfsi_popup_background_color"]').val()),
1625
- SFSI(".sfsi_Popinner h2").css("font-family", SFSI("#sfsi_popup_font").val()), SFSI(".sfsi_Popinner h2").css("font-style", SFSI("#sfsi_popup_fontStyle").val()),
1626
- SFSI(".sfsi_Popinner >h2").css("font-size", parseInt(SFSI('input[name="sfsi_popup_fontSize"]').val())),
1627
- SFSI(".sfsi_Popinner >h2").css("color", SFSI('input[name="sfsi_popup_fontColor"]').val() + " !important"),
1628
- "yes" == SFSI('input[name="sfsi_popup_border_shadow"]:checked').val() ? SFSI(".sfsi_Popinner").css("box-shadow", "12px 30px 18px #CCCCCC") : SFSI(".sfsi_Popinner").css("box-shadow", "none");
1629
- }
1630
-
1631
- function sfsi_stick_widget(s) {
1632
- 0 == initTop.length && (SFSI(".sfsi_widget").each(function (s) {
1633
- initTop[s] = SFSI(this).position().top;
1634
- }), console.log(initTop));
1635
- var i = SFSI(window).scrollTop(),
1636
- e = [],
1637
- t = [];
1638
- SFSI(".sfsi_widget").each(function (s) {
1639
- e[s] = SFSI(this).position().top, t[s] = SFSI(this);
1640
- });
1641
- var n = !1;
1642
- for (var o in e) {
1643
- var a = parseInt(o) + 1;
1644
- e[o] < i && e[a] > i && a < e.length ? (SFSI(t[o]).css({
1645
- position: "fixed",
1646
- top: s
1647
- }), SFSI(t[a]).css({
1648
- position: "",
1649
- top: initTop[a]
1650
- }), n = !0) : SFSI(t[o]).css({
1651
- position: "",
1652
- top: initTop[o]
1653
- });
1654
- }
1655
- if (!n) {
1656
- var r = e.length - 1,
1657
- c = -1;
1658
- e.length > 1 && (c = e.length - 2), initTop[r] < i ? (SFSI(t[r]).css({
1659
- position: "fixed",
1660
- top: s
1661
- }), c >= 0 && SFSI(t[c]).css({
1662
- position: "",
1663
- top: initTop[c]
1664
- })) : (SFSI(t[r]).css({
1665
- position: "",
1666
- top: initTop[r]
1667
- }), c >= 0 && e[c] < i);
1668
- }
1669
- }
1670
-
1671
- function sfsi_setCookie(s, i, e) {
1672
- var t = new Date();
1673
- t.setTime(t.getTime() + 1e3 * 60 * 60 * 24 * e);
1674
- var n = "expires=" + t.toGMTString();
1675
- document.cookie = s + "=" + i + "; " + n;
1676
- }
1677
-
1678
- function sfsfi_getCookie(s) {
1679
- for (var i = s + "=", e = document.cookie.split(";"), t = 0; t < e.length; t++) {
1680
- var n = e[t].trim();
1681
- if (0 == n.indexOf(i)) return n.substring(i.length, n.length);
1682
- }
1683
- return "";
1684
- }
1685
-
1686
- function sfsi_hideFooter() {}
1687
-
1688
- window.onerror = function () {},
1689
- SFSI = jQuery,
1690
- SFSI(window).on('load', function () {
1691
- SFSI("#sfpageLoad").fadeOut(2e3);
1692
- });
1693
-
1694
- //changes done {Monad}
1695
- function selectText(containerid) {
1696
- if (document.selection) {
1697
- var range = document.body.createTextRange();
1698
- range.moveToElementText(document.getElementById(containerid));
1699
- range.select();
1700
- } else if (window.getSelection()) {
1701
- var range = document.createRange();
1702
- range.selectNode(document.getElementById(containerid));
1703
- window.getSelection().removeAllRanges();
1704
- window.getSelection().addRange(range);
1705
- }
1706
- }
1707
-
1708
- function create_suscriber_form() {
1709
- //Popbox customization
1710
- "no" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1711
- "width": parseInt(SFSI('input[name="sfsi_form_width"]').val()),
1712
- "height": parseInt(SFSI('input[name="sfsi_form_height"]').val())
1713
- }) : SFSI(".sfsi_subscribe_Popinner").css({
1714
- "width": '',
1715
- "height": ''
1716
- });
1717
-
1718
- "yes" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_html > .sfsi_subscribe_Popinner").css({
1719
- "width": "100%"
1720
- }) : '';
1721
-
1722
- "yes" == SFSI('input[name="sfsi_form_border"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1723
- "border": SFSI('input[name="sfsi_form_border_thickness"]').val() + "px solid " + SFSI('input[name="sfsi_form_border_color"]').val()
1724
- }) : SFSI(".sfsi_subscribe_Popinner").css("border", "none");
1725
-
1726
- SFSI('input[name="sfsi_form_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").css("background-color", SFSI('input[name="sfsi_form_background"]').val())) : '';
1727
-
1728
- //Heading customization
1729
- SFSI('input[name="sfsi_form_heading_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").html(SFSI('input[name="sfsi_form_heading_text"]').val())) : SFSI(".sfsi_subscribe_Popinner > form > h5").html('');
1730
-
1731
- SFSI('#sfsi_form_heading_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-family", SFSI("#sfsi_form_heading_font").val())) : '';
1732
-
1733
- if (SFSI('#sfsi_form_heading_fontstyle').val() != 'bold') {
1734
- SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", SFSI("#sfsi_form_heading_fontstyle").val())) : '';
1735
- SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", '');
1736
- } else {
1737
- SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", "bold")) : '';
1738
- SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", '');
1739
- }
1740
-
1741
- SFSI('input[name="sfsi_form_heading_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("color", SFSI('input[name="sfsi_form_heading_fontcolor"]').val())) : '';
1742
-
1743
- SFSI('input[name="sfsi_form_heading_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css({
1744
- "font-size": parseInt(SFSI('input[name="sfsi_form_heading_fontsize"]').val())
1745
- })) : '';
1746
-
1747
- SFSI('#sfsi_form_heading_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("text-align", SFSI("#sfsi_form_heading_fontalign").val())) : '';
1748
-
1749
- //Field customization
1750
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", '');
1751
-
1752
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1753
-
1754
- SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1755
-
1756
- SFSI('#sfsi_form_field_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-family", SFSI("#sfsi_form_field_font").val())) : '';
1757
-
1758
- if (SFSI('#sfsi_form_field_fontstyle').val() != "bold") {
1759
- SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", SFSI("#sfsi_form_field_fontstyle").val())) : '';
1760
- SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", '');
1761
- } else {
1762
- SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", 'bold')) : '';
1763
- SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", '');
1764
- }
1765
-
1766
- SFSI('input[name="sfsi_form_field_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("color", SFSI('input[name="sfsi_form_field_fontcolor"]').val())) : '';
1767
-
1768
- SFSI('input[name="sfsi_form_field_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css({
1769
- "font-size": parseInt(SFSI('input[name="sfsi_form_field_fontsize"]').val())
1770
- })) : '';
1771
-
1772
- SFSI('#sfsi_form_field_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("text-align", SFSI("#sfsi_form_field_fontalign").val())) : '';
1773
-
1774
- //Button customization
1775
- SFSI('input[name="sfsi_form_button_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').attr("value", SFSI('input[name="sfsi_form_button_text"]').val())) : '';
1776
-
1777
- SFSI('#sfsi_form_button_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-family", SFSI("#sfsi_form_button_font").val())) : '';
1778
-
1779
- if (SFSI('#sfsi_form_button_fontstyle').val() != "bold") {
1780
- SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", SFSI("#sfsi_form_button_fontstyle").val())) : '';
1781
- SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", '');
1782
- } else {
1783
- SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", 'bold')) : '';
1784
- SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", '');
1785
- }
1786
-
1787
- SFSI('input[name="sfsi_form_button_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("color", SFSI('input[name="sfsi_form_button_fontcolor"]').val())) : '';
1788
-
1789
- SFSI('input[name="sfsi_form_button_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css({
1790
- "font-size": parseInt(SFSI('input[name="sfsi_form_button_fontsize"]').val())
1791
- })) : '';
1792
-
1793
- SFSI('#sfsi_form_button_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("text-align", SFSI("#sfsi_form_button_fontalign").val())) : '';
1794
-
1795
- SFSI('input[name="sfsi_form_button_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("background-color", SFSI('input[name="sfsi_form_button_background"]').val())) : '';
1796
-
1797
- var innerHTML = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").html();
1798
- var styleCss = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").attr("style");
1799
- innerHTML = '<div style="' + styleCss + '">' + innerHTML + '</div>';
1800
- SFSI(".sfsi_subscription_html > xmp").html(innerHTML);
1801
-
1802
- /*var data = {
1803
- action:"getForm",
1804
- heading: SFSI('input[name="sfsi_form_heading_text"]').val(),
1805
- placeholder:SFSI('input[name="sfsi_form_field_text"]').val(),
1806
- button:SFSI('input[name="sfsi_form_button_text"]').val()
1807
- };
1808
- SFSI.ajax({
1809
- url:sfsi_icon_ajax_object.ajax_url,
1810
- type:"post",
1811
- data:data,
1812
- success:function(s) {
1813
- SFSI(".sfsi_subscription_html").html(s);
1814
- }
1815
- });*/
1816
- }
1817
-
1818
- var global_error = 0;
1819
- if (typeof SFSI != 'undefined') {
1820
-
1821
- function sfsi_dismiss_notice(btnClass, ajaxAction) {
1822
-
1823
- var btnClass = "." + btnClass;
1824
-
1825
- SFSI(document).on("click", btnClass, function () {
1826
-
1827
- SFSI.ajax({
1828
- url: sfsi_icon_ajax_object.ajax_url,
1829
- type: "post",
1830
- data: {
1831
- action: ajaxAction
1832
- },
1833
- success: function (e) {
1834
- if (false != e) {
1835
- SFSI(btnClass).parent().remove();
1836
- }
1837
- }
1838
- });
1839
- });
1840
- }
1841
- }
1842
-
1843
- SFSI(document).ready(function (s) {
1844
-
1845
- var arrDismiss = [
1846
-
1847
- {
1848
- "btnClass": "sfsi-notice-dismiss",
1849
- "action": "sfsi_dismiss_lang_notice"
1850
- },
1851
-
1852
- {
1853
- "btnClass": "sfsi-AddThis-notice-dismiss",
1854
- "action": "sfsi_dismiss_addThis_icon_notice"
1855
- },
1856
-
1857
- {
1858
- "btnClass": "sfsi_error_reporting_notice-dismiss",
1859
- "action": "sfsi_dismiss_error_reporting_notice"
1860
- }
1861
- ];
1862
-
1863
- SFSI.each(arrDismiss, function (key, valueObj) {
1864
- sfsi_dismiss_notice(valueObj.btnClass, valueObj.action);
1865
- });
1866
-
1867
- //changes done {Monad}
1868
- SFSI(".tab_3_icns").on("click", ".cstomskins_upload", function () {
1869
- SFSI(".cstmskins-overlay").show("slow", function () {
1870
- e = 0;
1871
- });
1872
- });
1873
- /*SFSI("#custmskin_clspop").live("click", function() {*/
1874
- SFSI(document).on("click", '#custmskin_clspop', function () {
1875
- SFSI_done();
1876
- SFSI(".cstmskins-overlay").hide("slow");
1877
- });
1878
-
1879
- create_suscriber_form();
1880
- SFSI('input[name="sfsi_form_heading_text"], input[name="sfsi_form_border_thickness"], input[name="sfsi_form_height"], input[name="sfsi_form_width"], input[name="sfsi_form_heading_fontsize"], input[name="sfsi_form_field_text"], input[name="sfsi_form_field_fontsize"], input[name="sfsi_form_button_text"], input[name="sfsi_form_button_fontsize"]').on("keyup", create_suscriber_form);
1881
-
1882
- SFSI('input[name="sfsi_form_border_color"], input[name="sfsi_form_background"] ,input[name="sfsi_form_heading_fontcolor"], input[name="sfsi_form_field_fontcolor"] ,input[name="sfsi_form_button_fontcolor"],input[name="sfsi_form_button_background"]').on("focus", create_suscriber_form);
1883
-
1884
- SFSI("#sfsi_form_heading_font, #sfsi_form_heading_fontstyle, #sfsi_form_heading_fontalign, #sfsi_form_field_font, #sfsi_form_field_fontstyle, #sfsi_form_field_fontalign, #sfsi_form_button_font, #sfsi_form_button_fontstyle, #sfsi_form_button_fontalign").on("change", create_suscriber_form);
1885
-
1886
- /*SFSI(".radio").live("click", function() {*/
1887
- SFSI(document).on("click", '.radio', function () {
1888
-
1889
- var s = SFSI(this).parent().find("input:radio:first");
1890
-
1891
- var inputName = s.attr("name");
1892
- var inputChecked = s.attr("checked");
1893
-
1894
- switch (inputName) {
1895
- case 'sfsi_form_adjustment':
1896
- if (s.val() == 'no')
1897
- s.parents(".row_tab").next(".row_tab").show("fast");
1898
- else
1899
- s.parents(".row_tab").next(".row_tab").hide("fast");
1900
- create_suscriber_form()
1901
- break;
1902
- case 'sfsi_form_border':
1903
- if (s.val() == 'yes')
1904
- s.parents(".row_tab").next(".row_tab").show("fast");
1905
- else
1906
- s.parents(".row_tab").next(".row_tab").hide("fast");
1907
- create_suscriber_form()
1908
- break;
1909
- case 'sfsi_icons_suppress_errors':
1910
-
1911
- SFSI('input[name="sfsi_icons_suppress_errors"]').removeAttr('checked');
1912
-
1913
- if (s.val() == 'yes')
1914
- SFSI('input[name="sfsi_icons_suppress_errors"][value="yes"]').attr('checked', 'true');
1915
- else
1916
- SFSI('input[name="sfsi_icons_suppress_errors"][value="no"]').attr('checked', 'true');
1917
- break;
1918
-
1919
- default:
1920
- case 'sfsi_responsive_icons_end_post':
1921
- if("yes" == s.val()){
1922
- jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').show();
1923
- }else{
1924
- jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').hide();
1925
- }
1926
- }
1927
- });
1928
-
1929
- SFSI('#sfsi_form_border_color').wpColorPicker({
1930
- defaultColor: false,
1931
- change: function (event, ui) {
1932
- create_suscriber_form()
1933
- },
1934
- clear: function () {
1935
- create_suscriber_form()
1936
- },
1937
- hide: true,
1938
- palettes: true
1939
- }),
1940
- SFSI('#sfsi_form_background').wpColorPicker({
1941
- defaultColor: false,
1942
- change: function (event, ui) {
1943
- create_suscriber_form()
1944
- },
1945
- clear: function () {
1946
- create_suscriber_form()
1947
- },
1948
- hide: true,
1949
- palettes: true
1950
- }),
1951
- SFSI('#sfsi_form_heading_fontcolor').wpColorPicker({
1952
- defaultColor: false,
1953
- change: function (event, ui) {
1954
- create_suscriber_form()
1955
- },
1956
- clear: function () {
1957
- create_suscriber_form()
1958
- },
1959
- hide: true,
1960
- palettes: true
1961
- }),
1962
- SFSI('#sfsi_form_button_fontcolor').wpColorPicker({
1963
- defaultColor: false,
1964
- change: function (event, ui) {
1965
- create_suscriber_form()
1966
- },
1967
- clear: function () {
1968
- create_suscriber_form()
1969
- },
1970
- hide: true,
1971
- palettes: true
1972
- }),
1973
- SFSI('#sfsi_form_button_background').wpColorPicker({
1974
- defaultColor: false,
1975
- change: function (event, ui) {
1976
- create_suscriber_form()
1977
- },
1978
- clear: function () {
1979
- create_suscriber_form()
1980
- },
1981
- hide: true,
1982
- palettes: true
1983
- });
1984
- //changes done {Monad}
1985
-
1986
- function i() {
1987
- SFSI(".uperror").html(""), afterLoad();
1988
- var s = SFSI('input[name="' + SFSI("#upload_id").val() + '"]');
1989
- s.removeAttr("checked");
1990
- var i = SFSI(s).parent().find("span:first");
1991
- return SFSI(i).css("background-position", "0px 0px"), SFSI(".upload-overlay").hide("slow"),
1992
- !1;
1993
- }
1994
- SFSI("#accordion").accordion({
1995
- collapsible: !0,
1996
- active: !1,
1997
- heightStyle: "content",
1998
- event: "click",
1999
- beforeActivate: function (s, i) {
2000
- if (i.newHeader[0]) var e = i.newHeader,
2001
- t = e.next(".ui-accordion-content");
2002
- else var e = i.oldHeader,
2003
- t = e.next(".ui-accordion-content");
2004
- var n = "true" == e.attr("aria-selected");
2005
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2006
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2007
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2008
- }
2009
- }),
2010
- SFSI("#accordion1").accordion({
2011
- collapsible: !0,
2012
- active: !1,
2013
- heightStyle: "content",
2014
- event: "click",
2015
- beforeActivate: function (s, i) {
2016
- if (i.newHeader[0]) var e = i.newHeader,
2017
- t = e.next(".ui-accordion-content");
2018
- else var e = i.oldHeader,
2019
- t = e.next(".ui-accordion-content");
2020
- var n = "true" == e.attr("aria-selected");
2021
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2022
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2023
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2024
- }
2025
- }),
2026
-
2027
- SFSI("#accordion2").accordion({
2028
- collapsible: !0,
2029
- active: !1,
2030
- heightStyle: "content",
2031
- event: "click",
2032
- beforeActivate: function (s, i) {
2033
- if (i.newHeader[0]) var e = i.newHeader,
2034
- t = e.next(".ui-accordion-content");
2035
- else var e = i.oldHeader,
2036
- t = e.next(".ui-accordion-content");
2037
- var n = "true" == e.attr("aria-selected");
2038
- return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2039
- e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2040
- t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2041
- }
2042
- }),
2043
- SFSI(".closeSec").on("click", function () {
2044
- var s = !0,
2045
- i = SFSI(this).closest("div.ui-accordion-content").prev("h3.ui-accordion-header").first(),
2046
- e = SFSI(this).closest("div.ui-accordion-content").first();
2047
- i.toggleClass("ui-corner-all", s).toggleClass("accordion-header-active ui-state-active ui-corner-top", !s).attr("aria-selected", (!s).toString()),
2048
- i.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", s).toggleClass("ui-icon-triangle-1-s", !s),
2049
- e.toggleClass("accordion-content-active", !s), s ? e.slideUp() : e.slideDown();
2050
- }),
2051
- SFSI(document).click(function (s) {
2052
- var i = SFSI(".sfsi_FrntInner_chg"),
2053
- e = SFSI(".sfsi_wDiv"),
2054
- t = SFSI("#at15s");
2055
- i.is(s.target) || 0 !== i.has(s.target).length || e.is(s.target) || 0 !== e.has(s.target).length || t.is(s.target) || 0 !== t.has(s.target).length || i.fadeOut();
2056
- }),
2057
- SFSI('#sfsi_popup_background_color').wpColorPicker({
2058
- defaultColor: false,
2059
- change: function (event, ui) {
2060
- sfsi_make_popBox()
2061
- },
2062
- clear: function () {
2063
- sfsi_make_popBox()
2064
- },
2065
- hide: true,
2066
- palettes: true
2067
- }),
2068
- SFSI('#sfsi_popup_border_color').wpColorPicker({
2069
- defaultColor: false,
2070
- change: function (event, ui) {
2071
- sfsi_make_popBox()
2072
- },
2073
- clear: function () {
2074
- sfsi_make_popBox()
2075
- },
2076
- hide: true,
2077
- palettes: true
2078
- }),
2079
- SFSI('#sfsi_popup_fontColor').wpColorPicker({
2080
- defaultColor: false,
2081
- change: function (event, ui) {
2082
- sfsi_make_popBox()
2083
- },
2084
- clear: function () {
2085
- sfsi_make_popBox()
2086
- },
2087
- hide: true,
2088
- palettes: true
2089
- }),
2090
- SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseover(function () {
2091
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn_hover.svg");
2092
- }),
2093
- SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseleave(function () {
2094
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn.svg");
2095
- }),
2096
- SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseover(function () {
2097
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube_hover.svg");
2098
- }),
2099
- SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseleave(function () {
2100
- SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube.svg");
2101
- }),
2102
- SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseover(function () {
2103
- SFSI(this).css("opacity", "0.9");
2104
- }),
2105
- SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseleave(function () {
2106
- SFSI(this).css("opacity", "1");
2107
- }),
2108
- SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseover(function () {
2109
- SFSI(this).css("opacity", "0.9");
2110
- }),
2111
- SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseleave(function () {
2112
- SFSI(this).css("opacity", "1");
2113
- }),
2114
- SFSI("#sfsi_save1").on("click", function () {
2115
- // console.log('save1',sfsi_update_step1());
2116
- sfsi_update_step1() && sfsicollapse(this);
2117
- }),
2118
- SFSI("#sfsi_save2").on("click", function () {
2119
- sfsi_update_step2() && sfsicollapse(this);
2120
- }),
2121
- SFSI("#sfsi_save3").on("click", function () {
2122
- sfsi_update_step3() && sfsicollapse(this);
2123
- }),
2124
- SFSI("#sfsi_save4").on("click", function () {
2125
- sfsi_update_step4() && sfsicollapse(this);
2126
- }),
2127
- SFSI("#sfsi_save5").on("click", function () {
2128
- sfsi_update_step5() && sfsicollapse(this);
2129
- }),
2130
- SFSI("#sfsi_save6").on("click", function () {
2131
- sfsi_update_step6() && sfsicollapse(this);
2132
- }),
2133
- SFSI("#sfsi_save7").on("click", function () {
2134
- sfsi_update_step7() && sfsicollapse(this);
2135
- }),
2136
- SFSI("#sfsi_save8").on("click", function () {
2137
- sfsi_update_step8() && sfsicollapse(this);
2138
- }),
2139
- SFSI("#sfsi_save9").on("click", function () {
2140
- sfsi_update_step9() && sfsicollapse(this);
2141
- }),
2142
- SFSI("#save_all_settings").on("click", function () {
2143
- return SFSI("#save_all_settings").text("Saving.."), SFSI(".save_button >a").css("pointer-events", "none"),
2144
- sfsi_update_step1(), sfsi_update_step8(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Which icons do you want to show on your site?" tab.', 8),
2145
- global_error = 0, !1) : (sfsi_update_step2(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What do you want the icons to do?" tab.', 8),
2146
- global_error = 0, !1) : (sfsi_update_step3(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What design & animation do you want to give your icons?" tab.', 8),
2147
- global_error = 0, !1) : (sfsi_update_step4(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display "counts" next to your icons?" tab.', 8),
2148
- global_error = 0, !1) : (sfsi_update_step5(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Any other wishes for your main icons?" tab.', 8),
2149
- global_error = 0, !1) : (sfsi_update_step6(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display icons at the end of every post?" tab.', 8),
2150
- global_error = 0, !1) : (sfsi_update_step7(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display a pop-up, asking people to subscribe?" tab.', 8),
2151
- /*global_error = 0, !1) :void (0 == global_error && showErrorSuc("success", 'Saved! Now go to the <a href="widgets.php">widget</a> area and place the widget into your sidebar (if not done already)', 8))))))));*/
2152
- global_error = 0, !1) : void(0 == global_error && showErrorSuc("success", '', 8))))))));
2153
- }),
2154
- /*SFSI(".fileUPInput").live("change", function() {*/
2155
- SFSI(document).on("change", '.fileUPInput', function () {
2156
- beForeLoad(), beforeIconSubmit(this) && (SFSI(".upload-overlay").css("pointer-events", "none"),
2157
- SFSI("#customIconFrm").ajaxForm({
2158
- dataType: "json",
2159
- success: afterIconSuccess,
2160
- resetForm: !0
2161
- }).submit());
2162
- }),
2163
- SFSI(".pop-up").on("click", function () {
2164
- ("fbex-s2" == SFSI(this).attr("data-id") || "linkex-s2" == SFSI(this).attr("data-id")) && (SFSI("." + SFSI(this).attr("data-id")).hide(),
2165
- SFSI("." + SFSI(this).attr("data-id")).css("opacity", "1"), SFSI("." + SFSI(this).attr("data-id")).css("z-index", "1000")),
2166
- SFSI("." + SFSI(this).attr("data-id")).show("slow");
2167
- }),
2168
- /*SFSI("#close_popup").live("click", function() {*/
2169
- SFSI(document).on("click", '#close_popup', function () {
2170
- SFSI(".read-overlay").hide("slow");
2171
- });
2172
-
2173
- var e = 0;
2174
- SFSI(".icn_listing").on("click", ".checkbox", function () {
2175
- if (1 == e) return !1;
2176
- "yes" == SFSI(this).attr("dynamic_ele") && (s = SFSI(this).parent().find("input:checkbox:first"),
2177
- s.is(":checked") ? SFSI(s).attr("checked", !1) : SFSI(s).attr("checked", !0)), s = SFSI(this).parent().find("input:checkbox:first"),
2178
- "yes" == SFSI(s).attr("isNew") && ("0px 0px" == SFSI(this).css("background-position") ? (SFSI(s).attr("checked", !0),
2179
- SFSI(this).css("background-position", "0px -36px")) : (SFSI(s).removeAttr("checked", !0),
2180
- SFSI(this).css("background-position", "0px 0px")));
2181
- var s = SFSI(this).parent().find("input:checkbox:first");
2182
- if (s.is(":checked") && "cusotm-icon" == s.attr("element-type")) SFSI(".fileUPInput").attr("name", "custom_icons[]"),
2183
- SFSI(".upload-overlay").show("slow", function () {
2184
- e = 0;
2185
- }), SFSI("#upload_id").val(s.attr("name"));
2186
- else if (!s.is(":checked") && "cusotm-icon" == s.attr("element-type")) return s.attr("ele-type") ? (SFSI(this).attr("checked", !0),
2187
- SFSI(this).css("background-position", "0px -36px"), e = 0, !1) : confirm("Are you sure want to delete this Icon..?? ") ? "suc" == sfsi_delete_CusIcon(this, s) ? (s.attr("checked", !1),
2188
- SFSI(this).css("background-position", "0px 0px"), e = 0, !1) : (e = 0, !1) : (s.attr("checked", !0),
2189
- SFSI(this).css("background-position", "0px -36px"), e = 0, !1);
2190
- }),
2191
- SFSI(".icn_listing").on("click", ".checkbox", function () {
2192
- checked = SFSI(this).parent().find("input:checkbox:first"), "sfsi_email_display" != checked.attr("name") || checked.is(":checked") || SFSI(".demail-1").show("slow");
2193
- }),
2194
- SFSI("#deac_email2").on("click", function () {
2195
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").show("slow");
2196
- }),
2197
- SFSI("#deac_email3").on("click", function () {
2198
- SFSI(".demail-2").hide("slow"), SFSI(".demail-3").show("slow");
2199
- }),
2200
- SFSI(".hideemailpop").on("click", function () {
2201
- SFSI('input[name="sfsi_email_display"]').attr("checked", !0), SFSI('input[name="sfsi_email_display"]').parent().find("span:first").css("background-position", "0px -36px"),
2202
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2203
- }),
2204
- SFSI(".hidePop").on("click", function () {
2205
- SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2206
- }),
2207
- SFSI(".activate_footer").on("click", function () {
2208
- var nonce = SFSI(this).attr("data-nonce");
2209
- SFSI(this).text("activating....");
2210
- var s = {
2211
- action: "activateFooter",
2212
- nonce: nonce
2213
- };
2214
- SFSI.ajax({
2215
- url: sfsi_icon_ajax_object.ajax_url,
2216
- type: "post",
2217
- data: s,
2218
- dataType: "json",
2219
- success: function (s) {
2220
- if (s.res == "wrong_nonce") {
2221
- SFSI(".activate_footer").css("font-size", "18px");
2222
- SFSI(".activate_footer").text("Unauthorised Request, Try again after refreshing page");
2223
- } else {
2224
- "success" == s.res && (SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"),
2225
- SFSI(".demail-3").hide("slow"), SFSI(".activate_footer").text("Ok, activate link"));
2226
- }
2227
- }
2228
- });
2229
- }),
2230
- SFSI(".sfsi_removeFooter").on("click", function () {
2231
- var nonce = SFSI(this).attr("data-nonce");
2232
- SFSI(this).text("working....");
2233
- var s = {
2234
- action: "removeFooter",
2235
- nonce: nonce
2236
- };
2237
- SFSI.ajax({
2238
- url: sfsi_icon_ajax_object.ajax_url,
2239
- type: "post",
2240
- data: s,
2241
- dataType: "json",
2242
- success: function (s) {
2243
- if (s.res == "wrong_nonce") {
2244
- SFSI(".sfsi_removeFooter").text("Unauthorised Request, Try again after refreshing page");
2245
- } else {
2246
- "success" == s.res && (SFSI(".sfsi_removeFooter").fadeOut("slow"), SFSI(".sfsi_footerLnk").fadeOut("slow"));
2247
- }
2248
- }
2249
- });
2250
- }),
2251
- /*SFSI(".radio").live("click", function() {*/
2252
- SFSI(document).on("click", '.radio', function () {
2253
- var s = SFSI(this).parent().find("input:radio:first");
2254
- "sfsi_display_counts" == s.attr("name") && sfsi_show_counts();
2255
- }),
2256
- SFSI("#close_Uploadpopup").on("click", i), /*SFSI(".radio").live("click", function() {*/ SFSI(document).on("click", '.radio', function () {
2257
- var s = SFSI(this).parent().find("input:radio:first");
2258
- "sfsi_show_Onposts" == s.attr("name") && sfsi_show_OnpostsDisplay();
2259
- }),
2260
- sfsi_show_OnpostsDisplay(), sfsi_depened_sections(), sfsi_show_counts(), sfsi_showPreviewCounts(),
2261
- SFSI(".share_icon_order").sortable({
2262
- update: function () {
2263
- SFSI(".share_icon_order li").each(function () {
2264
- SFSI(this).attr("data-index", SFSI(this).index() + 1);
2265
- });
2266
- },
2267
- revert: !0
2268
- }),
2269
-
2270
- //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post STARTS -------------------------------------//
2271
-
2272
- SFSI(document).on("click", '.checkbox', function () {
2273
-
2274
- var s = SFSI(this).parent().find("input:checkbox:first");
2275
- var backgroundPos = jQuery(this).css('background-position').split(" ");
2276
- var xPos = backgroundPos[0],
2277
- yPos = backgroundPos[1];
2278
-
2279
- var inputName = s.attr('name');
2280
- var inputChecked = s.attr("checked");
2281
-
2282
- switch (inputName) {
2283
-
2284
- case "sfsi_custom_social_hide":
2285
-
2286
- var val = (yPos == "0px") ? "no" : "yes";
2287
- SFSI('input[name="sfsi_custom_social_hide"]').val(val);
2288
-
2289
- break;
2290
-
2291
- case "sfsi_show_via_widget":
2292
- case "sfsi_show_via_widget":
2293
- case "sfsi_show_via_afterposts":
2294
- case "sfsi_custom_social_hide":
2295
-
2296
- var val = (yPos == "0px") ? "no" : "yes";
2297
- SFSI('input[name="' + s.attr('name') + '"]').val(val);
2298
-
2299
- break;
2300
-
2301
- case 'sfsi_mouseOver':
2302
-
2303
- var elem = SFSI('input[name="' + inputName + '"]');
2304
-
2305
- var togglelem = SFSI('.mouse-over-effects');
2306
-
2307
- if (inputChecked) {
2308
- togglelem.removeClass('hide').addClass('show');
2309
- } else {
2310
- togglelem.removeClass('show').addClass('hide');
2311
- }
2312
-
2313
- break;
2314
- case 'sfsi_responsive_facebook_display':
2315
- if(inputChecked){
2316
- SFSI('.sfsi_responsive_icon_facebook_container').parents('a').show();
2317
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2318
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2319
- window.sfsi_fittext_shouldDisplay=true;
2320
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2321
- if(jQuery(a_container).css('display')!=="none"){
2322
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2323
- }
2324
- })
2325
- }
2326
- }else{
2327
-
2328
- SFSI('.sfsi_responsive_icon_facebook_container').parents('a').hide();
2329
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2330
- window.sfsi_fittext_shouldDisplay=true;
2331
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2332
- if(jQuery(a_container).css('display')!=="none"){
2333
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2334
- }
2335
- })
2336
- }
2337
- }
2338
- break;
2339
- case 'sfsi_responsive_Twitter_display':
2340
- if(inputChecked){
2341
- SFSI('.sfsi_responsive_icon_twitter_container').parents('a').show();
2342
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2343
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2344
- window.sfsi_fittext_shouldDisplay=true;
2345
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2346
- if(jQuery(a_container).css('display')!=="none"){
2347
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2348
- }
2349
- })
2350
- }
2351
- }else{
2352
- SFSI('.sfsi_responsive_icon_twitter_container').parents('a').hide();
2353
- if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2354
- window.sfsi_fittext_shouldDisplay=true;
2355
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2356
- if(jQuery(a_container).css('display')!=="none"){
2357
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2358
- }
2359
- })
2360
- }
2361
- }
2362
- break;
2363
- case 'sfsi_responsive_Follow_display':
2364
- if(inputChecked){
2365
- SFSI('.sfsi_responsive_icon_follow_container').parents('a').show();
2366
- var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2367
- }else{
2368
- SFSI('.sfsi_responsive_icon_follow_container').parents('a').hide();
2369
- }
2370
- window.sfsi_fittext_shouldDisplay=true;
2371
- jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2372
- if(jQuery(a_container).css('display')!=="none"){
2373
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2374
- }
2375
- })
2376
- break;
2377
- }
2378
-
2379
- });
2380
-
2381
- //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post CLOSES -------------------------------------//
2382
-
2383
- SFSI(document).on("click", '.radio', function () {
2384
-
2385
- var s = SFSI(this).parent().find("input:radio:first");
2386
-
2387
- switch (s.attr("name")) {
2388
-
2389
- case 'sfsi_mouseOver_effect_type':
2390
-
2391
- var _val = s.val();
2392
- var _name = s.attr("name");
2393
-
2394
- if ('same_icons' == _val) {
2395
- SFSI('.same_icons_effects').removeClass('hide').addClass('show');
2396
- SFSI('.other_icons_effects_options').removeClass('show').addClass('hide');
2397
- } else if ('other_icons' == _val) {
2398
- SFSI('.same_icons_effects').removeClass('show').addClass('hide');
2399
- SFSI('.other_icons_effects_options').removeClass('hide').addClass('show');
2400
- }
2401
-
2402
- break;
2403
- }
2404
-
2405
- });
2406
-
2407
- SFSI(document).on("click", '.radio', function () {
2408
-
2409
- var s = SFSI(this).parent().find("input:radio:first");
2410
- "sfsi_email_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_email_countsDisplay"]').prop("checked", !0),
2411
- SFSI('input[name="sfsi_email_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2412
- "manual" == SFSI("input[name='sfsi_email_countsFrom']:checked").val() ? SFSI("input[name='sfsi_email_manualCounts']").slideDown() : SFSI("input[name='sfsi_email_manualCounts']").slideUp()),
2413
-
2414
- "sfsi_facebook_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_facebook_countsDisplay"]').prop("checked", !0),
2415
- SFSI('input[name="sfsi_facebook_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2416
- "mypage" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_facebook_mypageCounts']").slideDown(), SFSI(".sfsi_fbpgidwpr").slideDown()) : (SFSI("input[name='sfsi_facebook_mypageCounts']").slideUp(), SFSI(".sfsi_fbpgidwpr").slideUp()),
2417
-
2418
- "manual" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() ? SFSI("input[name='sfsi_facebook_manualCounts']").slideDown() : SFSI("input[name='sfsi_facebook_manualCounts']").slideUp()),
2419
-
2420
- "sfsi_facebook_countsFrom" == s.attr("name") && (("mypage" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() || "likes" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val()) ? (SFSI(".sfsi_facebook_pagedeasc").slideDown()) : (SFSI(".sfsi_facebook_pagedeasc").slideUp())),
2421
-
2422
- "sfsi_twitter_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_twitter_countsDisplay"]').prop("checked", !0),
2423
- SFSI('input[name="sfsi_twitter_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2424
- "manual" == SFSI("input[name='sfsi_twitter_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_twitter_manualCounts']").slideDown(),
2425
- SFSI(".tw_follow_options").slideUp()) : (SFSI("input[name='sfsi_twitter_manualCounts']").slideUp(),
2426
- SFSI(".tw_follow_options").slideDown())),
2427
-
2428
-
2429
- "sfsi_linkedIn_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_linkedIn_countsDisplay"]').prop("checked", !0),
2430
- SFSI('input[name="sfsi_linkedIn_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2431
- "manual" == SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_linkedIn_manualCounts']").slideDown(),
2432
- SFSI(".linkedIn_options").slideUp()) : (SFSI("input[name='sfsi_linkedIn_manualCounts']").slideUp(),
2433
- SFSI(".linkedIn_options").slideDown())),
2434
-
2435
- "sfsi_youtube_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_youtube_countsDisplay"]').prop("checked", !0),
2436
- SFSI('input[name="sfsi_youtube_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2437
- "manual" == SFSI("input[name='sfsi_youtube_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_youtube_manualCounts']").slideDown(),
2438
- SFSI(".youtube_options").slideUp()) : (SFSI("input[name='sfsi_youtube_manualCounts']").slideUp(),
2439
- SFSI(".youtube_options").slideDown())), "sfsi_pinterest_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_pinterest_countsDisplay"]').prop("checked", !0),
2440
- SFSI('input[name="sfsi_pinterest_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2441
- "manual" == SFSI("input[name='sfsi_pinterest_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_pinterest_manualCounts']").slideDown(),
2442
- SFSI(".pin_options").slideUp()) : SFSI("input[name='sfsi_pinterest_manualCounts']").slideUp()),
2443
-
2444
- "sfsi_instagram_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_instagram_countsDisplay"]').prop("checked", !0),
2445
- SFSI('input[name="sfsi_instagram_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2446
- "manual" == SFSI("input[name='sfsi_instagram_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_instagram_manualCounts']").slideDown(),
2447
- SFSI(".instagram_userLi").slideUp()) : (SFSI("input[name='sfsi_instagram_manualCounts']").slideUp(),
2448
- SFSI(".instagram_userLi").slideDown()));
2449
-
2450
- }),
2451
-
2452
- sfsi_make_popBox(),
2453
-
2454
- SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("keyup", sfsi_make_popBox),
2455
- SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("focus", sfsi_make_popBox),
2456
-
2457
- SFSI("#sfsi_popup_font ,#sfsi_popup_fontStyle").on("change", sfsi_make_popBox),
2458
-
2459
- /*SFSI(".radio").live("click", function(){*/
2460
- SFSI(document).on("click", '.radio', function () {
2461
-
2462
- var s = SFSI(this).parent().find("input:radio:first");
2463
-
2464
- if ("sfsi_icons_floatPosition" == s.attr("name")) {
2465
- SFSI('input[name="sfsi_icons_floatPosition"]').removeAttr("checked");
2466
- s.attr("checked", true);
2467
- }
2468
-
2469
- if ("sfsi_disable_floaticons" == s.attr("name")) {
2470
- SFSI('input[name="sfsi_disable_floaticons"]').removeAttr("checked");
2471
- s.attr("checked", true);
2472
- }
2473
-
2474
- "sfsi_popup_border_shadow" == s.attr("name") && sfsi_make_popBox();
2475
- }), /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? SFSI("img.sfsi_wicon").on("click", function (s) {
2476
- s.stopPropagation();
2477
- var i = SFSI("#sfsi_floater_sec").val();
2478
- SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
2479
- SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
2480
- SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
2481
- SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
2482
- "z-index": "999"
2483
- }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2484
- opacity: 1,
2485
- "z-index": 10
2486
- }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2487
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2488
- opacity: 1,
2489
- "z-index": 10
2490
- }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2491
- SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2492
- opacity: 1,
2493
- "z-index": 10
2494
- })), ("top-left" == i || "top-right" == i) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
2495
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
2496
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2497
- opacity: 1,
2498
- "z-index": 10
2499
- }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
2500
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
2501
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2502
- opacity: 1,
2503
- "z-index": 1e3
2504
- }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
2505
- }) : SFSI("img.sfsi_wicon").on("mouseenter", function () {
2506
- var s = SFSI("#sfsi_floater_sec").val();
2507
- SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
2508
- SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
2509
- SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
2510
- SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
2511
- "z-index": "999"
2512
- }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2513
- opacity: 1,
2514
- "z-index": 10
2515
- }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2516
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2517
- opacity: 1,
2518
- "z-index": 10
2519
- }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2520
- SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2521
- opacity: 1,
2522
- "z-index": 10
2523
- })), ("top-left" == s || "top-right" == s) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
2524
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
2525
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2526
- opacity: 1,
2527
- "z-index": 10
2528
- }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
2529
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
2530
- SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2531
- opacity: 1,
2532
- "z-index": 10
2533
- }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
2534
- }), SFSI("div.sfsi_wicons").on("mouseleave", function () {
2535
- SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "fade_in" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
2536
- SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "scale" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale"),
2537
- SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "combo" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && (SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
2538
- SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale")), SFSI(this).children(".inerCnt").find("div.sfsi_tool_tip_2").hide();
2539
- }), SFSI("body").on("click", function () {
2540
- SFSI(".inerCnt").find("div.sfsi_tool_tip_2").hide();
2541
- }), SFSI(".adminTooltip >a").on("hover", function () {
2542
- SFSI(this).offset().top, SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "1"),
2543
- SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").show();
2544
- }), SFSI(".adminTooltip").on("mouseleave", function () {
2545
- "none" != SFSI(".gpls_tool_bdr").css("display") && 0 != SFSI(".gpls_tool_bdr").css("opacity") ? SFSI(".pop_up_box ").on("click", function () {
2546
- SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"), SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide();
2547
- }) : (SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"),
2548
- SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide());
2549
- }), SFSI(".expand-area").on("click", function () {
2550
- "Read more" == SFSI(this).text() ? (SFSI(this).siblings("p").children("label").fadeIn("slow"),
2551
- SFSI(this).text("Collapse")) : (SFSI(this).siblings("p").children("label").fadeOut("slow"),
2552
- SFSI(this).text("Read more"));
2553
- }), /*SFSI(".radio").live("click", function() {*/ SFSI(document).on("click", '.radio', function () {
2554
-
2555
- var s = SFSI(this).parent().find("input:radio:first");
2556
-
2557
- "sfsi_icons_float" == s.attr("name") && "yes" == s.val() && (SFSI(".float_options").slideDown("slow"),
2558
-
2559
- SFSI('input[name="sfsi_icons_stick"][value="no"]').attr("checked", !0), SFSI('input[name="sfsi_icons_stick"][value="yes"]').removeAttr("checked"),
2560
- SFSI('input[name="sfsi_icons_stick"][value="no"]').parent().find("span").attr("style", "background-position:0px -41px;"),
2561
- SFSI('input[name="sfsi_icons_stick"][value="yes"]').parent().find("span").attr("style", "background-position:0px -0px;")),
2562
-
2563
- //("sfsi_icons_stick" == s.attr("name") && "yes" == s.val() || "sfsi_icons_float" == s.attr("name") && "no" == s.val()) && (SFSI(".float_options").slideUp("slow"),
2564
- ("sfsi_icons_stick" == s.attr("name") && "yes" == s.val()) && (SFSI(".float_options").slideUp("slow"),
2565
-
2566
- SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", !0), SFSI('input[name="sfsi_icons_float"][value="yes"]').prop("checked", !1),
2567
- SFSI('input[name="sfsi_icons_float"][value="no"]').parent().find("span.radio").attr("style", "background-position:0px -41px;"),
2568
- SFSI('input[name="sfsi_icons_float"][value="yes"]').parent().find("span.radio").attr("style", "background-position:0px -0px;"));
2569
-
2570
- }),
2571
-
2572
- SFSI(".sfsi_wDiv").length > 0 && setTimeout(function () {
2573
- var s = parseInt(SFSI(".sfsi_wDiv").height()) + 0 + "px";
2574
- SFSI(".sfsi_holders").each(function () {
2575
- SFSI(this).css("height", s);
2576
- });
2577
- }, 200),
2578
- /*SFSI(".checkbox").live("click", function() {*/
2579
- SFSI(document).on("click", '.checkbox', function () {
2580
- var s = SFSI(this).parent().find("input:checkbox:first");
2581
- ("sfsi_shuffle_Firstload" == s.attr("name") && "checked" == s.attr("checked") || "sfsi_shuffle_interval" == s.attr("name") && "checked" == s.attr("checked")) && (SFSI('input[name="sfsi_shuffle_icons"]').parent().find("span").css("background-position", "0px -36px"),
2582
- SFSI('input[name="sfsi_shuffle_icons"]').attr("checked", "checked")), "sfsi_shuffle_icons" == s.attr("name") && "checked" != s.attr("checked") && (SFSI('input[name="sfsi_shuffle_Firstload"]').removeAttr("checked"),
2583
- SFSI('input[name="sfsi_shuffle_Firstload"]').parent().find("span").css("background-position", "0px 0px"),
2584
- SFSI('input[name="sfsi_shuffle_interval"]').removeAttr("checked"), SFSI('input[name="sfsi_shuffle_interval"]').parent().find("span").css("background-position", "0px 0px"));
2585
- });
2586
-
2587
- SFSI("body").on("click", "#sfsi_getMeFullAccess", function () {
2588
- var email = SFSI(this).parents("form").find("input[type='email']").val();
2589
- var feedid = SFSI(this).parents("form").find("input[name='feedid']").val();
2590
- var error = false;
2591
- var regEx = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
2592
-
2593
- if (email === '') {
2594
- error = true;
2595
- }
2596
-
2597
- if (!regEx.test(email)) {
2598
- error = true;
2599
- }
2600
-
2601
- if (!error) {
2602
- SFSI(this).parents("form").submit();
2603
- } else {
2604
- alert("Error: Please provide your email address.");
2605
- }
2606
- });
2607
-
2608
- SFSI('form#calimingOptimizationForm').on('keypress', function (e) {
2609
- var keyCode = e.keyCode || e.which;
2610
- if (keyCode === 13) {
2611
- e.preventDefault();
2612
- return false;
2613
- }
2614
- });
2615
-
2616
- /*SFSI(".checkbox").live("click", function()
2617
- {
2618
- var s = SFSI(this).parent().find("input:checkbox:first");
2619
- "float_on_page" == s.attr("name") && "yes" == s.val() && (
2620
- SFSI('input[name="sfsi_icons_stick"][value="no"]').attr("checked", !0), SFSI('input[name="sfsi_icons_stick"][value="yes"]').removeAttr("checked"),
2621
- SFSI('input[name="sfsi_icons_stick"][value="no"]').parent().find("span").attr("style", "background-position:0px -41px;"),
2622
- SFSI('input[name="sfsi_icons_stick"][value="yes"]').parent().find("span").attr("style", "background-position:0px -0px;"));
2623
- });
2624
- SFSI(".radio").live("click", function()
2625
- {
2626
- var s = SFSI(this).parent().find("input:radio:first");
2627
- var a = SFSI(".cstmfltonpgstck");
2628
- ("sfsi_icons_stick" == s.attr("name") && "yes" == s.val()) && (
2629
- SFSI('input[name="float_on_page"][value="no"]').prop("checked", !0), SFSI('input[name="float_on_page"][value="yes"]').prop("checked", !1),
2630
- SFSI('input[name="float_on_page"][value="no"]').parent().find("span.checkbox").attr("style", "background-position:0px -41px;"),
2631
- SFSI('input[name="float_on_page"][value="yes"]').parent().find("span.checkbox").attr("style", "background-position:0px -0px;"),
2632
- jQuery(a).children(".checkbox").css("background-position", "0px 0px" ), toggleflotpage(a));
2633
- });*/
2634
- window.sfsi_initialization_checkbox_count = 0;
2635
- window.sfsi_initialization_checkbox = setInterval(function () {
2636
- // console.log(jQuery('.radio_section.tb_4_ck>span.checkbox').length,jQuery('.radio_section.tb_4_ck>input.styled').length);
2637
- if (jQuery('.radio_section.tb_4_ck>span.checkbox').length < jQuery('.radio_section.tb_4_ck>input.styled').length) {
2638
- window.sfsi_initialization_checkbox_count++;
2639
- // console.log('not initialized',window.sfsi_initialization_checkbox_count);
2640
- if (window.sfsi_initialization_checkbox_count > 12) {
2641
- // alert('Some script from diffrent plugin is interfearing with "Ultimate Social Icons" js files and checkbox couldn\'t be initialized. ');
2642
- // window.clearInterval(window.sfsi_initialization_checkbox);
2643
- }
2644
- } else {
2645
- // console.log('all initialized',window.sfsi_initialization_checkbox_count);
2646
- window.clearInterval(window.sfsi_initialization_checkbox);
2647
- }
2648
- }, 1000);
2649
- sfsi_responsive_icon_intraction_handler();
2650
-
2651
- });
2652
-
2653
- //for utube channel name and id
2654
- function showhideutube(ref) {
2655
- var chnlslctn = SFSI(ref).children("input").val();
2656
- if (chnlslctn == "name") {
2657
- SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideDown();
2658
- SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlidwpr").slideUp();
2659
- } else {
2660
- SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlidwpr").slideDown();
2661
- SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideUp();
2662
- }
2663
- }
2664
-
2665
- function checkforinfoslction(ref) {
2666
- var pos = jQuery(ref).children(".checkbox").css("background-position");
2667
-
2668
- var rightInfoClass = jQuery(ref).next().attr('class');
2669
-
2670
- var rightInfoPElem = jQuery(ref).next("." + rightInfoClass).children("p").first();
2671
-
2672
- var elemName = 'label';
2673
-
2674
- if (pos == "0px 0px") {
2675
- rightInfoPElem.children(elemName).hide();
2676
- } else {
2677
- rightInfoPElem.children(elemName).show();
2678
- }
2679
- }
2680
-
2681
- function checkforinfoslction_checkbox(ref) {
2682
-
2683
- var pos = jQuery(ref).children(".checkbox").css("background-position");
2684
-
2685
- var elem = jQuery(ref).parent().children('.sfsi_right_info').find('.kckslctn');
2686
-
2687
- if (pos == "0px 0px") {
2688
- elem.hide();
2689
- } else {
2690
- elem.show();
2691
- }
2692
- }
2693
-
2694
- function sfsi_toggleflotpage_que3(ref) {
2695
- var pos = jQuery(ref).children(".checkbox").css("background-position");
2696
- if (pos == "0px 0px") {
2697
- jQuery(ref).next(".sfsi_right_info").hide();
2698
-
2699
- } else {
2700
- jQuery(ref).next(".sfsi_right_info").show();
2701
- }
2702
- }
2703
-
2704
- var initTop = new Array();
2705
-
2706
- SFSI('.sfsi_navigate_to_question7').on("click", function () {
2707
-
2708
- var elem = SFSI('#ui-id-6');
2709
-
2710
- if (elem.hasClass('accordion-content-active')) {
2711
-
2712
- // Cloase tab of Question 3
2713
- elem.find('.sfsiColbtn').trigger('click');
2714
-
2715
- // Open tab of Question 7
2716
- if (!SFSI('#ui-id-14').hasClass('accordion-content-active')) {
2717
- SFSI('#ui-id-13').trigger('click');
2718
- }
2719
-
2720
- var pos = SFSI("#ui-id-13").offset();
2721
- var scrollToPos = pos.top - SFSI(window).height() * 0.99 + 30;
2722
- SFSI('html,body').animate({
2723
- scrollTop: scrollToPos
2724
- }, 500);
2725
- }
2726
- });
2727
-
2728
- SFSI("body").on("click", ".sfsi_tokenGenerateButton a", function () {
2729
- var clienId = SFSI("input[name='sfsi_instagram_clientid']").val();
2730
- var redirectUrl = SFSI("input[name='sfsi_instagram_appurl']").val();
2731
-
2732
- var scope = "likes+comments+basic+public_content+follower_list+relationships";
2733
- var instaUrl = "https://www.instagram.com/oauth/authorize/?client_id=<id>&redirect_uri=<url>&response_type=token&scope=" + scope;
2734
-
2735
- if (clienId !== '' && redirectUrl !== '') {
2736
- instaUrl = instaUrl.replace('<id>', clienId);
2737
- instaUrl = instaUrl.replace('<url>', redirectUrl);
2738
-
2739
- window.open(instaUrl, '_blank');
2740
- } else {
2741
- alert("Please enter client id and redirect url first");
2742
- }
2743
-
2744
- });
2745
- SFSI(document).ready(function () {
2746
- SFSI('#sfsi_jivo_offline_chat .tab-link').click(function () {
2747
- var cur = SFSI(this);
2748
- if (!cur.hasClass('active')) {
2749
- var target = cur.find('a').attr('href');
2750
- cur.parent().children().removeClass('active');
2751
- cur.addClass('active');
2752
- SFSI('#sfsi_jivo_offline_chat .tabs').children().hide();
2753
- SFSI(target).show();
2754
- }
2755
- });
2756
- SFSI('#sfsi_jivo_offline_chat #sfsi_sales form').submit(function (event) {
2757
- event & event.preventDefault();
2758
- // console.log(event);
2759
- var target = SFSI(this).parents('.tab-content');
2760
- var message = SFSI(this).find('textarea[name="question"]').val();
2761
- var email = SFSI(this).find('input[name="email"]').val();
2762
- var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
2763
- var nonce = SFSI(this).find('input[name="nonce"]').val();
2764
-
2765
- if ("" === email || false === re.test(String(email).toLowerCase())) {
2766
- // console.log(SFSI(this).find('input[name="email"]'));
2767
- SFSI(this).find('input[name="email"]').css('background-color', 'red');
2768
- SFSI(this).find('input[name="email"]').on('keyup', function () {
2769
- var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
2770
- var email = SFSI(this).val();
2771
- // console.log(email,re.test(String(email).toLowerCase()) );
2772
- if ("" !== email && true === re.test(String(email).toLowerCase())) {
2773
- SFSI(this).css('background-color', '#fff');
2774
- }
2775
- })
2776
- return false;
2777
-
2778
- }
2779
- SFSI.ajax({
2780
- url: sfsi_icon_ajax_object.ajax_url,
2781
- type: "post",
2782
- data: {
2783
- action: "sfsiOfflineChatMessage",
2784
- message: message,
2785
- email: email,
2786
- 'nonce': nonce
2787
- }
2788
- }).done(function () {
2789
- target.find('.before_message_sent').hide();
2790
- target.find('.after_message_sent').show();
2791
- });
2792
- })
2793
- });
2794
-
2795
- function sfsi_close_offline_chat(e) {
2796
- e && e.preventDefault();
2797
-
2798
- SFSI('#sfsi_jivo_offline_chat').hide();
2799
- SFSI('#sfsi_dummy_chat_icon').show();
2800
- }
2801
-
2802
- function sfsi_open_quick_checkout(e) {
2803
- e && e.preventDefault();
2804
- // console.log(jQuery('.sfsi_quick-pay-box'));
2805
- jQuery('.sfsi_quick-pay-box').show();
2806
- }
2807
-
2808
- function sfsi_close_quickpay(e) {
2809
- e && e.preventDefault();
2810
- jQuery('.sfsi_quickpay-overlay').hide();
2811
- }
2812
-
2813
- function sfsi_quickpay_container_click(event) {
2814
- if (jQuery(event.target).hasClass('sellcodes-quick-purchase')) {
2815
- jQuery(jQuery(event.target).find('p.sc-button img')[0]).click();
2816
- }
2817
- }
2818
-
2819
-
2820
-
2821
- // <------------------------* Responsive icon *----------------------->
2822
-
2823
- function sfsi_responsive_icon_intraction_handler() {
2824
- window.sfsi_fittext_shouldDisplay = true;
2825
- SFSI('select[name="sfsi_responsive_icons_settings_edge_type"]').on('change', function () {
2826
- $target_div = (SFSI(this).parent());
2827
- if (SFSI(this).val() === "Round") {
2828
- console.log('Round', 'Round', SFSI(this).val());
2829
-
2830
- $target_div.parent().children().css('display', 'inline-block');
2831
- $target_div.parent().next().css("display","inline-block");
2832
- var radius = jQuery('select[name="sfsi_responsive_icons_settings_edge_radius"]').val() + 'px'
2833
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', radius);
2834
-
2835
- } else {
2836
- console.log('sharp', 'sharp', SFSI(this).val(), $target_div.parent().children(), $target_div.parent().children().hide());
2837
-
2838
- $target_div.parent().children().hide();
2839
- $target_div.show();
2840
- $target_div.parent().next().hide();
2841
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', 'unset');
2842
-
2843
- }
2844
- });
2845
- SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').on('change', function () {
2846
- $target_div = (SFSI(this).parent());
2847
- if (SFSI(this).val() === "Fixed icon width") {
2848
- $target_div.parent().children().css('display', 'inline-block');
2849
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width', 'auto').css('display', 'flex');
2850
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('flex-basis', 'unset');
2851
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery('input[name="sfsi_responsive_icons_sttings_icon_width_size"]').val());
2852
-
2853
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fully_container').removeClass('sfsi_icons_container_box_fully_container').addClass('sfsi_icons_container_box_fixed_container');
2854
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fixed_container').removeClass('sfsi_icons_container_box_fully_container').addClass('sfsi_icons_container_box_fixed_container');
2855
- window.sfsi_fittext_shouldDisplay = true;
2856
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2857
- if (jQuery(a_container).css('display') !== "none") {
2858
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2859
- }
2860
- })
2861
- } else {
2862
- $target_div.parent().children().hide();
2863
- $target_div.show();
2864
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width', '100%').css('display', 'flex');
2865
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('flex-basis', '100%');
2866
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', '100%');
2867
-
2868
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fixed_container').removeClass('sfsi_icons_container_box_fixed_container').addClass('sfsi_icons_container_box_fully_container');
2869
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fully_container').removeClass('sfsi_icons_container_box_fixed_container').addClass('sfsi_icons_container_box_fully_container');
2870
- window.sfsi_fittext_shouldDisplay = true;
2871
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2872
- if (jQuery(a_container).css('display') !== "none") {
2873
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2874
- }
2875
- })
2876
- }
2877
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').removeClass('sfsi_fixed_count_container').removeClass('sfsi_responsive_count_container').addClass('sfsi_' + (jQuery(this).val() == "Fully responsive" ? 'responsive' : 'fixed') + '_count_container')
2878
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container>a').removeClass('sfsi_responsive_fluid').removeClass('sfsi_responsive_fixed_width').addClass('sfsi_responsive_' + (jQuery(this).val() == "Fully responsive" ? 'fluid' : 'fixed_width'))
2879
- sfsi_resize_icons_container();
2880
-
2881
- })
2882
- jQuery(document).on('keyup', 'input[name="sfsi_responsive_icons_sttings_icon_width_size"]', function () {
2883
- if (SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() === "Fixed icon width") {
2884
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery(this).val() + 'px');
2885
- window.sfsi_fittext_shouldDisplay = true;
2886
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2887
- if (jQuery(a_container).css('display') !== "none") {
2888
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2889
- }
2890
- })
2891
- }
2892
- sfsi_resize_icons_container();
2893
- });
2894
- jQuery(document).on('change', 'input[name="sfsi_responsive_icons_sttings_icon_width_size"]', function () {
2895
- if (SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() === "Fixed icon width") {
2896
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery(this).val() + 'px');
2897
- }
2898
- });
2899
- jQuery(document).on('keyup', 'input[name="sfsi_responsive_icons_settings_margin"]', function () {
2900
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('margin-right', jQuery(this).val() + 'px');
2901
- });
2902
- jQuery(document).on('change', 'input[name="sfsi_responsive_icons_settings_margin"]', function () {
2903
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('margin-right', jQuery(this).val() + 'px');
2904
- // jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width',(jQuery('.sfsi_responsive_icons').width()-(jQuery('.sfsi_responsive_icons_count').width()+jQuery(this).val()))+'px');
2905
-
2906
- });
2907
- jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_text_align"]', function () {
2908
- if (jQuery(this).val() === "Centered") {
2909
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('text-align', 'center');
2910
- } else {
2911
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('text-align', 'left');
2912
- }
2913
- });
2914
- jQuery('.sfsi_responsive_default_icon_container input.sfsi_responsive_input').on('keyup', function () {
2915
- jQuery(this).parent().find('.sfsi_responsive_icon_item_container').find('span').text(jQuery(this).val());
2916
- var iconName = jQuery(this).attr('name');
2917
- var icon = iconName.replace('sfsi_responsive_', '').replace('_input', '');
2918
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_' + (icon.toLowerCase()) + '_container span').text(jQuery(this).val());
2919
- window.sfsi_fittext_shouldDisplay = true;
2920
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2921
- if (jQuery(a_container).css('display') !== "none") {
2922
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2923
- }
2924
- })
2925
- sfsi_resize_icons_container();
2926
- })
2927
- jQuery('.sfsi_responsive_custom_icon_container input.sfsi_responsive_input').on('keyup', function () {
2928
- jQuery(this).parent().find('.sfsi_responsive_icon_item_container').find('span').text(jQuery(this).val());
2929
- var iconName = jQuery(this).attr('name');
2930
- var icon = iconName.replace('sfsi_responsive_custom_', '').replace('_input', '');
2931
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_' + icon + '_container span').text(jQuery(this).val())
2932
- window.sfsi_fittext_shouldDisplay = true;
2933
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2934
- if (jQuery(a_container).css('display') !== "none") {
2935
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2936
- }
2937
- })
2938
- sfsi_resize_icons_container();
2939
-
2940
- })
2941
-
2942
- jQuery('.sfsi_responsive_default_url_toggler').click(function (event) {
2943
-
2944
- event.preventDefault();
2945
- sfsi_responsive_open_url(event);
2946
- });
2947
- jQuery('.sfsi_responsive_default_url_toggler').click(function (event) {
2948
- event.preventDefault();
2949
- sfsi_responsive_open_url(event);
2950
- })
2951
- jQuery('.sfsi_responsive_custom_url_hide, .sfsi_responsive_default_url_hide').click(function (event) {
2952
- event.preventDefault();
2953
- /* console.log(event,jQuery(event.target)); */
2954
- jQuery(event.target).parent().parent().find('.sfsi_responsive_custom_url_hide').hide();
2955
- jQuery(event.target).parent().parent().find('.sfsi_responsive_url_input').hide();
2956
- jQuery(event.target).parent().parent().find('.sfsi_responsive_default_url_hide').hide();
2957
- jQuery(event.target).parent().parent().find('.sfsi_responsive_default_url_toggler').show();
2958
- });
2959
- jQuery('select[name="sfsi_responsive_icons_settings_icon_size"]').change(function (event) {
2960
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').removeClass('sfsi_small_button').removeClass('sfsi_medium_button').removeClass('sfsi_large_button').addClass('sfsi_' + (jQuery(this).val().toLowerCase()) + '_button');
2961
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_small_button_container').removeClass('sfsi_medium_button_container').removeClass('sfsi_large_button_container').addClass('sfsi_' + (jQuery(this).val().toLowerCase()) + '_button_container')
2962
- })
2963
- jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_edge_radius"]', function (event) {
2964
- var radius = jQuery(this).val() + 'px'
2965
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', radius);
2966
-
2967
- });
2968
- jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_style"]', function (event) {
2969
- if ('Flat' === jQuery(this).val()) {
2970
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_responsive_icon_gradient');
2971
- } else {
2972
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').addClass('sfsi_responsive_icon_gradient');
2973
- }
2974
- });
2975
- jQuery(document).on('mouseenter', '.sfsi_responsive_icon_preview .sfsi_icons_container a', function () {
2976
- jQuery(this).css('opacity', 0.8);
2977
- })
2978
- jQuery(document).on('mouseleave', '.sfsi_responsive_icon_preview .sfsi_icons_container a', function () {
2979
- jQuery(this).css('opacity', 1);
2980
- })
2981
- window.sfsi_fittext_shouldDisplay = true;
2982
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2983
- if (jQuery(a_container).css('display') !== "none") {
2984
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2985
- }
2986
- })
2987
- sfsi_resize_icons_container();
2988
- jQuery('.ui-accordion-header.ui-state-default.ui-accordion-icons').click(function (data) {
2989
- window.sfsi_fittext_shouldDisplay = true;
2990
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2991
- if (jQuery(a_container).css('display') !== "none") {
2992
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2993
- }
2994
- })
2995
- sfsi_resize_icons_container();
2996
- });
2997
- jQuery('select[name="sfsi_responsive_icons_settings_text_align"]').change(function (event) {
2998
- var data = jQuery(event.target).val();
2999
- if (data == "Centered") {
3000
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_left-align_icon').addClass('sfsi_centered_icon');
3001
- } else {
3002
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_centered_icon').addClass('sfsi_left-align_icon');
3003
- }
3004
- });
3005
- jQuery('a.sfsi_responsive_custom_delete_btn').click(function (event) {
3006
- event.preventDefault();
3007
- var icon_num = jQuery(this).attr('data-id');
3008
- //reset the current block;
3009
- // var last_block = jQuery('.sfsi_responsive_custom_icon_4_container').clone();
3010
- var cur_block = jQuery('.sfsi_responsive_custom_icon_' + icon_num + '_container');
3011
- cur_block.find('.sfsi_responsive_custom_delete_btn').hide();
3012
- cur_block.find('input[name="sfsi_responsive_custom_' + icon_num + '_added"]').val('no');
3013
- cur_block.find('.sfsi_responsive_custom_' + icon_num + '_added').attr('value', 'no');
3014
- cur_block.find('.radio_section.tb_4_ck .checkbox').click();
3015
- cur_block.hide();
3016
-
3017
-
3018
- if (icon_num > 0) {
3019
- var prev_block = jQuery('.sfsi_responsive_custom_icon_' + (icon_num - 1) + '_container');
3020
- prev_block.find('.sfsi_responsive_custom_delete_btn').show();
3021
- }
3022
- // jQuery('.sfsi_responsive_custom_icon_container').each(function(index,custom_icon){
3023
- // var target= jQuery(custom_icon);
3024
- // target.find('.sfsi_responsive_custom_delete_btn');
3025
- // var custom_id = target.find('.sfsi_responsive_custom_delete_btn').attr('data-id');
3026
- // if(custom_id>icon_num){
3027
- // target.removeClass('sfsi_responsive_custom_icon_'+custom_id+'_container').addClass('sfsi_responsive_custom_icon_'+(custom_id-1)+'_container');
3028
- // target.find('input[name="sfsi_responsive_custom_'+custom_id+'_added"]').attr('name',"sfsi_responsive_custom_"+(custom_id-1)+"_added");
3029
- // target.find('#sfsi_responsive_'+custom_id+'_display').removeClass('sfsi_responsive_custom_'+custom_id+'_display').addClass('sfsi_responsive_custom_'+(custom_id-1)+'_display').attr('id','sfsi_responsive_'+(custom_id-1)+'_display').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_display').attr('data-custom-index',(custom_id-1));
3030
- // target.find('.sfsi_responsive_icon_item_container').removeClass('sfsi_responsive_icon_custom_'+custom_id+'_container').addClass('sfsi_responsive_icon_custom_'+(custom_id-1)+'_container');
3031
- // target.find('.sfsi_responsive_input').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_input');
3032
- // target.find('.sfsi_responsive_url_input').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_url_input');
3033
- // target.find('.sfsi_bg-color-picker').attr('name','sfsi_responsive_icon_'+(custom_id-1)+'_bg_color');
3034
- // target.find('.sfsi_logo_upload sfsi_logo_custom_'+custom_id+'_upload').removeClass('sfsi_logo_upload sfsi_logo_custom_'+custom_id+'_upload').addClass('sfsi_logo_upload sfsi_logo_custom_'+(custom_id-1)+'_upload');
3035
- // target.find('input[type="sfsi_responsive_icons_custom_'+custom_id+'_icon"]').attr('name','input[type="sfsi_responsive_icons_custom_'+(custom_id-1)+'_icon"]');
3036
- // target.find('.sfsi_responsive_custom_delete_btn').attr('data-id',''+(custom_id-1));
3037
- // }
3038
- // });
3039
- // // sfsi_backend_section_beforeafter_set_fixed_width();
3040
- // // jQuery(window).on('resize',sfsi_backend_section_beforeafter_set_fixed_width);
3041
- // var new_block=jQuery('.sfsi_responsive_custom_icon_container').clone();
3042
- // jQuery('.sfsi_responsive_custom_icon_container').remove();
3043
- // jQuery('.sfsi_responsive_default_icon_container').parent().append(last_block).append();
3044
- // jQuery('.sfsi_responsive_default_icon_container').parent().append(new_block);
3045
- // return false;
3046
- })
3047
- }
3048
-
3049
- function sfsi_responsive_icon_counter_tgl(hide, show, ref = null) {
3050
- if (null !== hide && '' !== hide) {
3051
- jQuery('.' + hide).hide();
3052
- }
3053
- if (null !== show && '' !== show) {
3054
- jQuery('.' + show).show();
3055
- }
3056
- }
3057
-
3058
- function sfsi_responsive_toggle_count() {
3059
- var data = jQuery('input[name="sfsi_share_count"]:checked').val();
3060
- var data2 = jQuery('input[name="sfsi_display_counts"]:checked').val();
3061
- /* console.log('toggleer ',data,data2); */
3062
- if (data2 == "yes" && 'yes' == data) {
3063
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'inline-block');
3064
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_without_counter_icons').addClass('sfsi_responsive_with_counter_icons');
3065
- sfsi_resize_icons_container();
3066
- } else {
3067
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'none');
3068
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_with_counter_icons').addClass('sfsi_responsive_without_counter_icons');
3069
- sfsi_resize_icons_container();
3070
- }
3071
- }
3072
-
3073
- function sfsi_responsive_open_url(event) {
3074
- jQuery(event.target).parent().find('.sfsi_responsive_custom_url_hide').show();
3075
- jQuery(event.target).parent().find('.sfsi_responsive_default_url_hide').show();
3076
- jQuery(event.target).parent().find('.sfsi_responsive_url_input').show();
3077
- jQuery(event.target).hide();
3078
- }
3079
-
3080
- function sfsi_responsive_icon_hide_responsive_options() {
3081
- jQuery('.sfsi_PostsSettings_section').show();
3082
- jQuery('.sfsi_choose_post_types_section').show();
3083
- jQuery('.sfsi_not_responsive').show();
3084
- // jQuery('.sfsi_icn_listing8.sfsi_closerli').hide();
3085
- }
3086
-
3087
- function sfsi_responsive_icon_show_responsive_options() {
3088
- jQuery('.sfsi_PostsSettings_section').hide();
3089
- // jQuery('.sfsi_PostsSettings_section').show();
3090
- jQuery('.sfsi_choose_post_types_section').hide();
3091
- jQuery('.sfsi_not_responsive').hide();
3092
- window.sfsi_fittext_shouldDisplay = true;
3093
- jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
3094
- if (jQuery(a_container).css('display') !== "none") {
3095
- sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
3096
- }
3097
- })
3098
- sfsi_resize_icons_container();
3099
- }
3100
-
3101
- function sfsi_scroll_to_div(option_id, scroll_selector) {
3102
- jQuery('#' + option_id + '.ui-accordion-header[aria-selected="false"]').click() //opened the option
3103
- //scroll to it.
3104
- if (scroll_selector && scroll_selector !== '') {
3105
- scroll_selector = scroll_selector;
3106
- } else {
3107
- scroll_selector = '#' + option_id + '.ui-accordion-header';
3108
- }
3109
- jQuery('html, body').stop().animate({
3110
- scrollTop: jQuery(scroll_selector).offset().top
3111
- }, 1000);
3112
- }
3113
-
3114
- function sfsi_fitText(container) {
3115
- /* console.log(container,container.parent().parent(),container.parent().parent().hasClass('sfsi_icons_container_box_fixed_container')); */
3116
- if (container.parent().parent().hasClass('sfsi_icons_container_box_fixed_container')) {
3117
- /* console.log(window.sfsi_fittext_shouldDisplay); */
3118
- if (window.sfsi_fittext_shouldDisplay === true) {
3119
- if (jQuery('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() == "Fully responsive") {
3120
- var all_icon_width = jQuery('.sfsi_responsive_icons .sfsi_icons_container').width();
3121
- var total_active_icons = jQuery('.sfsi_responsive_icons .sfsi_icons_container a').filter(function (i, icon) {
3122
- return jQuery(icon).css('display') && (jQuery(icon).css('display').toLowerCase() !== "none");
3123
- }).length;
3124
-
3125
- var distance_between_icon = jQuery('input[name="sfsi_responsive_icons_settings_margin"]').val()
3126
- var container_width = ((all_icon_width - distance_between_icon) / total_active_icons) - 5;
3127
- container_width = (container_width - distance_between_icon);
3128
- } else {
3129
- var container_width = container.width();
3130
- }
3131
- // var container_img_width = container.find('img').width();
3132
- var container_img_width = 70;
3133
- // var span=container.find('span').clone();
3134
- var span = container.find('span');
3135
- // var span_original_width = container.find('span').width();
3136
- var span_original_width = container_width - (container_img_width)
3137
- span
3138
- // .css('display','inline-block')
3139
- .css('white-space', 'nowrap')
3140
- // .css('width','auto')
3141
- ;
3142
- var span_flatted_width = span.width();
3143
- if (span_flatted_width == 0) {
3144
- span_flatted_width = span_original_width;
3145
- }
3146
- span
3147
- // .css('display','inline-block')
3148
- .css('white-space', 'unset')
3149
- // .css('width','auto')
3150
- ;
3151
- var shouldDisplay = ((undefined === window.sfsi_fittext_shouldDisplay) ? true : window.sfsi_fittext_shouldDisplay = true);
3152
- var fontSize = parseInt(span.css('font-size'));
3153
-
3154
- if (6 > fontSize) {
3155
- fontSize = 20;
3156
- }
3157
-
3158
- var computed_fontSize = (Math.floor((fontSize * span_original_width) / span_flatted_width));
3159
-
3160
- if (computed_fontSize < 8) {
3161
- shouldDisplay = false;
3162
- window.sfsi_fittext_shouldDisplay = false;
3163
- computed_fontSize = 20;
3164
- }
3165
- span.css('font-size', Math.min(computed_fontSize, 20));
3166
- span
3167
- // .css('display','inline-block')
3168
- .css('white-space', 'nowrap')
3169
- // .css('width','auto')
3170
- ;
3171
- if (shouldDisplay) {
3172
- span.show();
3173
- } else {
3174
- span.hide();
3175
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container span').hide();
3176
- }
3177
- }
3178
- } else {
3179
- var span = container.find('span');
3180
- /* console.log(span); */
3181
- span.css('font-size', 'initial');
3182
- span.show();
3183
- }
3184
-
3185
- }
3186
-
3187
- function sfsi_fixedWidth_fitText(container) {
3188
- return;
3189
- /* console.log(sfsi_fittext_shouldDisplay); */
3190
- if (window.sfsi_fittext_shouldDisplay === true) {
3191
- if (jQuery('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() == "Fixed icon width") {
3192
- var all_icon_width = jQuery('.sfsi_responsive_icons .sfsi_icons_container').width();
3193
- var total_active_icons = jQuery('.sfsi_responsive_icons .sfsi_icons_container a').filter(function (i, icon) {
3194
- return jQuery(icon).css('display') && (jQuery(icon).css('display').toLowerCase() !== "none");
3195
- }).length;
3196
- var distance_between_icon = jQuery('input[name="sfsi_responsive_icons_settings_margin"]').val()
3197
- var container_width = ((all_icon_width - distance_between_icon) / total_active_icons) - 5;
3198
- container_width = (container_width - distance_between_icon);
3199
- } else {
3200
- var container_width = container.width();
3201
- }
3202
- // var container_img_width = container.find('img').width();
3203
- var container_img_width = 70;
3204
- // var span=container.find('span').clone();
3205
- var span = container.find('span');
3206
- // var span_original_width = container.find('span').width();
3207
- var span_original_width = container_width - (container_img_width)
3208
- span
3209
- // .css('display','inline-block')
3210
- .css('white-space', 'nowrap')
3211
- // .css('width','auto')
3212
- ;
3213
- var span_flatted_width = span.width();
3214
- if (span_flatted_width == 0) {
3215
- span_flatted_width = span_original_width;
3216
- }
3217
- span
3218
- // .css('display','inline-block')
3219
- .css('white-space', 'unset')
3220
- // .css('width','auto')
3221
- ;
3222
- var shouldDisplay = undefined === window.sfsi_fittext_shouldDisplay ? true : window.sfsi_fittext_shouldDisplay = true;;
3223
- var fontSize = parseInt(span.css('font-size'));
3224
-
3225
- if (6 > fontSize) {
3226
- fontSize = 15;
3227
- }
3228
-
3229
- var computed_fontSize = (Math.floor((fontSize * span_original_width) / span_flatted_width));
3230
-
3231
- if (computed_fontSize < 8) {
3232
- shouldDisplay = false;
3233
- window.sfsi_fittext_shouldDisplay = false;
3234
- computed_fontSize = 15;
3235
- }
3236
- span.css('font-size', Math.min(computed_fontSize, 15));
3237
- span
3238
- // .css('display','inline-block')
3239
- .css('white-space', 'nowrap')
3240
- // .css('width','auto')
3241
- ;
3242
- // var heightOfResIcons = jQuery('.sfsi_responsive_icon_item_container').height();
3243
-
3244
- // if(heightOfResIcons < 17){
3245
- // span.show();
3246
- // }else{
3247
- // span.hide();
3248
- // }
3249
-
3250
- if (shouldDisplay) {
3251
- span.show();
3252
- } else {
3253
- span.hide();
3254
- }
3255
- }
3256
- }
3257
-
3258
- function sfsi_resize_icons_container() {
3259
- // resize icon container based on the size of count
3260
- sfsi_cloned_icon_list = jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').clone();
3261
- sfsi_cloned_icon_list.removeClass('.sfsi_responsive_icon_preview .sfsi_responsive_with_counter_icons').addClass('sfsi_responsive_cloned_list');
3262
- sfsi_cloned_icon_list.css('width', '100%');
3263
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').parent().append(sfsi_cloned_icon_list);
3264
-
3265
- // sfsi_cloned_icon_list.css({
3266
- // position: "absolute",
3267
- // left: "-10000px"
3268
- // }).appendTo("body");
3269
- actual_width = sfsi_cloned_icon_list.width();
3270
- count_width = jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').width();
3271
- jQuery('.sfsi_responsive_cloned_list').remove();
3272
- sfsi_inline_style = jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').attr('style');
3273
- // remove_width
3274
- sfsi_inline_style = sfsi_inline_style.replace(/width:auto($|!important|)(;|$)/g, '').replace(/width:\s*(-|)\d*\s*(px|%)\s*($|!important|)(;|$)/g, '');
3275
- if (!(jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').hasClass('sfsi_responsive_without_counter_icons') && jQuery('.sfsi_icons_container').hasClass('sfsi_icons_container_box_fixed_container'))) {
3276
- sfsi_inline_style += "width:" + (actual_width - count_width - 1) + 'px!important;'
3277
- } else {
3278
- sfsi_inline_style += "width:auto!important;";
3279
- }
3280
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').attr('style', sfsi_inline_style);
3281
-
3282
- }
3283
-
3284
- function sfsi_togglbtmsection(show, hide, ref) {
3285
- console.log(show,hide);
3286
- jQuery(ref).parent("ul").children("li.clckbltglcls").each(function (index, element) {
3287
- jQuery(this).children(".radio").css("background-position", "0px 0px");
3288
- jQuery(this).children(".styled").attr("checked", "false");
3289
- });
3290
- jQuery(ref).children(".radio").css("background-position", "0px -41px");
3291
- jQuery(ref).children(".styled").attr("checked", "true");
3292
- console.log(show,hide);
3293
-
3294
- jQuery("." + show).show();
3295
- jQuery("." + show).children(".radiodisplaysection").show();
3296
- jQuery("." + hide).hide();
3297
- jQuery("." + hide).children(".radiodisplaysection").hide();
3298
  }
1
+ function sfsi_update_index() {
2
+ var s = 1;
3
+ SFSI("ul.icn_listing li.custom").each(function () {
4
+ SFSI(this).children("span.custom-txt").html("Custom " + s), s++;
5
+ }), cntt = 1, SFSI("div.cm_lnk").each(function () {
6
+ SFSI(this).find("h2.custom").find("span.sfsiCtxt").html("Custom " + cntt + ":"),
7
+ cntt++;
8
+ }), cntt = 1, SFSI("div.custom_m").find("div.custom_section").each(function () {
9
+ SFSI(this).find("label").html("Custom " + cntt + ":"), cntt++;
10
+ });
11
+ }
12
+
13
+ function sfsicollapse(s) {
14
+ var i = !0,
15
+ e = SFSI(s).closest("div.ui-accordion-content").prev("h3.ui-accordion-header"),
16
+ t = SFSI(s).closest("div.ui-accordion-content").first();
17
+ e.toggleClass("ui-corner-all", i).toggleClass("accordion-header-active ui-state-active ui-corner-top", !i).attr("aria-selected", (!i).toString()),
18
+ e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", i).toggleClass("ui-icon-triangle-1-s", !i),
19
+ t.toggleClass("accordion-content-active", !i), i ? t.slideUp() : t.slideDown();
20
+ }
21
+
22
+ function sfsi_delete_CusIcon(s, i) {
23
+ beForeLoad();
24
+ var e = {
25
+ action: "deleteIcons",
26
+ icon_name: i.attr("name"),
27
+ nonce: SFSI(i).parents('.custom').find('input[name="nonce"]').val()
28
+ };
29
+ SFSI.ajax({
30
+ url: sfsi_icon_ajax_object.ajax_url,
31
+ type: "post",
32
+ data: e,
33
+ dataType: "json",
34
+ success: function (e) {
35
+ if ("success" == e.res) {
36
+ showErrorSuc("success", "Saved !", 1);
37
+ var t = e.last_index + 1;
38
+ SFSI("#total_cusotm_icons").val(e.total_up), SFSI(s).closest(".custom").remove(),
39
+ SFSI("li.custom:last-child").addClass("bdr_btm_non"), SFSI(".custom-links").find("div." + i.attr("name")).remove(),
40
+ SFSI(".custom_m").find("div." + i.attr("name")).remove(), SFSI(".share_icon_order").children("li." + i.attr("name")).remove(),
41
+ SFSI("ul.sfsi_sample_icons").children("li." + i.attr("name")).remove();
42
+
43
+ if (e.total_up == 0) {
44
+ SFSI(".notice_custom_icons_premium").hide();
45
+ }
46
+ var n = e.total_up + 1;
47
+ 4 == e.total_up && SFSI(".icn_listing").append('<li id="c' + t + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + t + '_display" type="checkbox" value="yes" class="styled" style="display:none;" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + t + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + n + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>');
48
+ } else showErrorSuc("error", "Unkown error , please try again", 1);
49
+ return sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step5(),
50
+ afterLoad(), "suc";
51
+ }
52
+ });
53
+ }
54
+
55
+ function update_Sec5Iconorder() {
56
+ SFSI("ul.share_icon_order").children("li").each(function () {
57
+ SFSI(this).attr("data-index", SFSI(this).index() + 1);
58
+ });
59
+ }
60
+
61
+ function sfsi_section_Display(s, i) {
62
+ "hide" == i ? (SFSI("." + s + " :input").prop("disabled", !0), SFSI("." + s + " :button").prop("disabled", !0),
63
+ SFSI("." + s).hide()) : (SFSI("." + s + " :input").removeAttr("disabled", !0), SFSI("." + s + " :button").removeAttr("disabled", !0),
64
+ SFSI("." + s).show());
65
+ }
66
+
67
+ function sfsi_depened_sections() {
68
+ if ("sfsi" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
69
+ for (i = 0; 16 > i; i++) {
70
+ var s = i + 1,
71
+ e = 74 * i;
72
+ SFSI(".row_" + s + "_2").css("background-position", "-588px -" + e + "px");
73
+ }
74
+ var t = SFSI(".icon_img").attr("src");
75
+ if (t) {
76
+ if (t.indexOf("subscribe") != -1) {
77
+ var n = t.replace("subscribe.png", "sf_arow_icn.png");
78
+ } else {
79
+ var n = t.replace("email.png", "sf_arow_icn.png");
80
+ }
81
+ SFSI(".icon_img").attr("src", n);
82
+ }
83
+ } else {
84
+ if ("email" == SFSI("input[name='sfsi_rss_icons']:checked").val()) {
85
+ for (SFSI(".row_1_2").css("background-position", "-58px 0"), i = 0; 16 > i; i++) {
86
+ var s = i + 1,
87
+ e = 74 * i;
88
+ SFSI(".row_" + s + "_2").css("background-position", "-58px -" + e + "px");
89
+ }
90
+ var t = SFSI(".icon_img").attr("src");
91
+ if (t) {
92
+ if (t.indexOf("sf_arow_icn") != -1) {
93
+ var n = t.replace("sf_arow_icn.png", "email.png");
94
+ } else {
95
+ var n = t.replace("subscribe.png", "email.png");
96
+ }
97
+ SFSI(".icon_img").attr("src", n);
98
+ }
99
+ } else {
100
+ for (SFSI(".row_1_2").css("background-position", "-649px 0"), i = 0; 16 > i; i++) {
101
+ var s = i + 1,
102
+ e = 74 * i;
103
+ SFSI(".row_" + s + "_2").css("background-position", "-649px -" + e + "px");
104
+ }
105
+ var t = SFSI(".icon_img").attr("src");
106
+ if (t) {
107
+ if (t.indexOf("email") != -1) {
108
+ var n = t.replace("email.png", "subscribe.png");
109
+ } else {
110
+ var n = t.replace("sf_arow_icn.png", "subscribe.png");
111
+ }
112
+ SFSI(".icon_img").attr("src", n);
113
+ }
114
+ }
115
+ }
116
+ SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"),
117
+ SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"),
118
+ SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"),
119
+ SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"),
120
+ SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"),
121
+ SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"),
122
+ SFSI("input[name='sfsi_telegram_display']").prop("checked") ? sfsi_section_Display("telegram_section", "show") : sfsi_section_Display("telegram_section", "hide"),
123
+ SFSI("input[name='sfsi_vk_display']").prop("checked") ? sfsi_section_Display("vk_section", "show") : sfsi_section_Display("vk_section", "hide"),
124
+ SFSI("input[name='sfsi_ok_display']").prop("checked") ? sfsi_section_Display("ok_section", "show") : sfsi_section_Display("ok_section", "hide"),
125
+ SFSI("input[name='sfsi_wechat_display']").prop("checked") ? sfsi_section_Display("wechat_section", "show") : sfsi_section_Display("wechat_section", "hide"),
126
+ SFSI("input[name='sfsi_weibo_display']").prop("checked") ? sfsi_section_Display("weibo_section", "show") : sfsi_section_Display("weibo_section", "hide"),
127
+ SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"),
128
+ SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"),
129
+ SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
130
+ }
131
+
132
+ function CustomIConSectionsUpdate() {
133
+ sfsi_section_Display("counter".ele, show);
134
+ }
135
+
136
+ // Upload Custom Skin {Monad}
137
+ function sfsi_customskin_upload(s, ref, nonce) {
138
+ var ttl = jQuery(ref).attr("title");
139
+ var i = s,
140
+ e = {
141
+ action: "UploadSkins",
142
+ custom_imgurl: i,
143
+ nonce: nonce
144
+ };
145
+ SFSI.ajax({
146
+ url: sfsi_icon_ajax_object.ajax_url,
147
+ type: "post",
148
+ data: e,
149
+ success: function (msg) {
150
+ if (msg.res = "success") {
151
+ var arr = s.split('=');
152
+ jQuery(ref).prev('.imgskin').attr('src', arr[1]);
153
+ jQuery(ref).prev('.imgskin').css("display", "block");
154
+ jQuery(ref).text("Update");
155
+ jQuery(ref).next('.dlt_btn').css("display", "block");
156
+ }
157
+ }
158
+ });
159
+ }
160
+
161
+ // Delete Custom Skin {Monad}
162
+ function deleteskin_icon(s) {
163
+ var iconname = jQuery(s).attr("title");
164
+ var nonce = jQuery(s).attr("data-nonce");
165
+ var i = iconname,
166
+ e = {
167
+ action: "DeleteSkin",
168
+ iconname: i,
169
+ nonce: nonce
170
+ };
171
+ console.log('delete sin icon', i, iconname, nonce);
172
+ SFSI.ajax({
173
+ url: sfsi_icon_ajax_object.ajax_url,
174
+ type: "post",
175
+ data: e,
176
+ dataType: "json",
177
+ success: function (msg) {
178
+ console.log(s, e, msg);
179
+
180
+ if (msg.res === "success") {
181
+ SFSI(s).prev("a").text("Upload");
182
+ SFSI(s).prev("a").prev("img").attr("src", '');
183
+ SFSI(s).prev("a").prev("img").css("display", "none");
184
+ SFSI(s).css("display", "none");
185
+ } else {
186
+ alert("Whoops! something went wrong.")
187
+ }
188
+ }
189
+ });
190
+ }
191
+
192
+ // Save Custom Skin {Monad}
193
+ function SFSI_done(nonce) {
194
+ e = {
195
+ action: "Iamdone",
196
+ nonce: nonce
197
+ };
198
+
199
+ SFSI.ajax({
200
+ url: sfsi_icon_ajax_object.ajax_url,
201
+ type: "post",
202
+ data: e,
203
+ success: function (msg) {
204
+ if (msg.res === "success") {
205
+
206
+
207
+ jQuery("li.cstomskins_upload").children(".icns_tab_3").html(msg);
208
+ SFSI("input[name='sfsi_rss_display']").prop("checked") ? sfsi_section_Display("rss_section", "show") : sfsi_section_Display("rss_section", "hide"), SFSI("input[name='sfsi_email_display']").prop("checked") ? sfsi_section_Display("email_section", "show") : sfsi_section_Display("email_section", "hide"), SFSI("input[name='sfsi_facebook_display']").prop("checked") ? sfsi_section_Display("facebook_section", "show") : sfsi_section_Display("facebook_section", "hide"), SFSI("input[name='sfsi_twitter_display']").prop("checked") ? sfsi_section_Display("twitter_section", "show") : sfsi_section_Display("twitter_section", "hide"), SFSI("input[name='sfsi_youtube_display']").prop("checked") ? sfsi_section_Display("youtube_section", "show") : sfsi_section_Display("youtube_section", "hide"), SFSI("input[name='sfsi_pinterest_display']").prop("checked") ? sfsi_section_Display("pinterest_section", "show") : sfsi_section_Display("pinterest_section", "hide"), SFSI("input[name='sfsi_instagram_display']").prop("checked") ? sfsi_section_Display("instagram_section", "show") : sfsi_section_Display("instagram_section", "hide"), SFSI("input[name='sfsi_linkedin_display']").prop("checked") ? sfsi_section_Display("linkedin_section", "show") : sfsi_section_Display("linkedin_section", "hide"), SFSI("input[element-type='cusotm-icon']").prop("checked") ? sfsi_section_Display("custom_section", "show") : sfsi_section_Display("custom_section", "hide");
209
+ SFSI(".cstmskins-overlay").hide("slow");
210
+ sfsi_update_step3() && sfsicollapse(this);
211
+ }
212
+ }
213
+ });
214
+ }
215
+
216
+ // Upload Custom Icons {Monad}
217
+ function sfsi_newcustomicon_upload(s, nonce, nonce2) {
218
+ var i = s,
219
+ e = {
220
+ action: "UploadIcons",
221
+ custom_imgurl: i,
222
+ nonce: nonce
223
+ };
224
+ SFSI.ajax({
225
+ url: sfsi_icon_ajax_object.ajax_url,
226
+ type: "post",
227
+ data: e,
228
+ dataType: "json",
229
+ async: !0,
230
+ success: function (s) {
231
+ if (s.res == 'success') {
232
+ afterIconSuccess(s, nonce2);
233
+ } else {
234
+ SFSI(".upload-overlay").hide("slow");
235
+ SFSI(".uperror").html(s.res);
236
+ showErrorSuc("Error", "Some Error Occured During Upload Custom Icon", 1)
237
+ }
238
+ }
239
+ });
240
+ }
241
+
242
+ function sfsi_update_step1() {
243
+ var nonce = SFSI("#sfsi_save1").attr("data-nonce");
244
+ global_error = 0, beForeLoad(), sfsi_depened_sections();
245
+ var s = !1,
246
+ i = SFSI("input[name='sfsi_rss_display']:checked").val(),
247
+ e = SFSI("input[name='sfsi_email_display']:checked").val(),
248
+ t = SFSI("input[name='sfsi_facebook_display']:checked").val(),
249
+ n = SFSI("input[name='sfsi_twitter_display']:checked").val(),
250
+ r = SFSI("input[name='sfsi_youtube_display']:checked").val(),
251
+ c = SFSI("input[name='sfsi_pinterest_display']:checked").val(),
252
+ p = SFSI("input[name='sfsi_linkedin_display']:checked").val(),
253
+ tg = SFSI("input[name='sfsi_telegram_display']:checked").val(),
254
+ vk = SFSI("input[name='sfsi_vk_display']:checked").val(),
255
+ ok = SFSI("input[name='sfsi_ok_display']:checked").val(),
256
+ wc = SFSI("input[name='sfsi_wechat_display']:checked").val(),
257
+ wb = SFSI("input[name='sfsi_weibo_display']:checked").val(),
258
+ _ = SFSI("input[name='sfsi_instagram_display']:checked").val(),
259
+ l = SFSI("input[name='sfsi_custom1_display']:checked").val(),
260
+ S = SFSI("input[name='sfsi_custom2_display']:checked").val(),
261
+ u = SFSI("input[name='sfsi_custom3_display']:checked").val(),
262
+ f = SFSI("input[name='sfsi_custom4_display']:checked").val(),
263
+ d = SFSI("input[name='sfsi_custom5_display']:checked").val(),
264
+ I = {
265
+ action: "updateSrcn1",
266
+ sfsi_rss_display: i,
267
+ sfsi_email_display: e,
268
+ sfsi_facebook_display: t,
269
+ sfsi_twitter_display: n,
270
+ sfsi_youtube_display: r,
271
+ sfsi_pinterest_display: c,
272
+ sfsi_linkedin_display: p,
273
+ sfsi_telegram_display: tg,
274
+ sfsi_vk_display: vk,
275
+ sfsi_ok_display: ok,
276
+ sfsi_wechat_display: wc,
277
+ sfsi_weibo_display: wb,
278
+ sfsi_instagram_display: _,
279
+ sfsi_custom1_display: l,
280
+ sfsi_custom2_display: S,
281
+ sfsi_custom3_display: u,
282
+ sfsi_custom4_display: f,
283
+ sfsi_custom5_display: d,
284
+ nonce: nonce
285
+ };
286
+ SFSI.ajax({
287
+ url: sfsi_icon_ajax_object.ajax_url,
288
+ type: "post",
289
+ data: I,
290
+ async: !0,
291
+ dataType: "json",
292
+ success: function (i) {
293
+ if (i == "wrong_nonce") {
294
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 1);
295
+ s = !1;
296
+ afterLoad();
297
+ } else {
298
+ "success" == i ? (showErrorSuc("success", "Saved !", 1), sfsicollapse("#sfsi_save1"),
299
+ sfsi_make_popBox()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 1),
300
+ s = !1), afterLoad();
301
+ }
302
+ }
303
+ });
304
+ }
305
+
306
+ function sfsi_update_step2() {
307
+
308
+ var nonce = SFSI("#sfsi_save2").attr("data-nonce");
309
+ var s = sfsi_validationStep2();
310
+ if (!s) return global_error = 1, !1;
311
+ beForeLoad();
312
+ var i = 1 == SFSI("input[name='sfsi_rss_url']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_url']").val(),
313
+ e = 1 == SFSI("input[name='sfsi_rss_icons']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_icons']:checked").val(),
314
+
315
+ t = 1 == SFSI("input[name='sfsi_facebookPage_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookPage_option']:checked").val(),
316
+ n = 1 == SFSI("input[name='sfsi_facebookLike_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookLike_option']:checked").val(),
317
+ o = 1 == SFSI("input[name='sfsi_facebookShare_option']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebookShare_option']:checked").val(),
318
+ a = SFSI("input[name='sfsi_facebookPage_url']").val(),
319
+ r = 1 == SFSI("input[name='sfsi_twitter_followme']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followme']:checked").val(),
320
+ c = 1 == SFSI("input[name='sfsi_twitter_followUserName']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_followUserName']").val(),
321
+ p = 1 == SFSI("input[name='sfsi_twitter_aboutPage']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_aboutPage']:checked").val(),
322
+ _ = 1 == SFSI("input[name='sfsi_twitter_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_page']:checked").val(),
323
+ l = SFSI("input[name='sfsi_twitter_pageURL']").val(),
324
+ S = SFSI("textarea[name='sfsi_twitter_aboutPageText']").val(),
325
+ m = 1 == SFSI("input[name='sfsi_youtube_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_page']:checked").val(),
326
+ F = 1 == SFSI("input[name='sfsi_youtube_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_pageUrl']").val(),
327
+ h = 1 == SFSI("input[name='sfsi_youtube_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_follow']:checked").val(),
328
+ cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val(),
329
+ v = SFSI("input[name='sfsi_ytube_user']").val(),
330
+ vchid = SFSI("input[name='sfsi_ytube_chnlid']").val(),
331
+ g = 1 == SFSI("input[name='sfsi_pinterest_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_page']:checked").val(),
332
+ k = 1 == SFSI("input[name='sfsi_pinterest_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pageUrl']").val(),
333
+ y = 1 == SFSI("input[name='sfsi_pinterest_pingBlog']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_pingBlog']:checked").val(),
334
+ b = 1 == SFSI("input[name='sfsi_instagram_pageUrl']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_pageUrl']").val(),
335
+ w = 1 == SFSI("input[name='sfsi_linkedin_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_page']:checked").val(),
336
+ x = 1 == SFSI("input[name='sfsi_linkedin_pageURL']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_pageURL']").val(),
337
+ C = 1 == SFSI("input[name='sfsi_linkedin_follow']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_follow']:checked").val(),
338
+ D = SFSI("input[name='sfsi_linkedin_followCompany']").val(),
339
+ U = 1 == SFSI("input[name='sfsi_linkedin_SharePage']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedin_SharePage']:checked").val(),
340
+ O = SFSI("input[name='sfsi_linkedin_recommendBusines']:checked").val(),
341
+ T = SFSI("input[name='sfsi_linkedin_recommendProductId']").val(),
342
+ j = SFSI("input[name='sfsi_linkedin_recommendCompany']").val(),
343
+ tp = 1 == SFSI("input[name='sfsi_telegram_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_page']:checked").val(),
344
+ tpu = SFSI("input[name='sfsi_telegram_pageURL']").val(),
345
+ tm = SFSI("input[name='sfsi_telegram_message']").val(),
346
+ tmn = SFSI("input[name='sfsi_telegram_username']").val(),
347
+ wp = 1 == SFSI("input[name='sfsi_weibo_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_page']:checked").val(),
348
+ wpu = SFSI("input[name='sfsi_weibo_pageURL']").val(),
349
+ vp = 1 == SFSI("input[name='sfsi_vk_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_page']:checked").val(),
350
+ vpu = SFSI("input[name='sfsi_vk_pageURL']").val(),
351
+ op = 1 == SFSI("input[name='sfsi_ok_page']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_page']:checked").val(),
352
+ opu = SFSI("input[name='sfsi_ok_pageURL']").val(),
353
+ P = {};
354
+ SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
355
+ P[SFSI(this).attr("file-id")] = this.value;
356
+ });
357
+ var M = {
358
+ action: "updateSrcn2",
359
+ sfsi_rss_url: i,
360
+ sfsi_rss_icons: e,
361
+ sfsi_facebookPage_option: t,
362
+ sfsi_facebookLike_option: n,
363
+ sfsi_facebookShare_option: o,
364
+ sfsi_facebookPage_url: a,
365
+ sfsi_twitter_followme: r,
366
+ sfsi_twitter_followUserName: c,
367
+ sfsi_twitter_aboutPage: p,
368
+ sfsi_twitter_page: _,
369
+ sfsi_twitter_pageURL: l,
370
+ sfsi_twitter_aboutPageText: S,
371
+ sfsi_youtube_page: m,
372
+ sfsi_youtube_pageUrl: F,
373
+ sfsi_youtube_follow: h,
374
+ sfsi_youtubeusernameorid: cls,
375
+ sfsi_ytube_user: v,
376
+ sfsi_ytube_chnlid: vchid,
377
+ sfsi_pinterest_page: g,
378
+ sfsi_pinterest_pageUrl: k,
379
+ sfsi_instagram_pageUrl: b,
380
+ sfsi_pinterest_pingBlog: y,
381
+ sfsi_linkedin_page: w,
382
+ sfsi_linkedin_pageURL: x,
383
+ sfsi_linkedin_follow: C,
384
+ sfsi_linkedin_followCompany: D,
385
+ sfsi_linkedin_SharePage: U,
386
+ sfsi_linkedin_recommendBusines: O,
387
+ sfsi_linkedin_recommendCompany: j,
388
+ sfsi_linkedin_recommendProductId: T,
389
+ sfsi_custom_links: P,
390
+ sfsi_telegram_page: tp,
391
+ sfsi_telegram_pageURL: tpu,
392
+ sfsi_telegram_message: tm,
393
+ sfsi_telegram_username: tmn,
394
+ sfsi_weibo_page: wp,
395
+ sfsi_weibo_pageURL: wpu,
396
+ sfsi_vk_page: vp,
397
+ sfsi_vk_pageURL: vpu,
398
+ sfsi_ok_page: op,
399
+ sfsi_ok_pageURL: opu,
400
+ nonce: nonce
401
+ };
402
+ SFSI.ajax({
403
+ url: sfsi_icon_ajax_object.ajax_url,
404
+ type: "post",
405
+ data: M,
406
+ async: !0,
407
+ dataType: "json",
408
+ success: function (s) {
409
+ if (s == "wrong_nonce") {
410
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 2);
411
+ return_value = !1;
412
+ afterLoad();
413
+ } else {
414
+ "success" == s ? (showErrorSuc("success", "Saved !", 2), sfsicollapse("#sfsi_save2"),
415
+ sfsi_depened_sections()) : (global_error = 1, showErrorSuc("error", "Unkown error , please try again", 2),
416
+ return_value = !1), afterLoad();
417
+ }
418
+ }
419
+ });
420
+ }
421
+
422
+ function sfsi_update_step3() {
423
+ var nonce = SFSI("#sfsi_save3").attr("data-nonce");
424
+ var s = sfsi_validationStep3();
425
+ if (!s) return global_error = 1, !1;
426
+ beForeLoad();
427
+ var i = SFSI("input[name='sfsi_actvite_theme']:checked").val(),
428
+ e = SFSI("input[name='sfsi_mouseOver']:checked").val(),
429
+ t = SFSI("input[name='sfsi_shuffle_icons']:checked").val(),
430
+ n = SFSI("input[name='sfsi_shuffle_Firstload']:checked").val(),
431
+ o = SFSI("input[name='sfsi_same_icons_mouseOver_effect']:checked").val(),
432
+ a = SFSI("input[name='sfsi_shuffle_interval']:checked").val(),
433
+ r = SFSI("input[name='sfsi_shuffle_intervalTime']").val(),
434
+ c = SFSI("input[name='sfsi_specialIcon_animation']:checked").val(),
435
+ p = SFSI("input[name='sfsi_specialIcon_MouseOver']:checked").val(),
436
+ _ = SFSI("input[name='sfsi_specialIcon_Firstload']:checked").val(),
437
+ l = SFSI("#sfsi_specialIcon_Firstload_Icons option:selected").val(),
438
+ S = SFSI("input[name='sfsi_specialIcon_interval']:checked").val(),
439
+ u = SFSI("input[name='sfsi_specialIcon_intervalTime']").val(),
440
+ f = SFSI("#sfsi_specialIcon_intervalIcons option:selected").val();
441
+
442
+ var mouseover_effect_type = 'same_icons'; //SFSI("input[name='sfsi_mouseOver_effect_type']:checked").val();
443
+
444
+ d = {
445
+ action: "updateSrcn3",
446
+ sfsi_actvite_theme: i,
447
+ sfsi_mouseOver: e,
448
+ sfsi_shuffle_icons: t,
449
+ sfsi_shuffle_Firstload: n,
450
+ sfsi_mouseOver_effect: o,
451
+ sfsi_mouseover_effect_type: mouseover_effect_type,
452
+ sfsi_shuffle_interval: a,
453
+ sfsi_shuffle_intervalTime: r,
454
+ sfsi_specialIcon_animation: c,
455
+ sfsi_specialIcon_MouseOver: p,
456
+ sfsi_specialIcon_Firstload: _,
457
+ sfsi_specialIcon_Firstload_Icons: l,
458
+ sfsi_specialIcon_interval: S,
459
+ sfsi_specialIcon_intervalTime: u,
460
+ sfsi_specialIcon_intervalIcons: f,
461
+ nonce: nonce
462
+ };
463
+ SFSI.ajax({
464
+ url: sfsi_icon_ajax_object.ajax_url,
465
+ type: "post",
466
+ data: d,
467
+ async: !0,
468
+ dataType: "json",
469
+ success: function (s) {
470
+ if (s == "wrong_nonce") {
471
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 3);
472
+ return_value = !1;
473
+ afterLoad();
474
+ } else {
475
+ "success" == s ? (showErrorSuc("success", "Saved !", 3), sfsicollapse("#sfsi_save3")) : (showErrorSuc("error", "Unkown error , please try again", 3),
476
+ return_value = !1), afterLoad();
477
+ }
478
+ }
479
+ });
480
+ }
481
+
482
+ function sfsi_show_counts() {
483
+ "yes" == SFSI("input[name='sfsi_display_counts']:checked").val() ? (SFSI(".count_sections").slideDown(),
484
+ sfsi_showPreviewCounts()) : (SFSI(".count_sections").slideUp(), sfsi_showPreviewCounts());
485
+ }
486
+
487
+ function sfsi_showPreviewCounts() {
488
+ var s = 0;
489
+ 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("checked") ? (SFSI("#sfsi_rss_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_rss_countsDisplay").css("opacity", 0),
490
+ 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("checked") ? (SFSI("#sfsi_email_countsDisplay").css("opacity", 1),
491
+ s = 1) : SFSI("#sfsi_email_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("checked") ? (SFSI("#sfsi_facebook_countsDisplay").css("opacity", 1),
492
+ s = 1) : SFSI("#sfsi_facebook_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("checked") ? (SFSI("#sfsi_twitter_countsDisplay").css("opacity", 1),
493
+ s = 1) : SFSI("#sfsi_twitter_countsDisplay").css("opacity", 0),
494
+ 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("checked") ? (SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 1), s = 1) : SFSI("#sfsi_linkedIn_countsDisplay").css("opacity", 0),
495
+ 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("checked") ? (SFSI("#sfsi_youtube_countsDisplay").css("opacity", 1),
496
+ s = 1) : SFSI("#sfsi_youtube_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("checked") ? (SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 1),
497
+ s = 1) : SFSI("#sfsi_pinterest_countsDisplay").css("opacity", 0), 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_instagram_countsDisplay").css("opacity", 1),
498
+ s = 1) : SFSI("#sfsi_instagram_countsDisplay").css("opacity", 0),
499
+ 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("checked") ? (SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_telegram_countsDisplay").css("opacity", 0),
500
+ 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("checked") ? (SFSI("#sfsi_vk_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_vk_countsDisplay").css("opacity", 0),
501
+ 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("checked") ? (SFSI("#sfsi_ok_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_ok_countsDisplay").css("opacity", 0),
502
+ 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("checked") ? (SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_weibo_countsDisplay").css("opacity", 0),
503
+ 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("checked") ? (SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0), s = 1) : SFSI("#sfsi_wechat_countsDisplay").css("opacity", 0),
504
+
505
+ 0 == s || "no" == SFSI("input[name='sfsi_display_counts']:checked").val() ? SFSI(".sfsi_Cdisplay").hide() : SFSI(".sfsi_Cdisplay").show();
506
+ }
507
+
508
+ function sfsi_show_OnpostsDisplay() {
509
+ //"yes" == SFSI("input[name='sfsi_show_Onposts']:checked").val() ? SFSI(".PostsSettings_section").slideDown() :SFSI(".PostsSettings_section").slideUp();
510
+ }
511
+
512
+ function sfsi_update_step4() {
513
+ var nonce = SFSI("#sfsi_save4").attr("data-nonce");
514
+ var s = !1,
515
+ i = sfsi_validationStep4();
516
+ if (!i) return global_error = 1, !1;
517
+ beForeLoad();
518
+ var e = SFSI("input[name='sfsi_display_counts']:checked").val(),
519
+ t = 1 == SFSI("input[name='sfsi_email_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsDisplay']:checked").val(),
520
+ n = 1 == SFSI("input[name='sfsi_email_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_countsFrom']:checked").val(),
521
+ o = SFSI("input[name='sfsi_email_manualCounts']").val(),
522
+ r = 1 == SFSI("input[name='sfsi_rss_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_countsDisplay']:checked").val(),
523
+ c = SFSI("input[name='sfsi_rss_manualCounts']").val(),
524
+ p = 1 == SFSI("input[name='sfsi_facebook_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsDisplay']:checked").val(),
525
+ _ = 1 == SFSI("input[name='sfsi_facebook_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_countsFrom']:checked").val(),
526
+ mp = SFSI("input[name='sfsi_facebook_mypageCounts']").val(),
527
+ l = SFSI("input[name='sfsi_facebook_manualCounts']").val(),
528
+ S = 1 == SFSI("input[name='sfsi_twitter_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsDisplay']:checked").val(),
529
+ u = 1 == SFSI("input[name='sfsi_twitter_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_countsFrom']:checked").val(),
530
+ f = SFSI("input[name='sfsi_twitter_manualCounts']").val(),
531
+ d = SFSI("input[name='tw_consumer_key']").val(),
532
+ I = SFSI("input[name='tw_consumer_secret']").val(),
533
+ m = SFSI("input[name='tw_oauth_access_token']").val(),
534
+ F = SFSI("input[name='tw_oauth_access_token_secret']").val(),
535
+ k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
536
+ y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
537
+ b = SFSI("input[name='ln_company']").val(),
538
+ w = SFSI("input[name='ln_api_key']").val(),
539
+ x = SFSI("input[name='ln_secret_key']").val(),
540
+ C = SFSI("input[name='ln_oAuth_user_token']").val(),
541
+ D = 1 == SFSI("input[name='sfsi_linkedIn_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsDisplay']:checked").val(),
542
+ k = 1 == SFSI("input[name='sfsi_linkedIn_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val(),
543
+ y = SFSI("input[name='sfsi_linkedIn_manualCounts']").val(),
544
+ U = 1 == SFSI("input[name='sfsi_youtube_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsDisplay']:checked").val(),
545
+ O = 1 == SFSI("input[name='sfsi_youtube_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_countsFrom']:checked").val(),
546
+ T = SFSI("input[name='sfsi_youtube_manualCounts']").val(),
547
+ j = SFSI("input[name='sfsi_youtube_user']").val(),
548
+ P = 1 == SFSI("input[name='sfsi_pinterest_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsDisplay']:checked").val(),
549
+ M = 1 == SFSI("input[name='sfsi_pinterest_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_countsFrom']:checked").val(),
550
+ L = SFSI("input[name='sfsi_pinterest_manualCounts']").val(),
551
+ B = SFSI("input[name='sfsi_pinterest_user']").val(),
552
+ E = SFSI("input[name='sfsi_pinterest_board']").val(),
553
+ z = 1 == SFSI("input[name='sfsi_instagram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsDisplay']:checked").val(),
554
+ A = 1 == SFSI("input[name='sfsi_instagram_countsFrom']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_countsFrom']:checked").val(),
555
+ N = SFSI("input[name='sfsi_instagram_manualCounts']").val(),
556
+ H = SFSI("input[name='sfsi_instagram_User']").val(),
557
+ ha = SFSI("input[name='sfsi_instagram_clientid']").val(),
558
+ ia = SFSI("input[name='sfsi_instagram_appurl']").val(),
559
+ ja = SFSI("input[name='sfsi_instagram_token']").val(),
560
+
561
+ tc = 1 == SFSI("input[name='sfsi_telegram_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_countsDisplay']:checked").val(),
562
+ tm = SFSI("input[name='sfsi_telegram_manualCounts']").val(),
563
+
564
+ vc = 1 == SFSI("input[name='sfsi_vk_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_countsDisplay']:checked").val(),
565
+ vm = SFSI("input[name='sfsi_vk_manualCounts']").val(),
566
+
567
+
568
+ oc = 1 == SFSI("input[name='sfsi_ok_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_countsDisplay']:checked").val(),
569
+ om = SFSI("input[name='sfsi_ok_manualCounts']").val(),
570
+
571
+
572
+ wc = 1 == SFSI("input[name='sfsi_weibo_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_countsDisplay']:checked").val(),
573
+ wm = SFSI("input[name='sfsi_weibo_manualCounts']").val(),
574
+
575
+ wcc = 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_countsDisplay']:checked").val(),
576
+ wcm = SFSI("input[name='sfsi_wechat_manualCounts']").val(),
577
+ $ = {
578
+ action: "updateSrcn4",
579
+ sfsi_display_counts: e,
580
+ sfsi_email_countsDisplay: t,
581
+ sfsi_email_countsFrom: n,
582
+ sfsi_email_manualCounts: o,
583
+ sfsi_rss_countsDisplay: r,
584
+ sfsi_rss_manualCounts: c,
585
+ sfsi_facebook_countsDisplay: p,
586
+ sfsi_facebook_countsFrom: _,
587
+ sfsi_facebook_mypageCounts: mp,
588
+ sfsi_facebook_manualCounts: l,
589
+ sfsi_twitter_countsDisplay: S,
590
+ sfsi_twitter_countsFrom: u,
591
+ sfsi_twitter_manualCounts: f,
592
+ tw_consumer_key: d,
593
+ tw_consumer_secret: I,
594
+ tw_oauth_access_token: m,
595
+ tw_oauth_access_token_secret: F,
596
+ sfsi_linkedIn_countsDisplay: D,
597
+ sfsi_linkedIn_countsFrom: k,
598
+ sfsi_linkedIn_manualCounts: y,
599
+ ln_company: b,
600
+ ln_api_key: w,
601
+ ln_secret_key: x,
602
+ ln_oAuth_user_token: C,
603
+ sfsi_youtube_countsDisplay: U,
604
+ sfsi_youtube_countsFrom: O,
605
+ sfsi_youtube_manualCounts: T,
606
+ sfsi_youtube_user: j,
607
+ sfsi_youtube_channelId: SFSI("input[name='sfsi_youtube_channelId']").val(),
608
+ sfsi_pinterest_countsDisplay: P,
609
+ sfsi_pinterest_countsFrom: M,
610
+ sfsi_pinterest_manualCounts: L,
611
+ sfsi_pinterest_user: B,
612
+ sfsi_pinterest_board: E,
613
+ sfsi_instagram_countsDisplay: z,
614
+ sfsi_instagram_countsFrom: A,
615
+ sfsi_instagram_manualCounts: N,
616
+ sfsi_instagram_User: H,
617
+ sfsi_instagram_clientid: ha,
618
+ sfsi_instagram_appurl: ia,
619
+ sfsi_instagram_token: ja,
620
+ sfsi_telegram_countsDisplay: tc,
621
+ sfsi_telegram_manualCounts: tm,
622
+ sfsi_vk_countsDisplay: vc,
623
+ sfsi_vk_manualCounts: vm,
624
+ sfsi_ok_countsDisplay: oc,
625
+ sfsi_ok_manualCounts: om,
626
+ sfsi_weibo_countsDisplay: wc,
627
+ sfsi_weibo_manualCounts: wm,
628
+ sfsi_wechat_countsDisplay: wcc,
629
+ sfsi_wechat_manualCounts: wcm,
630
+ nonce: nonce
631
+ };
632
+ console.log($);
633
+ return SFSI.ajax({
634
+ url: sfsi_icon_ajax_object.ajax_url,
635
+ type: "post",
636
+ data: $,
637
+ dataType: "json",
638
+ async: !0,
639
+ success: function (s) {
640
+ if (s == "wrong_nonce") {
641
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 4);
642
+ global_error = 1;
643
+ afterLoad();
644
+ } else {
645
+ "success" == s.res ? (showErrorSuc("success", "Saved !", 4), sfsicollapse("#sfsi_save4"),
646
+ sfsi_showPreviewCounts()) : (showErrorSuc("error", "Unkown error , please try again", 4),
647
+ global_error = 1), afterLoad();
648
+ }
649
+ }
650
+ }), s;
651
+ }
652
+
653
+ function sfsi_update_step5() {
654
+ var nonce = SFSI("#sfsi_save5").attr("data-nonce");
655
+ sfsi_update_step3();
656
+
657
+ var s = sfsi_validationStep5();
658
+
659
+ if (!s) return global_error = 1, !1;
660
+
661
+ beForeLoad();
662
+
663
+ var i = SFSI("input[name='sfsi_icons_size']").val(),
664
+ e = SFSI("input[name='sfsi_icons_perRow']").val(),
665
+ t = SFSI("input[name='sfsi_icons_spacing']").val(),
666
+ n = SFSI("#sfsi_icons_Alignment").val(),
667
+ o = SFSI("input[name='sfsi_icons_ClickPageOpen']:checked").val(),
668
+
669
+ se = SFSI("input[name='sfsi_icons_suppress_errors']:checked").val(),
670
+ c = SFSI("input[name='sfsi_icons_stick']:checked").val(),
671
+ p = SFSI("#sfsi_rssIcon_order").attr("data-index"),
672
+ _ = SFSI("#sfsi_emailIcon_order").attr("data-index"),
673
+ S = SFSI("#sfsi_facebookIcon_order").attr("data-index"),
674
+ u = SFSI("#sfsi_twitterIcon_order").attr("data-index"),
675
+ f = SFSI("#sfsi_youtubeIcon_order").attr("data-index"),
676
+ d = SFSI("#sfsi_pinterestIcon_order").attr("data-index"),
677
+ I = SFSI("#sfsi_instagramIcon_order").attr("data-index"),
678
+ F = SFSI("#sfsi_linkedinIcon_order").attr("data-index"),
679
+ tgi = SFSI("#sfsi_telegramIcon_order").attr("data-index"),
680
+ vki = SFSI("#sfsi_vkIcon_order").attr("data-index"),
681
+ oki = SFSI("#sfsi_okIcon_order").attr("data-index"),
682
+ wbi = SFSI("#sfsi_weiboIcon_order").attr("data-index"),
683
+ wci = SFSI("#sfsi_wechatIcon_order").attr("data-index"),
684
+
685
+ h = new Array();
686
+
687
+ SFSI(".custom_iconOrder").each(function () {
688
+ h.push({
689
+ order: SFSI(this).attr("data-index"),
690
+ ele: SFSI(this).attr("element-id")
691
+ });
692
+ });
693
+
694
+ var v = 1 == SFSI("input[name='sfsi_rss_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_rss_MouseOverText']").val(),
695
+ g = 1 == SFSI("input[name='sfsi_email_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_email_MouseOverText']").val(),
696
+ k = 1 == SFSI("input[name='sfsi_twitter_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_twitter_MouseOverText']").val(),
697
+ y = 1 == SFSI("input[name='sfsi_facebook_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_facebook_MouseOverText']").val(),
698
+ w = 1 == SFSI("input[name='sfsi_linkedIn_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_linkedIn_MouseOverText']").val(),
699
+ x = 1 == SFSI("input[name='sfsi_youtube_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_youtube_MouseOverText']").val(),
700
+ C = 1 == SFSI("input[name='sfsi_pinterest_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_pinterest_MouseOverText']").val(),
701
+ D = 1 == SFSI("input[name='sfsi_instagram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_instagram_MouseOverText']").val(),
702
+ tg = 1 == SFSI("input[name='sfsi_telegram_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_telegram_MouseOverText']").val(),
703
+ vk = 1 == SFSI("input[name='sfsi_vk_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_vk_MouseOverText']").val(),
704
+ ok = 1 == SFSI("input[name='sfsi_ok_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_ok_MouseOverText']").val(),
705
+ wb = 1 == SFSI("input[name='sfsi_weibo_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_weibo_MouseOverText']").val(),
706
+ wc = 1 == SFSI("input[name='sfsi_wechat_MouseOverText']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_MouseOverText']").val(),
707
+
708
+ O = {};
709
+ SFSI("input[name='sfsi_custom_MouseOverTexts[]']").each(function () {
710
+ O[SFSI(this).attr("file-id")] = this.value;
711
+ });
712
+
713
+ var sfsi_custom_social_hide = SFSI("input[name='sfsi_custom_social_hide']").val();
714
+
715
+ var T = {
716
+ action: "updateSrcn5",
717
+ sfsi_icons_size: i,
718
+ sfsi_icons_Alignment: n,
719
+ sfsi_icons_perRow: e,
720
+ sfsi_icons_spacing: t,
721
+ sfsi_icons_ClickPageOpen: o,
722
+ sfsi_icons_suppress_errors: se,
723
+ sfsi_icons_stick: c,
724
+ sfsi_rss_MouseOverText: v,
725
+ sfsi_email_MouseOverText: g,
726
+ sfsi_twitter_MouseOverText: k,
727
+ sfsi_facebook_MouseOverText: y,
728
+ sfsi_youtube_MouseOverText: x,
729
+ sfsi_linkedIn_MouseOverText: w,
730
+ sfsi_pinterest_MouseOverText: C,
731
+ sfsi_instagram_MouseOverText: D,
732
+ sfsi_telegram_MouseOverText: tg,
733
+ sfsi_vk_MouseOverText: vk,
734
+ sfsi_ok_MouseOverText: ok,
735
+ sfsi_weibo_MouseOverText: wb,
736
+ sfsi_wechat_MouseOverText: wc,
737
+ sfsi_custom_MouseOverTexts: O,
738
+ sfsi_rssIcon_order: p,
739
+ sfsi_emailIcon_order: _,
740
+ sfsi_facebookIcon_order: S,
741
+ sfsi_twitterIcon_order: u,
742
+ sfsi_youtubeIcon_order: f,
743
+ sfsi_pinterestIcon_order: d,
744
+ sfsi_instagramIcon_order: I,
745
+ sfsi_linkedinIcon_order: F,
746
+ sfsi_telegramIcon_order: tgi,
747
+ sfsi_vkIcon_order: vki,
748
+ sfsi_okIcon_order: oki,
749
+ sfsi_weiboIcon_order: wbi,
750
+ sfsi_wechatIcon_order: wci,
751
+
752
+ sfsi_custom_orders: h,
753
+ sfsi_custom_social_hide: sfsi_custom_social_hide,
754
+ nonce: nonce
755
+ };
756
+ console.log(T);
757
+ SFSI.ajax({
758
+ url: sfsi_icon_ajax_object.ajax_url,
759
+ type: "post",
760
+ data: T,
761
+ dataType: "json",
762
+ async: !0,
763
+ success: function (s) {
764
+ if (s == "wrong_nonce") {
765
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 5);
766
+ global_error = 1;
767
+ afterLoad();
768
+ } else {
769
+ "success" == s ? (showErrorSuc("success", "Saved !", 5), sfsicollapse("#sfsi_save5")) : (global_error = 1,
770
+ showErrorSuc("error", "Unkown error , please try again", 5)), afterLoad();
771
+ }
772
+ }
773
+ });
774
+ }
775
+
776
+ function sfsi_update_step6() {
777
+ var nonce = SFSI("#sfsi_save6").attr("data-nonce");
778
+ beForeLoad();
779
+ var s = SFSI("input[name='sfsi_show_Onposts']:checked").val(),
780
+ i = SFSI("input[name='sfsi_textBefor_icons']").val(),
781
+ e = SFSI("#sfsi_icons_alignment").val(),
782
+ t = SFSI("#sfsi_icons_DisplayCounts").val(),
783
+ rsub = SFSI("input[name='sfsi_rectsub']:checked").val(),
784
+ rfb = SFSI("input[name='sfsi_rectfb']:checked").val(),
785
+ rpin = SFSI("input[name='sfsi_rectpinit']:checked").val(),
786
+ rshr = SFSI("input[name='sfsi_rectshr']:checked").val(),
787
+ rtwr = SFSI("input[name='sfsi_recttwtr']:checked").val(),
788
+ rfbshare = SFSI("input[name='sfsi_rectfbshare']:checked").val(),
789
+ a = SFSI("input[name='sfsi_display_button_type']:checked").val();
790
+ countshare = SFSI("input[name='sfsi_share_count']:checked").val();
791
+ endpost = SFSI("input[name='sfsi_responsive_icons_end_post']:checked").val();
792
+
793
+ var responsive_icons = {
794
+ "default_icons": {},
795
+ "settings": {}
796
+ };
797
+ SFSI('.sfsi_responsive_default_icon_container input[type="checkbox"]').each(function (index, obj) {
798
+ var data_obj = {};
799
+ data_obj.active = ('checked' == SFSI(obj).attr('checked')) ? 'yes' : 'no';
800
+ var iconname = SFSI(obj).attr('data-icon');
801
+ var next_section = SFSI(obj).parent().parent();
802
+ data_obj.text = next_section.find('input[name="sfsi_responsive_' + iconname + '_input"]').val();
803
+ data_obj.url = next_section.find('input[name="sfsi_responsive_' + iconname + '_url_input"]').val();
804
+ responsive_icons.default_icons[iconname] = data_obj;
805
+ });
806
+ SFSI('.sfsi_responsive_custom_icon_container input[type="checkbox"]').each(function (index, obj) {
807
+ if (SFSI(obj).attr('id') != "sfsi_responsive_custom_new_display") {
808
+ var data_obj = {};
809
+ data_obj.active = 'checked' == SFSI(obj).attr('checked') ? 'yes' : 'no';
810
+ var icon_index = SFSI(obj).attr('data-custom-index');
811
+ var next_section = SFSI(obj).parent().parent();
812
+ data_obj['added'] = SFSI('input[name="sfsi_responsive_custom_' + index + '_added"]').val();
813
+ data_obj.icon = next_section.find('img').attr('src');
814
+ data_obj["bg-color"] = next_section.find('.sfsi_bg-color-picker').val();
815
+
816
+ data_obj.text = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_input"]').val();
817
+ data_obj.url = next_section.find('input[name="sfsi_responsive_custom_' + icon_index + '_url_input"]').val();
818
+ responsive_icons.custom_icons[index] = data_obj;
819
+ }
820
+ });
821
+ responsive_icons.settings.icon_size = SFSI('select[name="sfsi_responsive_icons_settings_icon_size"]').val();
822
+ responsive_icons.settings.icon_width_type = SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val();
823
+ responsive_icons.settings.icon_width_size = SFSI('input[name="sfsi_responsive_icons_sttings_icon_width_size"]').val();
824
+ responsive_icons.settings.edge_type = SFSI('select[name="sfsi_responsive_icons_settings_edge_type"]').val();
825
+ responsive_icons.settings.edge_radius = SFSI('select[name="sfsi_responsive_icons_settings_edge_radius"]').val();
826
+ responsive_icons.settings.style = SFSI('select[name="sfsi_responsive_icons_settings_style"]').val();
827
+ responsive_icons.settings.margin = SFSI('input[name="sfsi_responsive_icons_settings_margin"]').val();
828
+ responsive_icons.settings.text_align = SFSI('select[name="sfsi_responsive_icons_settings_text_align"]').val();
829
+ responsive_icons.settings.show_count = SFSI('input[name="sfsi_responsive_icon_show_count"]:checked').val();
830
+ responsive_icons.settings.counter_color = SFSI('input[name="sfsi_responsive_counter_color"]').val();
831
+ responsive_icons.settings.counter_bg_color = SFSI('input[name="sfsi_responsive_counter_bg_color"]').val();
832
+ responsive_icons.settings.share_count_text = SFSI('input[name="sfsi_responsive_counter_share_count_text"]').val();
833
+ responsive_icons.settings.show_count = countshare;
834
+ n = {
835
+ action: "updateSrcn6",
836
+ sfsi_show_Onposts: s,
837
+ sfsi_icons_DisplayCounts: t,
838
+ sfsi_icons_alignment: e,
839
+ sfsi_textBefor_icons: i,
840
+ sfsi_rectsub: rsub,
841
+ sfsi_rectfb: rfb,
842
+ sfsi_rectpinit: rpin,
843
+ sfsi_rectshr: rshr,
844
+ sfsi_recttwtr: rtwr,
845
+ sfsi_rectfbshare: rfbshare,
846
+ sfsi_responsive_icons: responsive_icons,
847
+ sfsi_display_button_type: a,
848
+ sfsi_responsive_icons_end_post:endpost,
849
+ sfsi_share_count: countshare,
850
+ nonce: nonce
851
+ };
852
+ SFSI.ajax({
853
+ url: sfsi_icon_ajax_object.ajax_url,
854
+ type: "post",
855
+ data: n,
856
+ dataType: "json",
857
+ async: !0,
858
+ success: function (s) {
859
+ if (s == "wrong_nonce") {
860
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
861
+ global_error = 1;
862
+ afterLoad();
863
+ } else {
864
+ "success" == s ? (showErrorSuc("success", "Saved !", 6), sfsicollapse("#sfsi_save6")) : (global_error = 1,
865
+ showErrorSuc("error", "Unkown error , please try again", 6)), afterLoad();
866
+ }
867
+ }
868
+ });
869
+ }
870
+
871
+ function sfsi_update_step7() {
872
+ var nonce = SFSI("#sfsi_save7").attr("data-nonce");
873
+ var s = sfsi_validationStep7();
874
+ if (!s) return global_error = 1, !1;
875
+ beForeLoad();
876
+ var i = SFSI("input[name='sfsi_popup_text']").val(),
877
+ e = SFSI("#sfsi_popup_font option:selected").val(),
878
+ t = SFSI("#sfsi_popup_fontStyle option:selected").val(),
879
+ color = SFSI("input[name='sfsi_popup_fontColor']").val(),
880
+ n = SFSI("input[name='sfsi_popup_fontSize']").val(),
881
+ o = SFSI("input[name='sfsi_popup_background_color']").val(),
882
+ a = SFSI("input[name='sfsi_popup_border_color']").val(),
883
+ r = SFSI("input[name='sfsi_popup_border_thickness']").val(),
884
+ c = SFSI("input[name='sfsi_popup_border_shadow']:checked").val(),
885
+ p = SFSI("input[name='sfsi_Show_popupOn']:checked").val(),
886
+ _ = [];
887
+ SFSI("#sfsi_Show_popupOn_PageIDs :selected").each(function (s, i) {
888
+ _[s] = SFSI(i).val();
889
+ });
890
+ var l = SFSI("input[name='sfsi_Shown_pop']:checked").val(),
891
+ S = SFSI("input[name='sfsi_Shown_popupOnceTime']").val(),
892
+ u = SFSI("#sfsi_Shown_popuplimitPerUserTime").val(),
893
+ f = {
894
+ action: "updateSrcn7",
895
+ sfsi_popup_text: i,
896
+ sfsi_popup_font: e,
897
+ sfsi_popup_fontColor: color,
898
+ /*sfsi_popup_fontStyle: t,*/
899
+ sfsi_popup_fontSize: n,
900
+ sfsi_popup_background_color: o,
901
+ sfsi_popup_border_color: a,
902
+ sfsi_popup_border_thickness: r,
903
+ sfsi_popup_border_shadow: c,
904
+ sfsi_Show_popupOn: p,
905
+ sfsi_Show_popupOn_PageIDs: _,
906
+ sfsi_Shown_pop: l,
907
+ sfsi_Shown_popupOnceTime: S,
908
+ sfsi_Shown_popuplimitPerUserTime: u,
909
+ nonce: nonce
910
+ };
911
+ SFSI.ajax({
912
+ url: sfsi_icon_ajax_object.ajax_url,
913
+ type: "post",
914
+ data: f,
915
+ dataType: "json",
916
+ async: !0,
917
+ success: function (s) {
918
+ if (s == "wrong_nonce") {
919
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
920
+ afterLoad();
921
+ } else {
922
+ "success" == s ? (showErrorSuc("success", "Saved !", 7), sfsicollapse("#sfsi_save7")) : showErrorSuc("error", "Unkown error , please try again", 7),
923
+ afterLoad();
924
+ }
925
+ }
926
+ });
927
+ }
928
+
929
+ function sfsi_update_step8() {
930
+ var nonce = SFSI("#sfsi_save8").attr("data-nonce");
931
+ beForeLoad();
932
+ var ie = SFSI("input[name='sfsi_form_adjustment']:checked").val(),
933
+ je = SFSI("input[name='sfsi_form_height']").val(),
934
+ ke = SFSI("input[name='sfsi_form_width']").val(),
935
+ le = SFSI("input[name='sfsi_form_border']:checked").val(),
936
+ me = SFSI("input[name='sfsi_form_border_thickness']").val(),
937
+ ne = SFSI("input[name='sfsi_form_border_color']").val(),
938
+ oe = SFSI("input[name='sfsi_form_background']").val(),
939
+
940
+ ae = SFSI("input[name='sfsi_form_heading_text']").val(),
941
+ be = SFSI("#sfsi_form_heading_font option:selected").val(),
942
+ ce = SFSI("#sfsi_form_heading_fontstyle option:selected").val(),
943
+ de = SFSI("input[name='sfsi_form_heading_fontcolor']").val(),
944
+ ee = SFSI("input[name='sfsi_form_heading_fontsize']").val(),
945
+ fe = SFSI("#sfsi_form_heading_fontalign option:selected").val(),
946
+
947
+ ue = SFSI("input[name='sfsi_form_field_text']").val(),
948
+ ve = SFSI("#sfsi_form_field_font option:selected").val(),
949
+ we = SFSI("#sfsi_form_field_fontstyle option:selected").val(),
950
+ xe = SFSI("input[name='sfsi_form_field_fontcolor']").val(),
951
+ ye = SFSI("input[name='sfsi_form_field_fontsize']").val(),
952
+ ze = SFSI("#sfsi_form_field_fontalign option:selected").val(),
953
+
954
+ i = SFSI("input[name='sfsi_form_button_text']").val(),
955
+ j = SFSI("#sfsi_form_button_font option:selected").val(),
956
+ k = SFSI("#sfsi_form_button_fontstyle option:selected").val(),
957
+ l = SFSI("input[name='sfsi_form_button_fontcolor']").val(),
958
+ m = SFSI("input[name='sfsi_form_button_fontsize']").val(),
959
+ n = SFSI("#sfsi_form_button_fontalign option:selected").val(),
960
+ o = SFSI("input[name='sfsi_form_button_background']").val();
961
+
962
+ var f = {
963
+ action: "updateSrcn8",
964
+ sfsi_form_adjustment: ie,
965
+ sfsi_form_height: je,
966
+ sfsi_form_width: ke,
967
+ sfsi_form_border: le,
968
+ sfsi_form_border_thickness: me,
969
+ sfsi_form_border_color: ne,
970
+ sfsi_form_background: oe,
971
+
972
+ sfsi_form_heading_text: ae,
973
+ sfsi_form_heading_font: be,
974
+ sfsi_form_heading_fontstyle: ce,
975
+ sfsi_form_heading_fontcolor: de,
976
+ sfsi_form_heading_fontsize: ee,
977
+ sfsi_form_heading_fontalign: fe,
978
+
979
+ sfsi_form_field_text: ue,
980
+ sfsi_form_field_font: ve,
981
+ sfsi_form_field_fontstyle: we,
982
+ sfsi_form_field_fontcolor: xe,
983
+ sfsi_form_field_fontsize: ye,
984
+ sfsi_form_field_fontalign: ze,
985
+
986
+ sfsi_form_button_text: i,
987
+ sfsi_form_button_font: j,
988
+ sfsi_form_button_fontstyle: k,
989
+ sfsi_form_button_fontcolor: l,
990
+ sfsi_form_button_fontsize: m,
991
+ sfsi_form_button_fontalign: n,
992
+ sfsi_form_button_background: o,
993
+
994
+ nonce: nonce
995
+ };
996
+ SFSI.ajax({
997
+ url: sfsi_icon_ajax_object.ajax_url,
998
+ type: "post",
999
+ data: f,
1000
+ dataType: "json",
1001
+ async: !0,
1002
+ success: function (s) {
1003
+ if (s == "wrong_nonce") {
1004
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 7);
1005
+ afterLoad();
1006
+ } else {
1007
+ "success" == s ? (showErrorSuc("success", "Saved !", 8), sfsicollapse("#sfsi_save8"), create_suscriber_form()) : showErrorSuc("error", "Unkown error , please try again", 8),
1008
+ afterLoad();
1009
+ }
1010
+ }
1011
+ });
1012
+ }
1013
+
1014
+ // Queestion 3
1015
+ function sfsi_update_step9() {
1016
+ var nonce = SFSI("#sfsi_save9").attr("data-nonce");
1017
+ beForeLoad();
1018
+
1019
+ var i_float = SFSI("input[name='sfsi_icons_float']:checked").val(),
1020
+ i_floatP = SFSI("input[name='sfsi_icons_floatPosition']:checked").val(),
1021
+ i_floatMt = SFSI("input[name='sfsi_icons_floatMargin_top']").val(),
1022
+ i_floatMb = SFSI("input[name='sfsi_icons_floatMargin_bottom']").val(),
1023
+ i_floatMl = SFSI("input[name='sfsi_icons_floatMargin_left']").val(),
1024
+ i_floatMr = SFSI("input[name='sfsi_icons_floatMargin_right']").val(),
1025
+ i_disableFloat = SFSI("input[name='sfsi_disable_floaticons']:checked").val(),
1026
+
1027
+ show_via_widget = SFSI("input[name='sfsi_show_via_widget']").val(),
1028
+ show_via__shortcode = SFSI("input[name='sfsi_show_via_shortcode']:checked").length==0?"no":"yes",
1029
+ sfsi_show_via_afterposts = SFSI("input[name='sfsi_show_via_afterposts']").val();
1030
+
1031
+ var f = {
1032
+
1033
+ action: "updateSrcn9",
1034
+
1035
+ sfsi_icons_float: i_float,
1036
+ sfsi_icons_floatPosition: i_floatP,
1037
+ sfsi_icons_floatMargin_top: i_floatMt,
1038
+ sfsi_icons_floatMargin_bottom: i_floatMb,
1039
+ sfsi_icons_floatMargin_left: i_floatMl,
1040
+ sfsi_icons_floatMargin_right: i_floatMr,
1041
+ sfsi_disable_floaticons: i_disableFloat,
1042
+
1043
+ sfsi_show_via_widget: show_via_widget,
1044
+ sfsi_show_via_shortcode: show_via__shortcode,
1045
+ sfsi_show_via_afterposts: sfsi_show_via_afterposts,
1046
+ nonce: nonce
1047
+ };
1048
+ SFSI.ajax({
1049
+ url: sfsi_icon_ajax_object.ajax_url,
1050
+ type: "post",
1051
+ data: f,
1052
+ dataType: "json",
1053
+ async: !0,
1054
+ success: function (s) {
1055
+ if (s == "wrong_nonce") {
1056
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 9);
1057
+ afterLoad();
1058
+ } else {
1059
+ "success" == s ? (showErrorSuc("success", "Saved !", 9), sfsicollapse("#sfsi_save9")) : showErrorSuc("error", "Unkown error , please try again", 9),
1060
+ afterLoad();
1061
+ }
1062
+ }
1063
+ });
1064
+ }
1065
+
1066
+ function sfsi_validationStep2() {
1067
+ //var class_name= SFSI(element).hasAttr('sfsi_validate');
1068
+ SFSI('input').removeClass('inputError'); // remove previous error
1069
+ if (sfsi_validator(SFSI('input[name="sfsi_rss_display"]'), 'checked')) {
1070
+ if (!sfsi_validator(SFSI('input[name="sfsi_rss_url"]'), 'url')) {
1071
+ showErrorSuc("error", "Error : Invalid Rss url ", 2);
1072
+ SFSI('input[name="sfsi_rss_url"]').addClass('inputError');
1073
+
1074
+ return false;
1075
+ }
1076
+ }
1077
+ /* validate facebook */
1078
+ if (sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'), 'checked')) {
1079
+ if (!sfsi_validator(SFSI('input[name="sfsi_facebookPage_url"]'), 'blank')) {
1080
+ showErrorSuc("error", "Error : Invalid Facebook page url ", 2);
1081
+ SFSI('input[name="sfsi_facebookPage_url"]').addClass('inputError');
1082
+
1083
+ return false;
1084
+ }
1085
+ }
1086
+ /* validate twitter user name */
1087
+ if (sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'), 'checked')) {
1088
+ if (!sfsi_validator(SFSI('input[name="sfsi_twitter_followUserName"]'), 'blank')) {
1089
+ showErrorSuc("error", "Error : Invalid Twitter UserName ", 2);
1090
+ SFSI('input[name="sfsi_twitter_followUserName"]').addClass('inputError');
1091
+ return false;
1092
+ }
1093
+ }
1094
+ /* validate twitter about page */
1095
+ if (sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'), 'checked')) {
1096
+ if (!sfsi_validator(SFSI('#sfsi_twitter_aboutPageText'), 'blank')) {
1097
+ showErrorSuc("error", "Error : Tweet about my page is blank ", 2);
1098
+ SFSI('#sfsi_twitter_aboutPageText').addClass('inputError');
1099
+ return false;
1100
+ }
1101
+ }
1102
+ /* twitter validation */
1103
+ if (sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'), 'checked')) {
1104
+ if (!sfsi_validator(SFSI('input[name="sfsi_twitter_pageURL"]'), 'blank')) {
1105
+ showErrorSuc("error", "Error : Invalid twitter page Url ", 2);
1106
+ SFSI('input[name="sfsi_twitter_pageURL"]').addClass('inputError');
1107
+ return false;
1108
+ }
1109
+ }
1110
+
1111
+ /* youtube validation */
1112
+ if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'checked')) {
1113
+ if (!sfsi_validator(SFSI('input[name="sfsi_youtube_pageUrl"]'), 'blank')) {
1114
+ showErrorSuc("error", "Error : Invalid youtube Url ", 2);
1115
+ SFSI('input[name="sfsi_youtube_pageUrl"]').addClass('inputError');
1116
+ return false;
1117
+ }
1118
+ }
1119
+ /* youtube validation */
1120
+ if (sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_follow"]'), 'checked')) {
1121
+ cls = SFSI("input[name='sfsi_youtubeusernameorid']:checked").val();
1122
+ if (cls == 'name' && !sfsi_validator(SFSI('input[name="sfsi_ytube_user"]'), 'blank')) {
1123
+ showErrorSuc("error", "Error : Invalid youtube user name", 2);
1124
+ SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1125
+ return false;
1126
+ }
1127
+
1128
+ if (cls == 'id' && !sfsi_validator(SFSI('input[name="sfsi_ytube_chnlid"]'), 'blank')) {
1129
+ showErrorSuc("error", "Error : Invalid youtube Channel ID ", 2);
1130
+ SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
1131
+ return false;
1132
+ }
1133
+ }
1134
+ /* pinterest validation */
1135
+ if (sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'), 'checked')) {
1136
+ if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_pageUrl"]'), 'blank')) {
1137
+ showErrorSuc("error", "Error : Invalid pinterest page url ", 2);
1138
+ SFSI('input[name="sfsi_pinterest_pageUrl"]').addClass('inputError');
1139
+ return false;
1140
+ }
1141
+ }
1142
+ /* instagram validation */
1143
+ if (sfsi_validator(SFSI('input[name="sfsi_instagram_display"]'), 'checked')) {
1144
+ if (!sfsi_validator(SFSI('input[name="sfsi_instagram_pageUrl"]'), 'blank')) {
1145
+ showErrorSuc("error", "Error : Invalid Instagram url ", 2);
1146
+ SFSI('input[name="sfsi_instagram_pageUrl"]').addClass('inputError');
1147
+ return false;
1148
+ }
1149
+ }
1150
+ /* telegram validation */
1151
+ if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1152
+ if (!sfsi_validator(SFSI('input[name="sfsi_telegram_username"]'), 'blank')) {
1153
+ showErrorSuc("error", "Error : Invalid telegram username ", 2);
1154
+ SFSI('input[name="sfsi_telegram_username"]').addClass('inputError');
1155
+ return false;
1156
+ }
1157
+ }
1158
+ /* telegram validation */
1159
+ if (sfsi_validator(SFSI('input[name="sfsi_telegram_display"]'), 'checked')) {
1160
+ if (!sfsi_validator(SFSI('input[name="sfsi_telegram_message"]'), 'blank')) {
1161
+ showErrorSuc("error", "Error : Invalid Message ", 2);
1162
+ SFSI('input[name="sfsi_telegram_message"]').addClass('inputError');
1163
+ return false;
1164
+ }
1165
+ }
1166
+ /* vk validation */
1167
+ if (sfsi_validator(SFSI('input[name="sfsi_vk_display"]'), 'checked')) {
1168
+ if (!sfsi_validator(SFSI('input[name="sfsi_vk_pageURL"]'), 'blank')) {
1169
+ showErrorSuc("error", "Error : Invalid vk url ", 2);
1170
+ SFSI('input[name="sfsi_vk_pageURL"]').addClass('inputError');
1171
+ return false;
1172
+ }
1173
+ }
1174
+ /* ok validation */
1175
+ if (sfsi_validator(SFSI('input[name="sfsi_ok_display"]'), 'checked')) {
1176
+ if (!sfsi_validator(SFSI('input[name="sfsi_ok_pageURL"]'), 'blank')) {
1177
+ showErrorSuc("error", "Error : Invalid ok url ", 2);
1178
+ SFSI('input[name="sfsi_ok_pageURL"]').addClass('inputError');
1179
+ return false;
1180
+ }
1181
+ }
1182
+ /* weibo validation */
1183
+ if (sfsi_validator(SFSI('input[name="sfsi_weibo_display"]'), 'checked')) {
1184
+ if (!sfsi_validator(SFSI('input[name="sfsi_weibo_pageURL"]'), 'blank')) {
1185
+ showErrorSuc("error", "Error : Invalid weibo url ", 2);
1186
+ SFSI('input[name="sfsi_weibo_pageURL"]').addClass('inputError');
1187
+ return false;
1188
+ }
1189
+ }
1190
+ /* LinkedIn validation */
1191
+ if (sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'), 'checked')) {
1192
+ if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_pageURL"]'), 'blank')) {
1193
+ showErrorSuc("error", "Error : Invalid LinkedIn page url ", 2);
1194
+ SFSI('input[name="sfsi_linkedin_pageURL"]').addClass('inputError');
1195
+ return false;
1196
+ }
1197
+ }
1198
+ if (sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'), 'checked')) {
1199
+ if (!sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendProductId"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendCompany"]'), 'blank')) {
1200
+ showErrorSuc("error", "Error : Please Enter Product Id and Company for LinkedIn Recommendation ", 2);
1201
+ SFSI('input[name="sfsi_linkedin_recommendProductId"]').addClass('inputError');
1202
+ SFSI('input[name="sfsi_linkedin_recommendCompany"]').addClass('inputError');
1203
+ return false;
1204
+ }
1205
+ }
1206
+ /* validate custom links */
1207
+ var er = 0;
1208
+ SFSI("input[name='sfsi_CustomIcon_links[]']").each(function () {
1209
+
1210
+ //if(!sfsi_validator(SFSI(this),'blank') || !sfsi_validator(SFSI(SFSI(this)),'url') )
1211
+ if (!sfsi_validator(SFSI(this), 'blank')) {
1212
+ showErrorSuc("error", "Error : Please Enter a valid Custom link ", 2);
1213
+ SFSI(this).addClass('inputError');
1214
+ er = 1;
1215
+ }
1216
+ });
1217
+ if (!er) return true;
1218
+ else return false;
1219
+ }
1220
+
1221
+ function sfsi_validationStep3() {
1222
+ SFSI('input').removeClass('inputError'); // remove previous error
1223
+ /* validate shuffle effect */
1224
+ if (sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked')) {
1225
+ if ((!sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked')) && (!sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1226
+ showErrorSuc("error", "Error : Please Chose a Shuffle option ", 3);
1227
+ SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1228
+ SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1229
+ return false;
1230
+ }
1231
+ }
1232
+ if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'), 'checked') && (sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'), 'checked') || sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked'))) {
1233
+ showErrorSuc("error", "Error : Please check \"Shuffle them automatically\" option also ", 3);
1234
+ SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
1235
+ SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
1236
+ return false;
1237
+ }
1238
+
1239
+ /* validate twitter user name */
1240
+ if (sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'), 'checked')) {
1241
+
1242
+ if (!sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'blank') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'), 'int')) {
1243
+ showErrorSuc("error", "Error : Invalid shuffle time interval", 3);
1244
+ SFSI('input[name="sfsi_shuffle_intervalTime"]').addClass('inputError');
1245
+ return false;
1246
+ }
1247
+ }
1248
+ return true;
1249
+ }
1250
+
1251
+ function sfsi_validationStep4() {
1252
+ //var class_name= SFSI(element).hasAttr('sfsi_validate');
1253
+ /* validate email */
1254
+ if (sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'), 'checked')) {
1255
+ if (SFSI('input[name="sfsi_email_countsFrom"]:checked').val() == 'manual') {
1256
+ if (!sfsi_validator(SFSI('input[name="sfsi_email_manualCounts"]'), 'blank')) {
1257
+ showErrorSuc("error", "Error : Please Enter manual counts for Email icon ", 4);
1258
+ SFSI('input[name="sfsi_email_manualCounts"]').addClass('inputError');
1259
+ return false;
1260
+ }
1261
+ }
1262
+ }
1263
+ /* validate RSS count */
1264
+ if (sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'), 'checked')) {
1265
+ if (!sfsi_validator(SFSI('input[name="sfsi_rss_manualCounts"]'), 'blank')) {
1266
+ showErrorSuc("error", "Error : Please Enter manual counts for Rss icon ", 4);
1267
+ SFSI('input[name="sfsi_rss_countsDisplay"]').addClass('inputError');
1268
+ return false;
1269
+ }
1270
+ }
1271
+ /* validate facebook */
1272
+ if (sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'), 'checked')) {
1273
+ /*if(SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val()=='likes' )
1274
+ {
1275
+ if(!sfsi_validator(SFSI('input[name="sfsi_facebook_PageLink"]'),'blank'))
1276
+ { showErrorSuc("error","Error : Please Enter facebook page Url ",4);
1277
+ SFSI('input[name="sfsi_facebook_PageLink"]').addClass('inputError');
1278
+ return false;
1279
+ }
1280
+ } */
1281
+ if (SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val() == 'manual') {
1282
+ if (!sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'), 'url')) {
1283
+ showErrorSuc("error", "Error : Please Enter a valid facebook manual counts ", 4);
1284
+ SFSI('input[name="sfsi_facebook_manualCounts"]').addClass('inputError');
1285
+ return false;
1286
+ }
1287
+ }
1288
+ }
1289
+
1290
+ /* validate twitter */
1291
+ if (sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'), 'checked')) {
1292
+ if (SFSI('input[name="sfsi_twitter_countsFrom"]:checked').val() == 'source') {
1293
+ if (!sfsi_validator(SFSI('input[name="tw_consumer_key"]'), 'blank')) {
1294
+ showErrorSuc("error", "Error : Please Enter a valid consumer key", 4);
1295
+ SFSI('input[name="tw_consumer_key"]').addClass('inputError');
1296
+ return false;
1297
+ }
1298
+ if (!sfsi_validator(SFSI('input[name="tw_consumer_secret"]'), 'blank')) {
1299
+ showErrorSuc("error", "Error : Please Enter a valid consume secret ", 4);
1300
+ SFSI('input[name="tw_consumer_secret"]').addClass('inputError');
1301
+ return false;
1302
+ }
1303
+ if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token"]'), 'blank')) {
1304
+ showErrorSuc("error", "Error : Please Enter a valid oauth access token", 4);
1305
+ SFSI('input[name="tw_oauth_access_token"]').addClass('inputError');
1306
+ return false;
1307
+ }
1308
+ if (!sfsi_validator(SFSI('input[name="tw_oauth_access_token_secret"]'), 'blank')) {
1309
+ showErrorSuc("error", "Error : Please Enter a oAuth access token secret", 4);
1310
+ SFSI('input[name="tw_oauth_access_token_secret"]').addClass('inputError');
1311
+ return false;
1312
+ }
1313
+ }
1314
+ if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1315
+
1316
+ if (!sfsi_validator(SFSI('input[name="sfsi_twitter_manualCounts"]'), 'blank')) {
1317
+ showErrorSuc("error", "Error : Please Enter Twitter manual counts ", 4);
1318
+ SFSI('input[name="sfsi_twitter_manualCounts"]').addClass('inputError');
1319
+ return false;
1320
+ }
1321
+ }
1322
+ }
1323
+ /* validate LinkedIn */
1324
+ if (sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'), 'checked')) {
1325
+ if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'follower') {
1326
+ if (!sfsi_validator(SFSI('input[name="ln_company"]'), 'blank')) {
1327
+ showErrorSuc("error", "Error : Please Enter a valid company name", 4);
1328
+ SFSI('input[name="ln_company"]').addClass('inputError');
1329
+ return false;
1330
+ }
1331
+ if (!sfsi_validator(SFSI('input[name="ln_api_key"]'), 'blank')) {
1332
+ showErrorSuc("error", "Error : Please Enter a valid API key ", 4);
1333
+ SFSI('input[name="ln_api_key"]').addClass('inputError');
1334
+ return false;
1335
+ }
1336
+ if (!sfsi_validator(SFSI('input[name="ln_secret_key"]'), 'blank')) {
1337
+ showErrorSuc("error", "Error : Please Enter a valid secret ", 4);
1338
+ SFSI('input[name="ln_secret_key"]').addClass('inputError');
1339
+ return false;
1340
+ }
1341
+ if (!sfsi_validator(SFSI('input[name="ln_oAuth_user_token"]'), 'blank')) {
1342
+ showErrorSuc("error", "Error : Please Enter a oAuth Access Token", 4);
1343
+ SFSI('input[name="ln_oAuth_user_token"]').addClass('inputError');
1344
+ return false;
1345
+ }
1346
+ }
1347
+ if (SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val() == 'manual') {
1348
+ if (!sfsi_validator(SFSI('input[name="sfsi_linkedIn_manualCounts"]'), 'blank')) {
1349
+ showErrorSuc("error", "Error : Please Enter LinkedIn manual counts ", 4);
1350
+ SFSI('input[name="sfsi_linkedIn_manualCounts"]').addClass('inputError');
1351
+ return false;
1352
+ }
1353
+ }
1354
+ }
1355
+ /* validate youtube */
1356
+ if (sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'), 'checked')) {
1357
+ if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'subscriber') {
1358
+ if (
1359
+ !sfsi_validator(SFSI('input[name="sfsi_youtube_user"]'), 'blank') &&
1360
+ !sfsi_validator(SFSI('input[name="sfsi_youtube_channelId"]'), 'blank')
1361
+ ) {
1362
+ showErrorSuc("error", "Error : Please Enter a youtube user name or channel id", 4);
1363
+ SFSI('input[name="sfsi_youtube_user"]').addClass('inputError');
1364
+ SFSI('input[name="sfsi_youtube_channelId"]').addClass('inputError');
1365
+ return false;
1366
+ }
1367
+ }
1368
+ if (SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val() == 'manual') {
1369
+ if (!sfsi_validator(SFSI('input[name="sfsi_youtube_manualCounts"]'), 'blank')) {
1370
+ showErrorSuc("error", "Error : Please Enter youtube manual counts ", 4);
1371
+ SFSI('input[name="sfsi_youtube_manualCounts"]').addClass('inputError');
1372
+ return false;
1373
+ }
1374
+ }
1375
+ }
1376
+ /* validate pinterest */
1377
+ if (sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'), 'checked')) {
1378
+ if (SFSI('input[name="sfsi_pinterest_countsFrom"]:checked').val() == 'manual') {
1379
+ if (!sfsi_validator(SFSI('input[name="sfsi_pinterest_manualCounts"]'), 'blank')) {
1380
+ showErrorSuc("error", "Error : Please Enter Pinterest manual counts ", 4);
1381
+ SFSI('input[name="sfsi_pinterest_manualCounts"]').addClass('inputError');
1382
+ return false;
1383
+ }
1384
+ }
1385
+ }
1386
+ /* validate instagram */
1387
+ if (sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'activte') && sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'), 'checked')) {
1388
+ if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'manual') {
1389
+ if (!sfsi_validator(SFSI('input[name="sfsi_instagram_manualCounts"]'), 'blank')) {
1390
+ showErrorSuc("error", "Error : Please Enter Instagram manual counts ", 4);
1391
+ SFSI('input[name="sfsi_instagram_manualCounts"]').addClass('inputError');
1392
+ return false;
1393
+ }
1394
+ }
1395
+ if (SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val() == 'followers') {
1396
+ if (!sfsi_validator(SFSI('input[name="sfsi_instagram_User"]'), 'blank')) {
1397
+ showErrorSuc("error", "Error : Please Enter a instagram user name", 4);
1398
+ SFSI('input[name="sfsi_instagram_User"]').addClass('inputError');
1399
+ return false;
1400
+ }
1401
+ }
1402
+ }
1403
+ return true;
1404
+ }
1405
+
1406
+ function sfsi_validationStep5() {
1407
+ //var class_name= SFSI(element).hasAttr('sfsi_validate');
1408
+ /* validate size */
1409
+ if (!sfsi_validator(SFSI('input[name="sfsi_icons_size"]'), 'int')) {
1410
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1411
+ SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1412
+ return false;
1413
+ }
1414
+ if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) > 100) {
1415
+ showErrorSuc("error", "Error : Icons Size allow 100px maximum ", 5);
1416
+ SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1417
+ return false;
1418
+ }
1419
+ if (parseInt(SFSI('input[name="sfsi_icons_size"]').val()) <= 0) {
1420
+ showErrorSuc("error", "Error : Icons Size should be more than 0 ", 5);
1421
+ SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
1422
+ return false;
1423
+ }
1424
+ /* validate spacing */
1425
+ if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1426
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1427
+ SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1428
+ return false;
1429
+ }
1430
+ if (parseInt(SFSI('input[name="sfsi_icons_spacing"]').val()) < 0) {
1431
+ showErrorSuc("error", "Error : Icons Spacing should be 0 or more", 5);
1432
+ SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1433
+ return false;
1434
+ }
1435
+ /* icons per row spacing */
1436
+ if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1437
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 5);
1438
+ SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1439
+ return false;
1440
+ }
1441
+ if (parseInt(SFSI('input[name="sfsi_icons_perRow"]').val()) <= 0) {
1442
+ showErrorSuc("error", "Error : Icons Per row should be more than 0", 5);
1443
+ SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1444
+ return false;
1445
+ }
1446
+ /* validate icons effects */
1447
+ // if(SFSI('input[name="sfsi_icons_float"]:checked').val()=="yes" && SFSI('input[name="sfsi_icons_stick"]:checked').val()=="yes")
1448
+ // {
1449
+ // showErrorSuc("error","Error : Only one allow from Sticking & floating ",5);
1450
+ // SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", true);
1451
+ // return false;
1452
+ // }
1453
+ return true;
1454
+ }
1455
+
1456
+ function sfsi_validationStep7() {
1457
+ //var class_name= SFSI(element).hasAttr('sfsi_validate');
1458
+ /* validate border thikness */
1459
+ if (!sfsi_validator(SFSI('input[name="sfsi_popup_border_thickness"]'), 'int')) {
1460
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1461
+ SFSI('input[name="sfsi_popup_border_thickness"]').addClass('inputError');
1462
+ return false;
1463
+ }
1464
+ /* validate fotn size */
1465
+ if (!sfsi_validator(SFSI('input[name="sfsi_popup_fontSize"]'), 'int')) {
1466
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1467
+ SFSI('input[name="sfsi_popup_fontSize"]').addClass('inputError');
1468
+ return false;
1469
+ }
1470
+ /* validate pop up shown */
1471
+ if (SFSI('input[name="sfsi_Shown_pop"]:checked').val() == 'once') {
1472
+
1473
+ if (!sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'blank') && !sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'), 'url')) {
1474
+ showErrorSuc("error", "Error : Please Enter a valid pop up shown time ", 7);
1475
+ SFSI('input[name="sfsi_Shown_popupOnceTime"]').addClass('inputError');
1476
+ return false;
1477
+ }
1478
+ }
1479
+ /* validate page ids */
1480
+ if (SFSI('input[name="sfsi_Show_popupOn"]:checked').val() == 'selectedpage') {
1481
+ if (!sfsi_validator(SFSI('input[name="sfsi_Show_popupOn"]'), 'blank')) {
1482
+ showErrorSuc("error", "Error : Please Enter page ids with comma ", 7);
1483
+ SFSI('input[name="sfsi_Show_popupOn"]').addClass('inputError');
1484
+ return false;
1485
+ }
1486
+ }
1487
+ /* validate spacing */
1488
+ if (!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'), 'int')) {
1489
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1490
+ SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
1491
+ return false;
1492
+ }
1493
+ /* icons per row spacing */
1494
+ if (!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'), 'int')) {
1495
+ showErrorSuc("error", "Error : Please enter a numeric value only ", 7);
1496
+ SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
1497
+ return false;
1498
+ }
1499
+ return true;
1500
+ }
1501
+
1502
+ function sfsi_validator(element, valType) {
1503
+ var Vurl = new RegExp("^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\@\?\'\\\+&amp;%\$#\=~_\-]+))*$");
1504
+ //var Vurl = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;
1505
+
1506
+ switch (valType) {
1507
+ case "blank":
1508
+ if (!element.val().trim()) return false;
1509
+ else return true;
1510
+ break;
1511
+ case "url":
1512
+ if (!Vurl.test(element.val().trim())) return false;
1513
+ else return true;
1514
+ break;
1515
+ case "checked":
1516
+ if (!element.attr('checked') === true) return false;
1517
+ else return true;
1518
+ break;
1519
+ case "activte":
1520
+ if (!element.attr('disabled')) return true;
1521
+ else return false;
1522
+ break;
1523
+ case "int":
1524
+ if (!isNaN(element.val())) return true;
1525
+ else return false;
1526
+ break;
1527
+
1528
+ }
1529
+ }
1530
+
1531
+ function afterIconSuccess(s, nonce) {
1532
+ if (s.res = "success") {
1533
+ var i = s.key + 1,
1534
+ e = s.element,
1535
+ t = e + 1;
1536
+ SFSI("#total_cusotm_icons").val(s.element);
1537
+ SFSI(".upload-overlay").hide("slow");
1538
+ SFSI(".uperror").html("");
1539
+ showErrorSuc("success", "Custom Icon updated successfully", 1);
1540
+ d = new Date();
1541
+
1542
+ var ele = SFSI(".notice_custom_icons_premium");
1543
+
1544
+ SFSI("li.custom:last-child").removeClass("bdr_btm_non");
1545
+ SFSI("li.custom:last-child").children("span.custom-img").children("img").attr("src", s.img_path + "?" + d.getTime());
1546
+ SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("ele-type");
1547
+ SFSI("input[name=sfsiICON_" + s.key + "]").removeAttr("isnew");
1548
+ icons_name = SFSI("li.custom:last-child").find("input.styled").attr("name");
1549
+ var n = icons_name.split("_");
1550
+ s.key = s.key, s.img_path += "?" + d.getTime(), 5 > e && SFSI(".icn_listing").append('<li id="c' + i + '" class="custom bdr_btm_non"><div class="radio_section tb_4_ck"><span class="checkbox" dynamic_ele="yes" style="background-position: 0px 0px;"></span><input name="sfsiICON_' + i + '" type="checkbox" value="yes" class="styled" style="display:none;" element-type="cusotm-icon" isNew="yes" /></div> <span class="custom-img"><img src="' + SFSI("#plugin_url").val() + 'images/custom.png" id="CImg_' + i + '" alt="error" /> </span> <span class="custom custom-txt">Custom' + t + ' </span> <div class="right_info"> <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to.</p><div class="inputWrapper"></div></li>'),
1551
+ SFSI(".custom_section").show(),
1552
+ SFSI('<div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" alt="error" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>').insertBefore('.notice_custom_icons_premium');
1553
+ //SFSI(".custom-links").append(' <div class="row sfsiICON_' + s.key + ' cm_lnk"> <h2 class="custom"> <span class="customstep2-img"> <img src="' + s.img_path + "?" + d.getTime() + '" style="border-radius:48%" /> </span> <span class="sfsiCtxt">Custom ' + e + '</span> </h2> <div class="inr_cont "><p>Where do you want this icon to link to?</p> <p class="radio_section fb_url custom_section sfsiICON_' + s.key + '" ><label>Link :</label><input file-id="' + s.key + '" name="sfsi_CustomIcon_links[]" type="text" value="" placeholder="http://" class="add" /></p></div></div>');
1554
+ SFSI(".notice_custom_icons_premium").show();
1555
+ SFSI("#c" + s.key).append('<input type="hidden" name="nonce" value="' + nonce + '">');
1556
+ var o = SFSI("div.custom_m").find("div.mouseover_field").length;
1557
+ SFSI("div.custom_m").append(0 == o % 2 ? '<div class="clear"> </div> <div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>' : '<div class="cHover " ><div class="mouseover_field custom_section sfsiICON_' + s.key + '"><label>Custom ' + e + ':</label><input name="sfsi_custom_MouseOverTexts[]" value="" type="text" file-id="' + s.key + '" /></div>'),
1558
+ SFSI("ul.share_icon_order").append('<li class="custom_iconOrder sfsiICON_' + s.key + '" data-index="" element-id="' + s.key + '" id=""><a href="#" title="Custom Icon" ><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/></a></li>'),
1559
+ SFSI("ul.sfsi_sample_icons").append('<li class="sfsiICON_' + s.key + '" element-id="' + s.key + '" ><div><img src="' + s.img_path + '" alt="Linked In" class="sfcm"/><span class="sfsi_Cdisplay">12k</span></div></li>'),
1560
+ sfsi_update_index(), update_Sec5Iconorder(), sfsi_update_step1(), sfsi_update_step2(),
1561
+ sfsi_update_step5(), SFSI(".upload-overlay").css("pointer-events", "auto"), sfsi_showPreviewCounts(),
1562
+ afterLoad();
1563
+ }
1564
+ }
1565
+
1566
+ function beforeIconSubmit(s) {
1567
+ if (SFSI(".uperror").html("Uploading....."), window.File && window.FileReader && window.FileList && window.Blob) {
1568
+ SFSI(s).val() || SFSI(".uperror").html("File is empty");
1569
+ var i = s.files[0].size,
1570
+ e = s.files[0].type;
1571
+ switch (e) {
1572
+ case "image/png":
1573
+ case "image/gif":
1574
+ case "image/jpeg":
1575
+ case "image/pjpeg":
1576
+ break;
1577
+
1578
+ default:
1579
+ return SFSI(".uperror").html("Unsupported file"), !1;
1580
+ }
1581
+ return i > 1048576 ? (SFSI(".uperror").html("Image should be less than 1 MB"), !1) : !0;
1582
+ }
1583
+ return !0;
1584
+ }
1585
+
1586
+ function bytesToSize(s) {
1587
+ var i = ["Bytes", "KB", "MB", "GB", "TB"];
1588
+ if (0 == s) return "0 Bytes";
1589
+ var e = parseInt(Math.floor(Math.log(s) / Math.log(1024)));
1590
+ return Math.round(s / Math.pow(1024, e), 2) + " " + i[e];
1591
+ }
1592
+
1593
+ function showErrorSuc(s, i, e) {
1594
+ if ("error" == s) var t = "errorMsg";
1595
+ else var t = "sucMsg";
1596
+ return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
1597
+ SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
1598
+ SFSI("." + t).slideUp("slow");
1599
+ }, 5e3), !1;
1600
+ }
1601
+
1602
+ function beForeLoad() {
1603
+ SFSI(".loader-img").show(), SFSI(".save_button >a").html("Saving..."), SFSI(".save_button >a").css("pointer-events", "none");
1604
+ }
1605
+
1606
+ function afterLoad() {
1607
+ SFSI("input").removeClass("inputError"), SFSI(".save_button >a").html("Save"), SFSI(".tab10>div.save_button >a").html("Save All Settings"),
1608
+ SFSI(".save_button >a").css("pointer-events", "auto"), SFSI(".save_button >a").removeAttr("onclick"),
1609
+ SFSI(".loader-img").hide();
1610
+ }
1611
+
1612
+ function sfsi_make_popBox() {
1613
+ var s = 0;
1614
+ SFSI(".sfsi_sample_icons >li").each(function () {
1615
+ "none" != SFSI(this).css("display") && (s = 1);
1616
+ }),
1617
+ 0 == s ? SFSI(".sfsi_Popinner").hide() : SFSI(".sfsi_Popinner").show(),
1618
+ "" != SFSI('input[name="sfsi_popup_text"]').val() ? (SFSI(".sfsi_Popinner >h2").html(SFSI('input[name="sfsi_popup_text"]').val()),
1619
+ SFSI(".sfsi_Popinner >h2").show()) : SFSI(".sfsi_Popinner >h2").hide(), SFSI(".sfsi_Popinner").css({
1620
+ "border-color": SFSI('input[name="sfsi_popup_border_color"]').val(),
1621
+ "border-width": SFSI('input[name="sfsi_popup_border_thickness"]').val(),
1622
+ "border-style": "solid"
1623
+ }),
1624
+ SFSI(".sfsi_Popinner").css("background-color", SFSI('input[name="sfsi_popup_background_color"]').val()),
1625
+ SFSI(".sfsi_Popinner h2").css("font-family", SFSI("#sfsi_popup_font").val()), SFSI(".sfsi_Popinner h2").css("font-style", SFSI("#sfsi_popup_fontStyle").val()),
1626
+ SFSI(".sfsi_Popinner >h2").css("font-size", parseInt(SFSI('input[name="sfsi_popup_fontSize"]').val())),
1627
+ SFSI(".sfsi_Popinner >h2").css("color", SFSI('input[name="sfsi_popup_fontColor"]').val() + " !important"),
1628
+ "yes" == SFSI('input[name="sfsi_popup_border_shadow"]:checked').val() ? SFSI(".sfsi_Popinner").css("box-shadow", "12px 30px 18px #CCCCCC") : SFSI(".sfsi_Popinner").css("box-shadow", "none");
1629
+ }
1630
+
1631
+ function sfsi_stick_widget(s) {
1632
+ 0 == initTop.length && (SFSI(".sfsi_widget").each(function (s) {
1633
+ initTop[s] = SFSI(this).position().top;
1634
+ }), console.log(initTop));
1635
+ var i = SFSI(window).scrollTop(),
1636
+ e = [],
1637
+ t = [];
1638
+ SFSI(".sfsi_widget").each(function (s) {
1639
+ e[s] = SFSI(this).position().top, t[s] = SFSI(this);
1640
+ });
1641
+ var n = !1;
1642
+ for (var o in e) {
1643
+ var a = parseInt(o) + 1;
1644
+ e[o] < i && e[a] > i && a < e.length ? (SFSI(t[o]).css({
1645
+ position: "fixed",
1646
+ top: s
1647
+ }), SFSI(t[a]).css({
1648
+ position: "",
1649
+ top: initTop[a]
1650
+ }), n = !0) : SFSI(t[o]).css({
1651
+ position: "",
1652
+ top: initTop[o]
1653
+ });
1654
+ }
1655
+ if (!n) {
1656
+ var r = e.length - 1,
1657
+ c = -1;
1658
+ e.length > 1 && (c = e.length - 2), initTop[r] < i ? (SFSI(t[r]).css({
1659
+ position: "fixed",
1660
+ top: s
1661
+ }), c >= 0 && SFSI(t[c]).css({
1662
+ position: "",
1663
+ top: initTop[c]
1664
+ })) : (SFSI(t[r]).css({
1665
+ position: "",
1666
+ top: initTop[r]
1667
+ }), c >= 0 && e[c] < i);
1668
+ }
1669
+ }
1670
+
1671
+ function sfsi_setCookie(s, i, e) {
1672
+ var t = new Date();
1673
+ t.setTime(t.getTime() + 1e3 * 60 * 60 * 24 * e);
1674
+ var n = "expires=" + t.toGMTString();
1675
+ document.cookie = s + "=" + i + "; " + n;
1676
+ }
1677
+
1678
+ function sfsfi_getCookie(s) {
1679
+ for (var i = s + "=", e = document.cookie.split(";"), t = 0; t < e.length; t++) {
1680
+ var n = e[t].trim();
1681
+ if (0 == n.indexOf(i)) return n.substring(i.length, n.length);
1682
+ }
1683
+ return "";
1684
+ }
1685
+
1686
+ function sfsi_hideFooter() {}
1687
+
1688
+ window.onerror = function () {},
1689
+ SFSI = jQuery,
1690
+ SFSI(window).on('load', function () {
1691
+ SFSI("#sfpageLoad").fadeOut(2e3);
1692
+ });
1693
+
1694
+ //changes done {Monad}
1695
+ function selectText(containerid) {
1696
+ if (document.selection) {
1697
+ var range = document.body.createTextRange();
1698
+ range.moveToElementText(document.getElementById(containerid));
1699
+ range.select();
1700
+ } else if (window.getSelection()) {
1701
+ var range = document.createRange();
1702
+ range.selectNode(document.getElementById(containerid));
1703
+ window.getSelection().removeAllRanges();
1704
+ window.getSelection().addRange(range);
1705
+ }
1706
+ }
1707
+
1708
+ function create_suscriber_form() {
1709
+ //Popbox customization
1710
+ "no" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1711
+ "width": parseInt(SFSI('input[name="sfsi_form_width"]').val()),
1712
+ "height": parseInt(SFSI('input[name="sfsi_form_height"]').val())
1713
+ }) : SFSI(".sfsi_subscribe_Popinner").css({
1714
+ "width": '',
1715
+ "height": ''
1716
+ });
1717
+
1718
+ "yes" == SFSI('input[name="sfsi_form_adjustment"]:checked').val() ? SFSI(".sfsi_html > .sfsi_subscribe_Popinner").css({
1719
+ "width": "100%"
1720
+ }) : '';
1721
+
1722
+ "yes" == SFSI('input[name="sfsi_form_border"]:checked').val() ? SFSI(".sfsi_subscribe_Popinner").css({
1723
+ "border": SFSI('input[name="sfsi_form_border_thickness"]').val() + "px solid " + SFSI('input[name="sfsi_form_border_color"]').val()
1724
+ }) : SFSI(".sfsi_subscribe_Popinner").css("border", "none");
1725
+
1726
+ SFSI('input[name="sfsi_form_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").css("background-color", SFSI('input[name="sfsi_form_background"]').val())) : '';
1727
+
1728
+ //Heading customization
1729
+ SFSI('input[name="sfsi_form_heading_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").html(SFSI('input[name="sfsi_form_heading_text"]').val())) : SFSI(".sfsi_subscribe_Popinner > form > h5").html('');
1730
+
1731
+ SFSI('#sfsi_form_heading_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-family", SFSI("#sfsi_form_heading_font").val())) : '';
1732
+
1733
+ if (SFSI('#sfsi_form_heading_fontstyle').val() != 'bold') {
1734
+ SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", SFSI("#sfsi_form_heading_fontstyle").val())) : '';
1735
+ SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", '');
1736
+ } else {
1737
+ SFSI('#sfsi_form_heading_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-weight", "bold")) : '';
1738
+ SFSI(".sfsi_subscribe_Popinner > form > h5").css("font-style", '');
1739
+ }
1740
+
1741
+ SFSI('input[name="sfsi_form_heading_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("color", SFSI('input[name="sfsi_form_heading_fontcolor"]').val())) : '';
1742
+
1743
+ SFSI('input[name="sfsi_form_heading_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css({
1744
+ "font-size": parseInt(SFSI('input[name="sfsi_form_heading_fontsize"]').val())
1745
+ })) : '';
1746
+
1747
+ SFSI('#sfsi_form_heading_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner > form > h5").css("text-align", SFSI("#sfsi_form_heading_fontalign").val())) : '';
1748
+
1749
+ //Field customization
1750
+ SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').attr("placeholder", '');
1751
+
1752
+ SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".sfsi_left_container > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1753
+
1754
+ SFSI('input[name="sfsi_form_field_text"]').val() != "" ? (SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val(SFSI('input[name="sfsi_form_field_text"]').val())) : SFSI(".like_pop_box > .sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').val('');
1755
+
1756
+ SFSI('#sfsi_form_field_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-family", SFSI("#sfsi_form_field_font").val())) : '';
1757
+
1758
+ if (SFSI('#sfsi_form_field_fontstyle').val() != "bold") {
1759
+ SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", SFSI("#sfsi_form_field_fontstyle").val())) : '';
1760
+ SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", '');
1761
+ } else {
1762
+ SFSI('#sfsi_form_field_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-weight", 'bold')) : '';
1763
+ SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("font-style", '');
1764
+ }
1765
+
1766
+ SFSI('input[name="sfsi_form_field_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("color", SFSI('input[name="sfsi_form_field_fontcolor"]').val())) : '';
1767
+
1768
+ SFSI('input[name="sfsi_form_field_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css({
1769
+ "font-size": parseInt(SFSI('input[name="sfsi_form_field_fontsize"]').val())
1770
+ })) : '';
1771
+
1772
+ SFSI('#sfsi_form_field_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="data[Widget][email]"]').css("text-align", SFSI("#sfsi_form_field_fontalign").val())) : '';
1773
+
1774
+ //Button customization
1775
+ SFSI('input[name="sfsi_form_button_text"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').attr("value", SFSI('input[name="sfsi_form_button_text"]').val())) : '';
1776
+
1777
+ SFSI('#sfsi_form_button_font').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-family", SFSI("#sfsi_form_button_font").val())) : '';
1778
+
1779
+ if (SFSI('#sfsi_form_button_fontstyle').val() != "bold") {
1780
+ SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", SFSI("#sfsi_form_button_fontstyle").val())) : '';
1781
+ SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", '');
1782
+ } else {
1783
+ SFSI('#sfsi_form_button_fontstyle').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-weight", 'bold')) : '';
1784
+ SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("font-style", '');
1785
+ }
1786
+
1787
+ SFSI('input[name="sfsi_form_button_fontcolor"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("color", SFSI('input[name="sfsi_form_button_fontcolor"]').val())) : '';
1788
+
1789
+ SFSI('input[name="sfsi_form_button_fontsize"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css({
1790
+ "font-size": parseInt(SFSI('input[name="sfsi_form_button_fontsize"]').val())
1791
+ })) : '';
1792
+
1793
+ SFSI('#sfsi_form_button_fontalign').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("text-align", SFSI("#sfsi_form_button_fontalign").val())) : '';
1794
+
1795
+ SFSI('input[name="sfsi_form_button_background"]').val() != "" ? (SFSI(".sfsi_subscribe_Popinner").find('input[name="subscribe"]').css("background-color", SFSI('input[name="sfsi_form_button_background"]').val())) : '';
1796
+
1797
+ var innerHTML = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").html();
1798
+ var styleCss = SFSI(".sfsi_html > .sfsi_subscribe_Popinner").attr("style");
1799
+ innerHTML = '<div style="' + styleCss + '">' + innerHTML + '</div>';
1800
+ SFSI(".sfsi_subscription_html > xmp").html(innerHTML);
1801
+
1802
+ /*var data = {
1803
+ action:"getForm",
1804
+ heading: SFSI('input[name="sfsi_form_heading_text"]').val(),
1805
+ placeholder:SFSI('input[name="sfsi_form_field_text"]').val(),
1806
+ button:SFSI('input[name="sfsi_form_button_text"]').val()
1807
+ };
1808
+ SFSI.ajax({
1809
+ url:sfsi_icon_ajax_object.ajax_url,
1810
+ type:"post",
1811
+ data:data,
1812
+ success:function(s) {
1813
+ SFSI(".sfsi_subscription_html").html(s);
1814
+ }
1815
+ });*/
1816
+ }
1817
+
1818
+ var global_error = 0;
1819
+ if (typeof SFSI != 'undefined') {
1820
+
1821
+ function sfsi_dismiss_notice(btnClass, ajaxAction) {
1822
+
1823
+ var btnClass = "." + btnClass;
1824
+
1825
+ SFSI(document).on("click", btnClass, function () {
1826
+
1827
+ SFSI.ajax({
1828
+ url: sfsi_icon_ajax_object.ajax_url,
1829
+ type: "post",
1830
+ data: {
1831
+ action: ajaxAction
1832
+ },
1833
+ success: function (e) {
1834
+ if (false != e) {
1835
+ SFSI(btnClass).parent().remove();
1836
+ }
1837
+ }
1838
+ });
1839
+ });
1840
+ }
1841
+ }
1842
+
1843
+ SFSI(document).ready(function (s) {
1844
+
1845
+ var arrDismiss = [
1846
+
1847
+ {
1848
+ "btnClass": "sfsi-notice-dismiss",
1849
+ "action": "sfsi_dismiss_lang_notice"
1850
+ },
1851
+
1852
+ {
1853
+ "btnClass": "sfsi-AddThis-notice-dismiss",
1854
+ "action": "sfsi_dismiss_addThis_icon_notice"
1855
+ },
1856
+
1857
+ {
1858
+ "btnClass": "sfsi_error_reporting_notice-dismiss",
1859
+ "action": "sfsi_dismiss_error_reporting_notice"
1860
+ }
1861
+ ];
1862
+
1863
+ SFSI.each(arrDismiss, function (key, valueObj) {
1864
+ sfsi_dismiss_notice(valueObj.btnClass, valueObj.action);
1865
+ });
1866
+
1867
+ //changes done {Monad}
1868
+ SFSI(".tab_3_icns").on("click", ".cstomskins_upload", function () {
1869
+ SFSI(".cstmskins-overlay").show("slow", function () {
1870
+ e = 0;
1871
+ });
1872
+ });
1873
+ /*SFSI("#custmskin_clspop").live("click", function() {*/
1874
+ SFSI(document).on("click", '#custmskin_clspop', function () {
1875
+ SFSI_done();
1876
+ SFSI(".cstmskins-overlay").hide("slow");
1877
+ });
1878
+
1879
+ create_suscriber_form();
1880
+ SFSI('input[name="sfsi_form_heading_text"], input[name="sfsi_form_border_thickness"], input[name="sfsi_form_height"], input[name="sfsi_form_width"], input[name="sfsi_form_heading_fontsize"], input[name="sfsi_form_field_text"], input[name="sfsi_form_field_fontsize"], input[name="sfsi_form_button_text"], input[name="sfsi_form_button_fontsize"]').on("keyup", create_suscriber_form);
1881
+
1882
+ SFSI('input[name="sfsi_form_border_color"], input[name="sfsi_form_background"] ,input[name="sfsi_form_heading_fontcolor"], input[name="sfsi_form_field_fontcolor"] ,input[name="sfsi_form_button_fontcolor"],input[name="sfsi_form_button_background"]').on("focus", create_suscriber_form);
1883
+
1884
+ SFSI("#sfsi_form_heading_font, #sfsi_form_heading_fontstyle, #sfsi_form_heading_fontalign, #sfsi_form_field_font, #sfsi_form_field_fontstyle, #sfsi_form_field_fontalign, #sfsi_form_button_font, #sfsi_form_button_fontstyle, #sfsi_form_button_fontalign").on("change", create_suscriber_form);
1885
+
1886
+ /*SFSI(".radio").live("click", function() {*/
1887
+ SFSI(document).on("click", '.radio', function () {
1888
+
1889
+ var s = SFSI(this).parent().find("input:radio:first");
1890
+
1891
+ var inputName = s.attr("name");
1892
+ var inputChecked = s.attr("checked");
1893
+
1894
+ switch (inputName) {
1895
+ case 'sfsi_form_adjustment':
1896
+ if (s.val() == 'no')
1897
+ s.parents(".row_tab").next(".row_tab").show("fast");
1898
+ else
1899
+ s.parents(".row_tab").next(".row_tab").hide("fast");
1900
+ create_suscriber_form()
1901
+ break;
1902
+ case 'sfsi_form_border':
1903
+ if (s.val() == 'yes')
1904
+ s.parents(".row_tab").next(".row_tab").show("fast");
1905
+ else
1906
+ s.parents(".row_tab").next(".row_tab").hide("fast");
1907
+ create_suscriber_form()
1908
+ break;
1909
+ case 'sfsi_icons_suppress_errors':
1910
+
1911
+ SFSI('input[name="sfsi_icons_suppress_errors"]').removeAttr('checked');
1912
+
1913
+ if (s.val() == 'yes')
1914
+ SFSI('input[name="sfsi_icons_suppress_errors"][value="yes"]').attr('checked', 'true');
1915
+ else
1916
+ SFSI('input[name="sfsi_icons_suppress_errors"][value="no"]').attr('checked', 'true');
1917
+ break;
1918
+
1919
+ default:
1920
+ case 'sfsi_responsive_icons_end_post':
1921
+ if("yes" == s.val()){
1922
+ jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').show();
1923
+ }else{
1924
+ jQuery('.sfsi_responsive_icon_option_li.sfsi_responsive_show').hide();
1925
+ }
1926
+ }
1927
+ });
1928
+
1929
+ SFSI('#sfsi_form_border_color').wpColorPicker({
1930
+ defaultColor: false,
1931
+ change: function (event, ui) {
1932
+ create_suscriber_form()
1933
+ },
1934
+ clear: function () {
1935
+ create_suscriber_form()
1936
+ },
1937
+ hide: true,
1938
+ palettes: true
1939
+ }),
1940
+ SFSI('#sfsi_form_background').wpColorPicker({
1941
+ defaultColor: false,
1942
+ change: function (event, ui) {
1943
+ create_suscriber_form()
1944
+ },
1945
+ clear: function () {
1946
+ create_suscriber_form()
1947
+ },
1948
+ hide: true,
1949
+ palettes: true
1950
+ }),
1951
+ SFSI('#sfsi_form_heading_fontcolor').wpColorPicker({
1952
+ defaultColor: false,
1953
+ change: function (event, ui) {
1954
+ create_suscriber_form()
1955
+ },
1956
+ clear: function () {
1957
+ create_suscriber_form()
1958
+ },
1959
+ hide: true,
1960
+ palettes: true
1961
+ }),
1962
+ SFSI('#sfsi_form_button_fontcolor').wpColorPicker({
1963
+ defaultColor: false,
1964
+ change: function (event, ui) {
1965
+ create_suscriber_form()
1966
+ },
1967
+ clear: function () {
1968
+ create_suscriber_form()
1969
+ },
1970
+ hide: true,
1971
+ palettes: true
1972
+ }),
1973
+ SFSI('#sfsi_form_button_background').wpColorPicker({
1974
+ defaultColor: false,
1975
+ change: function (event, ui) {
1976
+ create_suscriber_form()
1977
+ },
1978
+ clear: function () {
1979
+ create_suscriber_form()
1980
+ },
1981
+ hide: true,
1982
+ palettes: true
1983
+ });
1984
+ //changes done {Monad}
1985
+
1986
+ function i() {
1987
+ SFSI(".uperror").html(""), afterLoad();
1988
+ var s = SFSI('input[name="' + SFSI("#upload_id").val() + '"]');
1989
+ s.removeAttr("checked");
1990
+ var i = SFSI(s).parent().find("span:first");
1991
+ return SFSI(i).css("background-position", "0px 0px"), SFSI(".upload-overlay").hide("slow"),
1992
+ !1;
1993
+ }
1994
+ SFSI("#accordion").accordion({
1995
+ collapsible: !0,
1996
+ active: !1,
1997
+ heightStyle: "content",
1998
+ event: "click",
1999
+ beforeActivate: function (s, i) {
2000
+ if (i.newHeader[0]) var e = i.newHeader,
2001
+ t = e.next(".ui-accordion-content");
2002
+ else var e = i.oldHeader,
2003
+ t = e.next(".ui-accordion-content");
2004
+ var n = "true" == e.attr("aria-selected");
2005
+ return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2006
+ e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2007
+ t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2008
+ }
2009
+ }),
2010
+ SFSI("#accordion1").accordion({
2011
+ collapsible: !0,
2012
+ active: !1,
2013
+ heightStyle: "content",
2014
+ event: "click",
2015
+ beforeActivate: function (s, i) {
2016
+ if (i.newHeader[0]) var e = i.newHeader,
2017
+ t = e.next(".ui-accordion-content");
2018
+ else var e = i.oldHeader,
2019
+ t = e.next(".ui-accordion-content");
2020
+ var n = "true" == e.attr("aria-selected");
2021
+ return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2022
+ e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2023
+ t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2024
+ }
2025
+ }),
2026
+
2027
+ SFSI("#accordion2").accordion({
2028
+ collapsible: !0,
2029
+ active: !1,
2030
+ heightStyle: "content",
2031
+ event: "click",
2032
+ beforeActivate: function (s, i) {
2033
+ if (i.newHeader[0]) var e = i.newHeader,
2034
+ t = e.next(".ui-accordion-content");
2035
+ else var e = i.oldHeader,
2036
+ t = e.next(".ui-accordion-content");
2037
+ var n = "true" == e.attr("aria-selected");
2038
+ return e.toggleClass("ui-corner-all", n).toggleClass("accordion-header-active ui-state-active ui-corner-top", !n).attr("aria-selected", (!n).toString()),
2039
+ e.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", n).toggleClass("ui-icon-triangle-1-s", !n),
2040
+ t.toggleClass("accordion-content-active", !n), n ? t.slideUp() : t.slideDown(), !1;
2041
+ }
2042
+ }),
2043
+ SFSI(".closeSec").on("click", function () {
2044
+ var s = !0,
2045
+ i = SFSI(this).closest("div.ui-accordion-content").prev("h3.ui-accordion-header").first(),
2046
+ e = SFSI(this).closest("div.ui-accordion-content").first();
2047
+ i.toggleClass("ui-corner-all", s).toggleClass("accordion-header-active ui-state-active ui-corner-top", !s).attr("aria-selected", (!s).toString()),
2048
+ i.children(".ui-icon").toggleClass("ui-icon-triangle-1-e", s).toggleClass("ui-icon-triangle-1-s", !s),
2049
+ e.toggleClass("accordion-content-active", !s), s ? e.slideUp() : e.slideDown();
2050
+ }),
2051
+ SFSI(document).click(function (s) {
2052
+ var i = SFSI(".sfsi_FrntInner_chg"),
2053
+ e = SFSI(".sfsi_wDiv"),
2054
+ t = SFSI("#at15s");
2055
+ i.is(s.target) || 0 !== i.has(s.target).length || e.is(s.target) || 0 !== e.has(s.target).length || t.is(s.target) || 0 !== t.has(s.target).length || i.fadeOut();
2056
+ }),
2057
+ SFSI('#sfsi_popup_background_color').wpColorPicker({
2058
+ defaultColor: false,
2059
+ change: function (event, ui) {
2060
+ sfsi_make_popBox()
2061
+ },
2062
+ clear: function () {
2063
+ sfsi_make_popBox()
2064
+ },
2065
+ hide: true,
2066
+ palettes: true
2067
+ }),
2068
+ SFSI('#sfsi_popup_border_color').wpColorPicker({
2069
+ defaultColor: false,
2070
+ change: function (event, ui) {
2071
+ sfsi_make_popBox()
2072
+ },
2073
+ clear: function () {
2074
+ sfsi_make_popBox()
2075
+ },
2076
+ hide: true,
2077
+ palettes: true
2078
+ }),
2079
+ SFSI('#sfsi_popup_fontColor').wpColorPicker({
2080
+ defaultColor: false,
2081
+ change: function (event, ui) {
2082
+ sfsi_make_popBox()
2083
+ },
2084
+ clear: function () {
2085
+ sfsi_make_popBox()
2086
+ },
2087
+ hide: true,
2088
+ palettes: true
2089
+ }),
2090
+ SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseover(function () {
2091
+ SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn_hover.svg");
2092
+ }),
2093
+ SFSI("div#sfsiid_linkedin").find(".icon4").find("a").find("img").mouseleave(function () {
2094
+ SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/linkedIn.svg");
2095
+ }),
2096
+ SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseover(function () {
2097
+ SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube_hover.svg");
2098
+ }),
2099
+ SFSI("div#sfsiid_youtube").find(".icon1").find("a").find("img").mouseleave(function () {
2100
+ SFSI(this).attr("src", sfsi_icon_ajax_object.plugin_url + "images/visit_icons/youtube.svg");
2101
+ }),
2102
+ SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseover(function () {
2103
+ SFSI(this).css("opacity", "0.9");
2104
+ }),
2105
+ SFSI("div#sfsiid_facebook").find(".icon1").find("a").find("img").mouseleave(function () {
2106
+ SFSI(this).css("opacity", "1");
2107
+ }),
2108
+ SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseover(function () {
2109
+ SFSI(this).css("opacity", "0.9");
2110
+ }),
2111
+ SFSI("div#sfsiid_twitter").find(".cstmicon1").find("a").find("img").mouseleave(function () {
2112
+ SFSI(this).css("opacity", "1");
2113
+ }),
2114
+ SFSI("#sfsi_save1").on("click", function () {
2115
+ // console.log('save1',sfsi_update_step1());
2116
+ sfsi_update_step1() && sfsicollapse(this);
2117
+ }),
2118
+ SFSI("#sfsi_save2").on("click", function () {
2119
+ sfsi_update_step2() && sfsicollapse(this);
2120
+ }),
2121
+ SFSI("#sfsi_save3").on("click", function () {
2122
+ sfsi_update_step3() && sfsicollapse(this);
2123
+ }),
2124
+ SFSI("#sfsi_save4").on("click", function () {
2125
+ sfsi_update_step4() && sfsicollapse(this);
2126
+ }),
2127
+ SFSI("#sfsi_save5").on("click", function () {
2128
+ sfsi_update_step5() && sfsicollapse(this);
2129
+ }),
2130
+ SFSI("#sfsi_save6").on("click", function () {
2131
+ sfsi_update_step6() && sfsicollapse(this);
2132
+ }),
2133
+ SFSI("#sfsi_save7").on("click", function () {
2134
+ sfsi_update_step7() && sfsicollapse(this);
2135
+ }),
2136
+ SFSI("#sfsi_save8").on("click", function () {
2137
+ sfsi_update_step8() && sfsicollapse(this);
2138
+ }),
2139
+ SFSI("#sfsi_save9").on("click", function () {
2140
+ sfsi_update_step9() && sfsicollapse(this);
2141
+ }),
2142
+ SFSI("#save_all_settings").on("click", function () {
2143
+ return SFSI("#save_all_settings").text("Saving.."), SFSI(".save_button >a").css("pointer-events", "none"),
2144
+ sfsi_update_step1(), sfsi_update_step8(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Which icons do you want to show on your site?" tab.', 8),
2145
+ global_error = 0, !1) : (sfsi_update_step2(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What do you want the icons to do?" tab.', 8),
2146
+ global_error = 0, !1) : (sfsi_update_step3(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "What design & animation do you want to give your icons?" tab.', 8),
2147
+ global_error = 0, !1) : (sfsi_update_step4(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display "counts" next to your icons?" tab.', 8),
2148
+ global_error = 0, !1) : (sfsi_update_step5(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Any other wishes for your main icons?" tab.', 8),
2149
+ global_error = 0, !1) : (sfsi_update_step6(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display icons at the end of every post?" tab.', 8),
2150
+ global_error = 0, !1) : (sfsi_update_step7(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Do you want to display a pop-up, asking people to subscribe?" tab.', 8),
2151
+ /*global_error = 0, !1) :void (0 == global_error && showErrorSuc("success", 'Saved! Now go to the <a href="widgets.php">widget</a> area and place the widget into your sidebar (if not done already)', 8))))))));*/
2152
+ global_error = 0, !1) : void(0 == global_error && showErrorSuc("success", '', 8))))))));
2153
+ }),
2154
+ /*SFSI(".fileUPInput").live("change", function() {*/
2155
+ SFSI(document).on("change", '.fileUPInput', function () {
2156
+ beForeLoad(), beforeIconSubmit(this) && (SFSI(".upload-overlay").css("pointer-events", "none"),
2157
+ SFSI("#customIconFrm").ajaxForm({
2158
+ dataType: "json",
2159
+ success: afterIconSuccess,
2160
+ resetForm: !0
2161
+ }).submit());
2162
+ }),
2163
+ SFSI(".pop-up").on("click", function () {
2164
+ ("fbex-s2" == SFSI(this).attr("data-id") || "linkex-s2" == SFSI(this).attr("data-id")) && (SFSI("." + SFSI(this).attr("data-id")).hide(),
2165
+ SFSI("." + SFSI(this).attr("data-id")).css("opacity", "1"), SFSI("." + SFSI(this).attr("data-id")).css("z-index", "1000")),
2166
+ SFSI("." + SFSI(this).attr("data-id")).show("slow");
2167
+ }),
2168
+ /*SFSI("#close_popup").live("click", function() {*/
2169
+ SFSI(document).on("click", '#close_popup', function () {
2170
+ SFSI(".read-overlay").hide("slow");
2171
+ });
2172
+
2173
+ var e = 0;
2174
+ SFSI(".icn_listing").on("click", ".checkbox", function () {
2175
+ if (1 == e) return !1;
2176
+ "yes" == SFSI(this).attr("dynamic_ele") && (s = SFSI(this).parent().find("input:checkbox:first"),
2177
+ s.is(":checked") ? SFSI(s).attr("checked", !1) : SFSI(s).attr("checked", !0)), s = SFSI(this).parent().find("input:checkbox:first"),
2178
+ "yes" == SFSI(s).attr("isNew") && ("0px 0px" == SFSI(this).css("background-position") ? (SFSI(s).attr("checked", !0),
2179
+ SFSI(this).css("background-position", "0px -36px")) : (SFSI(s).removeAttr("checked", !0),
2180
+ SFSI(this).css("background-position", "0px 0px")));
2181
+ var s = SFSI(this).parent().find("input:checkbox:first");
2182
+ if (s.is(":checked") && "cusotm-icon" == s.attr("element-type")) SFSI(".fileUPInput").attr("name", "custom_icons[]"),
2183
+ SFSI(".upload-overlay").show("slow", function () {
2184
+ e = 0;
2185
+ }), SFSI("#upload_id").val(s.attr("name"));
2186
+ else if (!s.is(":checked") && "cusotm-icon" == s.attr("element-type")) return s.attr("ele-type") ? (SFSI(this).attr("checked", !0),
2187
+ SFSI(this).css("background-position", "0px -36px"), e = 0, !1) : confirm("Are you sure want to delete this Icon..?? ") ? "suc" == sfsi_delete_CusIcon(this, s) ? (s.attr("checked", !1),
2188
+ SFSI(this).css("background-position", "0px 0px"), e = 0, !1) : (e = 0, !1) : (s.attr("checked", !0),
2189
+ SFSI(this).css("background-position", "0px -36px"), e = 0, !1);
2190
+ }),
2191
+ SFSI(".icn_listing").on("click", ".checkbox", function () {
2192
+ checked = SFSI(this).parent().find("input:checkbox:first"), "sfsi_email_display" != checked.attr("name") || checked.is(":checked") || SFSI(".demail-1").show("slow");
2193
+ }),
2194
+ SFSI("#deac_email2").on("click", function () {
2195
+ SFSI(".demail-1").hide("slow"), SFSI(".demail-2").show("slow");
2196
+ }),
2197
+ SFSI("#deac_email3").on("click", function () {
2198
+ SFSI(".demail-2").hide("slow"), SFSI(".demail-3").show("slow");
2199
+ }),
2200
+ SFSI(".hideemailpop").on("click", function () {
2201
+ SFSI('input[name="sfsi_email_display"]').attr("checked", !0), SFSI('input[name="sfsi_email_display"]').parent().find("span:first").css("background-position", "0px -36px"),
2202
+ SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2203
+ }),
2204
+ SFSI(".hidePop").on("click", function () {
2205
+ SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"), SFSI(".demail-3").hide("slow");
2206
+ }),
2207
+ SFSI(".activate_footer").on("click", function () {
2208
+ var nonce = SFSI(this).attr("data-nonce");
2209
+ SFSI(this).text("activating....");
2210
+ var s = {
2211
+ action: "activateFooter",
2212
+ nonce: nonce
2213
+ };
2214
+ SFSI.ajax({
2215
+ url: sfsi_icon_ajax_object.ajax_url,
2216
+ type: "post",
2217
+ data: s,
2218
+ dataType: "json",
2219
+ success: function (s) {
2220
+ if (s.res == "wrong_nonce") {
2221
+ SFSI(".activate_footer").css("font-size", "18px");
2222
+ SFSI(".activate_footer").text("Unauthorised Request, Try again after refreshing page");
2223
+ } else {
2224
+ "success" == s.res && (SFSI(".demail-1").hide("slow"), SFSI(".demail-2").hide("slow"),
2225
+ SFSI(".demail-3").hide("slow"), SFSI(".activate_footer").text("Ok, activate link"));
2226
+ }
2227
+ }
2228
+ });
2229
+ }),
2230
+ SFSI(".sfsi_removeFooter").on("click", function () {
2231
+ var nonce = SFSI(this).attr("data-nonce");
2232
+ SFSI(this).text("working....");
2233
+ var s = {
2234
+ action: "removeFooter",
2235
+ nonce: nonce
2236
+ };
2237
+ SFSI.ajax({
2238
+ url: sfsi_icon_ajax_object.ajax_url,
2239
+ type: "post",
2240
+ data: s,
2241
+ dataType: "json",
2242
+ success: function (s) {
2243
+ if (s.res == "wrong_nonce") {
2244
+ SFSI(".sfsi_removeFooter").text("Unauthorised Request, Try again after refreshing page");
2245
+ } else {
2246
+ "success" == s.res && (SFSI(".sfsi_removeFooter").fadeOut("slow"), SFSI(".sfsi_footerLnk").fadeOut("slow"));
2247
+ }
2248
+ }
2249
+ });
2250
+ }),
2251
+ /*SFSI(".radio").live("click", function() {*/
2252
+ SFSI(document).on("click", '.radio', function () {
2253
+ var s = SFSI(this).parent().find("input:radio:first");
2254
+ "sfsi_display_counts" == s.attr("name") && sfsi_show_counts();
2255
+ }),
2256
+ SFSI("#close_Uploadpopup").on("click", i), /*SFSI(".radio").live("click", function() {*/ SFSI(document).on("click", '.radio', function () {
2257
+ var s = SFSI(this).parent().find("input:radio:first");
2258
+ "sfsi_show_Onposts" == s.attr("name") && sfsi_show_OnpostsDisplay();
2259
+ }),
2260
+ sfsi_show_OnpostsDisplay(), sfsi_depened_sections(), sfsi_show_counts(), sfsi_showPreviewCounts(),
2261
+ SFSI(".share_icon_order").sortable({
2262
+ update: function () {
2263
+ SFSI(".share_icon_order li").each(function () {
2264
+ SFSI(this).attr("data-index", SFSI(this).index() + 1);
2265
+ });
2266
+ },
2267
+ revert: !0
2268
+ }),
2269
+
2270
+ //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post STARTS -------------------------------------//
2271
+
2272
+ SFSI(document).on("click", '.checkbox', function () {
2273
+
2274
+ var s = SFSI(this).parent().find("input:checkbox:first");
2275
+ var backgroundPos = jQuery(this).css('background-position').split(" ");
2276
+ var xPos = backgroundPos[0],
2277
+ yPos = backgroundPos[1];
2278
+
2279
+ var inputName = s.attr('name');
2280
+ var inputChecked = s.attr("checked");
2281
+
2282
+ switch (inputName) {
2283
+
2284
+ case "sfsi_custom_social_hide":
2285
+
2286
+ var val = (yPos == "0px") ? "no" : "yes";
2287
+ SFSI('input[name="sfsi_custom_social_hide"]').val(val);
2288
+
2289
+ break;
2290
+
2291
+ case "sfsi_show_via_widget":
2292
+ case "sfsi_show_via_widget":
2293
+ case "sfsi_show_via_afterposts":
2294
+ case "sfsi_custom_social_hide":
2295
+
2296
+ var val = (yPos == "0px") ? "no" : "yes";
2297
+ SFSI('input[name="' + s.attr('name') + '"]').val(val);
2298
+
2299
+ break;
2300
+
2301
+ case 'sfsi_mouseOver':
2302
+
2303
+ var elem = SFSI('input[name="' + inputName + '"]');
2304
+
2305
+ var togglelem = SFSI('.mouse-over-effects');
2306
+
2307
+ if (inputChecked) {
2308
+ togglelem.removeClass('hide').addClass('show');
2309
+ } else {
2310
+ togglelem.removeClass('show').addClass('hide');
2311
+ }
2312
+
2313
+ break;
2314
+ case 'sfsi_responsive_facebook_display':
2315
+ if(inputChecked){
2316
+ SFSI('.sfsi_responsive_icon_facebook_container').parents('a').show();
2317
+ var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2318
+ if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2319
+ window.sfsi_fittext_shouldDisplay=true;
2320
+ jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2321
+ if(jQuery(a_container).css('display')!=="none"){
2322
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2323
+ }
2324
+ })
2325
+ }
2326
+ }else{
2327
+
2328
+ SFSI('.sfsi_responsive_icon_facebook_container').parents('a').hide();
2329
+ if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2330
+ window.sfsi_fittext_shouldDisplay=true;
2331
+ jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2332
+ if(jQuery(a_container).css('display')!=="none"){
2333
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2334
+ }
2335
+ })
2336
+ }
2337
+ }
2338
+ break;
2339
+ case 'sfsi_responsive_Twitter_display':
2340
+ if(inputChecked){
2341
+ SFSI('.sfsi_responsive_icon_twitter_container').parents('a').show();
2342
+ var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2343
+ if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2344
+ window.sfsi_fittext_shouldDisplay=true;
2345
+ jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2346
+ if(jQuery(a_container).css('display')!=="none"){
2347
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2348
+ }
2349
+ })
2350
+ }
2351
+ }else{
2352
+ SFSI('.sfsi_responsive_icon_twitter_container').parents('a').hide();
2353
+ if(SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val()!=="Fully responsive"){
2354
+ window.sfsi_fittext_shouldDisplay=true;
2355
+ jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2356
+ if(jQuery(a_container).css('display')!=="none"){
2357
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2358
+ }
2359
+ })
2360
+ }
2361
+ }
2362
+ break;
2363
+ case 'sfsi_responsive_Follow_display':
2364
+ if(inputChecked){
2365
+ SFSI('.sfsi_responsive_icon_follow_container').parents('a').show();
2366
+ var icon= inputName.replace('sfsi_responsive_','').replace('_display','');
2367
+ }else{
2368
+ SFSI('.sfsi_responsive_icon_follow_container').parents('a').hide();
2369
+ }
2370
+ window.sfsi_fittext_shouldDisplay=true;
2371
+ jQuery('.sfsi_responsive_icon_preview a').each(function(index,a_container){
2372
+ if(jQuery(a_container).css('display')!=="none"){
2373
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2374
+ }
2375
+ })
2376
+ break;
2377
+ }
2378
+
2379
+ });
2380
+
2381
+ //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post CLOSES -------------------------------------//
2382
+
2383
+ SFSI(document).on("click", '.radio', function () {
2384
+
2385
+ var s = SFSI(this).parent().find("input:radio:first");
2386
+
2387
+ switch (s.attr("name")) {
2388
+
2389
+ case 'sfsi_mouseOver_effect_type':
2390
+
2391
+ var _val = s.val();
2392
+ var _name = s.attr("name");
2393
+
2394
+ if ('same_icons' == _val) {
2395
+ SFSI('.same_icons_effects').removeClass('hide').addClass('show');
2396
+ SFSI('.other_icons_effects_options').removeClass('show').addClass('hide');
2397
+ } else if ('other_icons' == _val) {
2398
+ SFSI('.same_icons_effects').removeClass('show').addClass('hide');
2399
+ SFSI('.other_icons_effects_options').removeClass('hide').addClass('show');
2400
+ }
2401
+
2402
+ break;
2403
+ }
2404
+
2405
+ });
2406
+
2407
+ SFSI(document).on("click", '.radio', function () {
2408
+
2409
+ var s = SFSI(this).parent().find("input:radio:first");
2410
+ "sfsi_email_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_email_countsDisplay"]').prop("checked", !0),
2411
+ SFSI('input[name="sfsi_email_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2412
+ "manual" == SFSI("input[name='sfsi_email_countsFrom']:checked").val() ? SFSI("input[name='sfsi_email_manualCounts']").slideDown() : SFSI("input[name='sfsi_email_manualCounts']").slideUp()),
2413
+
2414
+ "sfsi_facebook_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_facebook_countsDisplay"]').prop("checked", !0),
2415
+ SFSI('input[name="sfsi_facebook_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2416
+ "mypage" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_facebook_mypageCounts']").slideDown(), SFSI(".sfsi_fbpgidwpr").slideDown()) : (SFSI("input[name='sfsi_facebook_mypageCounts']").slideUp(), SFSI(".sfsi_fbpgidwpr").slideUp()),
2417
+
2418
+ "manual" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() ? SFSI("input[name='sfsi_facebook_manualCounts']").slideDown() : SFSI("input[name='sfsi_facebook_manualCounts']").slideUp()),
2419
+
2420
+ "sfsi_facebook_countsFrom" == s.attr("name") && (("mypage" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val() || "likes" == SFSI("input[name='sfsi_facebook_countsFrom']:checked").val()) ? (SFSI(".sfsi_facebook_pagedeasc").slideDown()) : (SFSI(".sfsi_facebook_pagedeasc").slideUp())),
2421
+
2422
+ "sfsi_twitter_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_twitter_countsDisplay"]').prop("checked", !0),
2423
+ SFSI('input[name="sfsi_twitter_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2424
+ "manual" == SFSI("input[name='sfsi_twitter_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_twitter_manualCounts']").slideDown(),
2425
+ SFSI(".tw_follow_options").slideUp()) : (SFSI("input[name='sfsi_twitter_manualCounts']").slideUp(),
2426
+ SFSI(".tw_follow_options").slideDown())),
2427
+
2428
+
2429
+ "sfsi_linkedIn_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_linkedIn_countsDisplay"]').prop("checked", !0),
2430
+ SFSI('input[name="sfsi_linkedIn_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2431
+ "manual" == SFSI("input[name='sfsi_linkedIn_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_linkedIn_manualCounts']").slideDown(),
2432
+ SFSI(".linkedIn_options").slideUp()) : (SFSI("input[name='sfsi_linkedIn_manualCounts']").slideUp(),
2433
+ SFSI(".linkedIn_options").slideDown())),
2434
+
2435
+ "sfsi_youtube_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_youtube_countsDisplay"]').prop("checked", !0),
2436
+ SFSI('input[name="sfsi_youtube_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2437
+ "manual" == SFSI("input[name='sfsi_youtube_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_youtube_manualCounts']").slideDown(),
2438
+ SFSI(".youtube_options").slideUp()) : (SFSI("input[name='sfsi_youtube_manualCounts']").slideUp(),
2439
+ SFSI(".youtube_options").slideDown())), "sfsi_pinterest_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_pinterest_countsDisplay"]').prop("checked", !0),
2440
+ SFSI('input[name="sfsi_pinterest_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2441
+ "manual" == SFSI("input[name='sfsi_pinterest_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_pinterest_manualCounts']").slideDown(),
2442
+ SFSI(".pin_options").slideUp()) : SFSI("input[name='sfsi_pinterest_manualCounts']").slideUp()),
2443
+
2444
+ "sfsi_instagram_countsFrom" == s.attr("name") && (SFSI('input[name="sfsi_instagram_countsDisplay"]').prop("checked", !0),
2445
+ SFSI('input[name="sfsi_instagram_countsDisplay"]').parent().find("span.checkbox").attr("style", "background-position:0px -36px;"),
2446
+ "manual" == SFSI("input[name='sfsi_instagram_countsFrom']:checked").val() ? (SFSI("input[name='sfsi_instagram_manualCounts']").slideDown(),
2447
+ SFSI(".instagram_userLi").slideUp()) : (SFSI("input[name='sfsi_instagram_manualCounts']").slideUp(),
2448
+ SFSI(".instagram_userLi").slideDown()));
2449
+
2450
+ }),
2451
+
2452
+ sfsi_make_popBox(),
2453
+
2454
+ SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("keyup", sfsi_make_popBox),
2455
+ SFSI('input[name="sfsi_popup_text"] ,input[name="sfsi_popup_background_color"],input[name="sfsi_popup_border_color"],input[name="sfsi_popup_border_thickness"],input[name="sfsi_popup_fontSize"],input[name="sfsi_popup_fontColor"]').on("focus", sfsi_make_popBox),
2456
+
2457
+ SFSI("#sfsi_popup_font ,#sfsi_popup_fontStyle").on("change", sfsi_make_popBox),
2458
+
2459
+ /*SFSI(".radio").live("click", function(){*/
2460
+ SFSI(document).on("click", '.radio', function () {
2461
+
2462
+ var s = SFSI(this).parent().find("input:radio:first");
2463
+
2464
+ if ("sfsi_icons_floatPosition" == s.attr("name")) {
2465
+ SFSI('input[name="sfsi_icons_floatPosition"]').removeAttr("checked");
2466
+ s.attr("checked", true);
2467
+ }
2468
+
2469
+ if ("sfsi_disable_floaticons" == s.attr("name")) {
2470
+ SFSI('input[name="sfsi_disable_floaticons"]').removeAttr("checked");
2471
+ s.attr("checked", true);
2472
+ }
2473
+
2474
+ "sfsi_popup_border_shadow" == s.attr("name") && sfsi_make_popBox();
2475
+ }), /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? SFSI("img.sfsi_wicon").on("click", function (s) {
2476
+ s.stopPropagation();
2477
+ var i = SFSI("#sfsi_floater_sec").val();
2478
+ SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
2479
+ SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
2480
+ SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
2481
+ SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
2482
+ "z-index": "999"
2483
+ }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2484
+ opacity: 1,
2485
+ "z-index": 10
2486
+ }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2487
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2488
+ opacity: 1,
2489
+ "z-index": 10
2490
+ }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2491
+ SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2492
+ opacity: 1,
2493
+ "z-index": 10
2494
+ })), ("top-left" == i || "top-right" == i) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
2495
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
2496
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2497
+ opacity: 1,
2498
+ "z-index": 10
2499
+ }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
2500
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
2501
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2502
+ opacity: 1,
2503
+ "z-index": 1e3
2504
+ }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
2505
+ }) : SFSI("img.sfsi_wicon").on("mouseenter", function () {
2506
+ var s = SFSI("#sfsi_floater_sec").val();
2507
+ SFSI("div.sfsi_wicons").css("z-index", "0"), SFSI(this).parent().parent().parent().siblings("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide(),
2508
+ SFSI(this).parent().parent().parent().parent().siblings("li").length > 0 && (SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_tool_tip_2").css("z-index", "0"),
2509
+ SFSI(this).parent().parent().parent().parent().siblings("li").find("div.sfsi_wicons").find(".inerCnt").find("div.sfsi_tool_tip_2").hide()),
2510
+ SFSI(this).parent().parent().parent().css("z-index", "1000000"), SFSI(this).parent().parent().css({
2511
+ "z-index": "999"
2512
+ }), SFSI(this).attr("data-effect") && "fade_in" == SFSI(this).attr("data-effect") && (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2513
+ opacity: 1,
2514
+ "z-index": 10
2515
+ }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "scale" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2516
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2517
+ opacity: 1,
2518
+ "z-index": 10
2519
+ }), SFSI(this).parent().css("opacity", "1")), SFSI(this).attr("data-effect") && "combo" == SFSI(this).attr("data-effect") && (SFSI(this).parent().addClass("scale"),
2520
+ SFSI(this).parent().css("opacity", "1"), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2521
+ opacity: 1,
2522
+ "z-index": 10
2523
+ })), ("top-left" == s || "top-right" == s) && SFSI(this).parent().parent().parent().parent("#sfsi_floater").length > 0 && "sfsi_floater" == SFSI(this).parent().parent().parent().parent().attr("id") ? (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").addClass("sfsi_plc_btm"),
2524
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").addClass("top_big_arow"),
2525
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2526
+ opacity: 1,
2527
+ "z-index": 10
2528
+ }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show()) : (SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").find("span.bot_arow").removeClass("top_big_arow"),
2529
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").removeClass("sfsi_plc_btm"),
2530
+ SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").css({
2531
+ opacity: 1,
2532
+ "z-index": 10
2533
+ }), SFSI(this).parentsUntil("div").siblings("div.sfsi_tool_tip_2").show());
2534
+ }), SFSI("div.sfsi_wicons").on("mouseleave", function () {
2535
+ SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "fade_in" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
2536
+ SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "scale" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale"),
2537
+ SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && "combo" == SFSI(this).children("div.inerCnt").children("a.sficn").attr("data-effect") && (SFSI(this).children("div.inerCnt").find("a.sficn").css("opacity", "0.6"),
2538
+ SFSI(this).children("div.inerCnt").find("a.sficn").removeClass("scale")), SFSI(this).children(".inerCnt").find("div.sfsi_tool_tip_2").hide();
2539
+ }), SFSI("body").on("click", function () {
2540
+ SFSI(".inerCnt").find("div.sfsi_tool_tip_2").hide();
2541
+ }), SFSI(".adminTooltip >a").on("hover", function () {
2542
+ SFSI(this).offset().top, SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "1"),
2543
+ SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").show();
2544
+ }), SFSI(".adminTooltip").on("mouseleave", function () {
2545
+ "none" != SFSI(".gpls_tool_bdr").css("display") && 0 != SFSI(".gpls_tool_bdr").css("opacity") ? SFSI(".pop_up_box ").on("click", function () {
2546
+ SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"), SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide();
2547
+ }) : (SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").css("opacity", "0"),
2548
+ SFSI(this).parent("div").find("div.sfsi_tool_tip_2_inr").hide());
2549
+ }), SFSI(".expand-area").on("click", function () {
2550
+ "Read more" == SFSI(this).text() ? (SFSI(this).siblings("p").children("label").fadeIn("slow"),
2551
+ SFSI(this).text("Collapse")) : (SFSI(this).siblings("p").children("label").fadeOut("slow"),
2552
+ SFSI(this).text("Read more"));
2553
+ }), /*SFSI(".radio").live("click", function() {*/ SFSI(document).on("click", '.radio', function () {
2554
+
2555
+ var s = SFSI(this).parent().find("input:radio:first");
2556
+
2557
+ "sfsi_icons_float" == s.attr("name") && "yes" == s.val() && (SFSI(".float_options").slideDown("slow"),
2558
+
2559
+ SFSI('input[name="sfsi_icons_stick"][value="no"]').attr("checked", !0), SFSI('input[name="sfsi_icons_stick"][value="yes"]').removeAttr("checked"),
2560
+ SFSI('input[name="sfsi_icons_stick"][value="no"]').parent().find("span").attr("style", "background-position:0px -41px;"),
2561
+ SFSI('input[name="sfsi_icons_stick"][value="yes"]').parent().find("span").attr("style", "background-position:0px -0px;")),
2562
+
2563
+ //("sfsi_icons_stick" == s.attr("name") && "yes" == s.val() || "sfsi_icons_float" == s.attr("name") && "no" == s.val()) && (SFSI(".float_options").slideUp("slow"),
2564
+ ("sfsi_icons_stick" == s.attr("name") && "yes" == s.val()) && (SFSI(".float_options").slideUp("slow"),
2565
+
2566
+ SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", !0), SFSI('input[name="sfsi_icons_float"][value="yes"]').prop("checked", !1),
2567
+ SFSI('input[name="sfsi_icons_float"][value="no"]').parent().find("span.radio").attr("style", "background-position:0px -41px;"),
2568
+ SFSI('input[name="sfsi_icons_float"][value="yes"]').parent().find("span.radio").attr("style", "background-position:0px -0px;"));
2569
+
2570
+ }),
2571
+
2572
+ SFSI(".sfsi_wDiv").length > 0 && setTimeout(function () {
2573
+ var s = parseInt(SFSI(".sfsi_wDiv").height()) + 0 + "px";
2574
+ SFSI(".sfsi_holders").each(function () {
2575
+ SFSI(this).css("height", s);
2576
+ });
2577
+ }, 200),
2578
+ /*SFSI(".checkbox").live("click", function() {*/
2579
+ SFSI(document).on("click", '.checkbox', function () {
2580
+ var s = SFSI(this).parent().find("input:checkbox:first");
2581
+ ("sfsi_shuffle_Firstload" == s.attr("name") && "checked" == s.attr("checked") || "sfsi_shuffle_interval" == s.attr("name") && "checked" == s.attr("checked")) && (SFSI('input[name="sfsi_shuffle_icons"]').parent().find("span").css("background-position", "0px -36px"),
2582
+ SFSI('input[name="sfsi_shuffle_icons"]').attr("checked", "checked")), "sfsi_shuffle_icons" == s.attr("name") && "checked" != s.attr("checked") && (SFSI('input[name="sfsi_shuffle_Firstload"]').removeAttr("checked"),
2583
+ SFSI('input[name="sfsi_shuffle_Firstload"]').parent().find("span").css("background-position", "0px 0px"),
2584
+ SFSI('input[name="sfsi_shuffle_interval"]').removeAttr("checked"), SFSI('input[name="sfsi_shuffle_interval"]').parent().find("span").css("background-position", "0px 0px"));
2585
+ });
2586
+
2587
+ SFSI("body").on("click", "#sfsi_getMeFullAccess", function () {
2588
+ var email = SFSI(this).parents("form").find("input[type='email']").val();
2589
+ var feedid = SFSI(this).parents("form").find("input[name='feedid']").val();
2590
+ var error = false;
2591
+ var regEx = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
2592
+
2593
+ if (email === '') {
2594
+ error = true;
2595
+ }
2596
+
2597
+ if (!regEx.test(email)) {
2598
+ error = true;
2599
+ }
2600
+
2601
+ if (!error) {
2602
+ SFSI(this).parents("form").submit();
2603
+ } else {
2604
+ alert("Error: Please provide your email address.");
2605
+ }
2606
+ });
2607
+
2608
+ SFSI('form#calimingOptimizationForm').on('keypress', function (e) {
2609
+ var keyCode = e.keyCode || e.which;
2610
+ if (keyCode === 13) {
2611
+ e.preventDefault();
2612
+ return false;
2613
+ }
2614
+ });
2615
+
2616
+ /*SFSI(".checkbox").live("click", function()
2617
+ {
2618
+ var s = SFSI(this).parent().find("input:checkbox:first");
2619
+ "float_on_page" == s.attr("name") && "yes" == s.val() && (
2620
+ SFSI('input[name="sfsi_icons_stick"][value="no"]').attr("checked", !0), SFSI('input[name="sfsi_icons_stick"][value="yes"]').removeAttr("checked"),
2621
+ SFSI('input[name="sfsi_icons_stick"][value="no"]').parent().find("span").attr("style", "background-position:0px -41px;"),
2622
+ SFSI('input[name="sfsi_icons_stick"][value="yes"]').parent().find("span").attr("style", "background-position:0px -0px;"));
2623
+ });
2624
+ SFSI(".radio").live("click", function()
2625
+ {
2626
+ var s = SFSI(this).parent().find("input:radio:first");
2627
+ var a = SFSI(".cstmfltonpgstck");
2628
+ ("sfsi_icons_stick" == s.attr("name") && "yes" == s.val()) && (
2629
+ SFSI('input[name="float_on_page"][value="no"]').prop("checked", !0), SFSI('input[name="float_on_page"][value="yes"]').prop("checked", !1),
2630
+ SFSI('input[name="float_on_page"][value="no"]').parent().find("span.checkbox").attr("style", "background-position:0px -41px;"),
2631
+ SFSI('input[name="float_on_page"][value="yes"]').parent().find("span.checkbox").attr("style", "background-position:0px -0px;"),
2632
+ jQuery(a).children(".checkbox").css("background-position", "0px 0px" ), toggleflotpage(a));
2633
+ });*/
2634
+ window.sfsi_initialization_checkbox_count = 0;
2635
+ window.sfsi_initialization_checkbox = setInterval(function () {
2636
+ // console.log(jQuery('.radio_section.tb_4_ck>span.checkbox').length,jQuery('.radio_section.tb_4_ck>input.styled').length);
2637
+ if (jQuery('.radio_section.tb_4_ck>span.checkbox').length < jQuery('.radio_section.tb_4_ck>input.styled').length) {
2638
+ window.sfsi_initialization_checkbox_count++;
2639
+ // console.log('not initialized',window.sfsi_initialization_checkbox_count);
2640
+ if (window.sfsi_initialization_checkbox_count > 12) {
2641
+ // alert('Some script from diffrent plugin is interfearing with "Ultimate Social Icons" js files and checkbox couldn\'t be initialized. ');
2642
+ // window.clearInterval(window.sfsi_initialization_checkbox);
2643
+ }
2644
+ } else {
2645
+ // console.log('all initialized',window.sfsi_initialization_checkbox_count);
2646
+ window.clearInterval(window.sfsi_initialization_checkbox);
2647
+ }
2648
+ }, 1000);
2649
+ sfsi_responsive_icon_intraction_handler();
2650
+
2651
+ });
2652
+
2653
+ //for utube channel name and id
2654
+ function showhideutube(ref) {
2655
+ var chnlslctn = SFSI(ref).children("input").val();
2656
+ if (chnlslctn == "name") {
2657
+ SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideDown();
2658
+ SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlidwpr").slideUp();
2659
+ } else {
2660
+ SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlidwpr").slideDown();
2661
+ SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideUp();
2662
+ }
2663
+ }
2664
+
2665
+ function checkforinfoslction(ref) {
2666
+ var pos = jQuery(ref).children(".checkbox").css("background-position");
2667
+
2668
+ var rightInfoClass = jQuery(ref).next().attr('class');
2669
+
2670
+ var rightInfoPElem = jQuery(ref).next("." + rightInfoClass).children("p").first();
2671
+
2672
+ var elemName = 'label';
2673
+
2674
+ if (pos == "0px 0px") {
2675
+ rightInfoPElem.children(elemName).hide();
2676
+ } else {
2677
+ rightInfoPElem.children(elemName).show();
2678
+ }
2679
+ }
2680
+
2681
+ function checkforinfoslction_checkbox(ref) {
2682
+
2683
+ var pos = jQuery(ref).children(".checkbox").css("background-position");
2684
+
2685
+ var elem = jQuery(ref).parent().children('.sfsi_right_info').find('.kckslctn');
2686
+
2687
+ if (pos == "0px 0px") {
2688
+ elem.hide();
2689
+ } else {
2690
+ elem.show();
2691
+ }
2692
+ }
2693
+
2694
+ function sfsi_toggleflotpage_que3(ref) {
2695
+ var pos = jQuery(ref).children(".checkbox").css("background-position");
2696
+ if (pos == "0px 0px") {
2697
+ jQuery(ref).next(".sfsi_right_info").hide();
2698
+
2699
+ } else {
2700
+ jQuery(ref).next(".sfsi_right_info").show();
2701
+ }
2702
+ }
2703
+
2704
+ var initTop = new Array();
2705
+
2706
+ SFSI('.sfsi_navigate_to_question7').on("click", function () {
2707
+
2708
+ var elem = SFSI('#ui-id-6');
2709
+
2710
+ if (elem.hasClass('accordion-content-active')) {
2711
+
2712
+ // Cloase tab of Question 3
2713
+ elem.find('.sfsiColbtn').trigger('click');
2714
+
2715
+ // Open tab of Question 7
2716
+ if (!SFSI('#ui-id-14').hasClass('accordion-content-active')) {
2717
+ SFSI('#ui-id-13').trigger('click');
2718
+ }
2719
+
2720
+ var pos = SFSI("#ui-id-13").offset();
2721
+ var scrollToPos = pos.top - SFSI(window).height() * 0.99 + 30;
2722
+ SFSI('html,body').animate({
2723
+ scrollTop: scrollToPos
2724
+ }, 500);
2725
+ }
2726
+ });
2727
+
2728
+ SFSI("body").on("click", ".sfsi_tokenGenerateButton a", function () {
2729
+ var clienId = SFSI("input[name='sfsi_instagram_clientid']").val();
2730
+ var redirectUrl = SFSI("input[name='sfsi_instagram_appurl']").val();
2731
+
2732
+ var scope = "likes+comments+basic+public_content+follower_list+relationships";
2733
+ var instaUrl = "https://www.instagram.com/oauth/authorize/?client_id=<id>&redirect_uri=<url>&response_type=token&scope=" + scope;
2734
+
2735
+ if (clienId !== '' && redirectUrl !== '') {
2736
+ instaUrl = instaUrl.replace('<id>', clienId);
2737
+ instaUrl = instaUrl.replace('<url>', redirectUrl);
2738
+
2739
+ window.open(instaUrl, '_blank');
2740
+ } else {
2741
+ alert("Please enter client id and redirect url first");
2742
+ }
2743
+
2744
+ });
2745
+ SFSI(document).ready(function () {
2746
+ SFSI('#sfsi_jivo_offline_chat .tab-link').click(function () {
2747
+ var cur = SFSI(this);
2748
+ if (!cur.hasClass('active')) {
2749
+ var target = cur.find('a').attr('href');
2750
+ cur.parent().children().removeClass('active');
2751
+ cur.addClass('active');
2752
+ SFSI('#sfsi_jivo_offline_chat .tabs').children().hide();
2753
+ SFSI(target).show();
2754
+ }
2755
+ });
2756
+ SFSI('#sfsi_jivo_offline_chat #sfsi_sales form').submit(function (event) {
2757
+ event & event.preventDefault();
2758
+ // console.log(event);
2759
+ var target = SFSI(this).parents('.tab-content');
2760
+ var message = SFSI(this).find('textarea[name="question"]').val();
2761
+ var email = SFSI(this).find('input[name="email"]').val();
2762
+ var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
2763
+ var nonce = SFSI(this).find('input[name="nonce"]').val();
2764
+
2765
+ if ("" === email || false === re.test(String(email).toLowerCase())) {
2766
+ // console.log(SFSI(this).find('input[name="email"]'));
2767
+ SFSI(this).find('input[name="email"]').css('background-color', 'red');
2768
+ SFSI(this).find('input[name="email"]').on('keyup', function () {
2769
+ var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
2770
+ var email = SFSI(this).val();
2771
+ // console.log(email,re.test(String(email).toLowerCase()) );
2772
+ if ("" !== email && true === re.test(String(email).toLowerCase())) {
2773
+ SFSI(this).css('background-color', '#fff');
2774
+ }
2775
+ })
2776
+ return false;
2777
+
2778
+ }
2779
+ SFSI.ajax({
2780
+ url: sfsi_icon_ajax_object.ajax_url,
2781
+ type: "post",
2782
+ data: {
2783
+ action: "sfsiOfflineChatMessage",
2784
+ message: message,
2785
+ email: email,
2786
+ 'nonce': nonce
2787
+ }
2788
+ }).done(function () {
2789
+ target.find('.before_message_sent').hide();
2790
+ target.find('.after_message_sent').show();
2791
+ });
2792
+ })
2793
+ });
2794
+
2795
+ function sfsi_close_offline_chat(e) {
2796
+ e && e.preventDefault();
2797
+
2798
+ SFSI('#sfsi_jivo_offline_chat').hide();
2799
+ SFSI('#sfsi_dummy_chat_icon').show();
2800
+ }
2801
+
2802
+ function sfsi_open_quick_checkout(e) {
2803
+ e && e.preventDefault();
2804
+ // console.log(jQuery('.sfsi_quick-pay-box'));
2805
+ jQuery('.sfsi_quick-pay-box').show();
2806
+ }
2807
+
2808
+ function sfsi_close_quickpay(e) {
2809
+ e && e.preventDefault();
2810
+ jQuery('.sfsi_quickpay-overlay').hide();
2811
+ }
2812
+
2813
+ function sfsi_quickpay_container_click(event) {
2814
+ if (jQuery(event.target).hasClass('sellcodes-quick-purchase')) {
2815
+ jQuery(jQuery(event.target).find('p.sc-button img')[0]).click();
2816
+ }
2817
+ }
2818
+
2819
+
2820
+
2821
+ // <------------------------* Responsive icon *----------------------->
2822
+
2823
+ function sfsi_responsive_icon_intraction_handler() {
2824
+ window.sfsi_fittext_shouldDisplay = true;
2825
+ SFSI('select[name="sfsi_responsive_icons_settings_edge_type"]').on('change', function () {
2826
+ $target_div = (SFSI(this).parent());
2827
+ if (SFSI(this).val() === "Round") {
2828
+ console.log('Round', 'Round', SFSI(this).val());
2829
+
2830
+ $target_div.parent().children().css('display', 'inline-block');
2831
+ $target_div.parent().next().css("display","inline-block");
2832
+ var radius = jQuery('select[name="sfsi_responsive_icons_settings_edge_radius"]').val() + 'px'
2833
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', radius);
2834
+
2835
+ } else {
2836
+ console.log('sharp', 'sharp', SFSI(this).val(), $target_div.parent().children(), $target_div.parent().children().hide());
2837
+
2838
+ $target_div.parent().children().hide();
2839
+ $target_div.show();
2840
+ $target_div.parent().next().hide();
2841
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', 'unset');
2842
+
2843
+ }
2844
+ });
2845
+ SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').on('change', function () {
2846
+ $target_div = (SFSI(this).parent());
2847
+ if (SFSI(this).val() === "Fixed icon width") {
2848
+ $target_div.parent().children().css('display', 'inline-block');
2849
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width', 'auto').css('display', 'flex');
2850
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('flex-basis', 'unset');
2851
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery('input[name="sfsi_responsive_icons_sttings_icon_width_size"]').val());
2852
+
2853
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fully_container').removeClass('sfsi_icons_container_box_fully_container').addClass('sfsi_icons_container_box_fixed_container');
2854
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fixed_container').removeClass('sfsi_icons_container_box_fully_container').addClass('sfsi_icons_container_box_fixed_container');
2855
+ window.sfsi_fittext_shouldDisplay = true;
2856
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2857
+ if (jQuery(a_container).css('display') !== "none") {
2858
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2859
+ }
2860
+ })
2861
+ } else {
2862
+ $target_div.parent().children().hide();
2863
+ $target_div.show();
2864
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width', '100%').css('display', 'flex');
2865
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('flex-basis', '100%');
2866
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', '100%');
2867
+
2868
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fixed_container').removeClass('sfsi_icons_container_box_fixed_container').addClass('sfsi_icons_container_box_fully_container');
2869
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container_box_fully_container').removeClass('sfsi_icons_container_box_fixed_container').addClass('sfsi_icons_container_box_fully_container');
2870
+ window.sfsi_fittext_shouldDisplay = true;
2871
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2872
+ if (jQuery(a_container).css('display') !== "none") {
2873
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2874
+ }
2875
+ })
2876
+ }
2877
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').removeClass('sfsi_fixed_count_container').removeClass('sfsi_responsive_count_container').addClass('sfsi_' + (jQuery(this).val() == "Fully responsive" ? 'responsive' : 'fixed') + '_count_container')
2878
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container>a').removeClass('sfsi_responsive_fluid').removeClass('sfsi_responsive_fixed_width').addClass('sfsi_responsive_' + (jQuery(this).val() == "Fully responsive" ? 'fluid' : 'fixed_width'))
2879
+ sfsi_resize_icons_container();
2880
+
2881
+ })
2882
+ jQuery(document).on('keyup', 'input[name="sfsi_responsive_icons_sttings_icon_width_size"]', function () {
2883
+ if (SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() === "Fixed icon width") {
2884
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery(this).val() + 'px');
2885
+ window.sfsi_fittext_shouldDisplay = true;
2886
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2887
+ if (jQuery(a_container).css('display') !== "none") {
2888
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2889
+ }
2890
+ })
2891
+ }
2892
+ sfsi_resize_icons_container();
2893
+ });
2894
+ jQuery(document).on('change', 'input[name="sfsi_responsive_icons_sttings_icon_width_size"]', function () {
2895
+ if (SFSI('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() === "Fixed icon width") {
2896
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').css('width', jQuery(this).val() + 'px');
2897
+ }
2898
+ });
2899
+ jQuery(document).on('keyup', 'input[name="sfsi_responsive_icons_settings_margin"]', function () {
2900
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('margin-right', jQuery(this).val() + 'px');
2901
+ });
2902
+ jQuery(document).on('change', 'input[name="sfsi_responsive_icons_settings_margin"]', function () {
2903
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('margin-right', jQuery(this).val() + 'px');
2904
+ // jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').css('width',(jQuery('.sfsi_responsive_icons').width()-(jQuery('.sfsi_responsive_icons_count').width()+jQuery(this).val()))+'px');
2905
+
2906
+ });
2907
+ jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_text_align"]', function () {
2908
+ if (jQuery(this).val() === "Centered") {
2909
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('text-align', 'center');
2910
+ } else {
2911
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container a').css('text-align', 'left');
2912
+ }
2913
+ });
2914
+ jQuery('.sfsi_responsive_default_icon_container input.sfsi_responsive_input').on('keyup', function () {
2915
+ jQuery(this).parent().find('.sfsi_responsive_icon_item_container').find('span').text(jQuery(this).val());
2916
+ var iconName = jQuery(this).attr('name');
2917
+ var icon = iconName.replace('sfsi_responsive_', '').replace('_input', '');
2918
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_' + (icon.toLowerCase()) + '_container span').text(jQuery(this).val());
2919
+ window.sfsi_fittext_shouldDisplay = true;
2920
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2921
+ if (jQuery(a_container).css('display') !== "none") {
2922
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2923
+ }
2924
+ })
2925
+ sfsi_resize_icons_container();
2926
+ })
2927
+ jQuery('.sfsi_responsive_custom_icon_container input.sfsi_responsive_input').on('keyup', function () {
2928
+ jQuery(this).parent().find('.sfsi_responsive_icon_item_container').find('span').text(jQuery(this).val());
2929
+ var iconName = jQuery(this).attr('name');
2930
+ var icon = iconName.replace('sfsi_responsive_custom_', '').replace('_input', '');
2931
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_' + icon + '_container span').text(jQuery(this).val())
2932
+ window.sfsi_fittext_shouldDisplay = true;
2933
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2934
+ if (jQuery(a_container).css('display') !== "none") {
2935
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2936
+ }
2937
+ })
2938
+ sfsi_resize_icons_container();
2939
+
2940
+ })
2941
+
2942
+ jQuery('.sfsi_responsive_default_url_toggler').click(function (event) {
2943
+
2944
+ event.preventDefault();
2945
+ sfsi_responsive_open_url(event);
2946
+ });
2947
+ jQuery('.sfsi_responsive_default_url_toggler').click(function (event) {
2948
+ event.preventDefault();
2949
+ sfsi_responsive_open_url(event);
2950
+ })
2951
+ jQuery('.sfsi_responsive_custom_url_hide, .sfsi_responsive_default_url_hide').click(function (event) {
2952
+ event.preventDefault();
2953
+ /* console.log(event,jQuery(event.target)); */
2954
+ jQuery(event.target).parent().parent().find('.sfsi_responsive_custom_url_hide').hide();
2955
+ jQuery(event.target).parent().parent().find('.sfsi_responsive_url_input').hide();
2956
+ jQuery(event.target).parent().parent().find('.sfsi_responsive_default_url_hide').hide();
2957
+ jQuery(event.target).parent().parent().find('.sfsi_responsive_default_url_toggler').show();
2958
+ });
2959
+ jQuery('select[name="sfsi_responsive_icons_settings_icon_size"]').change(function (event) {
2960
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').removeClass('sfsi_small_button').removeClass('sfsi_medium_button').removeClass('sfsi_large_button').addClass('sfsi_' + (jQuery(this).val().toLowerCase()) + '_button');
2961
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_small_button_container').removeClass('sfsi_medium_button_container').removeClass('sfsi_large_button_container').addClass('sfsi_' + (jQuery(this).val().toLowerCase()) + '_button_container')
2962
+ })
2963
+ jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_edge_radius"]', function (event) {
2964
+ var radius = jQuery(this).val() + 'px'
2965
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container,.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('border-radius', radius);
2966
+
2967
+ });
2968
+ jQuery(document).on('change', 'select[name="sfsi_responsive_icons_settings_style"]', function (event) {
2969
+ if ('Flat' === jQuery(this).val()) {
2970
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_responsive_icon_gradient');
2971
+ } else {
2972
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').addClass('sfsi_responsive_icon_gradient');
2973
+ }
2974
+ });
2975
+ jQuery(document).on('mouseenter', '.sfsi_responsive_icon_preview .sfsi_icons_container a', function () {
2976
+ jQuery(this).css('opacity', 0.8);
2977
+ })
2978
+ jQuery(document).on('mouseleave', '.sfsi_responsive_icon_preview .sfsi_icons_container a', function () {
2979
+ jQuery(this).css('opacity', 1);
2980
+ })
2981
+ window.sfsi_fittext_shouldDisplay = true;
2982
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2983
+ if (jQuery(a_container).css('display') !== "none") {
2984
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2985
+ }
2986
+ })
2987
+ sfsi_resize_icons_container();
2988
+ jQuery('.ui-accordion-header.ui-state-default.ui-accordion-icons').click(function (data) {
2989
+ window.sfsi_fittext_shouldDisplay = true;
2990
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
2991
+ if (jQuery(a_container).css('display') !== "none") {
2992
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
2993
+ }
2994
+ })
2995
+ sfsi_resize_icons_container();
2996
+ });
2997
+ jQuery('select[name="sfsi_responsive_icons_settings_text_align"]').change(function (event) {
2998
+ var data = jQuery(event.target).val();
2999
+ if (data == "Centered") {
3000
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_left-align_icon').addClass('sfsi_centered_icon');
3001
+ } else {
3002
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container').removeClass('sfsi_centered_icon').addClass('sfsi_left-align_icon');
3003
+ }
3004
+ });
3005
+ jQuery('a.sfsi_responsive_custom_delete_btn').click(function (event) {
3006
+ event.preventDefault();
3007
+ var icon_num = jQuery(this).attr('data-id');
3008
+ //reset the current block;
3009
+ // var last_block = jQuery('.sfsi_responsive_custom_icon_4_container').clone();
3010
+ var cur_block = jQuery('.sfsi_responsive_custom_icon_' + icon_num + '_container');
3011
+ cur_block.find('.sfsi_responsive_custom_delete_btn').hide();
3012
+ cur_block.find('input[name="sfsi_responsive_custom_' + icon_num + '_added"]').val('no');
3013
+ cur_block.find('.sfsi_responsive_custom_' + icon_num + '_added').attr('value', 'no');
3014
+ cur_block.find('.radio_section.tb_4_ck .checkbox').click();
3015
+ cur_block.hide();
3016
+
3017
+
3018
+ if (icon_num > 0) {
3019
+ var prev_block = jQuery('.sfsi_responsive_custom_icon_' + (icon_num - 1) + '_container');
3020
+ prev_block.find('.sfsi_responsive_custom_delete_btn').show();
3021
+ }
3022
+ // jQuery('.sfsi_responsive_custom_icon_container').each(function(index,custom_icon){
3023
+ // var target= jQuery(custom_icon);
3024
+ // target.find('.sfsi_responsive_custom_delete_btn');
3025
+ // var custom_id = target.find('.sfsi_responsive_custom_delete_btn').attr('data-id');
3026
+ // if(custom_id>icon_num){
3027
+ // target.removeClass('sfsi_responsive_custom_icon_'+custom_id+'_container').addClass('sfsi_responsive_custom_icon_'+(custom_id-1)+'_container');
3028
+ // target.find('input[name="sfsi_responsive_custom_'+custom_id+'_added"]').attr('name',"sfsi_responsive_custom_"+(custom_id-1)+"_added");
3029
+ // target.find('#sfsi_responsive_'+custom_id+'_display').removeClass('sfsi_responsive_custom_'+custom_id+'_display').addClass('sfsi_responsive_custom_'+(custom_id-1)+'_display').attr('id','sfsi_responsive_'+(custom_id-1)+'_display').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_display').attr('data-custom-index',(custom_id-1));
3030
+ // target.find('.sfsi_responsive_icon_item_container').removeClass('sfsi_responsive_icon_custom_'+custom_id+'_container').addClass('sfsi_responsive_icon_custom_'+(custom_id-1)+'_container');
3031
+ // target.find('.sfsi_responsive_input').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_input');
3032
+ // target.find('.sfsi_responsive_url_input').attr('name','sfsi_responsive_custom_'+(custom_id-1)+'_url_input');
3033
+ // target.find('.sfsi_bg-color-picker').attr('name','sfsi_responsive_icon_'+(custom_id-1)+'_bg_color');
3034
+ // target.find('.sfsi_logo_upload sfsi_logo_custom_'+custom_id+'_upload').removeClass('sfsi_logo_upload sfsi_logo_custom_'+custom_id+'_upload').addClass('sfsi_logo_upload sfsi_logo_custom_'+(custom_id-1)+'_upload');
3035
+ // target.find('input[type="sfsi_responsive_icons_custom_'+custom_id+'_icon"]').attr('name','input[type="sfsi_responsive_icons_custom_'+(custom_id-1)+'_icon"]');
3036
+ // target.find('.sfsi_responsive_custom_delete_btn').attr('data-id',''+(custom_id-1));
3037
+ // }
3038
+ // });
3039
+ // // sfsi_backend_section_beforeafter_set_fixed_width();
3040
+ // // jQuery(window).on('resize',sfsi_backend_section_beforeafter_set_fixed_width);
3041
+ // var new_block=jQuery('.sfsi_responsive_custom_icon_container').clone();
3042
+ // jQuery('.sfsi_responsive_custom_icon_container').remove();
3043
+ // jQuery('.sfsi_responsive_default_icon_container').parent().append(last_block).append();
3044
+ // jQuery('.sfsi_responsive_default_icon_container').parent().append(new_block);
3045
+ // return false;
3046
+ })
3047
+ }
3048
+
3049
+ function sfsi_responsive_icon_counter_tgl(hide, show, ref = null) {
3050
+ if (null !== hide && '' !== hide) {
3051
+ jQuery('.' + hide).hide();
3052
+ }
3053
+ if (null !== show && '' !== show) {
3054
+ jQuery('.' + show).show();
3055
+ }
3056
+ }
3057
+
3058
+ function sfsi_responsive_toggle_count() {
3059
+ var data = jQuery('input[name="sfsi_share_count"]:checked').val();
3060
+ var data2 = jQuery('input[name="sfsi_display_counts"]:checked').val();
3061
+ /* console.log('toggleer ',data,data2); */
3062
+ if (data2 == "yes" && 'yes' == data) {
3063
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'inline-block');
3064
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_without_counter_icons').addClass('sfsi_responsive_with_counter_icons');
3065
+ sfsi_resize_icons_container();
3066
+ } else {
3067
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'none');
3068
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_with_counter_icons').addClass('sfsi_responsive_without_counter_icons');
3069
+ sfsi_resize_icons_container();
3070
+ }
3071
+ }
3072
+
3073
+ function sfsi_responsive_open_url(event) {
3074
+ jQuery(event.target).parent().find('.sfsi_responsive_custom_url_hide').show();
3075
+ jQuery(event.target).parent().find('.sfsi_responsive_default_url_hide').show();
3076
+ jQuery(event.target).parent().find('.sfsi_responsive_url_input').show();
3077
+ jQuery(event.target).hide();
3078
+ }
3079
+
3080
+ function sfsi_responsive_icon_hide_responsive_options() {
3081
+ jQuery('.sfsi_PostsSettings_section').show();
3082
+ jQuery('.sfsi_choose_post_types_section').show();
3083
+ jQuery('.sfsi_not_responsive').show();
3084
+ // jQuery('.sfsi_icn_listing8.sfsi_closerli').hide();
3085
+ }
3086
+
3087
+ function sfsi_responsive_icon_show_responsive_options() {
3088
+ jQuery('.sfsi_PostsSettings_section').hide();
3089
+ // jQuery('.sfsi_PostsSettings_section').show();
3090
+ jQuery('.sfsi_choose_post_types_section').hide();
3091
+ jQuery('.sfsi_not_responsive').hide();
3092
+ window.sfsi_fittext_shouldDisplay = true;
3093
+ jQuery('.sfsi_responsive_icon_preview a').each(function (index, a_container) {
3094
+ if (jQuery(a_container).css('display') !== "none") {
3095
+ sfsi_fitText(jQuery(a_container).find('.sfsi_responsive_icon_item_container'));
3096
+ }
3097
+ })
3098
+ sfsi_resize_icons_container();
3099
+ }
3100
+
3101
+ function sfsi_scroll_to_div(option_id, scroll_selector) {
3102
+ jQuery('#' + option_id + '.ui-accordion-header[aria-selected="false"]').click() //opened the option
3103
+ //scroll to it.
3104
+ if (scroll_selector && scroll_selector !== '') {
3105
+ scroll_selector = scroll_selector;
3106
+ } else {
3107
+ scroll_selector = '#' + option_id + '.ui-accordion-header';
3108
+ }
3109
+ jQuery('html, body').stop().animate({
3110
+ scrollTop: jQuery(scroll_selector).offset().top
3111
+ }, 1000);
3112
+ }
3113
+
3114
+ function sfsi_fitText(container) {
3115
+ /* console.log(container,container.parent().parent(),container.parent().parent().hasClass('sfsi_icons_container_box_fixed_container')); */
3116
+ if (container.parent().parent().hasClass('sfsi_icons_container_box_fixed_container')) {
3117
+ /* console.log(window.sfsi_fittext_shouldDisplay); */
3118
+ if (window.sfsi_fittext_shouldDisplay === true) {
3119
+ if (jQuery('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() == "Fully responsive") {
3120
+ var all_icon_width = jQuery('.sfsi_responsive_icons .sfsi_icons_container').width();
3121
+ var total_active_icons = jQuery('.sfsi_responsive_icons .sfsi_icons_container a').filter(function (i, icon) {
3122
+ return jQuery(icon).css('display') && (jQuery(icon).css('display').toLowerCase() !== "none");
3123
+ }).length;
3124
+
3125
+ var distance_between_icon = jQuery('input[name="sfsi_responsive_icons_settings_margin"]').val()
3126
+ var container_width = ((all_icon_width - distance_between_icon) / total_active_icons) - 5;
3127
+ container_width = (container_width - distance_between_icon);
3128
+ } else {
3129
+ var container_width = container.width();
3130
+ }
3131
+ // var container_img_width = container.find('img').width();
3132
+ var container_img_width = 70;
3133
+ // var span=container.find('span').clone();
3134
+ var span = container.find('span');
3135
+ // var span_original_width = container.find('span').width();
3136
+ var span_original_width = container_width - (container_img_width)
3137
+ span
3138
+ // .css('display','inline-block')
3139
+ .css('white-space', 'nowrap')
3140
+ // .css('width','auto')
3141
+ ;
3142
+ var span_flatted_width = span.width();
3143
+ if (span_flatted_width == 0) {
3144
+ span_flatted_width = span_original_width;
3145
+ }
3146
+ span
3147
+ // .css('display','inline-block')
3148
+ .css('white-space', 'unset')
3149
+ // .css('width','auto')
3150
+ ;
3151
+ var shouldDisplay = ((undefined === window.sfsi_fittext_shouldDisplay) ? true : window.sfsi_fittext_shouldDisplay = true);
3152
+ var fontSize = parseInt(span.css('font-size'));
3153
+
3154
+ if (6 > fontSize) {
3155
+ fontSize = 20;
3156
+ }
3157
+
3158
+ var computed_fontSize = (Math.floor((fontSize * span_original_width) / span_flatted_width));
3159
+
3160
+ if (computed_fontSize < 8) {
3161
+ shouldDisplay = false;
3162
+ window.sfsi_fittext_shouldDisplay = false;
3163
+ computed_fontSize = 20;
3164
+ }
3165
+ span.css('font-size', Math.min(computed_fontSize, 20));
3166
+ span
3167
+ // .css('display','inline-block')
3168
+ .css('white-space', 'nowrap')
3169
+ // .css('width','auto')
3170
+ ;
3171
+ if (shouldDisplay) {
3172
+ span.show();
3173
+ } else {
3174
+ span.hide();
3175
+ jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icon_item_container span').hide();
3176
+ }
3177
+ }
3178
+ } else {
3179
+ var span = container.find('span');
3180
+ /* console.log(span); */
3181
+ span.css('font-size', 'initial');
3182
+ span.show();
3183
+ }
3184
+
3185
+ }
3186
+
3187
+ function sfsi_fixedWidth_fitText(container) {
3188
+ return;
3189
+ /* console.log(sfsi_fittext_shouldDisplay); */
3190
+ if (window.sfsi_fittext_shouldDisplay === true) {
3191
+ if (jQuery('select[name="sfsi_responsive_icons_settings_icon_width_type"]').val() == "Fixed icon width") {
3192
+ var all_icon_width = jQuery('.sfsi_responsive_icons .sfsi_icons_container').width();
3193
+ var total_active_icons = jQuery('.sfsi_responsive_icons .sfsi_icons_container a').filter(function (i, icon) {
3194
+ return jQuery(icon).css('display') && (jQuery(icon).css('display').toLowerCase() !== "none");
3195
+ }).length;
3196
+ var distance_between_icon = jQuery('input[name="sfsi_responsive_icons_settings_margin"]').val()
3197
+ var container_width = ((all_icon_width - distance_between_icon) / total_active_icons) - 5;
3198
+ container_width = (container_width - distance_between_icon);
3199
+ } else {
3200
+ var container_width = container.width();
3201
+ }
3202
+ // var container_img_width = container.find('img').width();
3203
+ var container_img_width = 70;
3204
+ // var span=container.find('span').clone();
3205
+ var span = container.find('span');
3206
+ // var span_original_width = container.find('span').width();
3207
+ var span_original_width = container_width - (container_img_width)
3208
+ span
3209
+ // .css('display','inline-block')
3210
+ .css('white-space', 'nowrap')
3211
+ // .css('width','auto')
3212
+ ;
3213
+ var span_flatted_width = span.width();
3214
+ if (span_flatted_width == 0) {
3215
+ span_flatted_width = span_original_width;
3216
+ }
3217
+ span
3218
+ // .css('display','inline-block')
3219
+ .css('white-space', 'unset')
3220
+ // .css('width','auto')
3221
+ ;
3222
+ var shouldDisplay = undefined === window.sfsi_fittext_shouldDisplay ? true : window.sfsi_fittext_shouldDisplay = true;;
3223
+ var fontSize = parseInt(span.css('font-size'));
3224
+
3225
+ if (6 > fontSize) {
3226
+ fontSize = 15;
3227
+ }
3228
+
3229
+ var computed_fontSize = (Math.floor((fontSize * span_original_width) / span_flatted_width));
3230
+
3231
+ if (computed_fontSize < 8) {
3232
+ shouldDisplay = false;
3233
+ window.sfsi_fittext_shouldDisplay = false;
3234
+ computed_fontSize = 15;
3235
+ }
3236
+ span.css('font-size', Math.min(computed_fontSize, 15));
3237
+ span
3238
+ // .css('display','inline-block')
3239
+ .css('white-space', 'nowrap')
3240
+ // .css('width','auto')
3241
+ ;
3242
+ // var heightOfResIcons = jQuery('.sfsi_responsive_icon_item_container').height();
3243
+
3244
+ // if(heightOfResIcons < 17){
3245
+ // span.show();
3246
+ // }else{
3247
+ // span.hide();
3248
+ // }
3249
+
3250
+ if (shouldDisplay) {
3251
+ span.show();
3252
+ } else {
3253
+ span.hide();
3254
+ }
3255
+ }
3256
+ }
3257
+
3258
+ function sfsi_resize_icons_container() {
3259
+ // resize icon container based on the size of count
3260
+ sfsi_cloned_icon_list = jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').clone();
3261
+ sfsi_cloned_icon_list.removeClass('.sfsi_responsive_icon_preview .sfsi_responsive_with_counter_icons').addClass('sfsi_responsive_cloned_list');
3262
+ sfsi_cloned_icon_list.css('width', '100%');
3263
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').parent().append(sfsi_cloned_icon_list);
3264
+
3265
+ // sfsi_cloned_icon_list.css({
3266
+ // position: "absolute",
3267
+ // left: "-10000px"
3268
+ // }).appendTo("body");
3269
+ actual_width = sfsi_cloned_icon_list.width();
3270
+ count_width = jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').width();
3271
+ jQuery('.sfsi_responsive_cloned_list').remove();
3272
+ sfsi_inline_style = jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').attr('style');
3273
+ // remove_width
3274
+ sfsi_inline_style = sfsi_inline_style.replace(/width:auto($|!important|)(;|$)/g, '').replace(/width:\s*(-|)\d*\s*(px|%)\s*($|!important|)(;|$)/g, '');
3275
+ if (!(jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').hasClass('sfsi_responsive_without_counter_icons') && jQuery('.sfsi_icons_container').hasClass('sfsi_icons_container_box_fixed_container'))) {
3276
+ sfsi_inline_style += "width:" + (actual_width - count_width - 1) + 'px!important;'
3277
+ } else {
3278
+ sfsi_inline_style += "width:auto!important;";
3279
+ }
3280
+ jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').attr('style', sfsi_inline_style);
3281
+
3282
+ }
3283
+
3284
+ function sfsi_togglbtmsection(show, hide, ref) {
3285
+ console.log(show,hide);
3286
+ jQuery(ref).parent("ul").children("li.clckbltglcls").each(function (index, element) {
3287
+ jQuery(this).children(".radio").css("background-position", "0px 0px");
3288
+ jQuery(this).children(".styled").attr("checked", "false");
3289
+ });
3290
+ jQuery(ref).children(".radio").css("background-position", "0px -41px");
3291
+ jQuery(ref).children(".styled").attr("checked", "true");
3292
+ console.log(show,hide);
3293
+
3294
+ jQuery("." + show).show();
3295
+ jQuery("." + show).children(".radiodisplaysection").show();
3296
+ jQuery("." + hide).hide();
3297
+ jQuery("." + hide).children(".radiodisplaysection").hide();
3298
  }
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.36");
38
 
39
  if (!get_option('sfsi_serverphpVersionnotification')) {
40
  add_option("sfsi_serverphpVersionnotification", "yes");
@@ -1101,8 +1101,8 @@ function SFSI_getFeedUrl()
1101
  $resp = wp_remote_post('https://www.specificfeeds.com/wordpress/plugin_setup', $args);
1102
  if (is_wp_error($resp)) {
1103
  // var_dump($resp);
1104
- update_option("sfsi_curlErrorNotices", "yes");
1105
- update_option("sfsi_curlErrorMessage", $resp->get_error_message());
1106
  } else {
1107
  update_option("sfsi_curlErrorNotices", "no");
1108
  update_option("sfsi_curlErrorMessage", "");
34
  update_option("sfsi_custom_icons", "yes");
35
  }
36
  //Install version
37
+ update_option("sfsi_pluginVersion", "2.37");
38
 
39
  if (!get_option('sfsi_serverphpVersionnotification')) {
40
  add_option("sfsi_serverphpVersionnotification", "yes");
1101
  $resp = wp_remote_post('https://www.specificfeeds.com/wordpress/plugin_setup', $args);
1102
  if (is_wp_error($resp)) {
1103
  // var_dump($resp);
1104
+ // update_option("sfsi_curlErrorNotices", "yes");
1105
+ // update_option("sfsi_curlErrorMessage", $resp->get_error_message());
1106
  } else {
1107
  update_option("sfsi_curlErrorNotices", "no");
1108
  update_option("sfsi_curlErrorMessage", "");
libs/sfsi_widget.php CHANGED
@@ -1,1624 +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
- 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
  ?>
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
+ if( sanitize_text_field(get_option('sfsi_feed_id', false)) == ""){
491
+ $url = "https://specificfeeds.com/follow";
492
+ }else{
493
+
494
+ $url = (isset($sfsi_section2_options['sfsi_email_url'])) ? $sfsi_section2_options['sfsi_email_url'] : '';
495
+ }
496
+ $toolClass = "email_tool_bdr";
497
+ $arrow_class = "bot_eamil_arow";
498
+
499
+ /* fecth no of counts if active in admin section */
500
+ if(
501
+ $sfsi_section4_options['sfsi_email_countsDisplay']=="yes" &&
502
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
503
+ )
504
+ {
505
+ if($sfsi_section4_options['sfsi_email_countsFrom']=="manual")
506
+ {
507
+ $counts=$socialObj->format_num($sfsi_section4_options['sfsi_email_manualCounts']);
508
+ }
509
+ else
510
+ {
511
+ $counts = $socialObj->SFSI_getFeedSubscriber(sanitize_text_field(get_option('sfsi_feed_id',false)));
512
+ }
513
+ }
514
+
515
+ if(!empty($sfsi_section5_options['sfsi_email_MouseOverText']))
516
+ {
517
+ $alt_text = $sfsi_section5_options['sfsi_email_MouseOverText'];
518
+ }
519
+ else
520
+ {
521
+ $alt_text = 'EMAIL';
522
+ }
523
+
524
+ //Custom Skin Support {Monad}
525
+ if($active_theme == 'custom_support')
526
+ {
527
+ if(get_option("email_skin"))
528
+ {
529
+ $icon = get_option("email_skin");
530
+ }
531
+ else
532
+ {
533
+ $active_theme = 'default';
534
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
535
+ //$icon=($sfsi_section2_options['sfsi_rss_icons']=="sfsi") ? $icons_baseUrl.$active_theme."_sf.png" : $icons_baseUrl.$active_theme."_email.png";
536
+ if($sfsi_section2_options['sfsi_rss_icons']=="sfsi")
537
+ {
538
+ $icon = $icons_baseUrl.$active_theme."_sf.png";
539
+ }
540
+ elseif($sfsi_section2_options['sfsi_rss_icons']=="email")
541
+ {
542
+ $icon = $icons_baseUrl.$active_theme."_email.png";
543
+ }
544
+ else
545
+ {
546
+ $icon = $icons_baseUrl.$active_theme."_subscribe.png";
547
+ }
548
+ }
549
+ }
550
+ else
551
+ {
552
+
553
+ $rss_icons = isset($sfsi_section2_options['sfsi_rss_icons']) && !empty($sfsi_section2_options['sfsi_rss_icons']) ? $sfsi_section2_options['sfsi_rss_icons'] : false;
554
+
555
+ switch ($rss_icons) {
556
+
557
+ case 'email':
558
+ $image = "_email.png";
559
+ break;
560
+
561
+ case 'subscribe':
562
+ $image = "_subscribe.png";
563
+ break;
564
+
565
+ case 'sfsi':
566
+ $image = "_sf.png";
567
+ break;
568
+
569
+ default:
570
+ $image = "_subscribe.png";
571
+ break;
572
+ }
573
+
574
+ $icon = $icons_baseUrl.$active_theme.$image;
575
+ }
576
+ break;
577
+
578
+ case "facebook" :
579
+
580
+ $width = 62;
581
+ $totwith = $width+28+$icons_space;
582
+ $twt_margin = $totwith/2;
583
+ $toolClass = "fb_tool_bdr";
584
+ $arrow_class = "bot_fb_arow";
585
+
586
+ /* check for the over section */
587
+ if(!empty($sfsi_section5_options['sfsi_facebook_MouseOverText']))
588
+ {
589
+ $alt_text = $sfsi_section5_options['sfsi_facebook_MouseOverText'];
590
+ }
591
+ else
592
+ {
593
+ $alt_text = "FACEBOOK";
594
+ }
595
+
596
+ $visit_icon = $visit_iconsUrl."facebook.png";
597
+
598
+ $url = isset($sfsi_section2_options['sfsi_facebookPage_url']) && !empty($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url'] : false;
599
+
600
+ $url = false != $url ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
601
+
602
+ $like_option = isset($sfsi_section2_options['sfsi_facebookLike_option']) && !empty($sfsi_section2_options['sfsi_facebookLike_option']) ? $sfsi_section2_options['sfsi_facebookLike_option'] : false;
603
+
604
+ $page_option = isset($sfsi_section2_options['sfsi_facebookPage_option']) && !empty($sfsi_section2_options['sfsi_facebookPage_option']) ? $sfsi_section2_options['sfsi_facebookPage_option'] : false;
605
+
606
+ $share_option = isset($sfsi_section2_options['sfsi_facebookShare_option']) && !empty($sfsi_section2_options['sfsi_facebookShare_option']) ? $sfsi_section2_options['sfsi_facebookShare_option'] : false;
607
+
608
+ if((false != $like_option && $like_option=="yes") || (false != $share_option && $share_option=="yes"))
609
+ {
610
+ $url=($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url']:'';
611
+ $hoverSHow = 1;
612
+ $hoverdiv = '';
613
+
614
+ if(false != $page_option && $page_option=="yes")
615
+ {
616
+ $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>";
617
+ }
618
+ if(false!= $like_option && $like_option=="yes")
619
+ {
620
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_FBlike($current_url)."</div>";
621
+ }
622
+ if(false!= $share_option && $share_option=="yes")
623
+ {
624
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsiFB_Share($current_url)."</div>";
625
+ }
626
+
627
+ }
628
+
629
+ /* fecth no of counts if active in admin section */
630
+ if(
631
+ $sfsi_section4_options['sfsi_facebook_countsDisplay']=="yes" &&
632
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
633
+ )
634
+ {
635
+ if($sfsi_section4_options['sfsi_facebook_countsFrom']=="manual")
636
+ {
637
+ $counts=$socialObj->format_num($sfsi_section4_options['sfsi_facebook_manualCounts']);
638
+ }
639
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="likes")
640
+ {
641
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
642
+ $counts=$socialObj->format_num($fb_data['like_count']);
643
+ if(empty($counts))
644
+ {
645
+ $counts=(string) "0";
646
+ }
647
+ }
648
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="followers")
649
+ {
650
+ $fb_data=$socialObj->sfsi_get_fb($current_url);
651
+ $counts=$socialObj->format_num($fb_data['share_count']);
652
+
653
+ }
654
+ else if($sfsi_section4_options['sfsi_facebook_countsFrom']=="mypage")
655
+ {
656
+ $current_url = $sfsi_section4_options['sfsi_facebook_mypageCounts'];
657
+ $fb_data=$socialObj->sfsi_get_fb_pagelike($current_url);
658
+ $counts=$socialObj->format_num($fb_data);
659
+ }
660
+ }
661
+
662
+ //Custom Skin Support {Monad}
663
+ if($active_theme == 'custom_support')
664
+ {
665
+ if(get_option("facebook_skin"))
666
+ {
667
+ $icon = get_option("facebook_skin");
668
+ }
669
+ else
670
+ {
671
+ $active_theme = 'default';
672
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
673
+ $icon=$icons_baseUrl.$active_theme."_facebook.png";
674
+ }
675
+ }
676
+ else
677
+ {
678
+ $icon=$icons_baseUrl.$active_theme."_facebook.png";
679
+ }
680
+ break;
681
+ case "twitter" :
682
+ $toolClass = "twt_tool_bdr";
683
+ $arrow_class = "bot_twt_arow";
684
+
685
+ $url = isset($sfsi_section2_options['sfsi_twitter_pageURL']) && !empty($sfsi_section2_options['sfsi_twitter_pageURL']) ? $sfsi_section2_options['sfsi_twitter_pageURL'] : '';
686
+
687
+ $twitter_user = isset($sfsi_section2_options['sfsi_twitter_followUserName']) && !empty($sfsi_section2_options['sfsi_twitter_followUserName']) ? $sfsi_section2_options['sfsi_twitter_followUserName'] : false;
688
+
689
+ $twitter_text = isset($sfsi_section2_options['sfsi_twitter_aboutPageText']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPageText']) ? $sfsi_section2_options['sfsi_twitter_aboutPageText'] : false;
690
+
691
+ $visit_icon = $visit_iconsUrl."twitter.png";
692
+
693
+ $width = 59;
694
+ $totwith = $width+28+$icons_space;
695
+ $twt_margin = $totwith/2;
696
+ /* check for icons to display */
697
+ $hoverdiv='';
698
+
699
+ $follow_me = isset($sfsi_section2_options['sfsi_twitter_followme']) && !empty($sfsi_section2_options['sfsi_twitter_followme']) ? $sfsi_section2_options['sfsi_twitter_followme'] : false;
700
+
701
+ $about_page = isset($sfsi_section2_options['sfsi_twitter_aboutPage']) && !empty($sfsi_section2_options['sfsi_twitter_aboutPage']) ? $sfsi_section2_options['sfsi_twitter_aboutPage'] : false;
702
+
703
+ if($follow_me=="yes" ||$about_page=="yes")
704
+ {
705
+ $hoverSHow=1;
706
+ //Visit twitter page {Monad}
707
+ if(isset($sfsi_section2_options['sfsi_twitter_page']) && !empty($sfsi_section2_options['sfsi_twitter_page']) && $sfsi_section2_options['sfsi_twitter_page']=="yes")
708
+ {
709
+ $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>";
710
+ }
711
+ if($follow_me=="yes" && !empty($twitter_user))
712
+ {
713
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_twitterFollow($twitter_user)."</div>";
714
+ }
715
+ if($about_page=="yes")
716
+ {
717
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_twitterShare($current_url,$twitter_text)."</div>";
718
+ }
719
+
720
+ }
721
+
722
+ /* fecth no of counts if active in admin section */
723
+ if(
724
+ $sfsi_section4_options['sfsi_twitter_countsDisplay']=="yes" &&
725
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
726
+ )
727
+ {
728
+ if($sfsi_section4_options['sfsi_twitter_countsFrom']=="manual")
729
+ {
730
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_twitter_manualCounts']);
731
+ }
732
+ else if($sfsi_section4_options['sfsi_twitter_countsFrom']=="source")
733
+ {
734
+ $tw_settings = array('tw_consumer_key'=>$sfsi_section4_options['tw_consumer_key'],
735
+ 'tw_consumer_secret'=> $sfsi_section4_options['tw_consumer_secret'],
736
+ 'tw_oauth_access_token'=> $sfsi_section4_options['tw_oauth_access_token'],
737
+ 'tw_oauth_access_token_secret'=> $sfsi_section4_options['tw_oauth_access_token_secret']);
738
+
739
+ $followers = $socialObj->sfsi_get_tweets($twitter_user,$tw_settings);
740
+ $counts = $socialObj->format_num($followers);
741
+ if(empty($counts))
742
+ {
743
+ $counts=(string) "0";
744
+ }
745
+ }
746
+ }
747
+
748
+ //Giving alternative text to image
749
+ if(!empty($sfsi_section5_options['sfsi_twitter_MouseOverText']))
750
+ {
751
+ $alt_text = $sfsi_section5_options['sfsi_twitter_MouseOverText'];
752
+ }
753
+ else
754
+ {
755
+ $alt_text = "TWITTER";
756
+ }
757
+
758
+ //Custom Skin Support {Monad}
759
+ if($active_theme == 'custom_support')
760
+ {
761
+ if(get_option("twitter_skin"))
762
+ {
763
+ $icon = get_option("twitter_skin");
764
+ }
765
+ else
766
+ {
767
+ $active_theme = 'default';
768
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
769
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
770
+ }
771
+ }
772
+ else
773
+ {
774
+ $icon=$icons_baseUrl.$active_theme."_twitter.png";
775
+ }
776
+ break;
777
+
778
+ case "youtube" :
779
+ $toolClass = "utube_tool_bdr";
780
+ $arrow_class = "bot_utube_arow";
781
+ $width = 96;
782
+ $totwith = $width+28+$icons_space;
783
+ $twt_margin = $totwith/2;
784
+ $youtube_user = (isset($sfsi_section4_options['sfsi_youtube_user']) && !empty($sfsi_section4_options['sfsi_youtube_user'])) ? $sfsi_section4_options['sfsi_youtube_user'] : 'SpecificFeeds';
785
+ $visit_icon = $visit_iconsUrl."youtube.png";
786
+
787
+ $url = isset($sfsi_section2_options['sfsi_youtube_pageUrl']) && !empty($sfsi_section2_options['sfsi_youtube_pageUrl']) ? $sfsi_section2_options['sfsi_youtube_pageUrl'] : '';
788
+
789
+ //Giving alternative text to image
790
+ if(!empty($sfsi_section5_options['sfsi_youtube_MouseOverText']))
791
+ {
792
+ $alt_text = $sfsi_section5_options['sfsi_youtube_MouseOverText'];
793
+ }
794
+ else
795
+ {
796
+ $alt_text = "YOUTUBE";
797
+ }
798
+
799
+ /* check for icons to display */
800
+ $hoverdiv="";
801
+
802
+ $follow = isset($sfsi_section2_options['sfsi_youtube_follow']) && !empty($sfsi_section2_options['sfsi_youtube_follow']) ? $sfsi_section2_options['sfsi_youtube_follow'] : false;
803
+
804
+ $ypage = isset($sfsi_section2_options['sfsi_youtube_page']) && !empty($sfsi_section2_options['sfsi_youtube_page']) ? $sfsi_section2_options['sfsi_youtube_page'] : false;
805
+
806
+ if(false != $follow && $follow=="yes")
807
+ {
808
+ $hoverSHow = 1;
809
+
810
+ if($ypage =="yes")
811
+ {
812
+ $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>";
813
+ }
814
+ if($follow =="yes")
815
+ {
816
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_YouTubeSub($youtube_user)."</div>";
817
+ }
818
+ }
819
+
820
+ /* fecth no of counts if active in admin section */
821
+ if(
822
+ $sfsi_section4_options['sfsi_youtube_countsDisplay']=="yes" &&
823
+ $sfsi_section4_options['sfsi_display_counts']=="yes"
824
+ )
825
+ {
826
+ if($sfsi_section4_options['sfsi_youtube_countsFrom']=="manual")
827
+ {
828
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_youtube_manualCounts']);
829
+ }
830
+ else if($sfsi_section4_options['sfsi_youtube_countsFrom']=="subscriber")
831
+ {
832
+ $followers = $socialObj->sfsi_get_youtube($youtube_user);
833
+ $counts = $socialObj->format_num($followers);
834
+ if(empty($counts))
835
+ {
836
+ $counts = (string) "0";
837
+ }
838
+ }
839
+ }
840
+
841
+ //Custom Skin Support {Monad}
842
+ if($active_theme == 'custom_support')
843
+ {
844
+ if(get_option("youtube_skin"))
845
+ {
846
+ $icon = get_option("youtube_skin");
847
+ }
848
+ else
849
+ {
850
+ $active_theme = 'default';
851
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
852
+ $icon=$icons_baseUrl.$active_theme."_youtube.png";
853
+ }
854
+ }
855
+ else
856
+ {
857
+ $icon=$icons_baseUrl.$active_theme."_youtube.png";
858
+ }
859
+ break;
860
+
861
+ case "pinterest" :
862
+
863
+ $width = 73;
864
+ $totwith = $width+28+$icons_space;
865
+ $twt_margin = $totwith/2;
866
+ $toolClass = "printst_tool_bdr";
867
+ $arrow_class = "bot_pintst_arow";
868
+
869
+ $pinterest_user = (isset($sfsi_section4_options['sfsi_pinterest_user']))
870
+ ? $sfsi_section4_options['sfsi_pinterest_user'] : '';
871
+ $pinterest_board = (isset($sfsi_section4_options['sfsi_pinterest_board']))
872
+ ? $sfsi_section4_options['sfsi_pinterest_board'] : '';
873
+
874
+ $visit_icon = $visit_iconsUrl."pinterest.png";
875
+ $url = (isset($sfsi_section2_options['sfsi_pinterest_pageUrl'])) ? $sfsi_section2_options['sfsi_pinterest_pageUrl'] : '';
876
+
877
+ //Giving alternative text to image
878
+ if(isset($sfsi_section5_options['sfsi_pinterest_MouseOverText']) && !empty($sfsi_section5_options['sfsi_pinterest_MouseOverText']))
879
+ {
880
+ $alt_text = $sfsi_section5_options['sfsi_pinterest_MouseOverText'];
881
+ }
882
+ else
883
+ {
884
+ $alt_text = "PINTEREST";
885
+ }
886
+
887
+ /* check for icons to display */
888
+ $hoverdiv="";
889
+
890
+ $pingblog = isset($sfsi_section2_options['sfsi_pinterest_pingBlog']) && !empty($sfsi_section2_options['sfsi_pinterest_pingBlog']) ? $sfsi_section2_options['sfsi_pinterest_pingBlog'] : false;
891
+
892
+ $page = isset($sfsi_section2_options['sfsi_pinterest_page']) && !empty($sfsi_section2_options['sfsi_pinterest_page']) ? $sfsi_section2_options['sfsi_pinterest_page'] : false;
893
+
894
+ $cDisplay = isset($sfsi_section4_options['sfsi_pinterest_countsDisplay']) && !empty($sfsi_section4_options['sfsi_pinterest_countsDisplay']) ? $sfsi_section4_options['sfsi_pinterest_countsDisplay'] : false;
895
+
896
+ $displayC = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
897
+
898
+ $cFrom = isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && !empty($sfsi_section4_options['sfsi_pinterest_countsFrom']) ? $sfsi_section4_options['sfsi_pinterest_countsFrom'] : false;
899
+ // var_dump($sfsi_section4_options['sfsi_pinterest_countsFrom'],$cFrom);die();
900
+
901
+ if($pingblog=="yes" )
902
+ {
903
+ $hoverSHow = 1;
904
+
905
+ if($page =="yes")
906
+ {
907
+ $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>";
908
+ }
909
+ if($pingblog=="yes")
910
+ {
911
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_PinIt($current_url)."</div>";
912
+ }
913
+ }
914
+
915
+ /* fecth no of counts if active in admin section */
916
+ if($cDisplay == "yes" && $displayC=="yes")
917
+ {
918
+ if($cFrom=="manual")
919
+ {
920
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_pinterest_manualCounts']);
921
+ }
922
+ else if($cFrom=="pins")
923
+ {
924
+ $pins = $socialObj->sfsi_get_pinterest($current_url);
925
+ $counts = $pins;
926
+ if(empty($counts))
927
+ {
928
+ $counts=(string) "0";
929
+ }
930
+ }
931
+ }
932
+
933
+ //Custom Skin Support {Monad}
934
+ if($active_theme == 'custom_support')
935
+ {
936
+ if(get_option("pintrest_skin"))
937
+ {
938
+ $icon = get_option("pintrest_skin");
939
+ }
940
+ else
941
+ {
942
+ $active_theme = 'default';
943
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
944
+ $icon = $icons_baseUrl.$active_theme."_pinterest.png";
945
+ }
946
+ }
947
+ else
948
+ {
949
+ $icon=$icons_baseUrl.$active_theme."_pinterest.png";
950
+ }
951
+ break;
952
+
953
+ case "instagram" :
954
+ $toolClass = "instagram_tool_bdr";
955
+ $arrow_class = "bot_pintst_arow";
956
+
957
+ $url = (isset($sfsi_section2_options['sfsi_instagram_pageUrl'])) ? $sfsi_section2_options['sfsi_instagram_pageUrl'] : '';
958
+
959
+ $instagram_user_name = isset($sfsi_section4_options['sfsi_instagram_User']) && !empty($sfsi_section4_options['sfsi_instagram_User']) ? $sfsi_section4_options['sfsi_instagram_User'] : false;
960
+
961
+ //Giving alternative text to image
962
+ if(isset($sfsi_section5_options['sfsi_instagram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_instagram_MouseOverText']))
963
+ {
964
+ $alt_text = $sfsi_section5_options['sfsi_instagram_MouseOverText'];
965
+ }
966
+ else
967
+ {
968
+ $alt_text = "INSTAGRAM";
969
+ }
970
+
971
+ $hoverdiv="";
972
+
973
+ $cDisplay = isset($sfsi_section4_options['sfsi_instagram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_instagram_countsDisplay']) ? $sfsi_section4_options['sfsi_instagram_countsDisplay']: false;
974
+
975
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
976
+
977
+ $cFrom = isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && !empty($sfsi_section4_options['sfsi_instagram_countsFrom']) ? $sfsi_section4_options['sfsi_instagram_countsFrom']: false;
978
+
979
+ /* fecth no of counts if active in admin section */
980
+ if($cDisplay=="yes" && $Displayc=="yes")
981
+ {
982
+ if($cFrom=="manual")
983
+ {
984
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_instagram_manualCounts']);
985
+ }
986
+ else if($cFrom=="followers")
987
+ {
988
+ $counts = $socialObj->sfsi_get_instagramFollowers($instagram_user_name);
989
+ if(empty($counts))
990
+ {
991
+ $counts=(string) "0";
992
+ }
993
+ }
994
+ }
995
+
996
+ //Custom Skin Support {Monad}
997
+ if($active_theme == 'custom_support')
998
+ {
999
+ if(get_option("instagram_skin"))
1000
+ {
1001
+ $icon = get_option("instagram_skin");
1002
+ }
1003
+ else
1004
+ {
1005
+ $active_theme = 'default';
1006
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1007
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1008
+ }
1009
+ }
1010
+ else
1011
+ {
1012
+ $icon=$icons_baseUrl.$active_theme."_instagram.png";
1013
+ }
1014
+ break;
1015
+
1016
+ case "telegram" :
1017
+ $toolClass = "telegram_tool_bdr";
1018
+ $arrow_class = "bot_pintst_arow";
1019
+ $hoverdiv = '';
1020
+
1021
+ // $url = (isset($sfsi_section4_options['sfsi_telegram_pageURL'])) ? $sfsi_section4_options['sfsi_telegram_pageURL'] : '';
1022
+
1023
+ // $telegram_user_name = isset($sfsi_section4_options['sfsi_telegram_User']) && !empty($sfsi_section4_options['sfsi_telegram_User']) ? $sfsi_section4_options['sfsi_telegram_User'] : false;
1024
+
1025
+ //Giving alternative text to image
1026
+ if(isset($sfsi_section5_options['sfsi_telegram_MouseOverText']) && !empty($sfsi_section5_options['sfsi_telegram_MouseOverText']))
1027
+ {
1028
+ $alt_text = $sfsi_section5_options['sfsi_telegram_MouseOverText'];
1029
+
1030
+ }
1031
+ else
1032
+ {
1033
+ $alt_text = "telegram";
1034
+ }
1035
+ $messageus_icon = $visit_iconsUrl.$icon_name."_message.svg";
1036
+ $hoverdiv="";
1037
+ $cDisplay = isset($sfsi_section4_options['sfsi_telegram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_telegram_countsDisplay']) ? $sfsi_section4_options['sfsi_telegram_countsDisplay']: false;
1038
+
1039
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1040
+ /* fecth no of counts if active in admin section */
1041
+ if($cDisplay=="yes" && $Displayc=="yes")
1042
+ {
1043
+
1044
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_telegram_manualCounts']);
1045
+ }
1046
+
1047
+ //Custom Skin Support {Monad}
1048
+ if($active_theme == 'custom_support')
1049
+ {
1050
+ if(get_option("telegram_skin"))
1051
+ {
1052
+ $icon = get_option("telegram_skin");
1053
+ }
1054
+ else
1055
+ {
1056
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1057
+ $icon=$icons_baseUrl."default_telegram.png";
1058
+ }
1059
+ }
1060
+ else
1061
+ {
1062
+ $icon=$icons_baseUrl.$active_theme."_telegram.png";
1063
+ }
1064
+ if(
1065
+ isset($sfsi_section2_options['sfsi_telegram_message']) && !empty($sfsi_section2_options['sfsi_telegram_message'])
1066
+ &&
1067
+ isset($sfsi_section2_options['sfsi_telegram_username']) && !empty($sfsi_section2_options['sfsi_telegram_username'])
1068
+
1069
+ ){
1070
+ $tg_username = $sfsi_section2_options['sfsi_telegram_username'];
1071
+ $tg_msg = stripslashes($sfsi_section2_options['sfsi_telegram_message']);
1072
+ $tg_msg = str_replace('"', '', str_replace("'", '', $tg_msg));
1073
+ $tg_msg = html_entity_decode(strip_tags($tg_msg), ENT_QUOTES,'UTF-8');
1074
+ $tg_msg = str_replace("%26%238230%3B", "...", $tg_msg);
1075
+ $tg_msg = rawurlencode($tg_msg);
1076
+
1077
+ $tele_url = "https://t.me/".$tg_username;
1078
+ $url = $tele_url."?&text=".urlencode($tg_msg);
1079
+ // var_dump($url);
1080
+ // die();
1081
+ // file_get_contents($url);
1082
+ }else{
1083
+ $url="#";
1084
+ $sfsi_onclick="event.preventDefault();";
1085
+ }
1086
+ if($active_theme=="glossy"){
1087
+ $sfsi_new_icons = "yes";
1088
+ }
1089
+ break;
1090
+ case "vk" :
1091
+ $toolClass = "vk_tool_bdr";
1092
+ $arrow_class = "bot_pintst_arow";
1093
+
1094
+ $url = (isset($sfsi_section2_options['sfsi_vk_pageURL'])) ? $sfsi_section2_options['sfsi_vk_pageURL'] : '';
1095
+
1096
+ // $vk_user_name = isset($sfsi_section4_options['sfsi_vk_User']) && !empty($sfsi_section4_options['sfsi_vk_User']) ? $sfsi_section4_options['sfsi_vk_User'] : false;
1097
+
1098
+ //Giving alternative text to image
1099
+ if(isset($sfsi_section5_options['sfsi_vk_MouseOverText']) && !empty($sfsi_section5_options['sfsi_vk_MouseOverText']))
1100
+ {
1101
+ $alt_text = $sfsi_section5_options['sfsi_vk_MouseOverText'];
1102
+ }
1103
+ else
1104
+ {
1105
+ $alt_text = "vk";
1106
+ }
1107
+
1108
+ $hoverdiv="";
1109
+
1110
+ $cDisplay = isset($sfsi_section4_options['sfsi_vk_countsDisplay']) && !empty($sfsi_section4_options['sfsi_vk_countsDisplay']) ? $sfsi_section4_options['sfsi_vk_countsDisplay']: false;
1111
+
1112
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1113
+
1114
+ /* fecth no of counts if active in admin section */
1115
+ if($cDisplay=="yes" && $Displayc=="yes")
1116
+ {
1117
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_vk_manualCounts']);
1118
+ }
1119
+
1120
+ //Custom Skin Support {Monad}
1121
+ if($active_theme == 'custom_support')
1122
+ {
1123
+ if(get_option("vk_skin"))
1124
+ {
1125
+ $icon = get_option("vk_skin");
1126
+ }
1127
+ else
1128
+ {
1129
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1130
+ $icon=$icons_baseUrl."default_vk.png";
1131
+ }
1132
+ }
1133
+ else
1134
+ {
1135
+ $icon=$icons_baseUrl.$active_theme."_vk.png";
1136
+ }
1137
+ if($active_theme=="glossy"){
1138
+ $sfsi_new_icons = "yes";
1139
+ }
1140
+
1141
+ break;
1142
+ case "ok" :
1143
+ $toolClass = "ok_tool_bdr";
1144
+ $arrow_class = "bot_pintst_arow";
1145
+
1146
+ $url = (isset($sfsi_section2_options['sfsi_ok_pageURL'])) ? $sfsi_section2_options['sfsi_ok_pageURL'] : '';
1147
+
1148
+ // $ok_user_name = isset($sfsi_section4_options['sfsi_ok_User']) && !empty($sfsi_section4_options['sfsi_ok_User']) ? $sfsi_section4_options['sfsi_ok_User'] : false;
1149
+
1150
+ //Giving alternative text to image
1151
+ if(isset($sfsi_section5_options['sfsi_ok_MouseOverText']) && !empty($sfsi_section5_options['sfsi_ok_MouseOverText']))
1152
+ {
1153
+ $alt_text = $sfsi_section5_options['sfsi_ok_MouseOverText'];
1154
+ }
1155
+ else
1156
+ {
1157
+ $alt_text = "ok";
1158
+ }
1159
+
1160
+ $hoverdiv="";
1161
+
1162
+ $cDisplay = isset($sfsi_section4_options['sfsi_ok_countsDisplay']) && !empty($sfsi_section4_options['sfsi_ok_countsDisplay']) ? $sfsi_section4_options['sfsi_ok_countsDisplay']: false;
1163
+
1164
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1165
+ /* fecth no of counts if active in admin section */
1166
+ if($cDisplay=="yes" && $Displayc=="yes")
1167
+ {
1168
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_ok_manualCounts']);
1169
+ }
1170
+
1171
+ //Custom Skin Support {Monad}
1172
+ if($active_theme == 'custom_support')
1173
+ {
1174
+ if(get_option("ok_skin"))
1175
+ {
1176
+ $icon = get_option("ok_skin");
1177
+ }
1178
+ else
1179
+ {
1180
+
1181
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1182
+ $icon=$icons_baseUrl."default_ok.png";
1183
+ }
1184
+ }
1185
+ else
1186
+ {
1187
+ $icon=$icons_baseUrl.$active_theme."_ok.png";
1188
+ }
1189
+ if($active_theme=="glossy"){
1190
+ $sfsi_new_icons = "yes";
1191
+ }
1192
+
1193
+ break;
1194
+ case "weibo" :
1195
+ $toolClass = "weibo_tool_bdr";
1196
+ $arrow_class = "bot_pintst_arow";
1197
+
1198
+ $url = (isset($sfsi_section2_options['sfsi_weibo_pageURL'])) ? $sfsi_section2_options['sfsi_weibo_pageURL'] : '';
1199
+
1200
+ // $weibo_user_name = isset($sfsi_section4_options['sfsi_weibo_User']) && !empty($sfsi_section4_options['sfsi_weibo_User']) ? $sfsi_section4_options['sfsi_weibo_User'] : false;
1201
+
1202
+ //Giving alternative text to image
1203
+ if(isset($sfsi_section5_options['sfsi_weibo_MouseOverText']) && !empty($sfsi_section5_options['sfsi_weibo_MouseOverText']))
1204
+ {
1205
+ $alt_text = $sfsi_section5_options['sfsi_weibo_MouseOverText'];
1206
+ }
1207
+ else
1208
+ {
1209
+ $alt_text = "weibo";
1210
+ }
1211
+
1212
+ $hoverdiv="";
1213
+
1214
+ $cDisplay = isset($sfsi_section4_options['sfsi_weibo_countsDisplay']) && !empty($sfsi_section4_options['sfsi_weibo_countsDisplay']) ? $sfsi_section4_options['sfsi_weibo_countsDisplay']: false;
1215
+
1216
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1217
+
1218
+ /* fecth no of counts if active in admin section */
1219
+ if($cDisplay=="yes" && $Displayc=="yes")
1220
+ {
1221
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_weibo_manualCounts']);
1222
+ }
1223
+
1224
+ //Custom Skin Support {Monad}
1225
+ if($active_theme == 'custom_support')
1226
+ {
1227
+ if(get_option("weibo_skin"))
1228
+ {
1229
+ $icon = get_option("weibo_skin");
1230
+ }
1231
+ else
1232
+ {
1233
+
1234
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1235
+ $icon=$icons_baseUrl."default_weibo.png";
1236
+ }
1237
+ }
1238
+ else
1239
+ {
1240
+ $icon=$icons_baseUrl.$active_theme."_weibo.png";
1241
+ }
1242
+ if($active_theme=="glossy"){
1243
+ $sfsi_new_icons = "yes";
1244
+ }
1245
+
1246
+ break;
1247
+ case "wechat" :
1248
+ $toolClass = "wechat_tool_bdr";
1249
+ $arrow_class = "bot_pintst_arow";
1250
+
1251
+ // $url = (isset($sfsi_section2_options['sfsi_wechat_pageURL'])) ? $sfsi_section2_options['sfsi_wechat_pageURL'] : '';
1252
+
1253
+ // $wechat_user_name = isset($sfsi_section4_options['sfsi_wechat_User']) && !empty($sfsi_section4_options['sfsi_wechat_User']) ? $sfsi_section4_options['sfsi_wechat_User'] : false;
1254
+
1255
+ //Giving alternative text to image
1256
+ if(isset($sfsi_section5_options['sfsi_wechat_MouseOverText']) && !empty($sfsi_section5_options['sfsi_wechat_MouseOverText']))
1257
+ {
1258
+ $alt_text = $sfsi_section5_options['sfsi_wechat_MouseOverText'];
1259
+ }
1260
+ else
1261
+ {
1262
+ $alt_text = "wechat";
1263
+ }
1264
+
1265
+ $hoverdiv="";
1266
+
1267
+ $cDisplay = isset($sfsi_section4_options['sfsi_wechat_countsDisplay']) && !empty($sfsi_section4_options['sfsi_wechat_countsDisplay']) ? $sfsi_section4_options['sfsi_wechat_countsDisplay']: false;
1268
+
1269
+ $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts']: false;
1270
+
1271
+ /* fecth no of counts if active in admin section */
1272
+ if($cDisplay=="yes" && $Displayc=="yes")
1273
+ {
1274
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_wechat_manualCounts']);
1275
+ }
1276
+ $url = "weixin://dl/chat";
1277
+ if(
1278
+ (isset($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']) &&
1279
+
1280
+ (isset($sfsi_section2_options['sfsi_wechatShare_option']) && "yes" == $sfsi_section2_options['sfsi_wechatShare_option'])
1281
+ ){
1282
+ $hoverSHow = 1;
1283
+ $hoverdiv = "";
1284
+
1285
+ if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $option2['sfsi_wechatFollow_option']
1286
+
1287
+ && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1288
+
1289
+ $image_url = $sfsi_section2_options['sfsi_wechat_scan_image'];
1290
+
1291
+ $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>";
1292
+ }
1293
+
1294
+ if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && !empty($sfsi_section2_options['sfsi_wechatShare_option'])
1295
+ && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1296
+
1297
+ $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>";
1298
+ }
1299
+ }else{
1300
+
1301
+
1302
+ if(isset($sfsi_section2_options['sfsi_wechatFollow_option']) && !empty($sfsi_section2_options['sfsi_wechatFollow_option']) && "yes" == $sfsi_section2_options['sfsi_wechatFollow_option']
1303
+
1304
+ && isset($sfsi_section2_options['sfsi_wechat_scan_image']) && !empty($sfsi_section2_options['sfsi_wechat_scan_image'])){
1305
+
1306
+ $sfsi_onclick="event.preventDefault();sfsi_wechat_follow(\'".$sfsi_section2_options['sfsi_wechat_scan_image']."\')" ;
1307
+ }
1308
+
1309
+ if(isset($sfsi_section2_options['sfsi_wechatShare_option']) && 'yes'==($sfsi_section2_options['sfsi_wechatShare_option'])
1310
+ && "yes" == $sfsi_section2_options['sfsi_wechatShare_option']){
1311
+ if(!wp_is_mobile()){
1312
+ $sfsi_onclick="event.preventDefault();sfsi_wechat_share('".trim($current_url)."')" ;
1313
+ }else{
1314
+ $sfsi_onclick='';
1315
+ if(wp_is_mobile()){
1316
+ $sfsi_onclick = "console.log(event);event.stopPropagation&&event.stopPropagation();";
1317
+ }
1318
+ $sfsi_onclick.="event.preventDefault();sfsi_mobile_wechat_share('".trim($current_url)."')" ;
1319
+ }
1320
+ }
1321
+ $hoverSHow = 0;
1322
+ }
1323
+ //Custom Skin Support {Monad}
1324
+ if($active_theme == 'custom_support')
1325
+ {
1326
+ if(get_option("wechat_skin"))
1327
+ {
1328
+ $icon = get_option("wechat_skin");
1329
+ }
1330
+ else
1331
+ {
1332
+
1333
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1334
+ $icon=$icons_baseUrl."default_wechat.png";
1335
+ }
1336
+ }
1337
+ else
1338
+ {
1339
+ $icon=$icons_baseUrl.$active_theme."_wechat.png";
1340
+ }
1341
+ if($active_theme=="glossy"){
1342
+ $sfsi_new_icons = "yes";
1343
+ }
1344
+
1345
+ break;
1346
+
1347
+
1348
+ case "linkedin" :
1349
+ $width = 66;
1350
+ $toolClass = "linkedin_tool_bdr";
1351
+ $arrow_class = "bot_linkedin_arow";
1352
+
1353
+ $linkedIn_compayId = isset($sfsi_section2_options['sfsi_linkedin_followCompany']) && !empty($sfsi_section2_options['sfsi_linkedin_followCompany']) ? $sfsi_section2_options['sfsi_linkedin_followCompany'] : false;
1354
+
1355
+ $page = isset($sfsi_section2_options['sfsi_linkedin_page']) && !empty($sfsi_section2_options['sfsi_linkedin_page']) ? $sfsi_section2_options['sfsi_linkedin_page'] : false;
1356
+
1357
+ $follow = isset($sfsi_section2_options['sfsi_linkedin_follow']) && !empty($sfsi_section2_options['sfsi_linkedin_follow']) ? $sfsi_section2_options['sfsi_linkedin_follow'] : false;
1358
+
1359
+ $share = isset($sfsi_section2_options['sfsi_linkedin_SharePage']) && !empty($sfsi_section2_options['sfsi_linkedin_SharePage']) ? $sfsi_section2_options['sfsi_linkedin_SharePage'] : false;
1360
+
1361
+ $reBusiness = isset($sfsi_section2_options['sfsi_linkedin_recommendBusines']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendBusines']) ? $sfsi_section2_options['sfsi_linkedin_recommendBusines'] : false;
1362
+
1363
+ $linkedIn_compay = $linkedIn_compayId;
1364
+ $linkedIn_ProductId = isset($sfsi_section2_options['sfsi_linkedin_recommendProductId']) && !empty($sfsi_section2_options['sfsi_linkedin_recommendProductId']) ? $sfsi_section2_options['sfsi_linkedin_recommendProductId'] : false;
1365
+
1366
+ $visit_icon = $visit_iconsUrl."linkedIn.png";
1367
+
1368
+ /*check for icons to display */
1369
+ $url = isset($sfsi_section2_options['sfsi_linkedin_pageURL']) && !empty($sfsi_section2_options['sfsi_linkedin_pageURL']) ? $sfsi_section2_options['sfsi_linkedin_pageURL'] : '';
1370
+
1371
+ if($follow =="yes" || $share =="yes" || $reBusiness =="yes")
1372
+ {
1373
+ $hoverSHow = 1;
1374
+ $hoverdiv = '';
1375
+
1376
+ if($page=="yes")
1377
+ {
1378
+ $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>";
1379
+ }
1380
+ if($follow=="yes")
1381
+ {
1382
+ $hoverdiv.="<div class='icon1'>".$socialObj->sfsi_LinkedInFollow($linkedIn_compayId)."</div>";
1383
+ }
1384
+ if($share=="yes")
1385
+ {
1386
+ $hoverdiv.="<div class='icon2'>".$socialObj->sfsi_LinkedInShare()."</div>";
1387
+ }
1388
+ if($reBusiness=="yes")
1389
+ {
1390
+ $hoverdiv.="<div class='icon3'>".$socialObj->sfsi_LinkedInRecommend($linkedIn_compay,$linkedIn_ProductId)."</div>";
1391
+ $width=99;
1392
+ }
1393
+ }
1394
+
1395
+ $cFrom = isset($sfsi_section4_options['sfsi_linkedIn_countsFrom']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsFrom']) ? $sfsi_section4_options['sfsi_linkedIn_countsFrom'] : false;
1396
+
1397
+ $disp = isset($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) ? $sfsi_section4_options['sfsi_linkedIn_countsDisplay'] : false;
1398
+
1399
+ $dcount = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1400
+
1401
+ /* fecth no of counts if active in admin section */
1402
+ if($disp=="yes" &&$dcount=="yes")
1403
+ {
1404
+ if($cFrom=="manual")
1405
+ {
1406
+ $counts = $socialObj->format_num($sfsi_section4_options['sfsi_linkedIn_manualCounts']);
1407
+ }
1408
+ else if($cFrom=="follower")
1409
+ {
1410
+ $linkedIn_compay = $sfsi_section4_options['ln_company'];
1411
+ $ln_settings = array(
1412
+ 'ln_api_key'=>$sfsi_section4_options['ln_api_key'],
1413
+ 'ln_secret_key'=>$sfsi_section4_options['ln_secret_key'],
1414
+ 'ln_oAuth_user_token'=>$sfsi_section4_options['ln_oAuth_user_token']
1415
+ );
1416
+
1417
+ $followers=$socialObj->sfsi_getlinkedin_follower($linkedIn_compay,$ln_settings);
1418
+ (int) $followers;
1419
+ $counts=$socialObj->format_num($followers);
1420
+ if(empty($counts))
1421
+ {
1422
+ $counts = (string) "0";
1423
+ }
1424
+ }
1425
+ }
1426
+ $totwith = $width+28+$icons_space;
1427
+ $twt_margin = $totwith/2;
1428
+
1429
+ //Giving alternative text to image
1430
+ if(isset($sfsi_section5_options['sfsi_linkedIn_MouseOverText']) && !empty($sfsi_section5_options['sfsi_linkedIn_MouseOverText']))
1431
+ {
1432
+ $alt_text = $sfsi_section5_options['sfsi_linkedIn_MouseOverText'];
1433
+ }
1434
+ else
1435
+ {
1436
+ $alt_text = "LINKEDIN";
1437
+ }
1438
+
1439
+ //Custom Skin Support {Monad}
1440
+ if($active_theme == 'custom_support')
1441
+ {
1442
+ if(get_option("linkedin_skin"))
1443
+ {
1444
+ $icon = get_option("linkedin_skin");
1445
+ }
1446
+ else
1447
+ {
1448
+ $active_theme = 'default';
1449
+ $icons_baseUrl = SFSI_PLUGURL."images/icons_theme/default/";
1450
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1451
+ }
1452
+ }
1453
+ else
1454
+ {
1455
+ $icon=$icons_baseUrl.$active_theme."_linkedin.png";
1456
+ }
1457
+ break;
1458
+
1459
+ default:
1460
+ $border_radius = "";
1461
+ //$border_radius =" border-radius:48%;";
1462
+ $cmcls = "cmcls";
1463
+ $padding_top = "";
1464
+ if($active_theme=="badge")
1465
+ {
1466
+ //$border_radius="border-radius: 18%;";
1467
+ }
1468
+ if($active_theme=="cute")
1469
+ {
1470
+ //$border_radius="border-radius: 38%;";
1471
+ }
1472
+
1473
+ $custom_icon_urls = unserialize($sfsi_section2_options['sfsi_CustomIcon_links']);
1474
+ $url = (isset($custom_icon_urls[$icon_n]) && !empty($custom_icon_urls[$icon_n])) ? $custom_icon_urls[$icon_n]:'';
1475
+ $toolClass = "custom_lkn";
1476
+ $arrow_class = "";
1477
+ $custom_icons_hoverTxt = unserialize($sfsi_section5_options['sfsi_custom_MouseOverTexts']);
1478
+ $icons = unserialize($sfsi_section1_options['sfsi_custom_files']);
1479
+ $icon = isset($icons[$icon_n])?$icons[$icon_n]:'';
1480
+
1481
+ //Giving alternative text to image
1482
+ if(!empty($custom_icons_hoverTxt[$icon_n]))
1483
+ {
1484
+ $alt_text = $custom_icons_hoverTxt[$icon_n];
1485
+ }
1486
+ else
1487
+ {
1488
+ $alt_text = "SOCIALICON";
1489
+ }
1490
+ break;
1491
+ }
1492
+ $icons="";
1493
+ /* apply size of icon */
1494
+ if($is_front==0)
1495
+ {
1496
+ $icons_size = $sfsi_section5_options['sfsi_icons_size'];
1497
+ $itemselector = "sfsi_wicons shuffeldiv";
1498
+ $innrselector = "inerCnt";
1499
+ }
1500
+ else
1501
+ {
1502
+ $icons_size = 51;
1503
+ $itemselector = "sfsi_wicons";
1504
+ $innrselector = "inerCnt";
1505
+ }
1506
+
1507
+ /* spacing and no of icons per row */
1508
+ $icons_space = '';
1509
+ $icons_space = $sfsi_section5_options['sfsi_icons_spacing'];
1510
+ $icon_width = (int)$icons_size;
1511
+ /* check for mouse hover effect */
1512
+ $icon_opacity="1";
1513
+
1514
+ if($sfsi_section3_options['sfsi_mouseOver']=='yes')
1515
+ {
1516
+ $mouse_hover_effect=$sfsi_section3_options["sfsi_mouseOver_effect"];
1517
+ if($mouse_hover_effect=="fade_in" || $mouse_hover_effect=="combo")
1518
+ {
1519
+ $icon_opacity="0.6";
1520
+ }
1521
+ }
1522
+
1523
+ $toolT_cls='';
1524
+ if((int) $icon_width <=49 && (int) $icon_width >=30)
1525
+ {
1526
+ $bt_class="";
1527
+ $toolT_cls="sfsiTlleft";
1528
+ }
1529
+ else if((int) $icon_width <=20)
1530
+ {
1531
+ $bt_class="sfsiSmBtn";
1532
+ $toolT_cls="sfsiTlleft";
1533
+ }
1534
+ else
1535
+ {
1536
+ $bt_class="";
1537
+ $toolT_cls="sfsiTlleft";
1538
+ }
1539
+
1540
+ if($toolClass=="rss_tool_bdr" || $toolClass=='email_tool_bdr' || $toolClass=="custom_lkn" || $toolClass=="instagram_tool_bdr" )
1541
+ {
1542
+ $new_window = sfsi_checkNewWindow();
1543
+ $url = $url;
1544
+ }
1545
+ else if($hoverSHow)
1546
+ {
1547
+ if(!wp_is_mobile())
1548
+ {
1549
+ $new_window = sfsi_checkNewWindow();
1550
+ $url = $url;
1551
+ }
1552
+ else
1553
+ {
1554
+ $new_window = '';
1555
+ $url = "javascript:void(0)";
1556
+ }
1557
+ }
1558
+ else
1559
+ {
1560
+ $new_window = sfsi_checkNewWindow();
1561
+ $url = $url;
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
@@ -1,847 +1,849 @@
1
- === Social Media Share Buttons & Social Sharing Icons ===
2
- 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.6
7
- License: GPLv2
8
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
-
10
- Share buttons and share icons plugin for social media sharing on Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.
11
-
12
- == Description ==
13
-
14
- Social media plugin which let's you add share icons for RSS, Email, Facebook, Twitter, LinkedIn, Pinterest, Instagram, Youtube, 'Share' (covering 200+ other social media platforms) and upload custom share icons of your choice.
15
-
16
- This free plugin has a lot to offer. Even more can be found in the Premium Plugin, please watch this short video:
17
-
18
- [vimeo https://vimeo.com/269140798]
19
-
20
- See [all features of the Premium plugin](https://www.ultimatelysocial.com/usm-premium/).
21
-
22
- The free social media plugin includes the following features:
23
-
24
- - Pick from 16 different designs for your social media share icons
25
- - Give several actions to one social media share icon (e.g. your facebook share icon can lead visitors to your Facebook page, and also give visitors the opportunity to like your page)
26
- - Decide to give your social media icons an animation (e.g. automatic shuffling, mouse-over effects) to make your visitors aware of the share icons, increasing the chance that they follow/share your blog
27
- - Make your social media icons 'float' or 'sticky'
28
- - Allow visitors to subscribe to your blog by Email
29
- - Add 'counts' to your social media buttons
30
- - Decide to display a pop-up (on all or only on selected pages) asking people to follow/share you via your social media icons
31
- - Decide to display sharing-buttons and social media icons at the end of every post
32
- - Select from many other customization features for your socialmedia icons!
33
-
34
- For GDPR compliance, please have a look at our [Social Media GDPR Compliance page](https://ultimatelysocial.com/gdpr/).
35
-
36
- The social media plugin is very easy to use as it takes you through all the steps:
37
-
38
- - Step 1: Choose which social media icons you want to display
39
- - Step 2: Define what actions your social media icons should perform
40
- - Step 3: Pick design & animation options for your social media icons
41
- - Step 4: Add counts to your social media icons (optional)
42
- - Step 5: Select from various other social share options, e.g. make your social media icons 'float'
43
- - Step 6: Add sharing/linking icons next to each blog post (optional)
44
- - Step 7: Add a customized pop-up asking people to follow or share (optional)
45
- - Step 8: Add a subscription form on your site (optional)
46
-
47
- In case of issues or questions please ask in the [Support forum](https://wordpress.org/support/plugin/ultimate-social-media-icons).
48
-
49
- We hope you enjoy the free social media plugin!
50
-
51
- = New Premium Plugin =
52
-
53
- We released a Premium Plugin with many more exciting features:
54
-
55
- - **Many more social networks** supported, including Snapchat share buttons, Whatsapp share buttons, Yummly share buttons, Phone button, Yelp share buttons, Soundcloud share buttons, Skype share buttons Flickr share buttons, Blogger share buttons, Reddit share buttons, Vimeo share buttons, Tumblr share buttons, Xing share buttons, Vkontakte share buttons (VK), Telegram share buttons, Amazon share buttons, Goodreads share buttons, Angies list share buttons, Steam share buttons, Twitch share buttons, Spotify share buttons, Odnoklassniki share buttons (OK), Buffer share buttons, Weibo share buttons, Pocket share buttons, Meneame share buttons, Frype share buttons, LiveJournal share buttons, Patreon share buttons, Dloky share buttons, Discord share buttons, Github share buttons, Wordpress buttons, Etsy share buttons, Better Business Bureau share buttons, Digg share buttons, Delicious share buttons, Print share buttons, and many other share buttons!
56
- - **More design styles** to make your social share icons look really cool & matching the design of your website
57
- - **Themed design styles**, e.g. if you have a website about cats you can pick from social media logos which look like cats etc.
58
- - **Better social sharing and following features**, e.g. you can define the Tweet-texts better (e.g. pull the post titles into your Tweets automatically), let people follow you on Facebook directly without leaving your site etc.
59
- - **Place the social icons on specific pages**, i.e. you can define on which pages the icons to the social media sites should not show
60
- - **Position the social icons by anchor and margins**, i.e. you can define the margins where your share icons should be displayed (from top/bottom/left/right), and then have them floating, or stick, still visible when user scrolls down or not etc.
61
- - **Optimized for mobile** - you can define separate selections for your social network icons for mobile
62
- - **More functions for email icon**, such as Share (by email), Contact you, Link to a certain page etc.
63
- - **Social media counters optimized** to encourage more social media sharing from your visitors
64
- - **More pop up options** which contain your social media buttons, e.g. define a limit to how often the pop-up is shown to the same user, show pop-up only when people try to leave your website etc.
65
- - **Friendly support** in case you're stuck
66
- - **Many more settings and options** for your social media network icons
67
-
68
- Have a look at the [Premium Plugin features](https://www.ultimatelysocial.com/usm-premium/)
69
-
70
-
71
- == Installation ==
72
- Extract the zip file and drop the contents into the wp-content/plugins/ directory of your WordPress installation. Then activate the plugin from the plugins page.
73
-
74
- Then go to plugin settings page and follow the instructions. After you're done, go to the Widget area (Appearance >> Widget) and place the widget on your sidebar to display your social sharing icons on your blog.
75
-
76
- Note: This plugin requires CURL to be activated/installed on your server (which should be the standard case), and a PHP version of 5.4 or above. If you don't have it, please contact your hosting provider or server admin.
77
-
78
- == Frequently Asked Questions ==
79
- = Please also check the more comprehensive FAQ on http://ultimatelysocial.com/faq =
80
-
81
- .
82
-
83
- = I face fundamental issues (the plugin doesn't load etc.) =
84
-
85
- Please ensure that:
86
-
87
- - You're using the latest version of the plugin(s)
88
- - Your site is running on PHP 5.4 or above
89
- - You have CURL activated (should be activated by default)
90
-
91
- If you're not familiar with those please contact your hosting company or server admin.
92
-
93
- Please check if you have browser extensions activated which may conflict with the plugin. Known culprits include:
94
-
95
- - Open SEO Stats (Formerly: PageRank Status) in Chrome
96
- - Adblock Plus in Chrome
97
- - Vine in Chrome
98
-
99
- Either de-activate those extensions or try it in a different browser.
100
-
101
- If the plugin setting's area looks 'funny' after an upgrade then please clear your cache with String+F5 (PC) or Command+R (Mac).
102
-
103
- If you get the error message “Are you sure you want to do this? / Please try again” when uploading the socialsharing plugin: Some servers may have a low limits with respect to permitted upload times. Please set the values in the “php.ini” file to:
104
-
105
- max_execution_time 90
106
- post_max_size 48M
107
-
108
- If you don’t know how to do it, please contact your server support / hosting company for that. Tell them you need it for a social sharing plugin on WordPress which may take longer to upload.
109
-
110
- If your issue is still not fixed after you’ve followed the steps above, we can provide support as part of our share to social Premium Plugin: https://www.ultimatelysocial.com/usm-premium/.
111
-
112
- = I get error messages 'Error : 7', 'Error : 56', 'Error : 6' etc. =
113
-
114
- Those point to a CURL-issue on your site. Please contact your server admin or your hosting company to resolve it.
115
-
116
- The plugin requires CURL for the social share counts and other features.
117
-
118
- = Social share icons don't show =
119
-
120
- Please ensure you actually placed the social share buttons either as social widget (in your widget area) or as floating icons under question 5). The Premium Plugin makes placing the social icons especially easy and also allows you to place sticky social share icons on your site, define the placement of the social share icons by margins and many other options, see https://www.ultimatelysocial.com/usm-premium/.
121
-
122
- If only some social share icons show, but not all, then please clear your cache, and check if you may have conflicting browser extensions (e.g. 'Disconnect'-app in Chrome). Also Ad-Blockers are known culprits, please switch them off temporarily to see if that is the reason.
123
-
124
- If the social share icons still don't show then there's an issue with your template. Please contact the creator of your template for that.
125
-
126
- If you are referring to specific social share icons not showing in the plugin itself (e.g. you're looking for a Whatsapp share icon, but it doesnt exist) please note that our Premium Plugin has many more social media share icons, see https://www.ultimatelysocial.com/usm-premium/
127
-
128
- = Twitter social share counts are not displaying (anymore) =
129
-
130
- Unfortunately, Twitter stopped providing any social share count. God knows why.
131
-
132
- = Changes don't get saved / Deleted plugin but the social share icons still show =
133
-
134
- Most likely you have the WP Cache plugin installed. Please de-activate and then re-activate it, then the social share icons should display again.
135
-
136
- = Links when clicking on the social share icons don't work =
137
-
138
- Please ensure you've entered the 'http://' at the beginning of the url (for *all* social networks). If the social share icons are not clickable at all there is most likely an issue with your template. This is especially the case if you've given your social share buttons several features, which should show a pop-up (tooltip) when you move over the social share icons.
139
-
140
- = I cannot upload custom social share icons =
141
-
142
- Most likely that's because you've set 'allow_url_fopen' to 'off'. Please turn it to 'on' (or ask your server admin to do so, he'll know what to do. Tell them you need it to upload custom share icons for a social media buttons plugin).
143
-
144
- = My Youtube social share icon (direct follow) doesn't work =
145
-
146
- Please ensure that you've selected the radio button 'Username' when you enter a youtube username, or 'Channel ID' when you entered a channel ID.
147
-
148
- = Aligning the social share icons (centered, left- or right-aligned) doesn't work =
149
-
150
- The alignment options under question 5 align the social share icons with respect to each other, not where they appear on the page. Our new Premium Plugin is the best social sharing plugin on the market, allowing you to define also many other social share icon alignments (e.g. within a widget, within shortcode etc.).
151
-
152
- = Clicking on the RSS icon returns funny codes =
153
-
154
- That's normal. RSS users will know what to do with it (i.e. copy & paste the url into their RSS readers).
155
-
156
- = Facebook 'like'-count isn't correct =
157
-
158
- When you 'like' something on your blog via facebook it likes the site you're currently on (e.g. your blog) and not your Facebook page.
159
-
160
- The new Premium Plugin also allows to show the number of your Facebook page likes, see https://www.ultimatelysocial.com/usm-premium/.
161
-
162
- = Sharing doesn't take the right text or picture =
163
-
164
- We use the share codes from Facebook etc. and therefore don't have any influence over which text & pic Facebook decides to share.
165
-
166
- Note that you can define an image as 'Featured Image' which tells Facebook etc. to share that one. You'll find this 'Featured Image' section in your blog's admin area where you can edit your blog post.
167
-
168
- You can crosscheck which image Facebook will take by entering your url on https://developers.facebook.com/tools/debug/og/object/.
169
-
170
- UPDATE: we made significant enhancements to the premium plugin, it now allows you to define the sharing pics and texts for your social share icons.
171
-
172
- = The pop-up shows although I only gave my social share icon one function =
173
-
174
- The pop-up only disappears if you've given your social share icons only a 'visit us'-function, otherwise (e.g. if you gave it 'Like' (on facebook) or 'Tweet' functions) a pop-up is still needed because the social share buttons for those are coming directly from the social media sites (e.g. Facebook, Twitter) and we don't have any influence over their design.
175
-
176
- = I selected to display the social share icons after every post but they don't show =
177
-
178
- The social share icons usually do show, however not on your blog page, but on your single posts pages. The Premium plugin (https://www.ultimatelysocial.com/usm-premium/) also allows to display the social share icons on your homepage.
179
-
180
- = Plugin decreases my site's loading speed =
181
-
182
- The plugin is one of the most optimized social media plugin in terms of impact on a site's loading speed (optimized code, compressed pictures etc.).
183
-
184
- If you still experience loading speed issues, please note that:
185
-
186
- - The more sharing- and invite- features you place on your site, the more external codes you load (i.e. from the social media sites; we just use their share code), therefore impacting loading speed. So to prevent this, give your social share icons only 'Visit us'-functionality rather than sharing-functionalities.
187
-
188
- - We've programmed it so that the code for the social media icons is the one which loads lasts on your site, i.e. after all the other content has already been loaded. This means: even if there is a decrease in loading speed, it does not impact a user's experience because he sees your site as quickly as before, only the social media icons take a bit longer to load.
189
-
190
- There might be also other issues on your site which cause a high loading speed (e.g. conflicts with our plugins or template issues). Please ask your template creator about that.
191
-
192
- Also, if you've uploaded social media sharing icons not provided by the plugin itself (i.e. custom share icons) please ensure they are compressed as well.
193
-
194
- = After moving from demo-server to live-server the follow/subscribe-link doesn't work anymore =
195
-
196
- Please delete and install the plugin again.
197
-
198
- If you already placed the code for a subscription form on your site, remove it again and take the new one from the new plugin installation.
199
-
200
- = There are other issues when I activate the plugin or place the social share icons =
201
-
202
- Please check the following:
203
-
204
- The plugin requires that CURL is installed & activated on your server (which should be the standard case). If you don't have it, please contact your hosting provider.
205
-
206
- Please ensure that you don't have any browser extension activated which may conflict with the plugin, esp. those which block certain content. Known culprits include the 'Disconnect' extension in Chrome or the 'Privacy Badger' extension in Firefox.
207
-
208
- If issues persist most likely your theme has issues which makes it incompatible with our plugin. Please contact your template creator for that. As part of the Premium Plugin (https://www.ultimatelysocial.com/usm-premium/) we fix also theme issues, and provide support to ensure that your social media share buttons appear on your site (exactly where you want them).
209
-
210
- = How can I see how many people decided to share or like my post? =
211
-
212
- You can see this by activating the social share 'counts' on the front end (under question 4 in the USM plugin, question 5 in the USM+ plugin).
213
-
214
- We cannot provide you this data in other ways as it's coming directly from the social media sites. One exception: if you like to know when people start to follow you by email, then you can get email alerts. For that, please claim your feed (see question above).
215
-
216
- = How can I change the 'Please follow & like us :)'? =
217
-
218
- You can change it in the Widget-area where you dropped the widget (with the social share icons) on the sidebar. Please click on it (on the sidebar), it will open the menu where you can change the text.
219
-
220
- If you don't want to show any text, just enter a space (' ').
221
-
222
- = Can I use a shortcode to place the social share icons? =
223
-
224
- Yes, use [DISPLAY_ULTIMATE_SOCIAL_ICONS] to show the social share icons. You can place it into any editor.
225
-
226
- Alternatively, you can place the following into your codes to show the share icons: <?php echo do_shortcode('[DISPLAY_ULTIMATE_SOCIAL_ICONS]'); ?>
227
-
228
- In some cases there might be issues to display social media sharing buttons which you uploaded as custom share icons. In this case, we provide support as part of our premium plugin: https://www.ultimatelysocial.com/usm-premium/
229
-
230
- = Can I get more options for the social share icons next to posts? =
231
-
232
- Please use this plugin for that: https://www.ultimatelysocial.com/usm-premium/
233
-
234
- = Can I also give the email-icon a 'mailto:' functionality? =
235
-
236
- Yes, that is possible in our new social share plugin, the Premium Plugin: https://www.ultimatelysocial.com/usm-premium/
237
-
238
- = Can I also display the social share icons vertically? =
239
-
240
- Yes, that is possible in our new social sharing plugin, the Premium Plugin: https://www.ultimatelysocial.com/usm-premium/.
241
-
242
- = How can I change the text on the 'visit us'-buttons? =
243
-
244
- Use this plugin: https://www.ultimatelysocial.com/usm-premium/
245
-
246
- = Can I deactivate the social share icons on mobile? =
247
-
248
- Yes, you can disable the share icons under question 5. In our new Premium Plugin you can define different settings for mobile, see https://www.ultimatelysocial.com/usm-premium/. The best way to share social media! :)
249
-
250
- = How can I use two instances of the plugin on my site? =
251
-
252
- You cannot use the same plugin twice, however you can install both the USM as well as the Premiuem plugin (https://www.ultimatelysocial.com/usm-premium/). We've developed the code so that there are no conflicts and you can place the share icons in one way with one plugin, and select other share icons with the other plugin and place them differently.
253
-
254
-
255
- == Screenshots ==
256
-
257
- 1. After installing the plugin, you'll see this overview. You'll be taken through the easy-to-understand steps to configure your plugin
258
-
259
- 2. As a first step you select which share icons you want to display on your website
260
-
261
- 3. Then you'll define what the share icons should do (they can perform several actions, e.g. lead users to your facebook page, or allow them to share your content on their facebook page)
262
-
263
- 4. You can pick from a wide range of share icon designs
264
-
265
- 5. Here you can animate your social share icons (automatic shuffling, mouse-over effects etc.), to make visitors of your site aware that they can share, follow & like your site
266
-
267
- 6. You can choose to display counts next to your social share icons (e.g. number of Twitter-followers)
268
-
269
- 7. There are many more options to choose from
270
-
271
- 8. You can also add social share icons at the end of every post
272
-
273
- 9. ...or even display a pop-up (designed to your liking) which asks users to like & share your site
274
-
275
-
276
- == Changelog ==
277
- = 2.3.6
278
- * Solved: Updated Text changes.
279
-
280
- = 2.3.5
281
- * Solved: Updated Text changes.
282
-
283
- = 2.3.4
284
- * Solved: Updated Text changes.
285
- * Solved: Updated link for email.
286
-
287
- = 2.3.3
288
- * Solved: Updated the email link and subscription action.
289
-
290
- = 2.3.2
291
- * Solved: Updated feedback system.
292
-
293
- = 2.3.1
294
- * Solved: Updated feedback system.
295
-
296
- = 2.3.0=
297
- * Solved: Errors on the footer in dashboard corected.
298
- * Solved: Updated logic for inclusion of external js.
299
- * Solved: Some grametical errors.
300
- * Solved: Updated feedback system.
301
-
302
- = 2.2.9 =
303
- * Solved: After post icons shown.
304
-
305
- = 2.2.8 =
306
- * Solved: Header already sent error on some servers.
307
-
308
- = 2.2.7 =
309
- * Solved: Updated feedback system to next version.
310
- * Solved: Responsive Icons UI updated.
311
-
312
- = 2.2.6 =
313
-
314
- * New Feature: Responsive icons in free plugin.
315
- * Solved: Icons not rendering on woocomerce product page.
316
- * Solved: Twitter url changed to share from intent for better reliablity.
317
- * Solved: Lots of little adjustments to improve the UI and functionality.
318
- * Solved: Removed Google Plus.
319
- * Solved: Stop loading unused external library code for faster load.
320
- * Solved: Removed curl notice while activation.
321
- * Solved: Fixed broken arrays and missing indexes.
322
- * Solved: Updated feedback system to next version.
323
-
324
- = 2.2.5 =
325
- * Integrated feedback system
326
-
327
- = 2.2.4 =
328
- * Solved: Unserialized error corrected.
329
- * Solved: All curl calls to wp_remote.
330
- * Solved: Notices in front end solved.
331
-
332
- = 2.2.3 =
333
- * Solved: Footer Error solved.
334
- * Solved: Removed most of the html errors.
335
- * Solved: Less anoying sidebar.
336
-
337
- = 2.2.2 =
338
- * Solved: More icons upadated
339
- * Solved: Icon backgrounds updated
340
-
341
- = 2.2.1 =
342
- * Solved: woocomerce conflict resolved
343
- * Solved: alert in case on conflict.
344
- * new Feature: More icons for free plugin
345
-
346
- = 2.2.0 =
347
- * Solved: Critical Security Patch.
348
-
349
- = 2.1.9 =
350
- * Solved: Security Patch.
351
-
352
- = 2.1.8 =
353
- * Solved: security update.
354
-
355
- = 2.1.7 =
356
- * Solved: save button not working.
357
-
358
- = 2.1.6 =
359
- * Solved: compatablity issue with older versions.
360
-
361
- = 2.1.5 =
362
- * Solved: google plus is deprecated
363
- * Solved: Sf count not shown
364
- * Solved: Sf subscribe form opens blank page.
365
- * solved: decreased the manual intervestions of upgradation to premium.
366
-
367
- = 2.1.4 =
368
- * Solved: Changed theme check url to match bloginfo url.
369
-
370
- = 2.1.3 =
371
- * Solved: Email validation for Offline chat.
372
- * Solved: Premium notification breaking the dashboard structure.
373
- * Solved: changed option for linkedin count
374
- * Solved: ajax_object conflict with themes.
375
- * Solved: new keyword check from page title, page keywords and page description.
376
-
377
- = 2.1.2 =
378
- * Solved: Text optimized
379
-
380
- = 2.1.1 =
381
- * Solved: design changes for chat.
382
- * Solved: unexpected charactor "[" error for php version 5.3.
383
-
384
- = 2.1.0 =
385
- * New Feature: Chat for site admin on our settings page.
386
- * Solved: removed deprecated jQuery functions.
387
- * Solved: Rectangle icon alignemnt problem on some themes solved.
388
-
389
- = 2.0.9 =
390
- * Banner for animation section in Question 4 added
391
- * Different icon for mouseover section pointing in premium in Question 4 added
392
- * Removed theme icon banner if no match
393
-
394
- = 2.0.8 =
395
- * Solved: Notification bar cannot be seen anymore
396
- * Solved: cleared the float elements after notice.
397
-
398
- = 2.0.7 =
399
- * Round green follow button doesn't show - fixed
400
- * Footer optimized
401
-
402
- = 2.0.6 =
403
- * Fixed bug that sometimes banner didn't disappear
404
- * Links in review message updated
405
-
406
- = 2.0.5 =
407
- * Issue with click on icons on mobile fixed
408
-
409
- = 2.0.4 =
410
- * Corrected missing ? in shortcode
411
-
412
- = 2.0.3 =
413
- * Optimized texts
414
-
415
- = 2.0.2 =
416
- * Addthis removed due to GDPR
417
- * New option to switch debugging mode on/off
418
-
419
- = 2.0.1 =
420
- * Issue of window.onscroll function overriding and breaking other plugins/themes fixed
421
-
422
- = 2.0.0 =
423
- * New question 3 to facilitate placement of icons
424
-
425
- = 1.9.7 =
426
- * Stopped setting cookies for pop-up selection "if user moved to end of page" as not needed in this case (relevant for GDPR compliance)
427
-
428
- = 1.9.6 =
429
- * Usage instructions updated
430
-
431
- = 1.9.5 =
432
- * Facebook like count fixed (previously only fixed for likes of user's website, not likes of Facebook page)
433
-
434
- = 1.9.4 =
435
- * Youtube count and direct follow issues fixed
436
-
437
- = 1.9.3 =
438
- * Facebook like count issue fixed
439
- * Youtube saving issue when clicked on "Save all settings" - fixed now
440
-
441
- = 1.9.2 =
442
- * Instagram followers count issue fixed
443
- * Twitter count issue fixed
444
- * Facebook share count issue fixed
445
-
446
- = 1.9.1 =
447
- * Errors with "non-numeric value" fixed
448
-
449
- = 1.8.9 =
450
- * Error log files removed
451
-
452
- = 1.8.7 =
453
- * Updated description texts
454
-
455
- = 1.8.6 =
456
- * Made different placement options more visible
457
-
458
- = 1.8.5 =
459
- * Text changes
460
-
461
- = 1.8.4 =
462
- * Added referring opportunity
463
-
464
- = 1.8.3 =
465
- * Saving of links for custom icons sometimes didn't work. Fixed now.
466
-
467
- = 1.8.2 =
468
- * Links updated
469
-
470
- = 1.8.1 =
471
- * Themed icon notifications optimized
472
-
473
- = 1.8.0 =
474
- * CSS & JAVASCRIPT files are added in footer instead of header
475
-
476
- = 1.7.9 =
477
- * Banners added
478
- * Spelling mistakes corrected
479
-
480
- = 1.7.8 =
481
- * Added more themed icon banners
482
-
483
- = 1.7.6 =
484
- * Comment to selecting of specific text and picture per page/post added
485
-
486
- = 1.7.5 =
487
- * Link to more premium icons added
488
-
489
- = 1.7.4 =
490
- * Better error messages in case of Curl errors
491
- * Optimized review bar
492
- * Code not remaining on site after de-installation
493
-
494
- = 1.7.2 =
495
- * More individualized offer for themed icons
496
-
497
- = 1.7.1 =
498
- * Claiming process optimized
499
-
500
- = 1.6.9 =
501
- * Counts for social buttons optimized and Instagram counter bug fixed
502
- * Link to more social sharing buttons added
503
-
504
- = 1.6.8 =
505
- * Issue fixed that sometimes incorrect error-messages showed on front-end
506
- * Credit link updated
507
- * More icons added for pro-version
508
- * SpecificFeeds adjusted for paid option
509
- * De-installation will now clear database entirely
510
- * Upgrade to pro-link renamed
511
-
512
- = 1.6.6 =
513
- * New option for tailor-made icons
514
-
515
- = 1.6.5 =
516
- * Activation/deactivation links optimized
517
-
518
- = 1.6.4 =
519
- * Links to additional features optimized
520
-
521
- = 1.6.3 =
522
- * Notification issues corrected
523
-
524
- = 1.6.1 =
525
- * Dismissal of notification lead to plugin setting's page previously, this is corrected now
526
-
527
- = 1.5.8 =
528
- * Educational comments added
529
-
530
- = 1.5.7 =
531
- * Conflicts with other plugins resolved
532
-
533
- = 1.5.6 =
534
- * Instructions for trouble shooting optimized
535
-
536
- = 1.5.5 =
537
- * Facebook icon leading to empty pages (in specific cases) fixed
538
-
539
- = 1.5.4 =
540
- * Twitter sharing text issues with forwarded slashes fixed
541
- * Links to review sites adjusted following Wordpress changes in review section
542
-
543
- = 1.5.3 =
544
- * Missing counts for email follow option fixed (when there are no subscribers yet)
545
- * Extra explanation text added
546
-
547
- = 1.5.2 =
548
- * Corner case vulnerability fixed
549
-
550
- = 1.5.1 =
551
- * Claiming process simplified
552
- * Mouse-over for custom icons sometimes showed wrong text, corrected now
553
-
554
- = 1.4.8 =
555
- * Size of custom icons corrected
556
- * Cute G+ icon too small before, corrected now
557
- * Better description how to get G+ API key added
558
- * Unsupported "live" function in jquery fixed
559
-
560
- = 1.4.7 =
561
- * Icons sometimes on top of each other - fixed
562
-
563
- = 1.4.5 =
564
- * E-Notice errors fixed
565
- * Facebook share button added for before/after posts
566
-
567
- = 1.4.4 =
568
- * Errors fixed with color code sanitizing function
569
-
570
- = 1.4.3 =
571
- * Removed the js files from plugin and using the ones provided by WP now
572
-
573
- = 1.4.2 =
574
- * POST calls optimized (sanitize, escape, validate)
575
-
576
- = 1.4.1 =
577
- * Removed feedback option
578
- * Tags changed
579
-
580
- = 1.3.9 =
581
- * Added Pinterest button for rectangle icons after/before posts
582
- * If user has given an icon several functions, the tooltip appears as before, however if user clicks on the main icon then it will now also perform an action, i.e. the 'visit us'-function
583
-
584
- = 1.3.8 =
585
- * Review request changed
586
-
587
- = 1.3.7 =
588
- * Claiming links corrected
589
- * Icons don't have any mouseover-effects (e.g. fade in) by default anymore
590
-
591
- = 1.3.6 =
592
- * Overkill declaration in the CSS fixed
593
- * Custom icons can now have mailto:-functionality
594
- * jQuery UI issues fixed
595
- * Rectangle G+ icon now shown as last one as it takes more space (looks better)
596
- * Comment added that partner plugin https://wordpress.org/plugins/ultimate-social-media-plus/ now allows buttons in various languages
597
-
598
- = 1.3.5 =
599
- * jQuery issues/conflicts fixed
600
- * Placing icons on blog homepage had issues with counts, fixed now
601
- * Script issues fixed
602
- * Text added on plugin setting's page for easier understanding
603
- * Issue that dashboard sometimes doesn't load fixed
604
- * Instagram thin-icon issue fixed (misspelled, therefore didn't show)
605
-
606
- = 1.3.4 =
607
- * Facebook changed their API - please upgrade if you want Facebook sharing on mobile to work properly on your site!
608
-
609
- = 1.3.3 =
610
- * Feed claiming optimized
611
- * New 'Visit us'-icon for Twitter added which matches the new Twitter-design
612
- * PNG-file error for Houzz icon corrected
613
- * Incorrect G+ icon replaced
614
- * Error message for sites where subscription form doesn't work added
615
- * Extra comments added how to claim a feed and several other texts optimized
616
-
617
- = 1.3.2 =
618
- * Feed claiming optimized
619
-
620
- = 1.3.1 =
621
- * Shortpixel link fixed
622
-
623
- = 1.3.0 =
624
- * Feed claiming bug fixed
625
-
626
- = 1.2.9 =
627
- * New G+ button updated
628
- * Quicker claiming of feed possible
629
- * Comments to share-button added
630
- * Credit to shortpixel added
631
-
632
- = 1.2.8 =
633
- * New feature: Users can now decide where exactly the floating icons will display
634
- * Internal links corrected
635
- * Fixed: Targets only labels within the social icons div.
636
- * Subscriber counts fixed
637
- * Apostrophe issues fixed
638
- * Conflicts with Yoast SEO plugin resolved
639
- * PHP errors fixed
640
-
641
- = 1.2.7 =
642
- * Count issues fixed - please upgrade!
643
- * Style constructor updated to PHP 5
644
- * Text adjustments in admin area
645
-
646
- = 1.2.6 =
647
- * (Minor) compatibility issues with Wordpress 4.3. fixed
648
-
649
- = 1.2.5 =
650
- * Updating process fixed
651
-
652
- = 1.2.4 =
653
- * New question 8 added: you can now also add a subscription form to your site
654
-
655
- = 1.2.3 =
656
- * More explanations added how to fix if counts don't work
657
- * Icon files are compressed now for faster loading - thank you ShortPixel.com!
658
- * A typo in the code threw an error message in certain cases, this is fixed now
659
-
660
- = 1.2.2 =
661
- * jQuery issues fixed
662
- * Vulnerability issues fixed
663
- * Twitter-button didn't get displayed in full sometimes, this is fixed now
664
- * CSS issues (occurred on some templates) fixed
665
- * Facebook updated API (so counts didn't get displayed correctly anymore), we updated the plugin accordingly
666
-
667
- = 1.2.1 =
668
- * Template-specific issues fixed
669
- * Layout in admin-area optimized
670
- * Sometimes title didn't get rendered correctly, this is fixed now
671
- * Youtube API changes also updated in plugin
672
- * Outdated (and vulnerable) JS library updated
673
- * New options for placing icons after every post (under question 6)
674
-
675
- = 1.2.0 =
676
- * Links with '@' in the url (e.g. as in Flickr-links) now get recognized as well
677
- * Alignment issues of icons in tooltip fixed
678
- * Layout optimizations in plugin area
679
- * Users can now select to have the number of likes of their facebook page displayed as counts of the facebook icon on their blogs
680
- * Typos in admin area corrected
681
-
682
- = 1.1.1.12 =
683
- * Vulnerabilities (AJAX) fixed
684
- * OG-issues (caused in conjunction with other plugins) fixed
685
-
686
- = 1.1.1.11 =
687
- * Conflicts with Yoast SEO plugin sorted
688
- * Performance optimized
689
- * Facebook sharing text issues fixed
690
- * Sometimes facebook share count didn't increase despite liking it, this should be fixed now (to be observed)
691
- * When sharing from a Facebook business page it returned errors, this should be fixed now (to be observed)
692
- * Share-box only displayed partly sometimes, fixed now
693
- * Template CSS conflicts solved in the plugin
694
- * Adding of unwanted spans fixed
695
-
696
- = 1.1.1.10 =
697
- * OG-issues fixed
698
- * Text which gets shared sometimes didn't contain spaces, fixed now
699
- * Plugin name in php file shortened
700
- * More explanation texts added in admin area
701
- * Facebook share window sometimes only got displayed partially, fixed now
702
- * Other facebook share issues fixed
703
- * Template CSS issues causing icons to be displayed not in one straight horizontal line fixed
704
- * In some cases facebook counts didn't increase if liked, this should be fixed now
705
- * Tested for up to Wordpress version 4.2.1.
706
-
707
- = 1.1.1.9 =
708
- * Issues with custom icon upload & custom icon removal fixed
709
- * Box asking for review didn't disappear in some cases, fixed now
710
- * Some design issues with some CSS for icons after every post, fixed now
711
- * Changes in text / guide in plugin
712
- * Conflicts with YOAST SEO plugin sorted
713
- * Conflicts with ADD MEDIA button and ADD LINK sorted
714
- * In some cases activating the icons after every post the content disappeared, this is fixed now
715
- * New option to center icons after posts
716
- * In some cases if no widget was placed it said 'Kindly go to settings page and check the option 'show them via widget'' got displayed on the blog, this is fixed now
717
- * G+ window disappeared sometimes after moving over it, fixed now
718
- * LinkedIn icon disappeared after moving over it a few times, fixed now
719
- * Several other CSS issues fixed
720
- * Sometimes tooltips didn't appear, fixed now
721
- * When plugin is activated some toggle functionality stopped working, fixed now
722
- * Click on icons after posts now shares the post, not the blog page
723
- * Several little design enhancements
724
- * When user selected that icons should show floating in the bottom right they floated in the center right, fixed now
725
- * Issues with Youtube direct follow fixed
726
- * Number of Instagram followers not always got pulled correctly, fixed now
727
- * When site loaded the widget sometimes overlapped with others, fixed now
728
-
729
- = 1.1.1.8 =
730
- * Plugin's menu button now has less aggressive colors
731
- * Sometimes sharing via facebook returned error messages, this is fixed now
732
- * Conflicts with WooTheme Whitelight resolved
733
- * Occasional problems with https-sites previously, now compatibile
734
-
735
- = 1.1.1.7 =
736
- * The 'counts' were not always correct, fixed now
737
- * Conflicts with page editor resolved
738
- * Last plugin update fixed Youtube points, however the 'channel' was as default, set back to 'username'
739
- * Mouseover-text for social icons now correct
740
- * Some layout adjustment in the admin area (menu-button will also be adjusted in next release)
741
- * Setting order of icons sometimes didnt work properly when custom icons got uploaded, this is fixed now
742
-
743
- = 1.1.1.6 =
744
- * jQuery updated, now most conflicts with other plugins should be resolved
745
-
746
- = 1.1.1.5 =
747
- * Conflicts with several plugins sorted
748
- * Icons can now be disabled on mobile
749
- * Renaming of 'Youtube Channel' to 'Username' to avoid confusion
750
- * On some templates there were alignment issues of the icons, this is fixed
751
- * Menu button sub-menu removed (wasn't really necessary)
752
- * Lightbox in admin area for custom icon upload shortened (was too large)
753
- * Tags for all icons defined (for SEO purposes)
754
-
755
- = 1.1.1.4 =
756
- * If given only a 'visit us'-function for the Twitter-icon, the is no tooltip anymore (like for the other icons)
757
- * Sharing sometimes pulled an incorrect image, fixed now
758
- * Pop-up now also has an 'x' in the top right corner for people to close
759
- * Sometimes icons overlapped, this is fixed now
760
- * Several issues fixed when users put shortcode into the header
761
- * Sometimes our request to ask users for feedback got displayed too early, this is fixed now
762
- * Some youtube accounts don't have a username, but only a channel. To allow users to directly to subscribe to your youtube channel the plugin required a User ID, now a channel is possible too
763
- * Several conflicts with other plugins resolved
764
- * Some CSS issues fixed
765
- * Steps 1., 2., 3. in the guide how to upload a custom icon were sometimes missing, this is fixed now
766
- * Title removed now when using shortcodes
767
- * Some error messages in developer tools not showing up anymore
768
-
769
- = 1.1.1.3 =
770
- * Several CSS issues fixed
771
-
772
- = 1.1.1.2 =
773
- * Shortcode now available too, so that you can place the icons wherever you want: Insert [DISPLAY_ULTIMATE_SOCIAL_ICONS]
774
- * 'Visit us'-option now also available for Twitter-users
775
- * Description added for people helping to find their LinkedIn-ID
776
- * Description added for people helping to generate their API-keys for Twitter, LInkedIn and G+ to display their counts automatically
777
- * Design of pop-up for upload of custom icons changed, to better explain required steps
778
- * 'Icons per row' didn't work properly in specific cases, fixed now
779
- * If user displayed counts for the icons, and picked the option 'floating' and 'bottom', the counts were sometimes not displayed because they moved too far down. This is fixed now.
780
-
781
- = 1.1.1.1 =
782
- * Previously custom icons got deleted if plugin was upgraded. This is fixed *from now on*. If you previously uploaded a custom icon, please do so (once) more. Sorry for the inconvenience.
783
- * Question #5 The 'Sticking & Floating' -> 'Where shall they float?' was storing the right value but showing the 'Top - Left' always
784
- * If the floating icons on the frontend had 'counts' enabled for them, the counts for the last row of the icons were being cut-off on the screen if the 'Bottom - Left' OR 'Bottom - Right' was chosen as the display position
785
-
786
- = 1.1.1.0 =
787
- * Following user suggestions we made it easier to remove the credit link (if previously activated by user - otherwise it doesn't display)
788
-
789
- = 1.1.0.9 =
790
- * Some servers don't display svg-images due to security issues, so we switched back to png
791
- * Removed the comment line which may be me causes the syntax error at the time of installation
792
-
793
- = 1.1.0.8 =
794
- * In specific cases some share-icons were missing, this is fixed now
795
- * Plugin sent error messages if user had developer mode active, this won't happen anymore
796
-
797
- = 1.1.0.7 =
798
- * 'Visit us' icons sometimes didn't get displayed in the backend, this is fixed now
799
- * Also the design of the 'Visit us'-icons on the front end has been improved
800
- * If the email-delivery option is used, emails now get sent out much faster (central server gets pinged)
801
- * Pop-up in some cases didn't get shown on inner pages, fixed now
802
- * Some responsive adjustments for mobile
803
- * Custom icons had some resizing issues, fixed now
804
-
805
- = 1.1.0.6 =
806
- * If 'Do you want to display icons at end of every post' is clicked there were some issues on mobile view, this is fixed now
807
- * 'Visit us'-icons in the tooltips were no vector-icons, which made them look fuzzy in some browsers, this is fixed now
808
-
809
- = 1.1.0.5 =
810
- * On certain pages sometimes the youtube icon didnt show, this is fixed now
811
- * Custom uploaded icons got a black background, this is fixed now
812
- * In the admin panel the plugin conflicted (in rare cases) with other plugins, this is fixed
813
- * Pop-ups sometimes didn't disappear automatically, fixed now
814
- * The tooltip for floating icons now gets displayed so that it is always visible
815
-
816
- = 1.1.0.4 =
817
- * Several changes done to optimize display on mobile & tablets
818
- * Issues with widget fixed (in rare cases the separating lines between widgets didnt get displayed correctly)
819
- * Deletion of headline for widget works now
820
- * Slight alignment issues of share- and like buttons at the end of blog posts corrected
821
-
822
- = 1.1.0.3 =
823
- * Tooltip from share-option sometimes appeared some other strange places on the site, this is fixed now
824
- * Extra checks added if user enters nonsense in the admin area
825
- * Links to our review site added (please please give 5 stars)
826
-
827
- = 1.1.0.2 =
828
- * In specific cases there were Javascript loading errors, that's fixed now
829
- * Moving from the icons to the tooltips made the tooltips disappear sometimes, now they are 'stickier'
830
- * In specific cases the facebook-icon was displayed very small in the tooltip, fixed now
831
-
832
- = 1.1.0.1 =
833
- * Corrected that when only the 'visit us' function is selected, no tooltip is displayed
834
-
835
- = 1.1 =
836
- * Email-icon didn't get displayed for all design sets (on the website), this is fixed now
837
- * Alignments of buttons in tooltips optimized
838
- * Updated readme.txt
839
-
840
- = 1.0 =
841
- * First release
842
-
843
-
844
- == Upgrade Notice ==
845
-
846
- = 2.3.6 =
 
 
847
  Please upgrade
1
+ === Social Media Share Buttons & Social Sharing Icons ===
2
+ 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.7
7
+ License: GPLv2
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Share buttons and share icons plugin for social media sharing on Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.
11
+
12
+ == Description ==
13
+
14
+ Social media plugin which let's you add share icons for RSS, Email, Facebook, Twitter, LinkedIn, Pinterest, Instagram, Youtube, 'Share' (covering 200+ other social media platforms) and upload custom share icons of your choice.
15
+
16
+ This free plugin has a lot to offer. Even more can be found in the Premium Plugin, please watch this short video:
17
+
18
+ [vimeo https://vimeo.com/269140798]
19
+
20
+ See [all features of the Premium plugin](https://www.ultimatelysocial.com/usm-premium/).
21
+
22
+ The free social media plugin includes the following features:
23
+
24
+ - Pick from 16 different designs for your social media share icons
25
+ - Give several actions to one social media share icon (e.g. your facebook share icon can lead visitors to your Facebook page, and also give visitors the opportunity to like your page)
26
+ - Decide to give your social media icons an animation (e.g. automatic shuffling, mouse-over effects) to make your visitors aware of the share icons, increasing the chance that they follow/share your blog
27
+ - Make your social media icons 'float' or 'sticky'
28
+ - Allow visitors to subscribe to your blog by Email
29
+ - Add 'counts' to your social media buttons
30
+ - Decide to display a pop-up (on all or only on selected pages) asking people to follow/share you via your social media icons
31
+ - Decide to display sharing-buttons and social media icons at the end of every post
32
+ - Select from many other customization features for your socialmedia icons!
33
+
34
+ For GDPR compliance, please have a look at our [Social Media GDPR Compliance page](https://ultimatelysocial.com/gdpr/).
35
+
36
+ The social media plugin is very easy to use as it takes you through all the steps:
37
+
38
+ - Step 1: Choose which social media icons you want to display
39
+ - Step 2: Define what actions your social media icons should perform
40
+ - Step 3: Pick design & animation options for your social media icons
41
+ - Step 4: Add counts to your social media icons (optional)
42
+ - Step 5: Select from various other social share options, e.g. make your social media icons 'float'
43
+ - Step 6: Add sharing/linking icons next to each blog post (optional)
44
+ - Step 7: Add a customized pop-up asking people to follow or share (optional)
45
+ - Step 8: Add a subscription form on your site (optional)
46
+
47
+ In case of issues or questions please ask in the [Support forum](https://wordpress.org/support/plugin/ultimate-social-media-icons).
48
+
49
+ We hope you enjoy the free social media plugin!
50
+
51
+ = New Premium Plugin =
52
+
53
+ We released a Premium Plugin with many more exciting features:
54
+
55
+ - **Many more social networks** supported, including Snapchat share buttons, Whatsapp share buttons, Yummly share buttons, Phone button, Yelp share buttons, Soundcloud share buttons, Skype share buttons Flickr share buttons, Blogger share buttons, Reddit share buttons, Vimeo share buttons, Tumblr share buttons, Xing share buttons, Vkontakte share buttons (VK), Telegram share buttons, Amazon share buttons, Goodreads share buttons, Angies list share buttons, Steam share buttons, Twitch share buttons, Spotify share buttons, Odnoklassniki share buttons (OK), Buffer share buttons, Weibo share buttons, Pocket share buttons, Meneame share buttons, Frype share buttons, LiveJournal share buttons, Patreon share buttons, Dloky share buttons, Discord share buttons, Github share buttons, Wordpress buttons, Etsy share buttons, Better Business Bureau share buttons, Digg share buttons, Delicious share buttons, Print share buttons, and many other share buttons!
56
+ - **More design styles** to make your social share icons look really cool & matching the design of your website
57
+ - **Themed design styles**, e.g. if you have a website about cats you can pick from social media logos which look like cats etc.
58
+ - **Better social sharing and following features**, e.g. you can define the Tweet-texts better (e.g. pull the post titles into your Tweets automatically), let people follow you on Facebook directly without leaving your site etc.
59
+ - **Place the social icons on specific pages**, i.e. you can define on which pages the icons to the social media sites should not show
60
+ - **Position the social icons by anchor and margins**, i.e. you can define the margins where your share icons should be displayed (from top/bottom/left/right), and then have them floating, or stick, still visible when user scrolls down or not etc.
61
+ - **Optimized for mobile** - you can define separate selections for your social network icons for mobile
62
+ - **More functions for email icon**, such as Share (by email), Contact you, Link to a certain page etc.
63
+ - **Social media counters optimized** to encourage more social media sharing from your visitors
64
+ - **More pop up options** which contain your social media buttons, e.g. define a limit to how often the pop-up is shown to the same user, show pop-up only when people try to leave your website etc.
65
+ - **Friendly support** in case you're stuck
66
+ - **Many more settings and options** for your social media network icons
67
+
68
+ Have a look at the [Premium Plugin features](https://www.ultimatelysocial.com/usm-premium/)
69
+
70
+
71
+ == Installation ==
72
+ Extract the zip file and drop the contents into the wp-content/plugins/ directory of your WordPress installation. Then activate the plugin from the plugins page.
73
+
74
+ Then go to plugin settings page and follow the instructions. After you're done, go to the Widget area (Appearance >> Widget) and place the widget on your sidebar to display your social sharing icons on your blog.
75
+
76
+ Note: This plugin requires CURL to be activated/installed on your server (which should be the standard case), and a PHP version of 5.4 or above. If you don't have it, please contact your hosting provider or server admin.
77
+
78
+ == Frequently Asked Questions ==
79
+ = Please also check the more comprehensive FAQ on http://ultimatelysocial.com/faq =
80
+
81
+ .
82
+
83
+ = I face fundamental issues (the plugin doesn't load etc.) =
84
+
85
+ Please ensure that:
86
+
87
+ - You're using the latest version of the plugin(s)
88
+ - Your site is running on PHP 5.4 or above
89
+ - You have CURL activated (should be activated by default)
90
+
91
+ If you're not familiar with those please contact your hosting company or server admin.
92
+
93
+ Please check if you have browser extensions activated which may conflict with the plugin. Known culprits include:
94
+
95
+ - Open SEO Stats (Formerly: PageRank Status) in Chrome
96
+ - Adblock Plus in Chrome
97
+ - Vine in Chrome
98
+
99
+ Either de-activate those extensions or try it in a different browser.
100
+
101
+ If the plugin setting's area looks 'funny' after an upgrade then please clear your cache with String+F5 (PC) or Command+R (Mac).
102
+
103
+ If you get the error message “Are you sure you want to do this? / Please try again” when uploading the socialsharing plugin: Some servers may have a low limits with respect to permitted upload times. Please set the values in the “php.ini” file to:
104
+
105
+ max_execution_time 90
106
+ post_max_size 48M
107
+
108
+ If you don’t know how to do it, please contact your server support / hosting company for that. Tell them you need it for a social sharing plugin on WordPress which may take longer to upload.
109
+
110
+ If your issue is still not fixed after you’ve followed the steps above, we can provide support as part of our share to social Premium Plugin: https://www.ultimatelysocial.com/usm-premium/.
111
+
112
+ = I get error messages 'Error : 7', 'Error : 56', 'Error : 6' etc. =
113
+
114
+ Those point to a CURL-issue on your site. Please contact your server admin or your hosting company to resolve it.
115
+
116
+ The plugin requires CURL for the social share counts and other features.
117
+
118
+ = Social share icons don't show =
119
+
120
+ Please ensure you actually placed the social share buttons either as social widget (in your widget area) or as floating icons under question 5). The Premium Plugin makes placing the social icons especially easy and also allows you to place sticky social share icons on your site, define the placement of the social share icons by margins and many other options, see https://www.ultimatelysocial.com/usm-premium/.
121
+
122
+ If only some social share icons show, but not all, then please clear your cache, and check if you may have conflicting browser extensions (e.g. 'Disconnect'-app in Chrome). Also Ad-Blockers are known culprits, please switch them off temporarily to see if that is the reason.
123
+
124
+ If the social share icons still don't show then there's an issue with your template. Please contact the creator of your template for that.
125
+
126
+ If you are referring to specific social share icons not showing in the plugin itself (e.g. you're looking for a Whatsapp share icon, but it doesnt exist) please note that our Premium Plugin has many more social media share icons, see https://www.ultimatelysocial.com/usm-premium/
127
+
128
+ = Twitter social share counts are not displaying (anymore) =
129
+
130
+ Unfortunately, Twitter stopped providing any social share count. God knows why.
131
+
132
+ = Changes don't get saved / Deleted plugin but the social share icons still show =
133
+
134
+ Most likely you have the WP Cache plugin installed. Please de-activate and then re-activate it, then the social share icons should display again.
135
+
136
+ = Links when clicking on the social share icons don't work =
137
+
138
+ Please ensure you've entered the 'http://' at the beginning of the url (for *all* social networks). If the social share icons are not clickable at all there is most likely an issue with your template. This is especially the case if you've given your social share buttons several features, which should show a pop-up (tooltip) when you move over the social share icons.
139
+
140
+ = I cannot upload custom social share icons =
141
+
142
+ Most likely that's because you've set 'allow_url_fopen' to 'off'. Please turn it to 'on' (or ask your server admin to do so, he'll know what to do. Tell them you need it to upload custom share icons for a social media buttons plugin).
143
+
144
+ = My Youtube social share icon (direct follow) doesn't work =
145
+
146
+ Please ensure that you've selected the radio button 'Username' when you enter a youtube username, or 'Channel ID' when you entered a channel ID.
147
+
148
+ = Aligning the social share icons (centered, left- or right-aligned) doesn't work =
149
+
150
+ The alignment options under question 5 align the social share icons with respect to each other, not where they appear on the page. Our new Premium Plugin is the best social sharing plugin on the market, allowing you to define also many other social share icon alignments (e.g. within a widget, within shortcode etc.).
151
+
152
+ = Clicking on the RSS icon returns funny codes =
153
+
154
+ That's normal. RSS users will know what to do with it (i.e. copy & paste the url into their RSS readers).
155
+
156
+ = Facebook 'like'-count isn't correct =
157
+
158
+ When you 'like' something on your blog via facebook it likes the site you're currently on (e.g. your blog) and not your Facebook page.
159
+
160
+ The new Premium Plugin also allows to show the number of your Facebook page likes, see https://www.ultimatelysocial.com/usm-premium/.
161
+
162
+ = Sharing doesn't take the right text or picture =
163
+
164
+ We use the share codes from Facebook etc. and therefore don't have any influence over which text & pic Facebook decides to share.
165
+
166
+ Note that you can define an image as 'Featured Image' which tells Facebook etc. to share that one. You'll find this 'Featured Image' section in your blog's admin area where you can edit your blog post.
167
+
168
+ You can crosscheck which image Facebook will take by entering your url on https://developers.facebook.com/tools/debug/og/object/.
169
+
170
+ UPDATE: we made significant enhancements to the premium plugin, it now allows you to define the sharing pics and texts for your social share icons.
171
+
172
+ = The pop-up shows although I only gave my social share icon one function =
173
+
174
+ The pop-up only disappears if you've given your social share icons only a 'visit us'-function, otherwise (e.g. if you gave it 'Like' (on facebook) or 'Tweet' functions) a pop-up is still needed because the social share buttons for those are coming directly from the social media sites (e.g. Facebook, Twitter) and we don't have any influence over their design.
175
+
176
+ = I selected to display the social share icons after every post but they don't show =
177
+
178
+ The social share icons usually do show, however not on your blog page, but on your single posts pages. The Premium plugin (https://www.ultimatelysocial.com/usm-premium/) also allows to display the social share icons on your homepage.
179
+
180
+ = Plugin decreases my site's loading speed =
181
+
182
+ The plugin is one of the most optimized social media plugin in terms of impact on a site's loading speed (optimized code, compressed pictures etc.).
183
+
184
+ If you still experience loading speed issues, please note that:
185
+
186
+ - The more sharing- and invite- features you place on your site, the more external codes you load (i.e. from the social media sites; we just use their share code), therefore impacting loading speed. So to prevent this, give your social share icons only 'Visit us'-functionality rather than sharing-functionalities.
187
+
188
+ - We've programmed it so that the code for the social media icons is the one which loads lasts on your site, i.e. after all the other content has already been loaded. This means: even if there is a decrease in loading speed, it does not impact a user's experience because he sees your site as quickly as before, only the social media icons take a bit longer to load.
189
+
190
+ There might be also other issues on your site which cause a high loading speed (e.g. conflicts with our plugins or template issues). Please ask your template creator about that.
191
+
192
+ Also, if you've uploaded social media sharing icons not provided by the plugin itself (i.e. custom share icons) please ensure they are compressed as well.
193
+
194
+ = After moving from demo-server to live-server the follow/subscribe-link doesn't work anymore =
195
+
196
+ Please delete and install the plugin again.
197
+
198
+ If you already placed the code for a subscription form on your site, remove it again and take the new one from the new plugin installation.
199
+
200
+ = There are other issues when I activate the plugin or place the social share icons =
201
+
202
+ Please check the following:
203
+
204
+ The plugin requires that CURL is installed & activated on your server (which should be the standard case). If you don't have it, please contact your hosting provider.
205
+
206
+ Please ensure that you don't have any browser extension activated which may conflict with the plugin, esp. those which block certain content. Known culprits include the 'Disconnect' extension in Chrome or the 'Privacy Badger' extension in Firefox.
207
+
208
+ If issues persist most likely your theme has issues which makes it incompatible with our plugin. Please contact your template creator for that. As part of the Premium Plugin (https://www.ultimatelysocial.com/usm-premium/) we fix also theme issues, and provide support to ensure that your social media share buttons appear on your site (exactly where you want them).
209
+
210
+ = How can I see how many people decided to share or like my post? =
211
+
212
+ You can see this by activating the social share 'counts' on the front end (under question 4 in the USM plugin, question 5 in the USM+ plugin).
213
+
214
+ We cannot provide you this data in other ways as it's coming directly from the social media sites. One exception: if you like to know when people start to follow you by email, then you can get email alerts. For that, please claim your feed (see question above).
215
+
216
+ = How can I change the 'Please follow & like us :)'? =
217
+
218
+ You can change it in the Widget-area where you dropped the widget (with the social share icons) on the sidebar. Please click on it (on the sidebar), it will open the menu where you can change the text.
219
+
220
+ If you don't want to show any text, just enter a space (' ').
221
+
222
+ = Can I use a shortcode to place the social share icons? =
223
+
224
+ Yes, use [DISPLAY_ULTIMATE_SOCIAL_ICONS] to show the social share icons. You can place it into any editor.
225
+
226
+ Alternatively, you can place the following into your codes to show the share icons: <?php echo do_shortcode('[DISPLAY_ULTIMATE_SOCIAL_ICONS]'); ?>
227
+
228
+ In some cases there might be issues to display social media sharing buttons which you uploaded as custom share icons. In this case, we provide support as part of our premium plugin: https://www.ultimatelysocial.com/usm-premium/
229
+
230
+ = Can I get more options for the social share icons next to posts? =
231
+
232
+ Please use this plugin for that: https://www.ultimatelysocial.com/usm-premium/
233
+
234
+ = Can I also give the email-icon a 'mailto:' functionality? =
235
+
236
+ Yes, that is possible in our new social share plugin, the Premium Plugin: https://www.ultimatelysocial.com/usm-premium/
237
+
238
+ = Can I also display the social share icons vertically? =
239
+
240
+ Yes, that is possible in our new social sharing plugin, the Premium Plugin: https://www.ultimatelysocial.com/usm-premium/.
241
+
242
+ = How can I change the text on the 'visit us'-buttons? =
243
+
244
+ Use this plugin: https://www.ultimatelysocial.com/usm-premium/
245
+
246
+ = Can I deactivate the social share icons on mobile? =
247
+
248
+ Yes, you can disable the share icons under question 5. In our new Premium Plugin you can define different settings for mobile, see https://www.ultimatelysocial.com/usm-premium/. The best way to share social media! :)
249
+
250
+ = How can I use two instances of the plugin on my site? =
251
+
252
+ You cannot use the same plugin twice, however you can install both the USM as well as the Premiuem plugin (https://www.ultimatelysocial.com/usm-premium/). We've developed the code so that there are no conflicts and you can place the share icons in one way with one plugin, and select other share icons with the other plugin and place them differently.
253
+
254
+
255
+ == Screenshots ==
256
+
257
+ 1. After installing the plugin, you'll see this overview. You'll be taken through the easy-to-understand steps to configure your plugin
258
+
259
+ 2. As a first step you select which share icons you want to display on your website
260
+
261
+ 3. Then you'll define what the share icons should do (they can perform several actions, e.g. lead users to your facebook page, or allow them to share your content on their facebook page)
262
+
263
+ 4. You can pick from a wide range of share icon designs
264
+
265
+ 5. Here you can animate your social share icons (automatic shuffling, mouse-over effects etc.), to make visitors of your site aware that they can share, follow & like your site
266
+
267
+ 6. You can choose to display counts next to your social share icons (e.g. number of Twitter-followers)
268
+
269
+ 7. There are many more options to choose from
270
+
271
+ 8. You can also add social share icons at the end of every post
272
+
273
+ 9. ...or even display a pop-up (designed to your liking) which asks users to like & share your site
274
+
275
+
276
+ == Changelog ==
277
+ = 2.3.7 =
278
+ * solved: Wrong link on icons when curl not installed.
279
+
280
+ = 2.3.6 =
281
+ * Solved: Updated Text changes.
282
+
283
+ = 2.3.5 =
284
+ * Solved: Updated Text changes.
285
+
286
+ = 2.3.4 =
287
+ * Solved: Updated Text changes.
288
+ * Solved: Updated link for email.
289
+
290
+ = 2.3.3 =
291
+ * Solved: Updated the email link and subscription action.
292
+
293
+ = 2.3.2 =
294
+ * Solved: Updated feedback system.
295
+
296
+ = 2.3.1 =
297
+ * Solved: Updated feedback system.
298
+
299
+ = 2.3.0 =
300
+ * Solved: Errors on the footer in dashboard corected.
301
+ * Solved: Updated logic for inclusion of external js.
302
+ * Solved: Some grametical errors.
303
+ * Solved: Updated feedback system.
304
+
305
+ = 2.2.9 =
306
+ * Solved: After post icons shown.
307
+
308
+ = 2.2.8 =
309
+ * Solved: Header already sent error on some servers.
310
+
311
+ = 2.2.7 =
312
+ * Solved: Updated feedback system to next version.
313
+ * Solved: Responsive Icons UI updated.
314
+
315
+ = 2.2.6 =
316
+
317
+ * New Feature: Responsive icons in free plugin.
318
+ * Solved: Icons not rendering on woocomerce product page.
319
+ * Solved: Twitter url changed to share from intent for better reliablity.
320
+ * Solved: Lots of little adjustments to improve the UI and functionality.
321
+ * Solved: Removed Google Plus.
322
+ * Solved: Stop loading unused external library code for faster load.
323
+ * Solved: Removed curl notice while activation.
324
+ * Solved: Fixed broken arrays and missing indexes.
325
+ * Solved: Updated feedback system to next version.
326
+
327
+ = 2.2.5 =
328
+ * Integrated feedback system
329
+
330
+ = 2.2.4 =
331
+ * Solved: Unserialized error corrected.
332
+ * Solved: All curl calls to wp_remote.
333
+ * Solved: Notices in front end solved.
334
+
335
+ = 2.2.3 =
336
+ * Solved: Footer Error solved.
337
+ * Solved: Removed most of the html errors.
338
+ * Solved: Less anoying sidebar.
339
+
340
+ = 2.2.2 =
341
+ * Solved: More icons upadated
342
+ * Solved: Icon backgrounds updated
343
+
344
+ = 2.2.1 =
345
+ * Solved: woocomerce conflict resolved
346
+ * Solved: alert in case on conflict.
347
+ * new Feature: More icons for free plugin
348
+
349
+ = 2.2.0 =
350
+ * Solved: Critical Security Patch.
351
+
352
+ = 2.1.9 =
353
+ * Solved: Security Patch.
354
+
355
+ = 2.1.8 =
356
+ * Solved: security update.
357
+
358
+ = 2.1.7 =
359
+ * Solved: save button not working.
360
+
361
+ = 2.1.6 =
362
+ * Solved: compatablity issue with older versions.
363
+
364
+ = 2.1.5 =
365
+ * Solved: google plus is deprecated
366
+ * Solved: Sf count not shown
367
+ * Solved: Sf subscribe form opens blank page.
368
+ * solved: decreased the manual intervestions of upgradation to premium.
369
+
370
+ = 2.1.4 =
371
+ * Solved: Changed theme check url to match bloginfo url.
372
+
373
+ = 2.1.3 =
374
+ * Solved: Email validation for Offline chat.
375
+ * Solved: Premium notification breaking the dashboard structure.
376
+ * Solved: changed option for linkedin count
377
+ * Solved: ajax_object conflict with themes.
378
+ * Solved: new keyword check from page title, page keywords and page description.
379
+
380
+ = 2.1.2 =
381
+ * Solved: Text optimized
382
+
383
+ = 2.1.1 =
384
+ * Solved: design changes for chat.
385
+ * Solved: unexpected charactor "[" error for php version 5.3.
386
+
387
+ = 2.1.0 =
388
+ * New Feature: Chat for site admin on our settings page.
389
+ * Solved: removed deprecated jQuery functions.
390
+ * Solved: Rectangle icon alignemnt problem on some themes solved.
391
+
392
+ = 2.0.9 =
393
+ * Banner for animation section in Question 4 added
394
+ * Different icon for mouseover section pointing in premium in Question 4 added
395
+ * Removed theme icon banner if no match
396
+
397
+ = 2.0.8 =
398
+ * Solved: Notification bar cannot be seen anymore
399
+ * Solved: cleared the float elements after notice.
400
+
401
+ = 2.0.7 =
402
+ * Round green follow button doesn't show - fixed
403
+ * Footer optimized
404
+
405
+ = 2.0.6 =
406
+ * Fixed bug that sometimes banner didn't disappear
407
+ * Links in review message updated
408
+
409
+ = 2.0.5 =
410
+ * Issue with click on icons on mobile fixed
411
+
412
+ = 2.0.4 =
413
+ * Corrected missing ? in shortcode
414
+
415
+ = 2.0.3 =
416
+ * Optimized texts
417
+
418
+ = 2.0.2 =
419
+ * Addthis removed due to GDPR
420
+ * New option to switch debugging mode on/off
421
+
422
+ = 2.0.1 =
423
+ * Issue of window.onscroll function overriding and breaking other plugins/themes fixed
424
+
425
+ = 2.0.0 =
426
+ * New question 3 to facilitate placement of icons
427
+
428
+ = 1.9.7 =
429
+ * Stopped setting cookies for pop-up selection "if user moved to end of page" as not needed in this case (relevant for GDPR compliance)
430
+
431
+ = 1.9.6 =
432
+ * Usage instructions updated
433
+
434
+ = 1.9.5 =
435
+ * Facebook like count fixed (previously only fixed for likes of user's website, not likes of Facebook page)
436
+
437
+ = 1.9.4 =
438
+ * Youtube count and direct follow issues fixed
439
+
440
+ = 1.9.3 =
441
+ * Facebook like count issue fixed
442
+ * Youtube saving issue when clicked on "Save all settings" - fixed now
443
+
444
+ = 1.9.2 =
445
+ * Instagram followers count issue fixed
446
+ * Twitter count issue fixed
447
+ * Facebook share count issue fixed
448
+
449
+ = 1.9.1 =
450
+ * Errors with "non-numeric value" fixed
451
+
452
+ = 1.8.9 =
453
+ * Error log files removed
454
+
455
+ = 1.8.7 =
456
+ * Updated description texts
457
+
458
+ = 1.8.6 =
459
+ * Made different placement options more visible
460
+
461
+ = 1.8.5 =
462
+ * Text changes
463
+
464
+ = 1.8.4 =
465
+ * Added referring opportunity
466
+
467
+ = 1.8.3 =
468
+ * Saving of links for custom icons sometimes didn't work. Fixed now.
469
+
470
+ = 1.8.2 =
471
+ * Links updated
472
+
473
+ = 1.8.1 =
474
+ * Themed icon notifications optimized
475
+
476
+ = 1.8.0 =
477
+ * CSS & JAVASCRIPT files are added in footer instead of header
478
+
479
+ = 1.7.9 =
480
+ * Banners added
481
+ * Spelling mistakes corrected
482
+
483
+ = 1.7.8 =
484
+ * Added more themed icon banners
485
+
486
+ = 1.7.6 =
487
+ * Comment to selecting of specific text and picture per page/post added
488
+
489
+ = 1.7.5 =
490
+ * Link to more premium icons added
491
+
492
+ = 1.7.4 =
493
+ * Better error messages in case of Curl errors
494
+ * Optimized review bar
495
+ * Code not remaining on site after de-installation
496
+
497
+ = 1.7.2 =
498
+ * More individualized offer for themed icons
499
+
500
+ = 1.7.1 =
501
+ * Claiming process optimized
502
+
503
+ = 1.6.9 =
504
+ * Counts for social buttons optimized and Instagram counter bug fixed
505
+ * Link to more social sharing buttons added
506
+
507
+ = 1.6.8 =
508
+ * Issue fixed that sometimes incorrect error-messages showed on front-end
509
+ * Credit link updated
510
+ * More icons added for pro-version
511
+ * SpecificFeeds adjusted for paid option
512
+ * De-installation will now clear database entirely
513
+ * Upgrade to pro-link renamed
514
+
515
+ = 1.6.6 =
516
+ * New option for tailor-made icons
517
+
518
+ = 1.6.5 =
519
+ * Activation/deactivation links optimized
520
+
521
+ = 1.6.4 =
522
+ * Links to additional features optimized
523
+
524
+ = 1.6.3 =
525
+ * Notification issues corrected
526
+
527
+ = 1.6.1 =
528
+ * Dismissal of notification lead to plugin setting's page previously, this is corrected now
529
+
530
+ = 1.5.8 =
531
+ * Educational comments added
532
+
533
+ = 1.5.7 =
534
+ * Conflicts with other plugins resolved
535
+
536
+ = 1.5.6 =
537
+ * Instructions for trouble shooting optimized
538
+
539
+ = 1.5.5 =
540
+ * Facebook icon leading to empty pages (in specific cases) fixed
541
+
542
+ = 1.5.4 =
543
+ * Twitter sharing text issues with forwarded slashes fixed
544
+ * Links to review sites adjusted following Wordpress changes in review section
545
+
546
+ = 1.5.3 =
547
+ * Missing counts for email follow option fixed (when there are no subscribers yet)
548
+ * Extra explanation text added
549
+
550
+ = 1.5.2 =
551
+ * Corner case vulnerability fixed
552
+
553
+ = 1.5.1 =
554
+ * Claiming process simplified
555
+ * Mouse-over for custom icons sometimes showed wrong text, corrected now
556
+
557
+ = 1.4.8 =
558
+ * Size of custom icons corrected
559
+ * Cute G+ icon too small before, corrected now
560
+ * Better description how to get G+ API key added
561
+ * Unsupported "live" function in jquery fixed
562
+
563
+ = 1.4.7 =
564
+ * Icons sometimes on top of each other - fixed
565
+
566
+ = 1.4.5 =
567
+ * E-Notice errors fixed
568
+ * Facebook share button added for before/after posts
569
+
570
+ = 1.4.4 =
571
+ * Errors fixed with color code sanitizing function
572
+
573
+ = 1.4.3 =
574
+ * Removed the js files from plugin and using the ones provided by WP now
575
+
576
+ = 1.4.2 =
577
+ * POST calls optimized (sanitize, escape, validate)
578
+
579
+ = 1.4.1 =
580
+ * Removed feedback option
581
+ * Tags changed
582
+
583
+ = 1.3.9 =
584
+ * Added Pinterest button for rectangle icons after/before posts
585
+ * If user has given an icon several functions, the tooltip appears as before, however if user clicks on the main icon then it will now also perform an action, i.e. the 'visit us'-function
586
+
587
+ = 1.3.8 =
588
+ * Review request changed
589
+
590
+ = 1.3.7 =
591
+ * Claiming links corrected
592
+ * Icons don't have any mouseover-effects (e.g. fade in) by default anymore
593
+
594
+ = 1.3.6 =
595
+ * Overkill declaration in the CSS fixed
596
+ * Custom icons can now have mailto:-functionality
597
+ * jQuery UI issues fixed
598
+ * Rectangle G+ icon now shown as last one as it takes more space (looks better)
599
+ * Comment added that partner plugin https://wordpress.org/plugins/ultimate-social-media-plus/ now allows buttons in various languages
600
+
601
+ = 1.3.5 =
602
+ * jQuery issues/conflicts fixed
603
+ * Placing icons on blog homepage had issues with counts, fixed now
604
+ * Script issues fixed
605
+ * Text added on plugin setting's page for easier understanding
606
+ * Issue that dashboard sometimes doesn't load fixed
607
+ * Instagram thin-icon issue fixed (misspelled, therefore didn't show)
608
+
609
+ = 1.3.4 =
610
+ * Facebook changed their API - please upgrade if you want Facebook sharing on mobile to work properly on your site!
611
+
612
+ = 1.3.3 =
613
+ * Feed claiming optimized
614
+ * New 'Visit us'-icon for Twitter added which matches the new Twitter-design
615
+ * PNG-file error for Houzz icon corrected
616
+ * Incorrect G+ icon replaced
617
+ * Error message for sites where subscription form doesn't work added
618
+ * Extra comments added how to claim a feed and several other texts optimized
619
+
620
+ = 1.3.2 =
621
+ * Feed claiming optimized
622
+
623
+ = 1.3.1 =
624
+ * Shortpixel link fixed
625
+
626
+ = 1.3.0 =
627
+ * Feed claiming bug fixed
628
+
629
+ = 1.2.9 =
630
+ * New G+ button updated
631
+ * Quicker claiming of feed possible
632
+ * Comments to share-button added
633
+ * Credit to shortpixel added
634
+
635
+ = 1.2.8 =
636
+ * New feature: Users can now decide where exactly the floating icons will display
637
+ * Internal links corrected
638
+ * Fixed: Targets only labels within the social icons div.
639
+ * Subscriber counts fixed
640
+ * Apostrophe issues fixed
641
+ * Conflicts with Yoast SEO plugin resolved
642
+ * PHP errors fixed
643
+
644
+ = 1.2.7 =
645
+ * Count issues fixed - please upgrade!
646
+ * Style constructor updated to PHP 5
647
+ * Text adjustments in admin area
648
+
649
+ = 1.2.6 =
650
+ * (Minor) compatibility issues with Wordpress 4.3. fixed
651
+
652
+ = 1.2.5 =
653
+ * Updating process fixed
654
+
655
+ = 1.2.4 =
656
+ * New question 8 added: you can now also add a subscription form to your site
657
+
658
+ = 1.2.3 =
659
+ * More explanations added how to fix if counts don't work
660
+ * Icon files are compressed now for faster loading - thank you ShortPixel.com!
661
+ * A typo in the code threw an error message in certain cases, this is fixed now
662
+
663
+ = 1.2.2 =
664
+ * jQuery issues fixed
665
+ * Vulnerability issues fixed
666
+ * Twitter-button didn't get displayed in full sometimes, this is fixed now
667
+ * CSS issues (occurred on some templates) fixed
668
+ * Facebook updated API (so counts didn't get displayed correctly anymore), we updated the plugin accordingly
669
+
670
+ = 1.2.1 =
671
+ * Template-specific issues fixed
672
+ * Layout in admin-area optimized
673
+ * Sometimes title didn't get rendered correctly, this is fixed now
674
+ * Youtube API changes also updated in plugin
675
+ * Outdated (and vulnerable) JS library updated
676
+ * New options for placing icons after every post (under question 6)
677
+
678
+ = 1.2.0 =
679
+ * Links with '@' in the url (e.g. as in Flickr-links) now get recognized as well
680
+ * Alignment issues of icons in tooltip fixed
681
+ * Layout optimizations in plugin area
682
+ * Users can now select to have the number of likes of their facebook page displayed as counts of the facebook icon on their blogs
683
+ * Typos in admin area corrected
684
+
685
+ = 1.1.1.12 =
686
+ * Vulnerabilities (AJAX) fixed
687
+ * OG-issues (caused in conjunction with other plugins) fixed
688
+
689
+ = 1.1.1.11 =
690
+ * Conflicts with Yoast SEO plugin sorted
691
+ * Performance optimized
692
+ * Facebook sharing text issues fixed
693
+ * Sometimes facebook share count didn't increase despite liking it, this should be fixed now (to be observed)
694
+ * When sharing from a Facebook business page it returned errors, this should be fixed now (to be observed)
695
+ * Share-box only displayed partly sometimes, fixed now
696
+ * Template CSS conflicts solved in the plugin
697
+ * Adding of unwanted spans fixed
698
+
699
+ = 1.1.1.10 =
700
+ * OG-issues fixed
701
+ * Text which gets shared sometimes didn't contain spaces, fixed now
702
+ * Plugin name in php file shortened
703
+ * More explanation texts added in admin area
704
+ * Facebook share window sometimes only got displayed partially, fixed now
705
+ * Other facebook share issues fixed
706
+ * Template CSS issues causing icons to be displayed not in one straight horizontal line fixed
707
+ * In some cases facebook counts didn't increase if liked, this should be fixed now
708
+ * Tested for up to Wordpress version 4.2.1.
709
+
710
+ = 1.1.1.9 =
711
+ * Issues with custom icon upload & custom icon removal fixed
712
+ * Box asking for review didn't disappear in some cases, fixed now
713
+ * Some design issues with some CSS for icons after every post, fixed now
714
+ * Changes in text / guide in plugin
715
+ * Conflicts with YOAST SEO plugin sorted
716
+ * Conflicts with ADD MEDIA button and ADD LINK sorted
717
+ * In some cases activating the icons after every post the content disappeared, this is fixed now
718
+ * New option to center icons after posts
719
+ * In some cases if no widget was placed it said 'Kindly go to settings page and check the option 'show them via widget'' got displayed on the blog, this is fixed now
720
+ * G+ window disappeared sometimes after moving over it, fixed now
721
+ * LinkedIn icon disappeared after moving over it a few times, fixed now
722
+ * Several other CSS issues fixed
723
+ * Sometimes tooltips didn't appear, fixed now
724
+ * When plugin is activated some toggle functionality stopped working, fixed now
725
+ * Click on icons after posts now shares the post, not the blog page
726
+ * Several little design enhancements
727
+ * When user selected that icons should show floating in the bottom right they floated in the center right, fixed now
728
+ * Issues with Youtube direct follow fixed
729
+ * Number of Instagram followers not always got pulled correctly, fixed now
730
+ * When site loaded the widget sometimes overlapped with others, fixed now
731
+
732
+ = 1.1.1.8 =
733
+ * Plugin's menu button now has less aggressive colors
734
+ * Sometimes sharing via facebook returned error messages, this is fixed now
735
+ * Conflicts with WooTheme Whitelight resolved
736
+ * Occasional problems with https-sites previously, now compatibile
737
+
738
+ = 1.1.1.7 =
739
+ * The 'counts' were not always correct, fixed now
740
+ * Conflicts with page editor resolved
741
+ * Last plugin update fixed Youtube points, however the 'channel' was as default, set back to 'username'
742
+ * Mouseover-text for social icons now correct
743
+ * Some layout adjustment in the admin area (menu-button will also be adjusted in next release)
744
+ * Setting order of icons sometimes didnt work properly when custom icons got uploaded, this is fixed now
745
+
746
+ = 1.1.1.6 =
747
+ * jQuery updated, now most conflicts with other plugins should be resolved
748
+
749
+ = 1.1.1.5 =
750
+ * Conflicts with several plugins sorted
751
+ * Icons can now be disabled on mobile
752
+ * Renaming of 'Youtube Channel' to 'Username' to avoid confusion
753
+ * On some templates there were alignment issues of the icons, this is fixed
754
+ * Menu button sub-menu removed (wasn't really necessary)
755
+ * Lightbox in admin area for custom icon upload shortened (was too large)
756
+ * Tags for all icons defined (for SEO purposes)
757
+
758
+ = 1.1.1.4 =
759
+ * If given only a 'visit us'-function for the Twitter-icon, the is no tooltip anymore (like for the other icons)
760
+ * Sharing sometimes pulled an incorrect image, fixed now
761
+ * Pop-up now also has an 'x' in the top right corner for people to close
762
+ * Sometimes icons overlapped, this is fixed now
763
+ * Several issues fixed when users put shortcode into the header
764
+ * Sometimes our request to ask users for feedback got displayed too early, this is fixed now
765
+ * Some youtube accounts don't have a username, but only a channel. To allow users to directly to subscribe to your youtube channel the plugin required a User ID, now a channel is possible too
766
+ * Several conflicts with other plugins resolved
767
+ * Some CSS issues fixed
768
+ * Steps 1., 2., 3. in the guide how to upload a custom icon were sometimes missing, this is fixed now
769
+ * Title removed now when using shortcodes
770
+ * Some error messages in developer tools not showing up anymore
771
+
772
+ = 1.1.1.3 =
773
+ * Several CSS issues fixed
774
+
775
+ = 1.1.1.2 =
776
+ * Shortcode now available too, so that you can place the icons wherever you want: Insert [DISPLAY_ULTIMATE_SOCIAL_ICONS]
777
+ * 'Visit us'-option now also available for Twitter-users
778
+ * Description added for people helping to find their LinkedIn-ID
779
+ * Description added for people helping to generate their API-keys for Twitter, LInkedIn and G+ to display their counts automatically
780
+ * Design of pop-up for upload of custom icons changed, to better explain required steps
781
+ * 'Icons per row' didn't work properly in specific cases, fixed now
782
+ * If user displayed counts for the icons, and picked the option 'floating' and 'bottom', the counts were sometimes not displayed because they moved too far down. This is fixed now.
783
+
784
+ = 1.1.1.1 =
785
+ * Previously custom icons got deleted if plugin was upgraded. This is fixed *from now on*. If you previously uploaded a custom icon, please do so (once) more. Sorry for the inconvenience.
786
+ * Question #5 The 'Sticking & Floating' -> 'Where shall they float?' was storing the right value but showing the 'Top - Left' always
787
+ * If the floating icons on the frontend had 'counts' enabled for them, the counts for the last row of the icons were being cut-off on the screen if the 'Bottom - Left' OR 'Bottom - Right' was chosen as the display position
788
+
789
+ = 1.1.1.0 =
790
+ * Following user suggestions we made it easier to remove the credit link (if previously activated by user - otherwise it doesn't display)
791
+
792
+ = 1.1.0.9 =
793
+ * Some servers don't display svg-images due to security issues, so we switched back to png
794
+ * Removed the comment line which may be me causes the syntax error at the time of installation
795
+
796
+ = 1.1.0.8 =
797
+ * In specific cases some share-icons were missing, this is fixed now
798
+ * Plugin sent error messages if user had developer mode active, this won't happen anymore
799
+
800
+ = 1.1.0.7 =
801
+ * 'Visit us' icons sometimes didn't get displayed in the backend, this is fixed now
802
+ * Also the design of the 'Visit us'-icons on the front end has been improved
803
+ * If the email-delivery option is used, emails now get sent out much faster (central server gets pinged)
804
+ * Pop-up in some cases didn't get shown on inner pages, fixed now
805
+ * Some responsive adjustments for mobile
806
+ * Custom icons had some resizing issues, fixed now
807
+
808
+ = 1.1.0.6 =
809
+ * If 'Do you want to display icons at end of every post' is clicked there were some issues on mobile view, this is fixed now
810
+ * 'Visit us'-icons in the tooltips were no vector-icons, which made them look fuzzy in some browsers, this is fixed now
811
+
812
+ = 1.1.0.5 =
813
+ * On certain pages sometimes the youtube icon didnt show, this is fixed now
814
+ * Custom uploaded icons got a black background, this is fixed now
815
+ * In the admin panel the plugin conflicted (in rare cases) with other plugins, this is fixed
816
+ * Pop-ups sometimes didn't disappear automatically, fixed now
817
+ * The tooltip for floating icons now gets displayed so that it is always visible
818
+
819
+ = 1.1.0.4 =
820
+ * Several changes done to optimize display on mobile & tablets
821
+ * Issues with widget fixed (in rare cases the separating lines between widgets didnt get displayed correctly)
822
+ * Deletion of headline for widget works now
823
+ * Slight alignment issues of share- and like buttons at the end of blog posts corrected
824
+
825
+ = 1.1.0.3 =
826
+ * Tooltip from share-option sometimes appeared some other strange places on the site, this is fixed now
827
+ * Extra checks added if user enters nonsense in the admin area
828
+ * Links to our review site added (please please give 5 stars)
829
+
830
+ = 1.1.0.2 =
831
+ * In specific cases there were Javascript loading errors, that's fixed now
832
+ * Moving from the icons to the tooltips made the tooltips disappear sometimes, now they are 'stickier'
833
+ * In specific cases the facebook-icon was displayed very small in the tooltip, fixed now
834
+
835
+ = 1.1.0.1 =
836
+ * Corrected that when only the 'visit us' function is selected, no tooltip is displayed
837
+
838
+ = 1.1 =
839
+ * Email-icon didn't get displayed for all design sets (on the website), this is fixed now
840
+ * Alignments of buttons in tooltips optimized
841
+ * Updated readme.txt
842
+
843
+ = 1.0 =
844
+ * First release
845
+
846
+ == Upgrade Notice ==
847
+
848
+ = 2.3.7 =
849
  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.6
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.36)
101
  {
102
 
103
  add_action("init", "sfsi_update_plugin");
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
+ Version: 2.3.7
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.37)
101
  {
102
 
103
  add_action("init", "sfsi_update_plugin");
views/sfsi_option_view1.php CHANGED
@@ -1,818 +1,818 @@
1
- <?php
2
-
3
- /* unserialize all saved option for first options */
4
-
5
- $option1 = unserialize(get_option('sfsi_section1_options', false));
6
-
7
- /*
8
- * Sanitize, escape and validate values
9
- */
10
-
11
- $option1['sfsi_rss_display'] = (isset($option1['sfsi_rss_display']))
12
-
13
- ? sanitize_text_field($option1['sfsi_rss_display'])
14
-
15
- : 'yes';
16
-
17
- $option1['sfsi_email_display'] = (isset($option1['sfsi_email_display']))
18
- ? sanitize_text_field($option1['sfsi_email_display'])
19
- : 'yes';
20
- $option1['sfsi_facebook_display'] = (isset($option1['sfsi_facebook_display']))
21
- ? sanitize_text_field($option1['sfsi_facebook_display'])
22
- : 'yes';
23
-
24
- $option1['sfsi_twitter_display'] = (isset($option1['sfsi_twitter_display']))
25
- ? sanitize_text_field($option1['sfsi_twitter_display'])
26
- : 'yes';
27
- $option1['sfsi_youtube_display'] = (isset($option1['sfsi_youtube_display']))
28
-
29
- ? sanitize_text_field($option1['sfsi_youtube_display'])
30
-
31
- : 'no';
32
-
33
- $option1['sfsi_pinterest_display'] = (isset($option1['sfsi_pinterest_display']))
34
- ? sanitize_text_field($option1['sfsi_pinterest_display'])
35
- : 'no';
36
-
37
- $option1['sfsi_telegram_display'] = (isset($option1['sfsi_telegram_display']))
38
- ? sanitize_text_field($option1['sfsi_telegram_display'])
39
- : 'no';
40
-
41
- $option1['sfsi_vk_display'] = (isset($option1['sfsi_vk_display']))
42
- ? sanitize_text_field($option1['sfsi_vk_display'])
43
- : 'no';
44
-
45
- $option1['sfsi_ok_display'] = (isset($option1['sfsi_ok_display']))
46
- ? sanitize_text_field($option1['sfsi_ok_display'])
47
- : 'no';
48
-
49
- $option1['sfsi_wechat_display'] = (isset($option1['sfsi_wechat_display']))
50
- ? sanitize_text_field($option1['sfsi_wechat_display'])
51
- : 'no';
52
-
53
- $option1['sfsi_weibo_display'] = (isset($option1['sfsi_weibo_display']))
54
- ? sanitize_text_field($option1['sfsi_weibo_display'])
55
- : 'no';
56
-
57
- $option1['sfsi_linkedin_display'] = (isset($option1['sfsi_linkedin_display']))
58
- ? sanitize_text_field($option1['sfsi_linkedin_display'])
59
- : 'no';
60
-
61
- $option1['sfsi_instagram_display'] = (isset($option1['sfsi_instagram_display']))
62
- ? sanitize_text_field($option1['sfsi_instagram_display'])
63
- : 'no';
64
- ?>
65
-
66
- <!-- Section 1 "Which icons do you want to show on your site? " main div Start -->
67
-
68
- <div class="tab1">
69
- <p class="top_txt">
70
- In general, <span>the more icons you offer the better</span> because people have different preferences, and more options mean that there’s something for everybody, increasing the chances that you get followed and/or shared.
71
-
72
- </p>
73
- <ul class="icn_listing">
74
-
75
- <!-- RSS ICON -->
76
- <li class="gary_bg">
77
-
78
- <div class="radio_section tb_4_ck">
79
- <input name="sfsi_rss_display" <?php echo ($option1['sfsi_rss_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rss_display" type="checkbox" value="yes" class="styled" />
80
-
81
- </div>
82
-
83
- <span class="sfsicls_rs_s">RSS</span>
84
-
85
- <div class="right_info">
86
-
87
- <p><span>Strongly recommended:</span> RSS is still popular, esp. among the tech-savvy crowd.
88
-
89
- <label class="expanded-area">RSS stands for Really Simply Syndication and is an easy way for people to read your content. You can learn more about it <a href="http://en.wikipedia.org/wiki/RSS" target="new" title="Syndication">here</a>. </label></p>
90
-
91
- <a href="javascript:;" class="expand-area">Read more</a>
92
-
93
- </div>
94
-
95
- </li>
96
-
97
- <!-- END RSS ICON -->
98
-
99
- <!-- EMAIL ICON -->
100
- <li class="gary_bg">
101
- <div class="radio_section tb_4_ck">
102
-
103
- <input name="sfsi_email_display" <?php echo ($option1['sfsi_email_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_email_display" type="checkbox" value="yes" class="styled" />
104
-
105
- </div>
106
-
107
- <span class="sfsicls_email">Email</span>
108
-
109
- <div class="right_info">
110
-
111
- <p><span>Strongly recommended:</span> Email is the most effective tool to build up followership.
112
-
113
- <span style="float: right;margin-right: 13px; margin-top: -3px;">
114
-
115
- <?php if (get_option('sfsi_footer_sec') == "yes") {
116
- $nonce = wp_create_nonce("remove_footer"); ?>
117
-
118
- <a style="font-size:13px;margin-left:30px;color:#777777;" href="javascript:;" class="sfsi_removeFooter" data-nonce="<?php echo $nonce; ?>">Remove credit link</a>
119
-
120
- <?php } ?>
121
-
122
- </span>
123
-
124
- <label class="expanded-area">Everybody uses email – that’s why it’s <a href="http://www.entrepreneur.com/article/230949" target="new">much more effective than social media </a> to make people follow you. Not offering an email subscription option means losing out on future traffic to your site.</label>
125
-
126
- </p>
127
-
128
- <a href="javascript:;" class="expand-area">Read more</a>
129
-
130
- </div>
131
-
132
- </li>
133
-
134
- <!-- EMAIL ICON -->
135
- <!-- FACEBOOK ICON -->
136
-
137
- <li class="gary_bg">
138
-
139
- <div class="radio_section tb_4_ck"><input name="sfsi_facebook_display" <?php echo ($option1['sfsi_facebook_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_facebook_display" type="checkbox" value="yes" class="styled" /></div>
140
-
141
- <span class="sfsicls_facebook">Facebook</span>
142
-
143
- <div class="right_info">
144
-
145
- <p><span>Strongly recommended:</span> Facebook is crucial, esp. for sharing.
146
-
147
- <label class="expanded-area">Facebook is the giant in the social media world, and even if you don’t have a Facebook account yourself you should display this icon, so that Facebook users can share your site on Facebook. </label>
148
-
149
- </p>
150
-
151
- <a href="javascript:;" class="expand-area">Read more</a>
152
-
153
- </div>
154
-
155
- </li>
156
-
157
- <!-- END FACEBOOK ICON -->
158
- <!-- TWITTER ICON -->
159
-
160
- <li class="gary_bg">
161
-
162
- <div class="radio_section tb_4_ck"><input name="sfsi_twitter_display" <?php echo ($option1['sfsi_twitter_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_twitter_display" type="checkbox" value="yes" class="styled" /></div>
163
-
164
- <span class="sfsicls_twt">Twitter</span>
165
-
166
- <div class="right_info">
167
-
168
- <p><span>Strongly recommended:</span> Can have a strong promotional effect.
169
-
170
- <label class="expanded-area">If you have a Twitter-account then adding this icon is a no-brainer. However, similar as with facebook, even if you don’t have one you should still show this icon so that Twitter-users can share your site.</label>
171
-
172
- </p>
173
-
174
- <a href="javascript:;" class="expand-area">Read more</a>
175
-
176
- </div>
177
-
178
- </li>
179
-
180
- <!-- END TWITTER ICON -->
181
- <!-- YOUTUBE ICON -->
182
-
183
- <li class="sfsi_vertically_center">
184
- <div>
185
- <div class="radio_section tb_4_ck"><input name="sfsi_youtube_display" <?php echo ($option1['sfsi_youtube_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_youtube_display" type="checkbox" value="yes" class="styled" /></div>
186
- <span class="sfsicls_utube">Youtube</span>
187
- </div>
188
- <div class="right_info">
189
- <p><span>It depends:</span> Show this icon if you have a youtube account (and you should set up one if you have video content – that can increase your traffic significantly). </p>
190
- </div>
191
- </li>
192
-
193
- <!-- END YOUTUBE ICON -->
194
-
195
- <!-- LINKEDIN ICON -->
196
- <li class="sfsi_vertically_center">
197
- <div>
198
- <div class="radio_section tb_4_ck"><input name="sfsi_linkedin_display" <?php echo ($option1['sfsi_linkedin_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_linkedin_display" type="checkbox" value="yes" class="styled" /></div>
199
-
200
- <span class="sfsicls_linkdin">LinkedIn</span>
201
- </div>
202
- <div class="right_info">
203
-
204
- <p><span>It depends:</span> No.1 network for business purposes. Use this icon if you’re a LinkedInner.</p>
205
-
206
- </div>
207
-
208
- </li>
209
- <!-- END LINKEDIN ICON -->
210
-
211
- <!-- PINTEREST ICON -->
212
- <li class="sfsi_vertically_center">
213
- <div>
214
- <div class="radio_section tb_4_ck"><input name="sfsi_pinterest_display" <?php echo ($option1['sfsi_pinterest_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_pinterest_display" type="checkbox" value="yes" class="styled" /></div>
215
-
216
- <span class="sfsicls_pinterest">Pinterest</span>
217
-
218
- </div>
219
-
220
- <div class="right_info">
221
-
222
- <p><span>It depends:</span> Show this icon if you have a Pinterest account (and you should set up one if you publish new pictures regularly – that can increase your traffic significantly).</p>
223
-
224
- </div>
225
-
226
- </li>
227
- <!-- END PINTEREST ICON -->
228
-
229
- <!-- INSTAGRAM ICON -->
230
- <li class="sfsi_vertically_center">
231
- <div>
232
- <div class="radio_section tb_4_ck"><input name="sfsi_instagram_display" <?php echo ($option1['sfsi_instagram_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_instagram_display" type="checkbox" value="yes" class="styled" /></div>
233
-
234
- <span class="sfsicls_instagram">Instagram</span>
235
-
236
- </div>
237
-
238
- <div class="right_info">
239
-
240
- <p><span>It depends:</span> Show this icon if you have an Instagram account.</p>
241
-
242
- </div>
243
-
244
- </li>
245
- <!-- END INSTAGRAM ICON -->
246
-
247
- <!-- TELEGRAM ICON -->
248
- <li class="sfsi_vertically_center">
249
- <div>
250
- <div class="radio_section tb_4_ck"><input name="sfsi_telegram_display" <?php echo ($option1['sfsi_telegram_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_telegram_display" type="checkbox" value="yes" class="styled" /></div>
251
-
252
- <span class="sfsicls_telegram">Telegram</span>
253
-
254
- </div>
255
-
256
- <div class="right_info">
257
-
258
- <p><span>It depends:</span> Show this icon if you have a Telegram account.</p>
259
-
260
- </div>
261
-
262
- </li>
263
- <!-- END TELEGRAM ICON -->
264
-
265
- <!-- VK ICON -->
266
- <li class="sfsi_vertically_center">
267
- <div>
268
- <div class="radio_section tb_4_ck"><input name="sfsi_vk_display" <?php echo ($option1['sfsi_vk_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_vk_display" type="checkbox" value="yes" class="styled" /></div>
269
-
270
- <span class="sfsicls_vk">VK</span>
271
- </div>
272
- <div class="right_info">
273
-
274
- <p><span>It depends:</span> Show this icon if you have a VK account.</p>
275
-
276
- </div>
277
-
278
- </li>
279
- <!-- END VK ICON -->
280
-
281
- <!-- OK ICON -->
282
- <li class="sfsi_vertically_center">
283
- <div>
284
-
285
- <div class="radio_section tb_4_ck"><input name="sfsi_ok_display" <?php echo ($option1['sfsi_ok_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_ok_display" type="checkbox" value="yes" class="styled" /></div>
286
-
287
- <span class="sfsicls_ok">Ok</span>
288
-
289
- </div>
290
-
291
- <div class="right_info">
292
-
293
- <p><span>It depends:</span> Show this icon if you have an OK account.</p>
294
-
295
- </div>
296
-
297
- </li>
298
- <!-- END OK ICON -->
299
-
300
- <!-- WECHAT ICON -->
301
- <li class="sfsi_vertically_center">
302
- <div>
303
- <div class="radio_section tb_4_ck"><input name="sfsi_wechat_display" <?php echo ($option1['sfsi_wechat_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_wechat_display" type="checkbox" value="yes" class="styled" /></div>
304
-
305
- <span class="sfsicls_wechat">WeChat</span>
306
- </div>
307
- <div class="right_info">
308
-
309
- <p><span>It depends:</span> Show this icon if you have a WeChat account.</p>
310
-
311
- </div>
312
-
313
- </li>
314
- <!-- END WECHAT ICON -->
315
- <!-- WEIBO ICON -->
316
- <li class="sfsi_vertically_center">
317
- <div>
318
-
319
- <div class="radio_section tb_4_ck"><input name="sfsi_weibo_display" <?php echo ($option1['sfsi_weibo_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_weibo_display" type="checkbox" value="yes" class="styled" /></div>
320
-
321
- <span class="sfsicls_weibo">Weibo</span>
322
-
323
- </div>
324
-
325
- <div class="right_info">
326
-
327
- <p><span>It depends:</span> Show this icon if you have a Weibo account.</p>
328
-
329
- </div>
330
-
331
- </li>
332
- <!-- END INSTAGRAM ICON -->
333
-
334
- <!-- Custom icon section start here -->
335
- <?php if (get_option('sfsi_custom_icons') == 'no') { ?>
336
- <?php
337
-
338
- $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array();
339
-
340
- $total_icons = count($icons);
341
-
342
- end($icons);
343
- $endkey = key($icons);
344
- $endkey = (isset($endkey)) ? $endkey : 0;
345
- reset($icons);
346
- $first_key = key($icons);
347
- $first_key = (isset($first_key)) ? $first_key : 0;
348
- $new_element = 0;
349
- if ($total_icons > 0) {
350
- $new_element = $endkey + 1;
351
- }
352
-
353
- ?>
354
- <!-- Display all custom icons -->
355
-
356
- <?php $count = 1;
357
- for ($i = $first_key; $i <= $endkey; $i++) : ?>
358
- <?php if (!empty($icons[$i])) : ?>
359
-
360
- <?php $count++;
361
- endif;
362
- endfor; ?>
363
-
364
- <!-- Create a custom icon if total uploaded icons are less than 5 -->
365
-
366
- <?php if ($count <= 5) : ?>
367
-
368
- <li id="c<?php echo $new_element; ?>" class="custom bdr_btm_non sfsi_vertically_center">
369
-
370
- <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
371
- <div class="radio_section tb_4_ck" style="opacity:0.5">
372
- <input type="checkbox" onclick="return false; value=" yes" class="styled" disabled="true" />
373
- </div>
374
-
375
- <span class="custom-img" style="opacity:0.5">
376
- <img src="<?php echo SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?> " alt="error" />
377
-
378
- </span>
379
-
380
- <span class="custom custom-txt" style="font-weight:normal;opacity:0.5;margin-left:4px"> Custom Icon </span>
381
-
382
- </a>
383
-
384
- <div class="right_info">
385
- <p>
386
- <label style="color: #12a252 !important; font-weight: bold;font-family: unset;">
387
- Premium Feature:
388
- </label>
389
- <label>Upload a custom icon if you have other accounts/websites you want to link to -</label>
390
- <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;font-family: unset;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
391
- Get it now.
392
- </a>
393
- </p>
394
-
395
- </div>
396
-
397
- </li>
398
-
399
- <?php endif; ?>
400
- <?php } ?>
401
- <!-- END Custom icon section here -->
402
-
403
- <!-- Custom icon section start here -->
404
-
405
- <?php
406
- if (get_option('sfsi_custom_icons') == 'yes') { ?>
407
- <?php
408
-
409
- $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array();
410
-
411
- $total_icons = count($icons);
412
-
413
- end($icons);
414
-
415
- $endkey = key($icons);
416
-
417
- $endkey = (isset($endkey)) ? $endkey : 0;
418
-
419
- reset($icons);
420
-
421
- $first_key = key($icons);
422
-
423
- $first_key = (isset($first_key)) ? $first_key : 0;
424
-
425
- $new_element = 0;
426
-
427
- if ($total_icons > 0) {
428
-
429
- $new_element = $endkey + 1;
430
- }
431
-
432
- ?>
433
-
434
- <!-- Display all custom icons -->
435
-
436
- <?php $count = 1;
437
- for ($i = $first_key; $i <= $endkey; $i++) : ?>
438
- <?php if (!empty($icons[$i])) : ?>
439
-
440
- <li id="c<?php echo $i; ?>" class="custom">
441
-
442
- <div class="radio_section tb_4_ck">
443
-
444
- <input name="sfsiICON_<?php echo $i; ?>" checked="true" type="checkbox" value="yes" class="styled" element-type="cusotm-icon" />
445
-
446
- </div>
447
-
448
- <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('deleteIcons'); ?>">
449
-
450
- <span class="custom-img">
451
-
452
- <img class="sfcm" src="<?php echo (!empty($icons[$i])) ? esc_url($icons[$i]) : SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $i; ?>" alt="error" />
453
-
454
- </span>
455
-
456
- <span class="custom custom-txt">Custom <?php echo $count; ?> </span>
457
-
458
- <div class="right_info">
459
-
460
- <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to. </p>
461
- </div>
462
-
463
- </li>
464
-
465
- <?php $count++;
466
- endif;
467
- endfor; ?>
468
-
469
- <!-- Create a custom icon if total uploaded icons are less than 5 -->
470
-
471
- <?php if ($count <= 5) : ?>
472
-
473
- <li id="c<?php echo $new_element; ?>" class="custom bdr_btm_non sfsi_vertically_center">
474
- <div>
475
- <div class="radio_section tb_4_ck">
476
-
477
- <input name="sfsiICON_<?php echo $new_element; ?>" type="checkbox" value="yes" class="styled" element-type="cusotm-icon" ele-type='new' />
478
-
479
- </div>
480
-
481
- <span class="custom-img">
482
-
483
- <img src="<?php echo SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?> " alt="error" />
484
-
485
- </span>
486
- <span class="custom custom-txt">Custom<?php echo $count; ?> </span>
487
-
488
- </div>
489
-
490
- <div class="right_info">
491
-
492
- <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to. </p>
493
-
494
- </div>
495
-
496
- </li>
497
-
498
- <?php endif; ?>
499
- <?php } ?>
500
- <!-- END Custom icon section here -->
501
-
502
- </ul>
503
-
504
- <ul>
505
-
506
- <li class="sfsi_premium_brdr_box">
507
-
508
- <div class="sfsi_prem_icons_added">
509
-
510
- <div class="sf_si_prmium_head">
511
- <h2>New: <span> In our Premium Plugin we added icons for:</span></h2>
512
- </div>
513
-
514
- <div class="sfsi_premium_row">
515
-
516
- <div class="sfsi_prem_cmn_rowlisting">
517
-
518
- <span>
519
-
520
- <img src="<?php echo SFSI_PLUGURL . 'images/snapchat.png'; ?>" id="CImg" alt="error" />
521
-
522
- </span>
523
-
524
- <span class="sfsicls_prem_text">Snapchat</span>
525
-
526
- </div>
527
-
528
- <div class="sfsi_prem_cmn_rowlisting">
529
-
530
- <span>
531
-
532
- <img src="<?php echo SFSI_PLUGURL . 'images/whatsapp.png'; ?>" id="CImg" alt="error" />
533
-
534
- </span>
535
-
536
- <span class="sfsicls_prem_text">WhatsApp or Phone</span>
537
-
538
- </div>
539
-
540
- <div class="sfsi_prem_cmn_rowlisting">
541
-
542
- <span>
543
-
544
- <img src="<?php echo SFSI_PLUGURL . 'images/yummly.png'; ?>" id="CImg" alt="error" />
545
-
546
- </span>
547
-
548
- <span class="sfsicls_prem_text">Yummly</span>
549
-
550
- </div>
551
-
552
- <div class="sfsi_prem_cmn_rowlisting">
553
-
554
- <span>
555
-
556
- <img src="<?php echo SFSI_PLUGURL . 'images/yelp.png'; ?>" id="CImg" alt="error" />
557
-
558
- </span>
559
-
560
- <span class="sfsicls_prem_text">Yelp</span>
561
-
562
- </div>
563
-
564
- <div class="sfsi_prem_cmn_rowlisting">
565
-
566
- <span>
567
-
568
- <img src="<?php echo SFSI_PLUGURL . 'images/print.png'; ?>" id="CImg" alt="error" />
569
-
570
- </span>
571
-
572
- <span class="sfsicls_prem_text">Print</span>
573
-
574
- </div>
575
-
576
- <div class="sfsi_prem_cmn_rowlisting">
577
-
578
- <span>
579
-
580
- <img src="<?php echo SFSI_PLUGURL . 'images/messenger.png'; ?>" id="CImg" />
581
-
582
- </span>
583
-
584
- <span class="sfsicls_prem_text">Messenger</span>
585
-
586
- </div>
587
-
588
- </div>
589
-
590
- <div class="sfsi_premium_row">
591
-
592
- <div class="sfsi_prem_cmn_rowlisting">
593
-
594
- <span>
595
-
596
- <img src="<?php echo SFSI_PLUGURL . 'images/soundcloud.png'; ?>" id="CImg" alt="error" />
597
-
598
- </span>
599
-
600
- <span class="sfsicls_prem_text">Soundcloud</span>
601
-
602
- </div>
603
-
604
- <div class="sfsi_prem_cmn_rowlisting">
605
-
606
- <span>
607
-
608
- <img src="<?php echo SFSI_PLUGURL . 'images/skype.png'; ?>" id="CImg" alt="error" />
609
-
610
- </span>
611
-
612
- <span class="sfsicls_prem_text">Skype</span>
613
-
614
- </div>
615
-
616
- <div class="sfsi_prem_cmn_rowlisting">
617
-
618
- <span>
619
-
620
- <img src="<?php echo SFSI_PLUGURL . 'images/flickr.png'; ?>" id="CImg" alt="error" />
621
-
622
- </span>
623
-
624
- <span class="sfsicls_prem_text">Flickr</span>
625
-
626
- </div>
627
-
628
- <div class="sfsi_prem_cmn_rowlisting">
629
-
630
- <span>
631
-
632
- <img src="<?php echo SFSI_PLUGURL . 'images/buffer.png'; ?>" id="CImg" alt="error" />
633
-
634
- </span>
635
-
636
- <span class="sfsicls_prem_text">Buffer</span>
637
-
638
- </div>
639
-
640
- <div class="sfsi_prem_cmn_rowlisting">
641
-
642
- <span>
643
-
644
- <img src="<?php echo SFSI_PLUGURL . 'images/blogger.png'; ?>" id="CImg" alt="error" />
645
-
646
- </span>
647
-
648
- <span class="sfsicls_prem_text">Blogger</span>
649
-
650
- </div>
651
-
652
- <div class="sfsi_prem_cmn_rowlisting">
653
-
654
- <span>
655
-
656
- <img src="<?php echo SFSI_PLUGURL . 'images/reddit.png'; ?>" id="CImg" alt="error" />
657
-
658
- </span>
659
-
660
- <span class="sfsicls_prem_text">Reddit</span>
661
-
662
- </div>
663
-
664
- </div>
665
-
666
- <div class="sfsi_premium_row">
667
-
668
- <div class="sfsi_prem_cmn_rowlisting">
669
-
670
- <span>
671
-
672
- <img src="<?php echo SFSI_PLUGURL . 'images/vimeo.png'; ?>" id="CImg" alt="error" />
673
-
674
- </span>
675
-
676
- <span class="sfsicls_prem_text">Vimeo</span>
677
-
678
- </div>
679
-
680
- <div class="sfsi_prem_cmn_rowlisting">
681
-
682
- <span>
683
-
684
- <img src="<?php echo SFSI_PLUGURL . 'images/tumblr.png'; ?>" id="CImg" alt="error" />
685
-
686
- </span>
687
-
688
- <span class="sfsicls_prem_text">Tumblr</span>
689
-
690
- </div>
691
-
692
- <div class="sfsi_prem_cmn_rowlisting">
693
-
694
- <span>
695
-
696
- <img src="<?php echo SFSI_PLUGURL . 'images/houzz.png'; ?>" id="CImg" alt="error" />
697
-
698
- </span>
699
-
700
- <span class="sfsicls_prem_text">Houzz</span>
701
-
702
- </div>
703
-
704
- <div class="sfsi_prem_cmn_rowlisting">
705
-
706
- <span>
707
-
708
- <img src="<?php echo SFSI_PLUGURL . 'images/xing.png'; ?>" id="CImg" alt="error" />
709
-
710
- </span>
711
-
712
- <span class="sfsicls_prem_text">Xing</span>
713
-
714
- </div>
715
-
716
- <div class="sfsi_prem_cmn_rowlisting">
717
-
718
- <span>
719
-
720
- <img src="<?php echo SFSI_PLUGURL . 'images/twitch.png'; ?>" id="CImg" />
721
-
722
- </span>
723
-
724
- <span class="sfsicls_prem_text">Twitch</span>
725
-
726
- </div>
727
-
728
- <div class="sfsi_prem_cmn_rowlisting">
729
-
730
- <span>
731
-
732
- <img src="<?php echo SFSI_PLUGURL . 'images/amazon.png'; ?>" id="CImg" alt="error" />
733
-
734
- </span>
735
-
736
- <span class="sfsicls_prem_text">Amazon</span>
737
-
738
- </div>
739
-
740
- </div>
741
-
742
- <div class="sfsi_premium_row">
743
-
744
- <div class="sfsi_prem_cmn_rowlisting">
745
-
746
- <span>
747
-
748
- <img src="<?php echo SFSI_PLUGURL . 'images/angieslist.png'; ?>" id="CImg" alt="error" />
749
-
750
- </span>
751
-
752
- <span class="sfsicls_prem_text">Angie’s List</span>
753
-
754
- </div>
755
-
756
- <div class="sfsi_prem_cmn_rowlisting">
757
-
758
- <span>
759
-
760
- <img src="<?php echo SFSI_PLUGURL . 'images/steam.png'; ?>" id="CImg" alt="error" />
761
-
762
- </span>
763
-
764
- <span class="sfsicls_prem_text">Steam</span>
765
-
766
- </div>
767
-
768
- </div>
769
-
770
- <!--<div class="sfsi_need_another_one_link">
771
-
772
- <p>Need another one?<a href="mailto:biz@ultimatelysocial.com"> Tell us</a></p>
773
-
774
- </div>-->
775
-
776
- <div class="sfsi_need_another_tell_us" style="padding-top:20px">
777
-
778
- <a href="https://www.ultimatelysocial.com/all-platforms/" target="_blank">...and many more! See them here</a>
779
-
780
- <!--<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_platforms&utm_medium=banner" target="_blank">See all features Premium Plugin</a>-->
781
-
782
- </div>
783
-
784
- </div>
785
-
786
- </li>
787
-
788
- </ul>
789
-
790
- <input type="hidden" value="<?php echo SFSI_PLUGURL ?>" id="plugin_url" />
791
-
792
- <input type="hidden" value="" id="upload_id" />
793
-
794
- <?php sfsi_ask_for_help(1); ?>
795
-
796
- <!-- SAVE BUTTON SECTION -->
797
-
798
- <div class="save_button tab_1_sav">
799
-
800
- <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" alt="error" />
801
-
802
- <?php $nonce = wp_create_nonce("update_step1"); ?>
803
-
804
- <a href="javascript:;" id="sfsi_save1" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
805
-
806
- </div><!-- END SAVE BUTTON SECTION -->
807
-
808
- <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
809
-
810
- <!-- ERROR AND SUCCESS MESSAGE AREA-->
811
-
812
- <p class="red_txt errorMsg" style="display:none"> </p>
813
-
814
- <p class="green_txt sucMsg" style="display:none"> </p>
815
-
816
- </div>
817
-
818
  <!-- END Section 1 "Which icons do you want to show on your site? " main div-->
1
+ <?php
2
+
3
+ /* unserialize all saved option for first options */
4
+
5
+ $option1 = unserialize(get_option('sfsi_section1_options', false));
6
+
7
+ /*
8
+ * Sanitize, escape and validate values
9
+ */
10
+
11
+ $option1['sfsi_rss_display'] = (isset($option1['sfsi_rss_display']))
12
+
13
+ ? sanitize_text_field($option1['sfsi_rss_display'])
14
+
15
+ : 'yes';
16
+
17
+ $option1['sfsi_email_display'] = (isset($option1['sfsi_email_display']))
18
+ ? sanitize_text_field($option1['sfsi_email_display'])
19
+ : 'yes';
20
+ $option1['sfsi_facebook_display'] = (isset($option1['sfsi_facebook_display']))
21
+ ? sanitize_text_field($option1['sfsi_facebook_display'])
22
+ : 'yes';
23
+
24
+ $option1['sfsi_twitter_display'] = (isset($option1['sfsi_twitter_display']))
25
+ ? sanitize_text_field($option1['sfsi_twitter_display'])
26
+ : 'yes';
27
+ $option1['sfsi_youtube_display'] = (isset($option1['sfsi_youtube_display']))
28
+
29
+ ? sanitize_text_field($option1['sfsi_youtube_display'])
30
+
31
+ : 'no';
32
+
33
+ $option1['sfsi_pinterest_display'] = (isset($option1['sfsi_pinterest_display']))
34
+ ? sanitize_text_field($option1['sfsi_pinterest_display'])
35
+ : 'no';
36
+
37
+ $option1['sfsi_telegram_display'] = (isset($option1['sfsi_telegram_display']))
38
+ ? sanitize_text_field($option1['sfsi_telegram_display'])
39
+ : 'no';
40
+
41
+ $option1['sfsi_vk_display'] = (isset($option1['sfsi_vk_display']))
42
+ ? sanitize_text_field($option1['sfsi_vk_display'])
43
+ : 'no';
44
+
45
+ $option1['sfsi_ok_display'] = (isset($option1['sfsi_ok_display']))
46
+ ? sanitize_text_field($option1['sfsi_ok_display'])
47
+ : 'no';
48
+
49
+ $option1['sfsi_wechat_display'] = (isset($option1['sfsi_wechat_display']))
50
+ ? sanitize_text_field($option1['sfsi_wechat_display'])
51
+ : 'no';
52
+
53
+ $option1['sfsi_weibo_display'] = (isset($option1['sfsi_weibo_display']))
54
+ ? sanitize_text_field($option1['sfsi_weibo_display'])
55
+ : 'no';
56
+
57
+ $option1['sfsi_linkedin_display'] = (isset($option1['sfsi_linkedin_display']))
58
+ ? sanitize_text_field($option1['sfsi_linkedin_display'])
59
+ : 'no';
60
+
61
+ $option1['sfsi_instagram_display'] = (isset($option1['sfsi_instagram_display']))
62
+ ? sanitize_text_field($option1['sfsi_instagram_display'])
63
+ : 'no';
64
+ ?>
65
+
66
+ <!-- Section 1 "Which icons do you want to show on your site? " main div Start -->
67
+
68
+ <div class="tab1">
69
+ <p class="top_txt">
70
+ In general, <span>the more icons you offer the better</span> because people have different preferences, and more options mean that there’s something for everybody, increasing the chances that you get followed and/or shared.
71
+
72
+ </p>
73
+ <ul class="icn_listing">
74
+
75
+ <!-- RSS ICON -->
76
+ <li class="gary_bg">
77
+
78
+ <div class="radio_section tb_4_ck">
79
+ <input name="sfsi_rss_display" <?php echo ($option1['sfsi_rss_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rss_display" type="checkbox" value="yes" class="styled" />
80
+
81
+ </div>
82
+
83
+ <span class="sfsicls_rs_s">RSS</span>
84
+
85
+ <div class="right_info">
86
+
87
+ <p><span>Strongly recommended:</span> RSS is still popular, esp. among the tech-savvy crowd.
88
+
89
+ <label class="expanded-area">RSS stands for Really Simply Syndication and is an easy way for people to read your content. You can learn more about it <a href="http://en.wikipedia.org/wiki/RSS" target="new" title="Syndication">here</a>. </label></p>
90
+
91
+ <a href="javascript:;" class="expand-area">Read more</a>
92
+
93
+ </div>
94
+
95
+ </li>
96
+
97
+ <!-- END RSS ICON -->
98
+
99
+ <!-- EMAIL ICON -->
100
+ <li class="gary_bg">
101
+ <div class="radio_section tb_4_ck">
102
+
103
+ <input name="sfsi_email_display" <?php echo ($option1['sfsi_email_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_email_display" type="checkbox" value="yes" class="styled" />
104
+
105
+ </div>
106
+
107
+ <span class="sfsicls_email">Email</span>
108
+
109
+ <div class="right_info">
110
+
111
+ <p><span>Strongly recommended:</span> Email is the most effective tool to build up followership.
112
+
113
+ <span style="float: right;margin-right: 13px; margin-top: -3px;">
114
+
115
+ <?php if (get_option('sfsi_footer_sec') == "yes") {
116
+ $nonce = wp_create_nonce("remove_footer"); ?>
117
+
118
+ <a style="font-size:13px;margin-left:30px;color:#777777;" href="javascript:;" class="sfsi_removeFooter" data-nonce="<?php echo $nonce; ?>">Remove credit link</a>
119
+
120
+ <?php } ?>
121
+
122
+ </span>
123
+
124
+ <label class="expanded-area">Everybody uses email – that’s why it’s <a href="http://www.entrepreneur.com/article/230949" target="new">much more effective than social media </a> to make people follow you. Not offering an email subscription option means losing out on future traffic to your site.</label>
125
+
126
+ </p>
127
+
128
+ <a href="javascript:;" class="expand-area">Read more</a>
129
+
130
+ </div>
131
+
132
+ </li>
133
+
134
+ <!-- EMAIL ICON -->
135
+ <!-- FACEBOOK ICON -->
136
+
137
+ <li class="gary_bg">
138
+
139
+ <div class="radio_section tb_4_ck"><input name="sfsi_facebook_display" <?php echo ($option1['sfsi_facebook_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_facebook_display" type="checkbox" value="yes" class="styled" /></div>
140
+
141
+ <span class="sfsicls_facebook">Facebook</span>
142
+
143
+ <div class="right_info">
144
+
145
+ <p><span>Strongly recommended:</span> Facebook is crucial, esp. for sharing.
146
+
147
+ <label class="expanded-area">Facebook is the giant in the social media world, and even if you don’t have a Facebook account yourself you should display this icon, so that Facebook users can share your site on Facebook. </label>
148
+
149
+ </p>
150
+
151
+ <a href="javascript:;" class="expand-area">Read more</a>
152
+
153
+ </div>
154
+
155
+ </li>
156
+
157
+ <!-- END FACEBOOK ICON -->
158
+ <!-- TWITTER ICON -->
159
+
160
+ <li class="gary_bg">
161
+
162
+ <div class="radio_section tb_4_ck"><input name="sfsi_twitter_display" <?php echo ($option1['sfsi_twitter_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_twitter_display" type="checkbox" value="yes" class="styled" /></div>
163
+
164
+ <span class="sfsicls_twt">Twitter</span>
165
+
166
+ <div class="right_info">
167
+
168
+ <p><span>Strongly recommended:</span> Can have a strong promotional effect.
169
+
170
+ <label class="expanded-area">If you have a Twitter-account then adding this icon is a no-brainer. However, similar as with facebook, even if you don’t have one you should still show this icon so that Twitter-users can share your site.</label>
171
+
172
+ </p>
173
+
174
+ <a href="javascript:;" class="expand-area">Read more</a>
175
+
176
+ </div>
177
+
178
+ </li>
179
+
180
+ <!-- END TWITTER ICON -->
181
+ <!-- YOUTUBE ICON -->
182
+
183
+ <li class="sfsi_vertically_center">
184
+ <div>
185
+ <div class="radio_section tb_4_ck"><input name="sfsi_youtube_display" <?php echo ($option1['sfsi_youtube_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_youtube_display" type="checkbox" value="yes" class="styled" /></div>
186
+ <span class="sfsicls_utube">Youtube</span>
187
+ </div>
188
+ <div class="right_info">
189
+ <p><span>It depends:</span> Show this icon if you have a youtube account (and you should set up one if you have video content – that can increase your traffic significantly). </p>
190
+ </div>
191
+ </li>
192
+
193
+ <!-- END YOUTUBE ICON -->
194
+
195
+ <!-- LINKEDIN ICON -->
196
+ <li class="sfsi_vertically_center">
197
+ <div>
198
+ <div class="radio_section tb_4_ck"><input name="sfsi_linkedin_display" <?php echo ($option1['sfsi_linkedin_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_linkedin_display" type="checkbox" value="yes" class="styled" /></div>
199
+
200
+ <span class="sfsicls_linkdin">LinkedIn</span>
201
+ </div>
202
+ <div class="right_info">
203
+
204
+ <p><span>It depends:</span> No.1 network for business purposes. Use this icon if you’re a LinkedInner.</p>
205
+
206
+ </div>
207
+
208
+ </li>
209
+ <!-- END LINKEDIN ICON -->
210
+
211
+ <!-- PINTEREST ICON -->
212
+ <li class="sfsi_vertically_center">
213
+ <div>
214
+ <div class="radio_section tb_4_ck"><input name="sfsi_pinterest_display" <?php echo ($option1['sfsi_pinterest_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_pinterest_display" type="checkbox" value="yes" class="styled" /></div>
215
+
216
+ <span class="sfsicls_pinterest">Pinterest</span>
217
+
218
+ </div>
219
+
220
+ <div class="right_info">
221
+
222
+ <p><span>It depends:</span> Show this icon if you have a Pinterest account (and you should set up one if you publish new pictures regularly – that can increase your traffic significantly).</p>
223
+
224
+ </div>
225
+
226
+ </li>
227
+ <!-- END PINTEREST ICON -->
228
+
229
+ <!-- INSTAGRAM ICON -->
230
+ <li class="sfsi_vertically_center">
231
+ <div>
232
+ <div class="radio_section tb_4_ck"><input name="sfsi_instagram_display" <?php echo ($option1['sfsi_instagram_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_instagram_display" type="checkbox" value="yes" class="styled" /></div>
233
+
234
+ <span class="sfsicls_instagram">Instagram</span>
235
+
236
+ </div>
237
+
238
+ <div class="right_info">
239
+
240
+ <p><span>It depends:</span> Show this icon if you have an Instagram account.</p>
241
+
242
+ </div>
243
+
244
+ </li>
245
+ <!-- END INSTAGRAM ICON -->
246
+
247
+ <!-- TELEGRAM ICON -->
248
+ <li class="sfsi_vertically_center">
249
+ <div>
250
+ <div class="radio_section tb_4_ck"><input name="sfsi_telegram_display" <?php echo ($option1['sfsi_telegram_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_telegram_display" type="checkbox" value="yes" class="styled" /></div>
251
+
252
+ <span class="sfsicls_telegram">Telegram</span>
253
+
254
+ </div>
255
+
256
+ <div class="right_info">
257
+
258
+ <p><span>It depends:</span> Show this icon if you have a Telegram account.</p>
259
+
260
+ </div>
261
+
262
+ </li>
263
+ <!-- END TELEGRAM ICON -->
264
+
265
+ <!-- VK ICON -->
266
+ <li class="sfsi_vertically_center">
267
+ <div>
268
+ <div class="radio_section tb_4_ck"><input name="sfsi_vk_display" <?php echo ($option1['sfsi_vk_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_vk_display" type="checkbox" value="yes" class="styled" /></div>
269
+
270
+ <span class="sfsicls_vk">VK</span>
271
+ </div>
272
+ <div class="right_info">
273
+
274
+ <p><span>It depends:</span> Show this icon if you have a VK account.</p>
275
+
276
+ </div>
277
+
278
+ </li>
279
+ <!-- END VK ICON -->
280
+
281
+ <!-- OK ICON -->
282
+ <li class="sfsi_vertically_center">
283
+ <div>
284
+
285
+ <div class="radio_section tb_4_ck"><input name="sfsi_ok_display" <?php echo ($option1['sfsi_ok_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_ok_display" type="checkbox" value="yes" class="styled" /></div>
286
+
287
+ <span class="sfsicls_ok">Ok</span>
288
+
289
+ </div>
290
+
291
+ <div class="right_info">
292
+
293
+ <p><span>It depends:</span> Show this icon if you have an OK account.</p>
294
+
295
+ </div>
296
+
297
+ </li>
298
+ <!-- END OK ICON -->
299
+
300
+ <!-- WECHAT ICON -->
301
+ <li class="sfsi_vertically_center">
302
+ <div>
303
+ <div class="radio_section tb_4_ck"><input name="sfsi_wechat_display" <?php echo ($option1['sfsi_wechat_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_wechat_display" type="checkbox" value="yes" class="styled" /></div>
304
+
305
+ <span class="sfsicls_wechat">WeChat</span>
306
+ </div>
307
+ <div class="right_info">
308
+
309
+ <p><span>It depends:</span> Show this icon if you have a WeChat account.</p>
310
+
311
+ </div>
312
+
313
+ </li>
314
+ <!-- END WECHAT ICON -->
315
+ <!-- WEIBO ICON -->
316
+ <li class="sfsi_vertically_center">
317
+ <div>
318
+
319
+ <div class="radio_section tb_4_ck"><input name="sfsi_weibo_display" <?php echo ($option1['sfsi_weibo_display'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_weibo_display" type="checkbox" value="yes" class="styled" /></div>
320
+
321
+ <span class="sfsicls_weibo">Weibo</span>
322
+
323
+ </div>
324
+
325
+ <div class="right_info">
326
+
327
+ <p><span>It depends:</span> Show this icon if you have a Weibo account.</p>
328
+
329
+ </div>
330
+
331
+ </li>
332
+ <!-- END INSTAGRAM ICON -->
333
+
334
+ <!-- Custom icon section start here -->
335
+ <?php if (get_option('sfsi_custom_icons') == 'no') { ?>
336
+ <?php
337
+
338
+ $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array();
339
+
340
+ $total_icons = count($icons);
341
+
342
+ end($icons);
343
+ $endkey = key($icons);
344
+ $endkey = (isset($endkey)) ? $endkey : 0;
345
+ reset($icons);
346
+ $first_key = key($icons);
347
+ $first_key = (isset($first_key)) ? $first_key : 0;
348
+ $new_element = 0;
349
+ if ($total_icons > 0) {
350
+ $new_element = $endkey + 1;
351
+ }
352
+
353
+ ?>
354
+ <!-- Display all custom icons -->
355
+
356
+ <?php $count = 1;
357
+ for ($i = $first_key; $i <= $endkey; $i++) : ?>
358
+ <?php if (!empty($icons[$i])) : ?>
359
+
360
+ <?php $count++;
361
+ endif;
362
+ endfor; ?>
363
+
364
+ <!-- Create a custom icon if total uploaded icons are less than 5 -->
365
+
366
+ <?php if ($count <= 5) : ?>
367
+
368
+ <li id="c<?php echo $new_element; ?>" class="custom bdr_btm_non sfsi_vertically_center">
369
+
370
+ <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
371
+ <div class="radio_section tb_4_ck" style="opacity:0.5">
372
+ <input type="checkbox" onclick="return false; value=" yes" class="styled" disabled="true" />
373
+ </div>
374
+
375
+ <span class="custom-img" style="opacity:0.5">
376
+ <img src="<?php echo SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?> " alt="error" />
377
+
378
+ </span>
379
+
380
+ <span class="custom custom-txt" style="font-weight:normal;opacity:0.5;margin-left:4px"> Custom Icon </span>
381
+
382
+ </a>
383
+
384
+ <div class="right_info">
385
+ <p>
386
+ <label style="color: #12a252 !important; font-weight: bold;font-family: unset;">
387
+ Premium Feature:
388
+ </label>
389
+ <label>Upload a custom icon if you have other accounts/websites you want to link to -</label>
390
+ <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;font-family: unset;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
391
+ Get it now.
392
+ </a>
393
+ </p>
394
+
395
+ </div>
396
+
397
+ </li>
398
+
399
+ <?php endif; ?>
400
+ <?php } ?>
401
+ <!-- END Custom icon section here -->
402
+
403
+ <!-- Custom icon section start here -->
404
+
405
+ <?php
406
+ if (get_option('sfsi_custom_icons') == 'yes') { ?>
407
+ <?php
408
+
409
+ $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array();
410
+
411
+ $total_icons = count($icons);
412
+
413
+ end($icons);
414
+
415
+ $endkey = key($icons);
416
+
417
+ $endkey = (isset($endkey)) ? $endkey : 0;
418
+
419
+ reset($icons);
420
+
421
+ $first_key = key($icons);
422
+
423
+ $first_key = (isset($first_key)) ? $first_key : 0;
424
+
425
+ $new_element = 0;
426
+
427
+ if ($total_icons > 0) {
428
+
429
+ $new_element = $endkey + 1;
430
+ }
431
+
432
+ ?>
433
+
434
+ <!-- Display all custom icons -->
435
+
436
+ <?php $count = 1;
437
+ for ($i = $first_key; $i <= $endkey; $i++) : ?>
438
+ <?php if (!empty($icons[$i])) : ?>
439
+
440
+ <li id="c<?php echo $i; ?>" class="custom">
441
+
442
+ <div class="radio_section tb_4_ck">
443
+
444
+ <input name="sfsiICON_<?php echo $i; ?>" checked="true" type="checkbox" value="yes" class="styled" element-type="cusotm-icon" />
445
+
446
+ </div>
447
+
448
+ <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('deleteIcons'); ?>">
449
+
450
+ <span class="custom-img">
451
+
452
+ <img class="sfcm" src="<?php echo (!empty($icons[$i])) ? esc_url($icons[$i]) : SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $i; ?>" alt="error" />
453
+
454
+ </span>
455
+
456
+ <span class="custom custom-txt">Custom <?php echo $count; ?> </span>
457
+
458
+ <div class="right_info">
459
+
460
+ <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to. </p>
461
+ </div>
462
+
463
+ </li>
464
+
465
+ <?php $count++;
466
+ endif;
467
+ endfor; ?>
468
+
469
+ <!-- Create a custom icon if total uploaded icons are less than 5 -->
470
+
471
+ <?php if ($count <= 5) : ?>
472
+
473
+ <li id="c<?php echo $new_element; ?>" class="custom bdr_btm_non sfsi_vertically_center">
474
+ <div>
475
+ <div class="radio_section tb_4_ck">
476
+
477
+ <input name="sfsiICON_<?php echo $new_element; ?>" type="checkbox" value="yes" class="styled" element-type="cusotm-icon" ele-type='new' />
478
+
479
+ </div>
480
+
481
+ <span class="custom-img">
482
+
483
+ <img src="<?php echo SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?> " alt="error" />
484
+
485
+ </span>
486
+ <span class="custom custom-txt">Custom<?php echo $count; ?> </span>
487
+
488
+ </div>
489
+
490
+ <div class="right_info">
491
+
492
+ <p><span>It depends:</span> Upload a custom icon if you have other accounts/websites you want to link to. </p>
493
+
494
+ </div>
495
+
496
+ </li>
497
+
498
+ <?php endif; ?>
499
+ <?php } ?>
500
+ <!-- END Custom icon section here -->
501
+
502
+ </ul>
503
+
504
+ <ul>
505
+
506
+ <li class="sfsi_premium_brdr_box">
507
+
508
+ <div class="sfsi_prem_icons_added">
509
+
510
+ <div class="sf_si_prmium_head">
511
+ <h2>New: <span> In our Premium Plugin we added icons for:</span></h2>
512
+ </div>
513
+
514
+ <div class="sfsi_premium_row">
515
+
516
+ <div class="sfsi_prem_cmn_rowlisting">
517
+
518
+ <span>
519
+
520
+ <img src="<?php echo SFSI_PLUGURL . 'images/snapchat.png'; ?>" id="CImg" alt="error" />
521
+
522
+ </span>
523
+
524
+ <span class="sfsicls_prem_text">Snapchat</span>
525
+
526
+ </div>
527
+
528
+ <div class="sfsi_prem_cmn_rowlisting">
529
+
530
+ <span>
531
+
532
+ <img src="<?php echo SFSI_PLUGURL . 'images/whatsapp.png'; ?>" id="CImg" alt="error" />
533
+
534
+ </span>
535
+
536
+ <span class="sfsicls_prem_text">WhatsApp or Phone</span>
537
+
538
+ </div>
539
+
540
+ <div class="sfsi_prem_cmn_rowlisting">
541
+
542
+ <span>
543
+
544
+ <img src="<?php echo SFSI_PLUGURL . 'images/yummly.png'; ?>" id="CImg" alt="error" />
545
+
546
+ </span>
547
+
548
+ <span class="sfsicls_prem_text">Yummly</span>
549
+
550
+ </div>
551
+
552
+ <div class="sfsi_prem_cmn_rowlisting">
553
+
554
+ <span>
555
+
556
+ <img src="<?php echo SFSI_PLUGURL . 'images/yelp.png'; ?>" id="CImg" alt="error" />
557
+
558
+ </span>
559
+
560
+ <span class="sfsicls_prem_text">Yelp</span>
561
+
562
+ </div>
563
+
564
+ <div class="sfsi_prem_cmn_rowlisting">
565
+
566
+ <span>
567
+
568
+ <img src="<?php echo SFSI_PLUGURL . 'images/print.png'; ?>" id="CImg" alt="error" />
569
+
570
+ </span>
571
+
572
+ <span class="sfsicls_prem_text">Print</span>
573
+
574
+ </div>
575
+
576
+ <div class="sfsi_prem_cmn_rowlisting">
577
+
578
+ <span>
579
+
580
+ <img src="<?php echo SFSI_PLUGURL . 'images/messenger.png'; ?>" id="CImg" />
581
+
582
+ </span>
583
+
584
+ <span class="sfsicls_prem_text">Messenger</span>
585
+
586
+ </div>
587
+
588
+ </div>
589
+
590
+ <div class="sfsi_premium_row">
591
+
592
+ <div class="sfsi_prem_cmn_rowlisting">
593
+
594
+ <span>
595
+
596
+ <img src="<?php echo SFSI_PLUGURL . 'images/soundcloud.png'; ?>" id="CImg" alt="error" />
597
+
598
+ </span>
599
+
600
+ <span class="sfsicls_prem_text">Soundcloud</span>
601
+
602
+ </div>
603
+
604
+ <div class="sfsi_prem_cmn_rowlisting">
605
+
606
+ <span>
607
+
608
+ <img src="<?php echo SFSI_PLUGURL . 'images/skype.png'; ?>" id="CImg" alt="error" />
609
+
610
+ </span>
611
+
612
+ <span class="sfsicls_prem_text">Skype</span>
613
+
614
+ </div>
615
+
616
+ <div class="sfsi_prem_cmn_rowlisting">
617
+
618
+ <span>
619
+
620
+ <img src="<?php echo SFSI_PLUGURL . 'images/flickr.png'; ?>" id="CImg" alt="error" />
621
+
622
+ </span>
623
+
624
+ <span class="sfsicls_prem_text">Flickr</span>
625
+
626
+ </div>
627
+
628
+ <div class="sfsi_prem_cmn_rowlisting">
629
+
630
+ <span>
631
+
632
+ <img src="<?php echo SFSI_PLUGURL . 'images/buffer.png'; ?>" id="CImg" alt="error" />
633
+
634
+ </span>
635
+
636
+ <span class="sfsicls_prem_text">Buffer</span>
637
+
638
+ </div>
639
+
640
+ <div class="sfsi_prem_cmn_rowlisting">
641
+
642
+ <span>
643
+
644
+ <img src="<?php echo SFSI_PLUGURL . 'images/blogger.png'; ?>" id="CImg" alt="error" />
645
+
646
+ </span>
647
+
648
+ <span class="sfsicls_prem_text">Blogger</span>
649
+
650
+ </div>
651
+
652
+ <div class="sfsi_prem_cmn_rowlisting">
653
+
654
+ <span>
655
+
656
+ <img src="<?php echo SFSI_PLUGURL . 'images/reddit.png'; ?>" id="CImg" alt="error" />
657
+
658
+ </span>
659
+
660
+ <span class="sfsicls_prem_text">Reddit</span>
661
+
662
+ </div>
663
+
664
+ </div>
665
+
666
+ <div class="sfsi_premium_row">
667
+
668
+ <div class="sfsi_prem_cmn_rowlisting">
669
+
670
+ <span>
671
+
672
+ <img src="<?php echo SFSI_PLUGURL . 'images/vimeo.png'; ?>" id="CImg" alt="error" />
673
+
674
+ </span>
675
+
676
+ <span class="sfsicls_prem_text">Vimeo</span>
677
+
678
+ </div>
679
+
680
+ <div class="sfsi_prem_cmn_rowlisting">
681
+
682
+ <span>
683
+
684
+ <img src="<?php echo SFSI_PLUGURL . 'images/tumblr.png'; ?>" id="CImg" alt="error" />
685
+
686
+ </span>
687
+
688
+ <span class="sfsicls_prem_text">Tumblr</span>
689
+
690
+ </div>
691
+
692
+ <div class="sfsi_prem_cmn_rowlisting">
693
+
694
+ <span>
695
+
696
+ <img src="<?php echo SFSI_PLUGURL . 'images/houzz.png'; ?>" id="CImg" alt="error" />
697
+
698
+ </span>
699
+
700
+ <span class="sfsicls_prem_text">Houzz</span>
701
+
702
+ </div>
703
+
704
+ <div class="sfsi_prem_cmn_rowlisting">
705
+
706
+ <span>
707
+
708
+ <img src="<?php echo SFSI_PLUGURL . 'images/xing.png'; ?>" id="CImg" alt="error" />
709
+
710
+ </span>
711
+
712
+ <span class="sfsicls_prem_text">Xing</span>
713
+
714
+ </div>
715
+
716
+ <div class="sfsi_prem_cmn_rowlisting">
717
+
718
+ <span>
719
+
720
+ <img src="<?php echo SFSI_PLUGURL . 'images/twitch.png'; ?>" id="CImg" />
721
+
722
+ </span>
723
+
724
+ <span class="sfsicls_prem_text">Twitch</span>
725
+
726
+ </div>
727
+
728
+ <div class="sfsi_prem_cmn_rowlisting">
729
+
730
+ <span>
731
+
732
+ <img src="<?php echo SFSI_PLUGURL . 'images/amazon.png'; ?>" id="CImg" alt="error" />
733
+
734
+ </span>
735
+
736
+ <span class="sfsicls_prem_text">Amazon</span>
737
+
738
+ </div>
739
+
740
+ </div>
741
+
742
+ <div class="sfsi_premium_row">
743
+
744
+ <div class="sfsi_prem_cmn_rowlisting">
745
+
746
+ <span>
747
+
748
+ <img src="<?php echo SFSI_PLUGURL . 'images/angieslist.png'; ?>" id="CImg" alt="error" />
749
+
750
+ </span>
751
+
752
+ <span class="sfsicls_prem_text">Angie’s List</span>
753
+
754
+ </div>
755
+
756
+ <div class="sfsi_prem_cmn_rowlisting">
757
+
758
+ <span>
759
+
760
+ <img src="<?php echo SFSI_PLUGURL . 'images/steam.png'; ?>" id="CImg" alt="error" />
761
+
762
+ </span>
763
+
764
+ <span class="sfsicls_prem_text">Steam</span>
765
+
766
+ </div>
767
+
768
+ </div>
769
+
770
+ <!--<div class="sfsi_need_another_one_link">
771
+
772
+ <p>Need another one?<a href="mailto:biz@ultimatelysocial.com"> Tell us</a></p>
773
+
774
+ </div>-->
775
+
776
+ <div class="sfsi_need_another_tell_us" style="padding-top:20px">
777
+
778
+ <a href="https://www.ultimatelysocial.com/all-platforms/" target="_blank">...and many more! See them here</a>
779
+
780
+ <!--<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_platforms&utm_medium=banner" target="_blank">See all features Premium Plugin</a>-->
781
+
782
+ </div>
783
+
784
+ </div>
785
+
786
+ </li>
787
+
788
+ </ul>
789
+
790
+ <input type="hidden" value="<?php echo SFSI_PLUGURL ?>" id="plugin_url" />
791
+
792
+ <input type="hidden" value="" id="upload_id" />
793
+
794
+ <?php sfsi_ask_for_help(1); ?>
795
+
796
+ <!-- SAVE BUTTON SECTION -->
797
+
798
+ <div class="save_button tab_1_sav">
799
+
800
+ <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" alt="error" />
801
+
802
+ <?php $nonce = wp_create_nonce("update_step1"); ?>
803
+
804
+ <a href="javascript:;" id="sfsi_save1" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
805
+
806
+ </div><!-- END SAVE BUTTON SECTION -->
807
+
808
+ <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
809
+
810
+ <!-- ERROR AND SUCCESS MESSAGE AREA-->
811
+
812
+ <p class="red_txt errorMsg" style="display:none"> </p>
813
+
814
+ <p class="green_txt sucMsg" style="display:none"> </p>
815
+
816
+ </div>
817
+
818
  <!-- END Section 1 "Which icons do you want to show on your site? " main div-->
views/sfsi_option_view2.php CHANGED
@@ -1,504 +1,504 @@
1
- <?php
2
- /* unserialize all saved option for second section options */
3
- $option4 = unserialize(get_option('sfsi_section4_options', false));
4
- $option2 = unserialize(get_option('sfsi_section2_options', false));
5
-
6
- /*
7
- * Sanitize, escape and validate values
8
- */
9
- $option2['sfsi_rss_url'] = (isset($option2['sfsi_rss_url']))
10
- ? esc_url($option2['sfsi_rss_url'])
11
- : '';
12
- $option2['sfsi_rss_icons'] = (isset($option2['sfsi_rss_icons']))
13
- ? sanitize_text_field($option2['sfsi_rss_icons'])
14
- : '';
15
- $option2['sfsi_email_url'] = (isset($option2['sfsi_email_url']))
16
- ? esc_url($option2['sfsi_email_url'])
17
- : '';
18
-
19
- $option2['sfsi_facebookPage_option'] = (isset($option2['sfsi_facebookPage_option']))
20
- ? sanitize_text_field($option2['sfsi_facebookPage_option'])
21
- : '';
22
- $option2['sfsi_facebookPage_url'] = (isset($option2['sfsi_facebookPage_url']))
23
- ? esc_url($option2['sfsi_facebookPage_url'])
24
- : '';
25
- $option2['sfsi_facebookLike_option'] = (isset($option2['sfsi_facebookLike_option']))
26
- ? sanitize_text_field($option2['sfsi_facebookLike_option'])
27
- : '';
28
- $option2['sfsi_facebookShare_option'] = (isset($option2['sfsi_facebookShare_option']))
29
- ? sanitize_text_field($option2['sfsi_facebookShare_option'])
30
- : '';
31
-
32
- $option2['sfsi_twitter_followme'] = (isset($option2['sfsi_twitter_followme']))
33
- ? sanitize_text_field($option2['sfsi_twitter_followme'])
34
- : '';
35
- $option2['sfsi_twitter_followUserName'] = (isset($option2['sfsi_twitter_followUserName']))
36
- ? sanitize_text_field($option2['sfsi_twitter_followUserName'])
37
- : '';
38
- $option2['sfsi_twitter_aboutPage'] = (isset($option2['sfsi_twitter_aboutPage']))
39
- ? sanitize_text_field($option2['sfsi_twitter_aboutPage'])
40
- : '';
41
- $option2['sfsi_twitter_page'] = (isset($option2['sfsi_twitter_page']))
42
- ? sanitize_text_field($option2['sfsi_twitter_page'])
43
- : '';
44
- $option2['sfsi_twitter_pageURL'] = (isset($option2['sfsi_twitter_pageURL']))
45
- ? esc_url($option2['sfsi_twitter_pageURL'])
46
- : '';
47
- $option2['sfsi_twitter_aboutPageText'] = (isset($option2['sfsi_twitter_aboutPageText']))
48
- ? sanitize_text_field($option2['sfsi_twitter_aboutPageText'])
49
- : '';
50
-
51
- $option2['sfsi_youtube_pageUrl'] = (isset($option2['sfsi_youtube_pageUrl']))
52
- ? esc_url($option2['sfsi_youtube_pageUrl'])
53
- : '';
54
- $option2['sfsi_youtube_page'] = (isset($option2['sfsi_youtube_page']))
55
- ? sanitize_text_field($option2['sfsi_youtube_page'])
56
- : '';
57
- $option2['sfsi_youtube_follow'] = (isset($option2['sfsi_youtube_follow']))
58
- ? sanitize_text_field($option2['sfsi_youtube_follow'])
59
- : '';
60
-
61
- $option2['sfsi_pinterest_page'] = (isset($option2['sfsi_pinterest_page']))
62
- ? sanitize_text_field($option2['sfsi_pinterest_page'])
63
- : '';
64
- $option2['sfsi_pinterest_pageUrl'] = (isset($option2['sfsi_pinterest_pageUrl']))
65
- ? esc_url($option2['sfsi_pinterest_pageUrl'])
66
- : '';
67
- $option2['sfsi_pinterest_pingBlog'] = (isset($option2['sfsi_pinterest_pingBlog']))
68
- ? sanitize_text_field($option2['sfsi_pinterest_pingBlog'])
69
- : '';
70
- $option2['sfsi_instagram_pageUrl'] = (isset($option2['sfsi_instagram_pageUrl']))
71
- ? esc_url($option2['sfsi_instagram_pageUrl'])
72
- : '';
73
-
74
- $option2['sfsi_linkedin_page'] = (isset($option2['sfsi_linkedin_page']))
75
- ? sanitize_text_field($option2['sfsi_linkedin_page'])
76
- : '';
77
- $option2['sfsi_linkedin_pageURL'] = (isset($option2['sfsi_linkedin_pageURL']))
78
- ? esc_url($option2['sfsi_linkedin_pageURL'])
79
- : '';
80
- $option2['sfsi_linkedin_follow'] = (isset($option2['sfsi_linkedin_follow']))
81
- ? sanitize_text_field($option2['sfsi_linkedin_follow'])
82
- : '';
83
- $option2['sfsi_linkedin_followCompany'] = (isset($option2['sfsi_linkedin_followCompany']))
84
- ? intval($option2['sfsi_linkedin_followCompany'])
85
- : '';
86
- $option2['sfsi_linkedin_SharePage'] = (isset($option2['sfsi_linkedin_SharePage']))
87
- ? sanitize_text_field($option2['sfsi_linkedin_SharePage'])
88
- : '';
89
-
90
- $option2['sfsi_linkedin_recommendBusines'] = (isset($option2['sfsi_linkedin_recommendBusines']))
91
- ? sanitize_text_field($option2['sfsi_linkedin_recommendBusines'])
92
- : '';
93
- $option2['sfsi_linkedin_recommendCompany'] = (isset($option2['sfsi_linkedin_recommendCompany']))
94
- ? sanitize_text_field($option2['sfsi_linkedin_recommendCompany'])
95
- : '';
96
- $option2['sfsi_linkedin_recommendProductId'] = (isset($option2['sfsi_linkedin_recommendProductId']))
97
- ? intval($option2['sfsi_linkedin_recommendProductId'])
98
- : '';
99
- $option2['sfsi_telegram_message'] = (isset($option2['sfsi_telegram_message']))
100
- ? sanitize_text_field($option2['sfsi_telegram_message'])
101
- : '';
102
- $option2['sfsi_telegram_username'] = (isset($option2['sfsi_telegram_username']))
103
- ? sanitize_text_field($option2['sfsi_telegram_username'])
104
- : '';
105
- $option2['sfsi_telegram_page'] = (isset($option2['sfsi_telegram_page']))
106
- ? sanitize_text_field($option2['sfsi_telegram_page'])
107
- : '';
108
- $option2['sfsi_telegram_pageURL'] = (isset($option2['sfsi_telegram_pageURL']))
109
- ? esc_url($option2['sfsi_telegram_pageURL'])
110
- : '';
111
- $option2['sfsi_vk_page'] = (isset($option2['sfsi_vk_page']))
112
- ? sanitize_text_field($option2['sfsi_vk_page'])
113
- : '';
114
- $option2['sfsi_vk_pageURL'] = (isset($option2['sfsi_vk_pageURL']))
115
- ? esc_url($option2['sfsi_vk_pageURL'])
116
- : '';
117
- $option2['sfsi_weibo_page'] = (isset($option2['sfsi_weibo_page']))
118
- ? sanitize_text_field($option2['sfsi_weibo_page'])
119
- : '';
120
- $option2['sfsi_weibo_pageURL'] = (isset($option2['sfsi_weibo_pageURL']))
121
- ? esc_url($option2['sfsi_weibo_pageURL'])
122
- : '';
123
- $option2['sfsi_ok_page'] = (isset($option2['sfsi_ok_page']))
124
- ? sanitize_text_field($option2['sfsi_ok_page'])
125
- : '';
126
- $option2['sfsi_ok_pageURL'] = (isset($option2['sfsi_ok_pageURL']))
127
- ? esc_url($option2['sfsi_ok_pageURL'])
128
- : '';
129
-
130
- if ("name" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
131
-
132
- if (isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user'])) {
133
- $option2['sfsi_ytube_user'] = sfsi_sanitize_field($option2['sfsi_ytube_user']);
134
- } else {
135
- $option2['sfsi_ytube_user'] = isset($option4['sfsi_youtube_user']) && !empty($option4['sfsi_youtube_user']) ? $option4['sfsi_youtube_user'] : "";
136
- }
137
- }
138
-
139
- if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
140
-
141
- if (isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid'])) {
142
- $option2['sfsi_ytube_chnlid'] = sfsi_sanitize_field($option2['sfsi_ytube_chnlid']);
143
- } else {
144
- $option2['sfsi_ytube_chnlid'] = isset($option4['sfsi_youtube_channelId']) && !empty($option4['sfsi_youtube_channelId']) ? $option4['sfsi_youtube_channelId'] : "";
145
- }
146
- }
147
- ?>
148
-
149
- <!-- Section 2 "What do you want the icons to do?" main div Start -->
150
- <div class="tab2">
151
- <!-- RSS ICON -->
152
- <div class="row bdr_top rss_section">
153
- <h2 class="sfsicls_rs_s">RSS</h2>
154
- <div class="inr_cont">
155
- <p>When clicked on, users can subscribe via RSS</p>
156
- <div class="rss_url_row">
157
- <h4>RSS URL:</h4>
158
- <input name="sfsi_rss_url" id="sfsi_rss_url" class="add" type="url" value="<?php echo ($option2['sfsi_rss_url'] != '') ? $option2['sfsi_rss_url'] : ''; ?>" placeholder="E.g http://www.yoursite.com/feed" />
159
- <span class="sfrsTxt">For most blogs it’s <strong>http://blogname.com/feed</strong></span>
160
- </div>
161
- </div>
162
- </div>
163
- <!-- END RSS ICON -->
164
-
165
- <!-- EMAIL ICON -->
166
- <?php
167
- $feedId = sanitize_text_field(get_option('sfsi_feed_id', false));
168
- $connectToFeed = "http://www.specificfeeds.com/?" . base64_encode("userprofile=wordpress&feed_id=" . $feedId);
169
- ?>
170
- <div class="row email_section">
171
- <h2 class="sfsicls_email">Email</h2>
172
- <?php sfsi_curl_error_notification(); ?>
173
-
174
- <div class="inr_cont">
175
- <p>
176
- It allows your visitors to subscribe to your site (on <a href="http://www.specificfeeds.com/widgets/emailSubscribeEncFeed/<?php echo $feedId; ?>/<?php echo base64_encode(8); ?>" target="new">this screen</a>) and receive new posts automatically by email.
177
- </p>
178
- <p>Please pick which icon type you want to use:</p>
179
- <ul class="tab_2_email_sec">
180
- <li>
181
- <div class="sfsiicnsdvwrp">
182
- <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'email') ? 'checked="true"' : ''; ?> type="radio" value="email" class="styled" /><span class="email_icn"></span>
183
- </div>
184
- <label>Email icon</label>
185
- </li>
186
- <li>
187
- <div class="sfsiicnsdvwrp">
188
- <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'subscribe') ? 'checked="true"' : ''; ?> type="radio" value="subscribe" class="styled" /><span class="subscribe_icn"></span>
189
- </div>
190
- <label>Follow icon<span class="sficndesc"> (increases sign-ups)</span></label>
191
- </li>
192
- <li>
193
- <div class="sfsiicnsdvwrp">
194
- <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'sfsi') ? 'checked="true"' : ''; ?> type="radio" value="sfsi" class="styled" /><span class="sf_arow"></span>
195
- </div>
196
- <label>SpecificFeeds icon<span class="sfplsdesc"> (provider of the service)</span></label>
197
- </li>
198
- </ul>
199
- <p>The service offers many (more) advantages: </p>
200
- <div class='sfsi_service_row'>
201
- <div class='sfsi_service_column'>
202
- <ul>
203
- <li><span>More people come back</span> to your site</li>
204
- <li>See your<span> subscribers’ emails</span> & <span>interesting statistics</span></li>
205
- <li>Automatically post on<span> Facebook & Twitter</span></li>
206
- </ul>
207
- </div>
208
- <div class='sfsi_service_column'>
209
- <ul>
210
- <li><span>Get more traffic</span> by being listed in the SF directory</li>
211
- <li><span>Get alerts</span> when people subscribe or unsubscribe</li>
212
- <li><span>Tailor the sender name & subject line</span> of the emails </li>
213
- </ul>
214
- </div>
215
- </div>
216
-
217
- <form id="calimingOptimizationForm" method="get" action="https://www.specificfeeds.com/wpclaimfeeds/getFullAccess" target="_blank">
218
- <div class="sfsi_inputbtn">
219
- <input type="hidden" name="feed_id" value="<?php echo sanitize_text_field(get_option('sfsi_feed_id', false)); ?>" />
220
- <input type="email" name="email" value="<?php echo bloginfo('admin_email'); ?>" />
221
- </div>
222
- <div class='sfsi_more_services_link'>
223
- <a href="javascript:;" id="sfsi_getMeFullAccess" title="Give me access">
224
- Click here to benefit from all advantages >
225
- </a>
226
- </div>
227
- </form>
228
-
229
- <p class='sfsi_email_last_paragraph'>
230
- This will create your FREE account on SpecificFeeds, using the above email. <br>
231
- All data will be treated highly confidentially, see the
232
- <a href="https://www.specificfeeds.com/page/privacy-policy" target="new">
233
- Privacy Policy.
234
- </a>
235
- </p> <div class="sfsi_new_prmium_follw">
236
- <p><b>New:</b> In our Premium Plugin you can now give your email icon other functions too, e.g. <b>contact you </b>(email), <b>share by email,</b> and <b>link to a certain page </b>(e.g. your contact form or newsletter sign-up site). <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_functions_email_icon&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a>
237
- </div>
238
- </div>
239
- </div>
240
- <!-- END EMAIL ICON -->
241
-
242
- <!-- FACEBOOK ICON -->
243
- <div class="row facebook_section">
244
- <h2 class="sfsicls_facebook">Facebook</h2>
245
- <div class="inr_cont">
246
- <p>The facebook icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="fbex-s2">(see an example)</a>.</p>
247
- <p>The facebook icon should allow users to...</p>
248
-
249
- <p class="radio_section fb_url"><input name="sfsi_facebookPage_option" <?php echo ($option2['sfsi_facebookPage_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Facebook page at:</label><input class="add" name="sfsi_facebookPage_url" type="url" value="<?php echo ($option2['sfsi_facebookPage_url'] != '') ? $option2['sfsi_facebookPage_url'] : ''; ?>" placeholder="E.g https://www.facebook.com/your_page_name" /></p>
250
-
251
- <p class="radio_section fb_url extra_sp"><input name="sfsi_facebookLike_option" <?php echo ($option2['sfsi_facebookLike_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Like my blog on Facebook (+1)</label></p>
252
-
253
- <p class="radio_section fb_url extra_sp"><input name="sfsi_facebookShare_option" <?php echo ($option2['sfsi_facebookShare_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Share my blog with friends (on Facebook)</label></p>
254
- <div class="sfsi_new_prmium_follw">
255
- <p><b>New:</b> In our Premium Plugin you can also allow users to follow you on Facebook <b>directly from your site</b> (without leaving your page, increasing followers). <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=direct_follow_facebook&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
256
- </div>
257
- </div>
258
- </div>
259
- <!-- END FACEBOOK ICON -->
260
-
261
- <!-- TWITTER ICON -->
262
- <div class="row twitter_section">
263
- <h2 class="sfsicls_twt">Twitter</h2>
264
- <div class="inr_cont twt_tab_2">
265
- <p>The Twitter icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="twex-s2">(see an example)</a>.</p>
266
- <p>The Twitter icon should allow users to...</p>
267
-
268
- <p class="radio_section fb_url"><input name="sfsi_twitter_page" <?php echo ($option2['sfsi_twitter_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit me on Twitter:</label><input name="sfsi_twitter_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_twitter_pageURL'] != '') ? $option2['sfsi_twitter_pageURL'] : ''; ?>" class="add" /></p>
269
-
270
- <div class="radio_section fb_url twt_fld"><input name="sfsi_twitter_followme" <?php echo ($option2['sfsi_twitter_followme'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Follow me on Twitter:</label><input name="sfsi_twitter_followUserName" type="text" value="<?php echo ($option2['sfsi_twitter_followUserName'] != '') ? $option2['sfsi_twitter_followUserName'] : ''; ?>" placeholder="my_twitter_name" class="add" /></div>
271
- <?php
272
- $twitter_text = isset($option2['sfsi_twitter_aboutPageText']) && !empty($option2['sfsi_twitter_aboutPageText']) ? $option2['sfsi_twitter_aboutPageText'] : '';
273
- ?>
274
- <div class="radio_section fb_url twt_fld_2"><input name="sfsi_twitter_aboutPage" <?php echo ($option2['sfsi_twitter_aboutPage'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Tweet about my page:</label><textarea name="sfsi_twitter_aboutPageText" id="sfsi_twitter_aboutPageText" class="add_txt" placeholder="Hey, check out this cool site I found: www.yourname.com #Topic via@my_twitter_name"><?php echo $twitter_text; ?></textarea><?php /*echo ($option2['sfsi_twitter_aboutPageText']!='') ? stripslashes($option2['sfsi_twitter_aboutPageText']) : '' ;*/?></div>
275
- <div class="sfsi_new_prmium_follw">
276
- <p><b>New: </b>Tweeting becomes really fun in the Premium Plugin – you can insert tags to automatically pull the title of the story & link to the story, attach pictures & snippets to the Tweets (‘Twitter cards’) and user Url-shorteners, all leading to more Tweets and traffic for your site! <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=better_tweets&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
277
- </div>
278
- </div>
279
- </div>
280
- <!-- END TWITTER ICON -->
281
-
282
- <!-- YOUTUBE ICON -->
283
- <div class="row youtube_section">
284
- <h2 class="sfsicls_utube">Youtube</h2>
285
- <div class="inr_cont utube_inn">
286
- <p>The Youtube icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="ytex-s2">(see an example)</a>.</p>
287
-
288
- <p>The youtube icon should allow users to... </p>
289
-
290
- <p class="radio_section fb_url"><input name="sfsi_youtube_page" <?php echo ($option2['sfsi_youtube_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Youtube page at:</label><input name="sfsi_youtube_pageUrl" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_youtube_pageUrl'] != '') ? $option2['sfsi_youtube_pageUrl'] : ''; ?>" class="add" /></p>
291
-
292
- <p class="radio_section fb_url"><input name="sfsi_youtube_follow" <?php echo ($option2['sfsi_youtube_follow'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Subscribe to me on Youtube <span>(allows people to subscribe to you directly, without leaving your blog)</span></label></p>
293
-
294
- <!--Adding Code for Channel Id and Channel Name-->
295
- <div class="cstmutbewpr">
296
- <ul class="enough_waffling">
297
- <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'name') ? 'checked="true"' : ''; ?> type="radio" value="name" class="styled" /><label>User Name</label></li>
298
- <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'id') ? 'checked="true"' : ''; ?> type="radio" value="id" class="styled" /><label>Channel Id</label></li>
299
- </ul>
300
- <div class="cstmutbtxtwpr">
301
- <?php
302
- $sfsi_youtubeusernameorid = $option2['sfsi_youtubeusernameorid'];
303
- ?>
304
- <div class="cstmutbchnlnmewpr" <?php if ($sfsi_youtubeusernameorid != 'id') {
305
- echo 'style="display: block;"';
306
- } ?>>
307
- <p class="extra_pp"><label>UserName:</label><input name="sfsi_ytube_user" type="url" value="<?php echo (isset($option2['sfsi_ytube_user']) && $option2['sfsi_ytube_user'] != '') ? $option2['sfsi_ytube_user'] : ''; ?>" placeholder="Youtube username" class="add" /></p>
308
- <div class="utbe_instruction">
309
- To find your User ID/Channel ID, login to your YouTube account, click the user icon at the top right corner and select "Settings", then click "Advanced" under "Name" and you will find both your "Channel ID" and "User ID" under "Account Information".
310
- </div>
311
- </div>
312
- <div class="cstmutbchnlidwpr" <?php if ($sfsi_youtubeusernameorid == 'id') {
313
- echo 'style="display: block;"';
314
- } ?>>
315
- <p class="extra_pp"><label>ChannelId:</label><input name="sfsi_ytube_chnlid" type="url" value="<?php echo (isset($option2['sfsi_ytube_chnlid']) && $option2['sfsi_ytube_chnlid'] != '') ? $option2['sfsi_ytube_chnlid'] : ''; ?>" placeholder="youtube_channel_id" class="add" /></p>
316
- <div class="utbe_instruction">
317
- To find your User ID/Channel ID, login to your YouTube account, click the user icon at the top right corner and select "Settings", then click "Advanced" under "Name" and you will find both your "Channel ID" and "User ID" under "Account Information".
318
- </div>
319
- </div>
320
- </div>
321
- </div>
322
-
323
- </div>
324
- </div>
325
- <!-- END YOUTUBE ICON -->
326
-
327
- <!-- PINTEREST ICON -->
328
- <div class="row pinterest_section">
329
- <h2 class="sfsicls_pinterest">Pinterest</h2>
330
- <div class="inr_cont">
331
- <p>The Pinterest icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="pinex-s2">(see an example)</a>.</p>
332
- <p>The Pinterest icon should allow users to... </p>
333
- <p class="radio_section fb_url"><input name="sfsi_pinterest_page" <?php echo ($option2['sfsi_pinterest_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Pinterest page at:</label><input name="sfsi_pinterest_pageUrl" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_pinterest_pageUrl'] != '') ? $option2['sfsi_pinterest_pageUrl'] : ''; ?>" class="add" /></p>
334
- <div class="pint_url">
335
- <p class="radio_section fb_url"><input name="sfsi_pinterest_pingBlog" <?php echo ($option2['sfsi_pinterest_pingBlog'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Pin my blog on Pinterest (+1)</label></p>
336
- </div>
337
- </div>
338
- </div>
339
- <!-- END PINTEREST ICON -->
340
-
341
- <!-- INSTAGRAM ICON -->
342
- <div class="row instagram_section">
343
- <h2 class="sfsicls_instagram">Instagram</h2>
344
- <div class="inr_cont">
345
- <p>When clicked on, users will get directed to your Instagram page.</p>
346
- <p class="radio_section fb_url cus_link instagram_space"><label>URL:</label><input name="sfsi_instagram_pageUrl" type="text" value="<?php echo (isset($option2['sfsi_instagram_pageUrl']) && $option2['sfsi_instagram_pageUrl'] != '') ? $option2['sfsi_instagram_pageUrl'] : ''; ?>" placeholder="http://" class="add" /></p>
347
- </div>
348
- </div>
349
- <!-- END INSTAGRAM ICON -->
350
-
351
- <!-- LINKEDIN ICON -->
352
- <div class="row linkedin_section">
353
- <h2 class="sfsicls_linkdin">LinkedIn</h2>
354
- <div class="inr_cont linked_tab_2 link_in">
355
- <p>The LinkedIn icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="linkex-s2">(see an example)</a>.</p>
356
- <p>You find your ID in the link of your profile page, e.g. https://www.linkedin.com/profile/view?id=<b>8539887</b>&trk=nav_responsive_tab_profile_pic</p>
357
- <p style="margin-bottom:20px;">The LinkedIn icon should allow users to... </p>
358
- <div class="radio_section fb_url link_1"><input name="sfsi_linkedin_page" <?php echo ($option2['sfsi_linkedin_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Linkedin page at:</label><input name="sfsi_linkedin_pageURL" type="text" placeholder="http://" value="<?php echo ($option2['sfsi_linkedin_pageURL'] != '') ? $option2['sfsi_linkedin_pageURL'] : ''; ?>" class="add" /></div>
359
- <div class="radio_section fb_url link_2"><input name="sfsi_linkedin_follow" <?php echo ($option2['sfsi_linkedin_follow'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Follow me on Linkedin: </label><input name="sfsi_linkedin_followCompany" type="text" value="<?php echo ($option2['sfsi_linkedin_followCompany'] != '') ? $option2['sfsi_linkedin_followCompany'] : ''; ?>" class="add" placeholder="Enter company ID, e.g. 123456" /></div>
360
-
361
- <div class="radio_section fb_url link_3"><input name="sfsi_linkedin_SharePage" <?php echo ($option2['sfsi_linkedin_SharePage'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Share my page on LinkedIn</label></div>
362
-
363
- <div class="radio_section fb_url link_4"><input name="sfsi_linkedin_recommendBusines" <?php echo ($option2['sfsi_linkedin_recommendBusines'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label class="anthr_labl">Recommend my business or product on Linkedin:</label><input name="sfsi_linkedin_recommendProductId" type="text" value="<?php echo ($option2['sfsi_linkedin_recommendProductId'] != '') ? $option2['sfsi_linkedin_recommendProductId'] : ''; ?>" class="add link_dbl" placeholder="Enter Product ID, e.g. 1441" /> <input name="sfsi_linkedin_recommendCompany" type="text" value="<?php echo ($option2['sfsi_linkedin_recommendCompany'] != '') ? $option2['sfsi_linkedin_recommendCompany'] : ''; ?>" class="add" placeholder="Enter company name, e.g. Google”" /></div>
364
-
365
- <div class="lnkdin_instruction">
366
- To find your Product or Company ID, you can use their ID lookup tool at <a target="_blank" href="https://developer.linkedin.com/apply-getting-started#company-lookup">https://developer.linkedin.com/apply-getting-started#company-lookup</a>. You need to be logged in to Linkedin to be able to use it.
367
- </div>
368
- </div>
369
- </div>
370
-
371
- <!-- TELEGRAM ICON -->
372
- <div class="row telegram_section">
373
- <h2 class="sfsicls_telegram">Telegram</h2>
374
- <div class="inr_cont telegram_tab_2">
375
- <p>Clicking on this icon will allow users to contact you on Telegram.</p>
376
- <!-- <input name="sfsi_telegram_message" checked="true" type="checkbox" value="yes" class="" style="display:none"/> -->
377
-
378
- <p class="radio_section fb_url no_check ">
379
- <label>Pre-filled message</label>
380
- <input name="sfsi_telegram_message" type="text" value="<?php echo ($option2['sfsi_telegram_message'] != '') ? $option2['sfsi_telegram_message'] : ''; ?>" placeholder="my_telegram_name" class="add" />
381
- </p>
382
-
383
- <p class="radio_section fb_url no_check">
384
- <label>My Telegram username</label>
385
- <input name="sfsi_telegram_username" type="url" placeholder="username" value="<?php echo ($option2['sfsi_telegram_username'] != '') ? $option2['sfsi_telegram_username'] : ''; ?>" class="add" />
386
- </p>
387
-
388
- <div class="sfsi_new_prmium_follw">
389
- <p><b>New: </b>In our Premium Plugin you can now give your Telegram icon sharing functionality too, e.g. <b> share your website/blog with friends. </b><a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=telegram_sharing&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
390
- </div>
391
- </div>
392
- </div>
393
-
394
- <!-- END TELEGRAM ICON -->
395
-
396
- <!-- WECHAT ICON -->
397
- <div class="row wechat_section">
398
- <h2 class="sfsicls_wechat">WeChat</h2>
399
- <div class="inr_cont wechat_tab_2">
400
- <p>When clicked on, your website/blog will be shared on WeChat.</p>
401
- <input name="sfsi_wechatShare_option" checked="true" type="checkbox" value="yes" class="" style="display:none" />
402
- <div class="sfsi_new_prmium_follw">
403
- <p><b>New: </b>In our Premium Plugin you can also allow users to <b>follow you </b> on WeChat <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=wechat_sharing&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
404
- </div>
405
- </div>
406
- </div>
407
- <!-- END WECHAT ICON -->
408
- <!-- WEIBO ICON -->
409
- <div class="row weibo_section">
410
- <h2 class="sfsicls_weibo">Weibo</h2>
411
- <div class="inr_cont weibo_tab_2">
412
- <p>When clicked on, users will get directed to your Weibo page.</p>
413
-
414
- <p class="radio_section fb_url no_check"><input name="sfsi_weibo_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on Weibo:</label><input name="sfsi_weibo_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_weibo_pageURL'] != '') ? $option2['sfsi_weibo_pageURL'] : ''; ?>" class="add" /></p>
415
-
416
- <div class="sfsi_new_prmium_follw">
417
- <p><b>New: </b> In our Premium Plugin you can now give Weibo icon other functions too, e.g. <b>your website/blog, share your website/blog</b> on Weibo. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=weibo_like_and_share&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
418
- </div>
419
- </div>
420
- </div>
421
- <!-- END WEIBO ICON -->
422
-
423
- <!-- VK ICON -->
424
- <div class="row vk_section">
425
- <h2 class="sfsicls_vk">VK</h2>
426
- <div class="inr_cont vk_tab_2">
427
- <p>When clicked on, users will get directed to your VK page.</p>
428
-
429
- <p class="radio_section fb_url no_check"><input name="sfsi_vk_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on VK:</label><input name="sfsi_vk_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_vk_pageURL'] != '') ? $option2['sfsi_vk_pageURL'] : ''; ?>" class="add" /></p>
430
-
431
- <div class="sfsi_new_prmium_follw">
432
- <p><b>New: </b>In our Premium Plugin you can now give your VK icon sharing functionality too, e.g. <b>share your website/blog </b> with friends. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=vk_share&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
433
- </div>
434
- </div>
435
- </div>
436
- <!-- END VK ICON -->
437
- <!-- OK ICON -->
438
- <div class="row ok_section">
439
- <h2 class="sfsicls_ok">OK</h2>
440
- <div class="inr_cont ok_tab_2">
441
- <p>When clicked on, users will get directed to your OK page.</p>
442
-
443
- <p class="radio_section fb_url no_check"><input name="sfsi_ok_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on OK:</label><input name="sfsi_ok_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_ok_pageURL'] != '') ? $option2['sfsi_ok_pageURL'] : ''; ?>" class="add" /></p>
444
-
445
- <div class="sfsi_new_prmium_follw">
446
- <p><b>New: </b>In our Premium Plugin you can now give OK icon other functions too, e.g. <b> like your website/blog </b>, subscribe/follow you on OK. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=ok_like_and_subscribe&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
447
- </div>
448
- </div>
449
- </div>
450
- <!-- END OK ICON -->
451
- <!-- END LINKEDIN ICON -->
452
-
453
- <!-- Custom icon section start here -->
454
- <div class="custom-links custom_section">
455
- <?php
456
- $costom_links = unserialize($option2['sfsi_CustomIcon_links']);
457
- $count = 1;
458
- $bannerDisplay = "display:none;";
459
- for ($i = $first_key; $i <= $endkey; $i++) :
460
- ?>
461
- <?php if (!empty($icons[$i])) :
462
- $bannerDisplay = "display:block;";
463
- ?>
464
- <div class="row sfsiICON_<?php echo $i; ?> cm_lnk">
465
- <h2 class="custom">
466
- <span class="customstep2-img">
467
- <img src="<?php echo (!empty($icons[$i])) ? esc_url($icons[$i]) : SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?>" style="border-radius:48%" alt="error" />
468
- </span>
469
- <span class="sfsiCtxt">Custom <?php echo $count; ?></span>
470
- </h2>
471
- <div class="inr_cont ">
472
- <p>Where do you want this icon to link to?</p>
473
- <p class="radio_section fb_url custom_section cus_link ">
474
- <label>Link :</label>
475
- <input name="sfsi_CustomIcon_links[]" type="text" value="<?php echo (isset($costom_links[$i]) && $costom_links[$i] != '') ? esc_url($costom_links[$i]) : ''; ?>" placeholder="http://" class="add" file-id="<?php echo $i; ?>" />
476
- </p>
477
- </div>
478
- </div>
479
- <?php $count++;
480
- endif;
481
- endfor; ?>
482
-
483
- <div class="notice_custom_icons_premium sfsi_new_prmium_follw" style="<?php echo $bannerDisplay; ?>">
484
- <p><b>New: </b>In the Premium Plugin you can also give custom icons the feature that when people click on it, they can call you, or send you an SMS. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=call_or_sms_feature_custom_icons&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
485
- </div>
486
- </div>
487
- <!-- END Custom icon section here -->
488
-
489
- <?php sfsi_ask_for_help(2); ?> <!-- SAVE BUTTON SECTION -->
490
- <div class="save_button tab_2_sav">
491
- <img src="<?php echo SFSI_PLUGURL; ?>images/ajax-loader.gif" class="loader-img" alt="error" />
492
- <?php $nonce = wp_create_nonce("update_step2"); ?>
493
- <a href="javascript:;" id="sfsi_save2" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
494
- </div>
495
- <!-- END SAVE BUTTON SECTION -->
496
-
497
- <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
498
- <label class="closeSec"></label>
499
-
500
- <!-- ERROR AND SUCCESS MESSAGE AREA-->
501
- <p class="red_txt errorMsg" style="display:none"> </p>
502
- <p class="green_txt sucMsg" style="display:none"> </p>
503
-
504
  </div><!-- END Section 2 "What do you want the icons to do?" main div -->
1
+ <?php
2
+ /* unserialize all saved option for second section options */
3
+ $option4 = unserialize(get_option('sfsi_section4_options', false));
4
+ $option2 = unserialize(get_option('sfsi_section2_options', false));
5
+
6
+ /*
7
+ * Sanitize, escape and validate values
8
+ */
9
+ $option2['sfsi_rss_url'] = (isset($option2['sfsi_rss_url']))
10
+ ? esc_url($option2['sfsi_rss_url'])
11
+ : '';
12
+ $option2['sfsi_rss_icons'] = (isset($option2['sfsi_rss_icons']))
13
+ ? sanitize_text_field($option2['sfsi_rss_icons'])
14
+ : '';
15
+ $option2['sfsi_email_url'] = (isset($option2['sfsi_email_url']))
16
+ ? esc_url($option2['sfsi_email_url'])
17
+ : '';
18
+
19
+ $option2['sfsi_facebookPage_option'] = (isset($option2['sfsi_facebookPage_option']))
20
+ ? sanitize_text_field($option2['sfsi_facebookPage_option'])
21
+ : '';
22
+ $option2['sfsi_facebookPage_url'] = (isset($option2['sfsi_facebookPage_url']))
23
+ ? esc_url($option2['sfsi_facebookPage_url'])
24
+ : '';
25
+ $option2['sfsi_facebookLike_option'] = (isset($option2['sfsi_facebookLike_option']))
26
+ ? sanitize_text_field($option2['sfsi_facebookLike_option'])
27
+ : '';
28
+ $option2['sfsi_facebookShare_option'] = (isset($option2['sfsi_facebookShare_option']))
29
+ ? sanitize_text_field($option2['sfsi_facebookShare_option'])
30
+ : '';
31
+
32
+ $option2['sfsi_twitter_followme'] = (isset($option2['sfsi_twitter_followme']))
33
+ ? sanitize_text_field($option2['sfsi_twitter_followme'])
34
+ : '';
35
+ $option2['sfsi_twitter_followUserName'] = (isset($option2['sfsi_twitter_followUserName']))
36
+ ? sanitize_text_field($option2['sfsi_twitter_followUserName'])
37
+ : '';
38
+ $option2['sfsi_twitter_aboutPage'] = (isset($option2['sfsi_twitter_aboutPage']))
39
+ ? sanitize_text_field($option2['sfsi_twitter_aboutPage'])
40
+ : '';
41
+ $option2['sfsi_twitter_page'] = (isset($option2['sfsi_twitter_page']))
42
+ ? sanitize_text_field($option2['sfsi_twitter_page'])
43
+ : '';
44
+ $option2['sfsi_twitter_pageURL'] = (isset($option2['sfsi_twitter_pageURL']))
45
+ ? esc_url($option2['sfsi_twitter_pageURL'])
46
+ : '';
47
+ $option2['sfsi_twitter_aboutPageText'] = (isset($option2['sfsi_twitter_aboutPageText']))
48
+ ? sanitize_text_field($option2['sfsi_twitter_aboutPageText'])
49
+ : '';
50
+
51
+ $option2['sfsi_youtube_pageUrl'] = (isset($option2['sfsi_youtube_pageUrl']))
52
+ ? esc_url($option2['sfsi_youtube_pageUrl'])
53
+ : '';
54
+ $option2['sfsi_youtube_page'] = (isset($option2['sfsi_youtube_page']))
55
+ ? sanitize_text_field($option2['sfsi_youtube_page'])
56
+ : '';
57
+ $option2['sfsi_youtube_follow'] = (isset($option2['sfsi_youtube_follow']))
58
+ ? sanitize_text_field($option2['sfsi_youtube_follow'])
59
+ : '';
60
+
61
+ $option2['sfsi_pinterest_page'] = (isset($option2['sfsi_pinterest_page']))
62
+ ? sanitize_text_field($option2['sfsi_pinterest_page'])
63
+ : '';
64
+ $option2['sfsi_pinterest_pageUrl'] = (isset($option2['sfsi_pinterest_pageUrl']))
65
+ ? esc_url($option2['sfsi_pinterest_pageUrl'])
66
+ : '';
67
+ $option2['sfsi_pinterest_pingBlog'] = (isset($option2['sfsi_pinterest_pingBlog']))
68
+ ? sanitize_text_field($option2['sfsi_pinterest_pingBlog'])
69
+ : '';
70
+ $option2['sfsi_instagram_pageUrl'] = (isset($option2['sfsi_instagram_pageUrl']))
71
+ ? esc_url($option2['sfsi_instagram_pageUrl'])
72
+ : '';
73
+
74
+ $option2['sfsi_linkedin_page'] = (isset($option2['sfsi_linkedin_page']))
75
+ ? sanitize_text_field($option2['sfsi_linkedin_page'])
76
+ : '';
77
+ $option2['sfsi_linkedin_pageURL'] = (isset($option2['sfsi_linkedin_pageURL']))
78
+ ? esc_url($option2['sfsi_linkedin_pageURL'])
79
+ : '';
80
+ $option2['sfsi_linkedin_follow'] = (isset($option2['sfsi_linkedin_follow']))
81
+ ? sanitize_text_field($option2['sfsi_linkedin_follow'])
82
+ : '';
83
+ $option2['sfsi_linkedin_followCompany'] = (isset($option2['sfsi_linkedin_followCompany']))
84
+ ? intval($option2['sfsi_linkedin_followCompany'])
85
+ : '';
86
+ $option2['sfsi_linkedin_SharePage'] = (isset($option2['sfsi_linkedin_SharePage']))
87
+ ? sanitize_text_field($option2['sfsi_linkedin_SharePage'])
88
+ : '';
89
+
90
+ $option2['sfsi_linkedin_recommendBusines'] = (isset($option2['sfsi_linkedin_recommendBusines']))
91
+ ? sanitize_text_field($option2['sfsi_linkedin_recommendBusines'])
92
+ : '';
93
+ $option2['sfsi_linkedin_recommendCompany'] = (isset($option2['sfsi_linkedin_recommendCompany']))
94
+ ? sanitize_text_field($option2['sfsi_linkedin_recommendCompany'])
95
+ : '';
96
+ $option2['sfsi_linkedin_recommendProductId'] = (isset($option2['sfsi_linkedin_recommendProductId']))
97
+ ? intval($option2['sfsi_linkedin_recommendProductId'])
98
+ : '';
99
+ $option2['sfsi_telegram_message'] = (isset($option2['sfsi_telegram_message']))
100
+ ? sanitize_text_field($option2['sfsi_telegram_message'])
101
+ : '';
102
+ $option2['sfsi_telegram_username'] = (isset($option2['sfsi_telegram_username']))
103
+ ? sanitize_text_field($option2['sfsi_telegram_username'])
104
+ : '';
105
+ $option2['sfsi_telegram_page'] = (isset($option2['sfsi_telegram_page']))
106
+ ? sanitize_text_field($option2['sfsi_telegram_page'])
107
+ : '';
108
+ $option2['sfsi_telegram_pageURL'] = (isset($option2['sfsi_telegram_pageURL']))
109
+ ? esc_url($option2['sfsi_telegram_pageURL'])
110
+ : '';
111
+ $option2['sfsi_vk_page'] = (isset($option2['sfsi_vk_page']))
112
+ ? sanitize_text_field($option2['sfsi_vk_page'])
113
+ : '';
114
+ $option2['sfsi_vk_pageURL'] = (isset($option2['sfsi_vk_pageURL']))
115
+ ? esc_url($option2['sfsi_vk_pageURL'])
116
+ : '';
117
+ $option2['sfsi_weibo_page'] = (isset($option2['sfsi_weibo_page']))
118
+ ? sanitize_text_field($option2['sfsi_weibo_page'])
119
+ : '';
120
+ $option2['sfsi_weibo_pageURL'] = (isset($option2['sfsi_weibo_pageURL']))
121
+ ? esc_url($option2['sfsi_weibo_pageURL'])
122
+ : '';
123
+ $option2['sfsi_ok_page'] = (isset($option2['sfsi_ok_page']))
124
+ ? sanitize_text_field($option2['sfsi_ok_page'])
125
+ : '';
126
+ $option2['sfsi_ok_pageURL'] = (isset($option2['sfsi_ok_pageURL']))
127
+ ? esc_url($option2['sfsi_ok_pageURL'])
128
+ : '';
129
+
130
+ if ("name" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
131
+
132
+ if (isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user'])) {
133
+ $option2['sfsi_ytube_user'] = sfsi_sanitize_field($option2['sfsi_ytube_user']);
134
+ } else {
135
+ $option2['sfsi_ytube_user'] = isset($option4['sfsi_youtube_user']) && !empty($option4['sfsi_youtube_user']) ? $option4['sfsi_youtube_user'] : "";
136
+ }
137
+ }
138
+
139
+ if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
140
+
141
+ if (isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid'])) {
142
+ $option2['sfsi_ytube_chnlid'] = sfsi_sanitize_field($option2['sfsi_ytube_chnlid']);
143
+ } else {
144
+ $option2['sfsi_ytube_chnlid'] = isset($option4['sfsi_youtube_channelId']) && !empty($option4['sfsi_youtube_channelId']) ? $option4['sfsi_youtube_channelId'] : "";
145
+ }
146
+ }
147
+ ?>
148
+
149
+ <!-- Section 2 "What do you want the icons to do?" main div Start -->
150
+ <div class="tab2">
151
+ <!-- RSS ICON -->
152
+ <div class="row bdr_top rss_section">
153
+ <h2 class="sfsicls_rs_s">RSS</h2>
154
+ <div class="inr_cont">
155
+ <p>When clicked on, users can subscribe via RSS</p>
156
+ <div class="rss_url_row">
157
+ <h4>RSS URL:</h4>
158
+ <input name="sfsi_rss_url" id="sfsi_rss_url" class="add" type="url" value="<?php echo ($option2['sfsi_rss_url'] != '') ? $option2['sfsi_rss_url'] : ''; ?>" placeholder="E.g http://www.yoursite.com/feed" />
159
+ <span class="sfrsTxt">For most blogs it’s <strong>http://blogname.com/feed</strong></span>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ <!-- END RSS ICON -->
164
+
165
+ <!-- EMAIL ICON -->
166
+ <?php
167
+ $feedId = sanitize_text_field(get_option('sfsi_feed_id', false));
168
+ $connectToFeed = "http://www.specificfeeds.com/?" . base64_encode("userprofile=wordpress&feed_id=" . $feedId);
169
+ ?>
170
+ <div class="row email_section">
171
+ <h2 class="sfsicls_email">Email</h2>
172
+ <?php sfsi_curl_error_notification(); ?>
173
+
174
+ <div class="inr_cont">
175
+ <p>
176
+ It allows your visitors to subscribe to your site (on <a href="http://www.specificfeeds.com/widgets/emailSubscribeEncFeed/<?php echo $feedId; ?>/<?php echo base64_encode(8); ?>" target="new">this screen</a>) and receive new posts automatically by email.
177
+ </p>
178
+ <p>Please pick which icon type you want to use:</p>
179
+ <ul class="tab_2_email_sec">
180
+ <li>
181
+ <div class="sfsiicnsdvwrp">
182
+ <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'email') ? 'checked="true"' : ''; ?> type="radio" value="email" class="styled" /><span class="email_icn"></span>
183
+ </div>
184
+ <label>Email icon</label>
185
+ </li>
186
+ <li>
187
+ <div class="sfsiicnsdvwrp">
188
+ <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'subscribe') ? 'checked="true"' : ''; ?> type="radio" value="subscribe" class="styled" /><span class="subscribe_icn"></span>
189
+ </div>
190
+ <label>Follow icon<span class="sficndesc"> (increases sign-ups)</span></label>
191
+ </li>
192
+ <li>
193
+ <div class="sfsiicnsdvwrp">
194
+ <input name="sfsi_rss_icons" <?php echo ($option2['sfsi_rss_icons'] == 'sfsi') ? 'checked="true"' : ''; ?> type="radio" value="sfsi" class="styled" /><span class="sf_arow"></span>
195
+ </div>
196
+ <label>SpecificFeeds icon<span class="sfplsdesc"> (provider of the service)</span></label>
197
+ </li>
198
+ </ul>
199
+ <p>The service offers many (more) advantages: </p>
200
+ <div class='sfsi_service_row'>
201
+ <div class='sfsi_service_column'>
202
+ <ul>
203
+ <li><span>More people come back</span> to your site</li>
204
+ <li>See your<span> subscribers’ emails</span> & <span>interesting statistics</span></li>
205
+ <li>Automatically post on<span> Facebook & Twitter</span></li>
206
+ </ul>
207
+ </div>
208
+ <div class='sfsi_service_column'>
209
+ <ul>
210
+ <li><span>Get more traffic</span> by being listed in the SF directory</li>
211
+ <li><span>Get alerts</span> when people subscribe or unsubscribe</li>
212
+ <li><span>Tailor the sender name & subject line</span> of the emails </li>
213
+ </ul>
214
+ </div>
215
+ </div>
216
+
217
+ <form id="calimingOptimizationForm" method="get" action="https://www.specificfeeds.com/wpclaimfeeds/getFullAccess" target="_blank">
218
+ <div class="sfsi_inputbtn">
219
+ <input type="hidden" name="feed_id" value="<?php echo sanitize_text_field(get_option('sfsi_feed_id', false)); ?>" />
220
+ <input type="email" name="email" value="<?php echo bloginfo('admin_email'); ?>" />
221
+ </div>
222
+ <div class='sfsi_more_services_link'>
223
+ <a href="javascript:;" id="sfsi_getMeFullAccess" title="Give me access">
224
+ Click here to benefit from all advantages >
225
+ </a>
226
+ </div>
227
+ </form>
228
+
229
+ <p class='sfsi_email_last_paragraph'>
230
+ This will create your FREE account on SpecificFeeds, using the above email. <br>
231
+ All data will be treated highly confidentially, see the
232
+ <a href="https://www.specificfeeds.com/page/privacy-policy" target="new">
233
+ Privacy Policy.
234
+ </a>
235
+ </p> <div class="sfsi_new_prmium_follw">
236
+ <p><b>New:</b> In our Premium Plugin you can now give your email icon other functions too, e.g. <b>contact you </b>(email), <b>share by email,</b> and <b>link to a certain page </b>(e.g. your contact form or newsletter sign-up site). <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_functions_email_icon&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ <!-- END EMAIL ICON -->
241
+
242
+ <!-- FACEBOOK ICON -->
243
+ <div class="row facebook_section">
244
+ <h2 class="sfsicls_facebook">Facebook</h2>
245
+ <div class="inr_cont">
246
+ <p>The facebook icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="fbex-s2">(see an example)</a>.</p>
247
+ <p>The facebook icon should allow users to...</p>
248
+
249
+ <p class="radio_section fb_url"><input name="sfsi_facebookPage_option" <?php echo ($option2['sfsi_facebookPage_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Facebook page at:</label><input class="add" name="sfsi_facebookPage_url" type="url" value="<?php echo ($option2['sfsi_facebookPage_url'] != '') ? $option2['sfsi_facebookPage_url'] : ''; ?>" placeholder="E.g https://www.facebook.com/your_page_name" /></p>
250
+
251
+ <p class="radio_section fb_url extra_sp"><input name="sfsi_facebookLike_option" <?php echo ($option2['sfsi_facebookLike_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Like my blog on Facebook (+1)</label></p>
252
+
253
+ <p class="radio_section fb_url extra_sp"><input name="sfsi_facebookShare_option" <?php echo ($option2['sfsi_facebookShare_option'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Share my blog with friends (on Facebook)</label></p>
254
+ <div class="sfsi_new_prmium_follw">
255
+ <p><b>New:</b> In our Premium Plugin you can also allow users to follow you on Facebook <b>directly from your site</b> (without leaving your page, increasing followers). <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=direct_follow_facebook&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ <!-- END FACEBOOK ICON -->
260
+
261
+ <!-- TWITTER ICON -->
262
+ <div class="row twitter_section">
263
+ <h2 class="sfsicls_twt">Twitter</h2>
264
+ <div class="inr_cont twt_tab_2">
265
+ <p>The Twitter icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="twex-s2">(see an example)</a>.</p>
266
+ <p>The Twitter icon should allow users to...</p>
267
+
268
+ <p class="radio_section fb_url"><input name="sfsi_twitter_page" <?php echo ($option2['sfsi_twitter_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit me on Twitter:</label><input name="sfsi_twitter_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_twitter_pageURL'] != '') ? $option2['sfsi_twitter_pageURL'] : ''; ?>" class="add" /></p>
269
+
270
+ <div class="radio_section fb_url twt_fld"><input name="sfsi_twitter_followme" <?php echo ($option2['sfsi_twitter_followme'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Follow me on Twitter:</label><input name="sfsi_twitter_followUserName" type="text" value="<?php echo ($option2['sfsi_twitter_followUserName'] != '') ? $option2['sfsi_twitter_followUserName'] : ''; ?>" placeholder="my_twitter_name" class="add" /></div>
271
+ <?php
272
+ $twitter_text = isset($option2['sfsi_twitter_aboutPageText']) && !empty($option2['sfsi_twitter_aboutPageText']) ? $option2['sfsi_twitter_aboutPageText'] : '';
273
+ ?>
274
+ <div class="radio_section fb_url twt_fld_2"><input name="sfsi_twitter_aboutPage" <?php echo ($option2['sfsi_twitter_aboutPage'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Tweet about my page:</label><textarea name="sfsi_twitter_aboutPageText" id="sfsi_twitter_aboutPageText" class="add_txt" placeholder="Hey, check out this cool site I found: www.yourname.com #Topic via@my_twitter_name"><?php echo $twitter_text; ?></textarea><?php /*echo ($option2['sfsi_twitter_aboutPageText']!='') ? stripslashes($option2['sfsi_twitter_aboutPageText']) : '' ;*/?></div>
275
+ <div class="sfsi_new_prmium_follw">
276
+ <p><b>New: </b>Tweeting becomes really fun in the Premium Plugin – you can insert tags to automatically pull the title of the story & link to the story, attach pictures & snippets to the Tweets (‘Twitter cards’) and user Url-shorteners, all leading to more Tweets and traffic for your site! <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=better_tweets&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ <!-- END TWITTER ICON -->
281
+
282
+ <!-- YOUTUBE ICON -->
283
+ <div class="row youtube_section">
284
+ <h2 class="sfsicls_utube">Youtube</h2>
285
+ <div class="inr_cont utube_inn">
286
+ <p>The Youtube icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="ytex-s2">(see an example)</a>.</p>
287
+
288
+ <p>The youtube icon should allow users to... </p>
289
+
290
+ <p class="radio_section fb_url"><input name="sfsi_youtube_page" <?php echo ($option2['sfsi_youtube_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Youtube page at:</label><input name="sfsi_youtube_pageUrl" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_youtube_pageUrl'] != '') ? $option2['sfsi_youtube_pageUrl'] : ''; ?>" class="add" /></p>
291
+
292
+ <p class="radio_section fb_url"><input name="sfsi_youtube_follow" <?php echo ($option2['sfsi_youtube_follow'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Subscribe to me on Youtube <span>(allows people to subscribe to you directly, without leaving your blog)</span></label></p>
293
+
294
+ <!--Adding Code for Channel Id and Channel Name-->
295
+ <div class="cstmutbewpr">
296
+ <ul class="enough_waffling">
297
+ <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'name') ? 'checked="true"' : ''; ?> type="radio" value="name" class="styled" /><label>User Name</label></li>
298
+ <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'id') ? 'checked="true"' : ''; ?> type="radio" value="id" class="styled" /><label>Channel Id</label></li>
299
+ </ul>
300
+ <div class="cstmutbtxtwpr">
301
+ <?php
302
+ $sfsi_youtubeusernameorid = $option2['sfsi_youtubeusernameorid'];
303
+ ?>
304
+ <div class="cstmutbchnlnmewpr" <?php if ($sfsi_youtubeusernameorid != 'id') {
305
+ echo 'style="display: block;"';
306
+ } ?>>
307
+ <p class="extra_pp"><label>UserName:</label><input name="sfsi_ytube_user" type="url" value="<?php echo (isset($option2['sfsi_ytube_user']) && $option2['sfsi_ytube_user'] != '') ? $option2['sfsi_ytube_user'] : ''; ?>" placeholder="Youtube username" class="add" /></p>
308
+ <div class="utbe_instruction">
309
+ To find your User ID/Channel ID, login to your YouTube account, click the user icon at the top right corner and select "Settings", then click "Advanced" under "Name" and you will find both your "Channel ID" and "User ID" under "Account Information".
310
+ </div>
311
+ </div>
312
+ <div class="cstmutbchnlidwpr" <?php if ($sfsi_youtubeusernameorid == 'id') {
313
+ echo 'style="display: block;"';
314
+ } ?>>
315
+ <p class="extra_pp"><label>ChannelId:</label><input name="sfsi_ytube_chnlid" type="url" value="<?php echo (isset($option2['sfsi_ytube_chnlid']) && $option2['sfsi_ytube_chnlid'] != '') ? $option2['sfsi_ytube_chnlid'] : ''; ?>" placeholder="youtube_channel_id" class="add" /></p>
316
+ <div class="utbe_instruction">
317
+ To find your User ID/Channel ID, login to your YouTube account, click the user icon at the top right corner and select "Settings", then click "Advanced" under "Name" and you will find both your "Channel ID" and "User ID" under "Account Information".
318
+ </div>
319
+ </div>
320
+ </div>
321
+ </div>
322
+
323
+ </div>
324
+ </div>
325
+ <!-- END YOUTUBE ICON -->
326
+
327
+ <!-- PINTEREST ICON -->
328
+ <div class="row pinterest_section">
329
+ <h2 class="sfsicls_pinterest">Pinterest</h2>
330
+ <div class="inr_cont">
331
+ <p>The Pinterest icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="pinex-s2">(see an example)</a>.</p>
332
+ <p>The Pinterest icon should allow users to... </p>
333
+ <p class="radio_section fb_url"><input name="sfsi_pinterest_page" <?php echo ($option2['sfsi_pinterest_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Pinterest page at:</label><input name="sfsi_pinterest_pageUrl" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_pinterest_pageUrl'] != '') ? $option2['sfsi_pinterest_pageUrl'] : ''; ?>" class="add" /></p>
334
+ <div class="pint_url">
335
+ <p class="radio_section fb_url"><input name="sfsi_pinterest_pingBlog" <?php echo ($option2['sfsi_pinterest_pingBlog'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Pin my blog on Pinterest (+1)</label></p>
336
+ </div>
337
+ </div>
338
+ </div>
339
+ <!-- END PINTEREST ICON -->
340
+
341
+ <!-- INSTAGRAM ICON -->
342
+ <div class="row instagram_section">
343
+ <h2 class="sfsicls_instagram">Instagram</h2>
344
+ <div class="inr_cont">
345
+ <p>When clicked on, users will get directed to your Instagram page.</p>
346
+ <p class="radio_section fb_url cus_link instagram_space"><label>URL:</label><input name="sfsi_instagram_pageUrl" type="text" value="<?php echo (isset($option2['sfsi_instagram_pageUrl']) && $option2['sfsi_instagram_pageUrl'] != '') ? $option2['sfsi_instagram_pageUrl'] : ''; ?>" placeholder="http://" class="add" /></p>
347
+ </div>
348
+ </div>
349
+ <!-- END INSTAGRAM ICON -->
350
+
351
+ <!-- LINKEDIN ICON -->
352
+ <div class="row linkedin_section">
353
+ <h2 class="sfsicls_linkdin">LinkedIn</h2>
354
+ <div class="inr_cont linked_tab_2 link_in">
355
+ <p>The LinkedIn icon can perform several actions. Pick below which ones it should perform. If you select several options, then users can select what they want to do <a class="rit_link pop-up" href="javascript:;" data-id="linkex-s2">(see an example)</a>.</p>
356
+ <p>You find your ID in the link of your profile page, e.g. https://www.linkedin.com/profile/view?id=<b>8539887</b>&trk=nav_responsive_tab_profile_pic</p>
357
+ <p style="margin-bottom:20px;">The LinkedIn icon should allow users to... </p>
358
+ <div class="radio_section fb_url link_1"><input name="sfsi_linkedin_page" <?php echo ($option2['sfsi_linkedin_page'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Visit my Linkedin page at:</label><input name="sfsi_linkedin_pageURL" type="text" placeholder="http://" value="<?php echo ($option2['sfsi_linkedin_pageURL'] != '') ? $option2['sfsi_linkedin_pageURL'] : ''; ?>" class="add" /></div>
359
+ <div class="radio_section fb_url link_2"><input name="sfsi_linkedin_follow" <?php echo ($option2['sfsi_linkedin_follow'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Follow me on Linkedin: </label><input name="sfsi_linkedin_followCompany" type="text" value="<?php echo ($option2['sfsi_linkedin_followCompany'] != '') ? $option2['sfsi_linkedin_followCompany'] : ''; ?>" class="add" placeholder="Enter company ID, e.g. 123456" /></div>
360
+
361
+ <div class="radio_section fb_url link_3"><input name="sfsi_linkedin_SharePage" <?php echo ($option2['sfsi_linkedin_SharePage'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label>Share my page on LinkedIn</label></div>
362
+
363
+ <div class="radio_section fb_url link_4"><input name="sfsi_linkedin_recommendBusines" <?php echo ($option2['sfsi_linkedin_recommendBusines'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /><label class="anthr_labl">Recommend my business or product on Linkedin:</label><input name="sfsi_linkedin_recommendProductId" type="text" value="<?php echo ($option2['sfsi_linkedin_recommendProductId'] != '') ? $option2['sfsi_linkedin_recommendProductId'] : ''; ?>" class="add link_dbl" placeholder="Enter Product ID, e.g. 1441" /> <input name="sfsi_linkedin_recommendCompany" type="text" value="<?php echo ($option2['sfsi_linkedin_recommendCompany'] != '') ? $option2['sfsi_linkedin_recommendCompany'] : ''; ?>" class="add" placeholder="Enter company name, e.g. Google”" /></div>
364
+
365
+ <div class="lnkdin_instruction">
366
+ To find your Product or Company ID, you can use their ID lookup tool at <a target="_blank" href="https://developer.linkedin.com/apply-getting-started#company-lookup">https://developer.linkedin.com/apply-getting-started#company-lookup</a>. You need to be logged in to Linkedin to be able to use it.
367
+ </div>
368
+ </div>
369
+ </div>
370
+
371
+ <!-- TELEGRAM ICON -->
372
+ <div class="row telegram_section">
373
+ <h2 class="sfsicls_telegram">Telegram</h2>
374
+ <div class="inr_cont telegram_tab_2">
375
+ <p>Clicking on this icon will allow users to contact you on Telegram.</p>
376
+ <!-- <input name="sfsi_telegram_message" checked="true" type="checkbox" value="yes" class="" style="display:none"/> -->
377
+
378
+ <p class="radio_section fb_url no_check ">
379
+ <label>Pre-filled message</label>
380
+ <input name="sfsi_telegram_message" type="text" value="<?php echo ($option2['sfsi_telegram_message'] != '') ? $option2['sfsi_telegram_message'] : ''; ?>" placeholder="my_telegram_name" class="add" />
381
+ </p>
382
+
383
+ <p class="radio_section fb_url no_check">
384
+ <label>My Telegram username</label>
385
+ <input name="sfsi_telegram_username" type="url" placeholder="username" value="<?php echo ($option2['sfsi_telegram_username'] != '') ? $option2['sfsi_telegram_username'] : ''; ?>" class="add" />
386
+ </p>
387
+
388
+ <div class="sfsi_new_prmium_follw">
389
+ <p><b>New: </b>In our Premium Plugin you can now give your Telegram icon sharing functionality too, e.g. <b> share your website/blog with friends. </b><a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=telegram_sharing&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
390
+ </div>
391
+ </div>
392
+ </div>
393
+
394
+ <!-- END TELEGRAM ICON -->
395
+
396
+ <!-- WECHAT ICON -->
397
+ <div class="row wechat_section">
398
+ <h2 class="sfsicls_wechat">WeChat</h2>
399
+ <div class="inr_cont wechat_tab_2">
400
+ <p>When clicked on, your website/blog will be shared on WeChat.</p>
401
+ <input name="sfsi_wechatShare_option" checked="true" type="checkbox" value="yes" class="" style="display:none" />
402
+ <div class="sfsi_new_prmium_follw">
403
+ <p><b>New: </b>In our Premium Plugin you can also allow users to <b>follow you </b> on WeChat <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=wechat_sharing&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
404
+ </div>
405
+ </div>
406
+ </div>
407
+ <!-- END WECHAT ICON -->
408
+ <!-- WEIBO ICON -->
409
+ <div class="row weibo_section">
410
+ <h2 class="sfsicls_weibo">Weibo</h2>
411
+ <div class="inr_cont weibo_tab_2">
412
+ <p>When clicked on, users will get directed to your Weibo page.</p>
413
+
414
+ <p class="radio_section fb_url no_check"><input name="sfsi_weibo_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on Weibo:</label><input name="sfsi_weibo_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_weibo_pageURL'] != '') ? $option2['sfsi_weibo_pageURL'] : ''; ?>" class="add" /></p>
415
+
416
+ <div class="sfsi_new_prmium_follw">
417
+ <p><b>New: </b> In our Premium Plugin you can now give Weibo icon other functions too, e.g. <b>your website/blog, share your website/blog</b> on Weibo. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=weibo_like_and_share&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
418
+ </div>
419
+ </div>
420
+ </div>
421
+ <!-- END WEIBO ICON -->
422
+
423
+ <!-- VK ICON -->
424
+ <div class="row vk_section">
425
+ <h2 class="sfsicls_vk">VK</h2>
426
+ <div class="inr_cont vk_tab_2">
427
+ <p>When clicked on, users will get directed to your VK page.</p>
428
+
429
+ <p class="radio_section fb_url no_check"><input name="sfsi_vk_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on VK:</label><input name="sfsi_vk_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_vk_pageURL'] != '') ? $option2['sfsi_vk_pageURL'] : ''; ?>" class="add" /></p>
430
+
431
+ <div class="sfsi_new_prmium_follw">
432
+ <p><b>New: </b>In our Premium Plugin you can now give your VK icon sharing functionality too, e.g. <b>share your website/blog </b> with friends. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=vk_share&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
433
+ </div>
434
+ </div>
435
+ </div>
436
+ <!-- END VK ICON -->
437
+ <!-- OK ICON -->
438
+ <div class="row ok_section">
439
+ <h2 class="sfsicls_ok">OK</h2>
440
+ <div class="inr_cont ok_tab_2">
441
+ <p>When clicked on, users will get directed to your OK page.</p>
442
+
443
+ <p class="radio_section fb_url no_check"><input name="sfsi_ok_page" checked="true" type="checkbox" value="yes" class="" style="display:none" /><label>Visit me on OK:</label><input name="sfsi_ok_pageURL" type="url" placeholder="http://" value="<?php echo ($option2['sfsi_ok_pageURL'] != '') ? $option2['sfsi_ok_pageURL'] : ''; ?>" class="add" /></p>
444
+
445
+ <div class="sfsi_new_prmium_follw">
446
+ <p><b>New: </b>In our Premium Plugin you can now give OK icon other functions too, e.g. <b> like your website/blog </b>, subscribe/follow you on OK. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=ok_like_and_subscribe&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
447
+ </div>
448
+ </div>
449
+ </div>
450
+ <!-- END OK ICON -->
451
+ <!-- END LINKEDIN ICON -->
452
+
453
+ <!-- Custom icon section start here -->
454
+ <div class="custom-links custom_section">
455
+ <?php
456
+ $costom_links = unserialize($option2['sfsi_CustomIcon_links']);
457
+ $count = 1;
458
+ $bannerDisplay = "display:none;";
459
+ for ($i = $first_key; $i <= $endkey; $i++) :
460
+ ?>
461
+ <?php if (!empty($icons[$i])) :
462
+ $bannerDisplay = "display:block;";
463
+ ?>
464
+ <div class="row sfsiICON_<?php echo $i; ?> cm_lnk">
465
+ <h2 class="custom">
466
+ <span class="customstep2-img">
467
+ <img src="<?php echo (!empty($icons[$i])) ? esc_url($icons[$i]) : SFSI_PLUGURL . 'images/custom.png'; ?>" id="CImg_<?php echo $new_element; ?>" style="border-radius:48%" alt="error" />
468
+ </span>
469
+ <span class="sfsiCtxt">Custom <?php echo $count; ?></span>
470
+ </h2>
471
+ <div class="inr_cont ">
472
+ <p>Where do you want this icon to link to?</p>
473
+ <p class="radio_section fb_url custom_section cus_link ">
474
+ <label>Link :</label>
475
+ <input name="sfsi_CustomIcon_links[]" type="text" value="<?php echo (isset($costom_links[$i]) && $costom_links[$i] != '') ? esc_url($costom_links[$i]) : ''; ?>" placeholder="http://" class="add" file-id="<?php echo $i; ?>" />
476
+ </p>
477
+ </div>
478
+ </div>
479
+ <?php $count++;
480
+ endif;
481
+ endfor; ?>
482
+
483
+ <div class="notice_custom_icons_premium sfsi_new_prmium_follw" style="<?php echo $bannerDisplay; ?>">
484
+ <p><b>New: </b>In the Premium Plugin you can also give custom icons the feature that when people click on it, they can call you, or send you an SMS. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=call_or_sms_feature_custom_icons&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
485
+ </div>
486
+ </div>
487
+ <!-- END Custom icon section here -->
488
+
489
+ <?php sfsi_ask_for_help(2); ?> <!-- SAVE BUTTON SECTION -->
490
+ <div class="save_button tab_2_sav">
491
+ <img src="<?php echo SFSI_PLUGURL; ?>images/ajax-loader.gif" class="loader-img" alt="error" />
492
+ <?php $nonce = wp_create_nonce("update_step2"); ?>
493
+ <a href="javascript:;" id="sfsi_save2" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
494
+ </div>
495
+ <!-- END SAVE BUTTON SECTION -->
496
+
497
+ <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
498
+ <label class="closeSec"></label>
499
+
500
+ <!-- ERROR AND SUCCESS MESSAGE AREA-->
501
+ <p class="red_txt errorMsg" style="display:none"> </p>
502
+ <p class="green_txt sucMsg" style="display:none"> </p>
503
+
504
  </div><!-- END Section 2 "What do you want the icons to do?" main div -->
views/sfsi_option_view5.php CHANGED
@@ -1,455 +1,455 @@
1
- <?php
2
- /* unserialize all saved option for section 5 options */
3
- $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array() ;
4
- $option3 = unserialize(get_option('sfsi_section3_options',false));
5
- $option5 = unserialize(get_option('sfsi_section5_options',false));
6
-
7
- $custom_icons_order = unserialize($option5['sfsi_CustomIcons_order']);
8
- if(!isset($option5['sfsi_telegramIcon_order'])){
9
- $option5['sfsi_telegramIcon_order'] = '11';
10
- }
11
- if(!isset($option5['sfsi_vkIcon_order'])){
12
- $option5['sfsi_vkIcon_order'] = '12';
13
- }
14
- if(!isset($option5['sfsi_okIcon_order'])){
15
- $option5['sfsi_okIcon_order'] = '13';
16
- }
17
- if(!isset($option5['sfsi_weiboIcon_order'])){
18
- $option5['sfsi_weiboIcon_order'] = '14';
19
- }
20
- if(!isset($option5['sfsi_wechatIcon_order'])){
21
- $option5['sfsi_wechatIcon_order'] = '15';
22
- }
23
- $icons_order = array(
24
- $option5['sfsi_rssIcon_order'] => 'rss',
25
- $option5['sfsi_emailIcon_order'] => 'email',
26
- $option5['sfsi_facebookIcon_order'] => 'facebook',
27
- $option5['sfsi_twitterIcon_order'] => 'twitter',
28
- $option5['sfsi_youtubeIcon_order'] => 'youtube',
29
- $option5['sfsi_pinterestIcon_order']=> 'pinterest',
30
- $option5['sfsi_linkedinIcon_order'] => 'linkedin',
31
- $option5['sfsi_instagramIcon_order']=> 'instagram',
32
- $option5['sfsi_telegramIcon_order']=> 'telegram',
33
- $option5['sfsi_vkIcon_order']=> 'vk',
34
- $option5['sfsi_okIcon_order']=> 'ok',
35
- $option5['sfsi_weiboIcon_order']=> 'weibo',
36
- $option5['sfsi_wechatIcon_order']=> 'wechat',
37
-
38
- ) ;
39
-
40
- /*
41
- * Sanitize, escape and validate values
42
- */
43
- $option5['sfsi_icons_size'] = (isset($option5['sfsi_icons_size']))
44
- ? intval($option5['sfsi_icons_size'])
45
- : '';
46
- $option5['sfsi_icons_spacing'] = (isset($option5['sfsi_icons_spacing']))
47
- ? intval($option5['sfsi_icons_spacing'])
48
- : '';
49
- $option5['sfsi_icons_Alignment'] = (isset($option5['sfsi_icons_Alignment']))
50
- ? sanitize_text_field($option5['sfsi_icons_Alignment'])
51
- : '';
52
- $option5['sfsi_icons_perRow'] = (isset($option5['sfsi_icons_perRow']))
53
- ? intval($option5['sfsi_icons_perRow'])
54
- : '';
55
- $option5['sfsi_icons_ClickPageOpen'] = (isset($option5['sfsi_icons_ClickPageOpen']))
56
- ? sanitize_text_field($option5['sfsi_icons_ClickPageOpen'])
57
- :'';
58
- $option5['sfsi_icons_stick'] = (isset($option5['sfsi_icons_stick']))
59
- ? sanitize_text_field($option5['sfsi_icons_stick'])
60
- : '';
61
- $option5['sfsi_rss_MouseOverText'] = (isset($option5['sfsi_rss_MouseOverText']))
62
- ? sanitize_text_field($option5['sfsi_rss_MouseOverText'])
63
- : '';
64
- $option5['sfsi_email_MouseOverText'] = (isset($option5['sfsi_email_MouseOverText']))
65
- ? sanitize_text_field($option5['sfsi_email_MouseOverText'])
66
- :'';
67
- $option5['sfsi_twitter_MouseOverText'] = (isset($option5['sfsi_twitter_MouseOverText']))
68
- ? sanitize_text_field($option5['sfsi_twitter_MouseOverText'])
69
- : '';
70
- $option5['sfsi_facebook_MouseOverText'] = (isset($option5['sfsi_facebook_MouseOverText']))
71
- ? sanitize_text_field($option5['sfsi_facebook_MouseOverText'])
72
- : '';
73
- $option5['sfsi_linkedIn_MouseOverText'] = (isset($option5['sfsi_linkedIn_MouseOverText']))
74
- ? sanitize_text_field($option5['sfsi_linkedIn_MouseOverText'])
75
- : '';
76
- $option5['sfsi_pinterest_MouseOverText'] = (isset($option5['sfsi_pinterest_MouseOverText']))
77
- ? sanitize_text_field($option5['sfsi_pinterest_MouseOverText'])
78
- : '';
79
- $option5['sfsi_youtube_MouseOverText'] = (isset($option5['sfsi_youtube_MouseOverText']))
80
- ? sanitize_text_field($option5['sfsi_youtube_MouseOverText'])
81
- : '';
82
- $option5['sfsi_instagram_MouseOverText'] = (isset($option5['sfsi_instagram_MouseOverText']))
83
- ? sanitize_text_field($option5['sfsi_instagram_MouseOverText'])
84
- : '';
85
- $option5['sfsi_telegram_MouseOverText'] = (isset($option5['sfsi_telegram_MouseOverText']))
86
- ? sanitize_text_field($option5['sfsi_telegram_MouseOverText'])
87
- : '';
88
- $option5['sfsi_vk_MouseOverText'] = (isset($option5['sfsi_vk_MouseOverText']))
89
- ? sanitize_text_field($option5['sfsi_vk_MouseOverText'])
90
- : '';
91
- $option5['sfsi_ok_MouseOverText'] = (isset($option5['sfsi_ok_MouseOverText']))
92
- ? sanitize_text_field($option5['sfsi_ok_MouseOverText'])
93
- : '';
94
- $option5['sfsi_weibo_MouseOverText'] = (isset($option5['sfsi_weibo_MouseOverText']))
95
- ? sanitize_text_field($option5['sfsi_weibo_MouseOverText'])
96
- : '';
97
- $option5['sfsi_wechat_MouseOverText'] = (isset($option5['sfsi_wechat_MouseOverText']))
98
- ? sanitize_text_field($option5['sfsi_wechat_MouseOverText'])
99
- : '';
100
- $sfsi_icons_suppress_errors = (isset($option5['sfsi_icons_suppress_errors']))
101
- ? sanitize_text_field($option5['sfsi_icons_suppress_errors'])
102
- : 'no';
103
- if(is_array($custom_icons_order) )
104
- {
105
- foreach($custom_icons_order as $data)
106
- {
107
- $icons_order[$data['order']] = $data;
108
- }
109
- }
110
- ksort($icons_order);
111
- ?>
112
-
113
- <!-- Section 5 "Any other wishes for your main icons?" main div Start -->
114
- <div class="tab5">
115
- <h4>Order of your icons</h4>
116
- <!-- icon drag drop section start here -->
117
- <ul class="share_icon_order" >
118
- <?php
119
- $ctn = 0;
120
- foreach($icons_order as $index=>$icn) :
121
-
122
- switch ($icn) :
123
- case 'rss' :?>
124
- <li class="rss_section" data-index="<?php echo $index; ?>" id="sfsi_rssIcon_order">
125
- <a href="#" title="RSS"><img src="<?php echo SFSI_PLUGURL; ?>images/rss.png" alt="RSS" /></a>
126
- </li>
127
- <?php break; ?><?php case 'email' :?>
128
- <li class="email_section " data-index="<?php echo $index; ?>" id="sfsi_emailIcon_order">
129
- <a href="#" title="Email"><img src="<?php echo SFSI_PLUGURL; ?>images/<?php echo $email_image; ?>" alt="Email" class="icon_img" /></a>
130
- </li>
131
- <?php break; ?><?php case 'facebook' :?>
132
- <li class="facebook_section " data-index="<?php echo $index; ?>" id="sfsi_facebookIcon_order">
133
- <a href="#" title="Facebook"><img src="<?php echo SFSI_PLUGURL; ?>images/facebook.png" alt="Facebook" /></a>
134
- </li>
135
- <?php break; ?><?php case 'twitter' :?>
136
- <li class="twitter_section " data-index="<?php echo $index; ?>" id="sfsi_twitterIcon_order">
137
- <a href="#" title="Twitter" ><img src="<?php echo SFSI_PLUGURL; ?>images/twitter.png" alt="Twitter" /></a>
138
- </li>
139
- <?php break; ?><?php case 'youtube' :?>
140
- <li class="youtube_section " data-index="<?php echo $index; ?>" id="sfsi_youtubeIcon_order">
141
- <a href="#" title="YouTube" ><img src="<?php echo SFSI_PLUGURL; ?>images/youtube.png" alt="YouTube" /></a>
142
- </li>
143
- <?php break; ?><?php case 'pinterest' :?>
144
- <li class="pinterest_section " data-index="<?php echo $index; ?>" id="sfsi_pinterestIcon_order">
145
- <a href="#" title="Pinterest" ><img src="<?php echo SFSI_PLUGURL; ?>images/pinterest.png" alt="Pinterest" /></a>
146
- </li>
147
- <?php break; ?><?php case 'linkedin' :?>
148
- <li class="linkedin_section " data-index="<?php echo $index; ?>" id="sfsi_linkedinIcon_order">
149
- <a href="#" title="Linked In" ><img src="<?php echo SFSI_PLUGURL; ?>images/linked_in.png" alt="Linked In" /></a>
150
- </li>
151
- <?php break; ?><?php case 'instagram' :?>
152
- <li class="instagram_section " data-index="<?php echo $index; ?>" id="sfsi_instagramIcon_order">
153
- <a href="#" title="Instagram" ><img src="<?php echo SFSI_PLUGURL; ?>images/instagram.png" alt="Instagram" /></a>
154
- </li>
155
- <?php break; ?><?php case 'telegram' :?>
156
- <li class="telegram_section " data-index="<?php echo $index; ?>" id="sfsi_telegramIcon_order">
157
- <a href="#" title="telegram" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_telegram.png" height="54px;" alt="telegram" /></a>
158
- </li>
159
- <?php break; ?><?php case 'vk' :?>
160
- <li class="vk_section " data-index="<?php echo $index; ?>" id="sfsi_vkIcon_order">
161
- <a href="#" title="vk" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_vk.png" height="54px;" alt="vk" /></a>
162
- </li>
163
- <?php break; ?><?php case 'ok' :?>
164
- <li class="ok_section " data-index="<?php echo $index; ?>" id="sfsi_okIcon_order">
165
- <a href="#" title="ok" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_ok.png" height="54px;" alt="ok" /></a>
166
- </li>
167
- <?php break; ?><?php case 'weibo' :?>
168
- <li class="weibo_section " data-index="<?php echo $index; ?>" id="sfsi_weiboIcon_order">
169
- <a href="#" title="weibo" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_weibo.png" height="54px;" alt="weibo" /></a>
170
- </li>
171
- <?php break; ?><?php case 'wechat' :?>
172
- <li class="wechat_section " data-index="<?php echo $index; ?>" id="sfsi_wechatIcon_order">
173
- <a href="#" title="wechat" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_wechat.png" height="54px;" alt="wechat" /></a>
174
- </li>
175
- <?php break; ?><?php default :?><?php if(isset($icons[$icn['ele']]) && !empty($icons[$icn['ele']]) && filter_var($icons[$icn['ele']], FILTER_VALIDATE_URL) ): ?>
176
- <li class="custom_iconOrder sfsiICON_<?php echo $icn['ele']; ?>" data-index="<?php echo $index; ?>" element-id="<?php echo $icn['ele']; ?>" >
177
- <a href="#" title="Custom Icon" ><img src="<?php echo $icons[$icn['ele']]; ?>" alt="Linked In" class="sfcm" /></a>
178
- </li>
179
- <?php endif; ?><?php break; ?><?php endswitch; ?><?php endforeach; ?>
180
-
181
- </ul> <!-- END icon drag drop section start here -->
182
-
183
- <span class="drag_drp">(Drag &amp; Drop)</span>
184
- <!-- icon's size and spacing section start here -->
185
- <div class="row">
186
- <h4>Size &amp; spacing of your icons</h4>
187
- <div class="icons_size"><span>Size:</span><input name="sfsi_icons_size" value="<?php echo ($option5['sfsi_icons_size']!='') ? $option5['sfsi_icons_size'] : '' ;?>" type="text" /><ins>pixels wide &amp; tall</ins> <span class="last">Spacing between icons:</span><input name="sfsi_icons_spacing" type="text" value="<?php echo ($option5['sfsi_icons_spacing']!='') ? $option5['sfsi_icons_spacing'] : '' ;?>" /><ins>Pixels</ins></div>
188
-
189
- <div class="icons_prem_disc">
190
- <p class="sfsi_prem_plu_desc"><b>New: </b>The Premium Plugin also allows you to define the vertical distance between the icons (and set this differently for mobile vs. desktop): <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" style="cursor:pointer;border-bottom: 1px solid #12a252;color: #12a252 !important;font-weight:bold" class="sfisi_font_bold" target="_blank">Go premium now.<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_spacings&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more.</a>
191
- </div>
192
-
193
- </div>
194
-
195
- <div class="row">
196
- <h4>Alignments</h4>
197
- <div class="icons_size">
198
- <div style="width: 210px;float: left;position: relative;">
199
- <span>Alignment of icons:</span>
200
- <ins class="sfsi_icons_other_allign" style="position: absolute;bottom: -22px;left: 0;width: 200px;color: rgb(128,136,145);">
201
- (with respect to each other)
202
- </ins>
203
- </div>
204
- <div class="field">
205
- <select name="sfsi_icons_Alignment" id="sfsi_icons_Alignment" class="styled">
206
- <option value="center" <?php echo ($option5['sfsi_icons_Alignment']=='center') ? 'selected="selected"' : '' ;?>>Centered</option>
207
- <option value="right" <?php echo ($option5['sfsi_icons_Alignment']=='right') ? 'selected="selected"' : '' ;?>>Right</option>
208
- <option value="left" <?php echo ($option5['sfsi_icons_Alignment']=='left') ? 'selected="selected"' : '' ;?>>Left</option>
209
- </select>
210
- </div>
211
- <span>Icons per row:</span>
212
- <input name="sfsi_icons_perRow" type="text" value="<?php echo ($option5['sfsi_icons_perRow']!='') ? $option5['sfsi_icons_perRow'] : '' ;?>" />
213
- <ins class="leave_empty">Leave empty if you don't want to <br /> define this</ins>
214
- </div>
215
-
216
- <div class= "sfsi_new_prmium_follw" style="margin-top: 38px;">
217
- <p><b>New: </b>The Premium Plugin gives several more alignment options: <br>- &nbsp;&nbsp; Show icons vertically<br>- &nbsp;&nbsp; Align icons within a widget (left, right, centered)<br>- &nbsp;&nbsp; Align icons within the «container» where you place them via shortcode (left, right, centered) <br><a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_alignment_options&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
218
- </div>
219
-
220
- </div>
221
-
222
- <div class="row new_wind">
223
- <h4>New window</h4>
224
- <div class="row_onl"><p>If a user clicks on your icons, do you want to open the page in a new window?
225
- </p>
226
- <ul class="enough_waffling">
227
- <li>
228
- <input name="sfsi_icons_ClickPageOpen" <?php echo ($option5['sfsi_icons_ClickPageOpen']=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
229
- <label>Yes</label>
230
- </li>
231
- <li>
232
- <input name="sfsi_icons_ClickPageOpen" <?php echo ($option5['sfsi_icons_ClickPageOpen']=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
233
- <label>No</label>
234
- </li>
235
- </ul>
236
- </div>
237
- </div>
238
-
239
-
240
- <!-- icon's floating and stick section start here -->
241
- <div class="row sticking">
242
-
243
- <h4>Sticky icons</h4>
244
-
245
- <div class="clear float_options" <?php if($option5['sfsi_icons_stick']=='yes') :?> style="display:none" <?php endif;?>>
246
-
247
-
248
- </div>
249
-
250
- <div class="space">
251
-
252
- <p class="list">Make icons stick?</p>
253
-
254
- <ul class="enough_waffling">
255
-
256
- <li>
257
- <input name="sfsi_icons_stick" <?php echo ($option5['sfsi_icons_stick']=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
258
- <label>Yes</label>
259
- </li>
260
-
261
- <li>
262
- <input name="sfsi_icons_stick" <?php echo ($option5['sfsi_icons_stick']=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
263
- <label>No</label>
264
- </li>
265
-
266
- </ul>
267
-
268
- <p>
269
- If you select «Yes» here, then the icons which you placed via <span style="text-decoration: underline;"><b>widget</b></span> or <span style="text-decoration: underline;"><b>shortcode</b></span> will still be visible on the screen as user scrolls down your page, i.e. they will stick at the top.</p>
270
-
271
- <p>
272
- This is not to be confused with making the icons permanently placed in the same position, which is possible in the <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium"><b>Premium Plugin</b></a>.
273
- </p>
274
-
275
- </div>
276
-
277
-
278
- </div><!-- END icon's floating and stick section -->
279
-
280
- <!--************* Sharing texts & pictures section STARTS *****************************-->
281
-
282
- <div class="row sfsi_custom_social_data_setting" id="custom_social_data_setting">
283
-
284
- <h4>Sharing texts & pictures?</h4>
285
- <p>On the pages where you edit your posts/pages, you’ll see a (new) section where you can define which pictures & text should be shared. This extra section is displayed on the following:</p>
286
-
287
- <?php
288
- $checkedS = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? 'checked="checked"': '';
289
- $checked = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? '': 'checked="checked"';
290
- $checkedVal = (isset($option5['sfsi_custom_social_hide'])) ? $option5['sfsi_custom_social_hide']: 'no';
291
- ?>
292
- <div class="social_data_post_types">
293
- <ul class="socialPostTypesUl">
294
- <li>
295
- <div class="radio_section tb_4_ck">
296
- <input type="checkbox" <?php echo $checked; ?> value="page" class="styled" />
297
- <label class="cstmdsplsub">Page</label>
298
- </div>
299
- </li>
300
- <li>
301
- <div class="radio_section tb_4_ck">
302
- <input type="checkbox" <?php echo $checked; ?> value="post" class="styled" />
303
- <label class="cstmdsplsub">Post</label>
304
- </div>
305
- </li>
306
- </ul>
307
-
308
- <ul class="sfsi_show_hide_section">
309
- <li>
310
- <div class="radio_section tb_4_ck">
311
- <input name="sfsi_custom_social_hide" type="checkbox" <?php echo $checkedS; ?> value="<?php echo $checkedVal; ?>" class="styled" />
312
- <label class="cstmdsplsub">Hide section for all</label>
313
- </div>
314
- </li>
315
- </ul>
316
- </div>
317
-
318
- <div class="sfsi_new_prmium_follw sfsi_social_sharing" style="margin-bottom: 15px;">
319
- <p>Note: This feature is currently only available in the Premium Plugin. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=define_pic_and_text&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a>
320
- </p>
321
- </div>
322
- </div>
323
-
324
- <!--******************** Sharing texts & pictures section CLOSES ************************************************-->
325
-
326
- <!-- mouse over text section start here -->
327
- <div class="row mouse_txt">
328
- <h4>Mouseover text</h4>
329
- <p>
330
- If you’ve given your icon only one function (i.e. no pop-up where user can perform different actions) then you can define
331
- here what text will be displayed if a user moves his mouse over the icon:
332
- </p>
333
- <div class="space">
334
- <div class="clear"></div>
335
- <div class="mouseover_field rss_section">
336
- <label>RSS:</label><input name="sfsi_rss_MouseOverText" value="<?php echo ($option5['sfsi_rss_MouseOverText']!='') ? $option5['sfsi_rss_MouseOverText'] : '' ;?>" type="text" />
337
- </div>
338
- <div class="mouseover_field email_section">
339
- <label>Email:</label><input name="sfsi_email_MouseOverText" value="<?php echo ($option5['sfsi_email_MouseOverText']!='') ? $option5['sfsi_email_MouseOverText'] : '' ;?>" type="text" />
340
- </div>
341
-
342
- <div class="clear">
343
- <div class="mouseover_field twitter_section">
344
- <label>Twitter:</label>
345
- <input name="sfsi_twitter_MouseOverText" value="<?php echo ($option5['sfsi_twitter_MouseOverText']!='') ? $option5['sfsi_twitter_MouseOverText'] : '' ;?>" type="text" />
346
- </div>
347
- <div class="mouseover_field facebook_section">
348
- <label>Facebook:</label>
349
- <input name="sfsi_facebook_MouseOverText" value="<?php echo ($option5['sfsi_facebook_MouseOverText']!='') ? $option5['sfsi_facebook_MouseOverText'] : '' ;?>" type="text" />
350
- </div>
351
- </div>
352
- <div class="clear">
353
- <div class="mouseover_field linkedin_section">
354
- <label>LinkedIn:</label>
355
- <input name="sfsi_linkedIn_MouseOverText" value="<?php echo ($option5['sfsi_linkedIn_MouseOverText']!='') ? $option5['sfsi_linkedIn_MouseOverText'] : '' ;?>" type="text" />
356
- </div>
357
- </div>
358
- <div class="clear">
359
- <div class="mouseover_field pinterest_section">
360
- <label>Pinterest:</label>
361
- <input name="sfsi_pinterest_MouseOverText" value="<?php echo ($option5['sfsi_pinterest_MouseOverText']!='') ? $option5['sfsi_pinterest_MouseOverText'] : '' ;?>" type="text" />
362
- </div>
363
- <div class="mouseover_field youtube_section">
364
- <label>Youtube:</label>
365
- <input name="sfsi_youtube_MouseOverText" value="<?php echo ($option5['sfsi_youtube_MouseOverText']!='') ? $option5['sfsi_youtube_MouseOverText'] : '' ;?>" type="text" />
366
- </div>
367
- </div>
368
- <div class="clear">
369
- <div class="mouseover_field instagram_section">
370
- <label>Instagram:</label>
371
- <input name="sfsi_instagram_MouseOverText" value="<?php echo ($option5['sfsi_instagram_MouseOverText']!='') ? $option5['sfsi_instagram_MouseOverText'] : '' ;?>" type="text" />
372
- </div>
373
- <div class="mouseover_field telegram_section">
374
- <label>Telegram:</label>
375
- <input name="sfsi_telegram_MouseOverText" value="<?php echo ($option5['sfsi_telegram_MouseOverText']!='') ? $option5['sfsi_telegram_MouseOverText'] : '' ;?>" type="text" />
376
- </div>
377
- </div>
378
- <div class="clear">
379
- <div class="mouseover_field vk_section">
380
- <label>VK:</label>
381
- <input name="sfsi_vk_MouseOverText" value="<?php echo ($option5['sfsi_vk_MouseOverText']!='') ? $option5['sfsi_vk_MouseOverText'] : '' ;?>" type="text" />
382
- </div>
383
- <div class="mouseover_field ok_section">
384
- <label>Ok:</label>
385
- <input name="sfsi_ok_MouseOverText" value="<?php echo ($option5['sfsi_ok_MouseOverText']!='') ? $option5['sfsi_ok_MouseOverText'] : '' ;?>" type="text" />
386
- </div>
387
- </div>
388
- <div class="clear">
389
- <div class="mouseover_field weibo_section">
390
- <label>Weibo:</label>
391
- <input name="sfsi_weibo_MouseOverText" value="<?php echo ($option5['sfsi_weibo_MouseOverText']!='') ? $option5['sfsi_weibo_MouseOverText'] : '' ;?>" type="text" />
392
- </div>
393
- <div class="mouseover_field wechat_section">
394
- <label>WeChat:</label>
395
- <input name="sfsi_wechat_MouseOverText" value="<?php echo ($option5['sfsi_wechat_MouseOverText']!='') ? $option5['sfsi_wechat_MouseOverText'] : '' ;?>" type="text" />
396
- </div>
397
- </div>
398
- <div class="clear"> </div>
399
- <div class="custom_m">
400
- <?php
401
- $sfsiMouseOverTexts = unserialize($option5['sfsi_custom_MouseOverTexts']);
402
- $count = 1; for($i=$first_key; $i <= $endkey; $i++) :
403
- ?><?php if(!empty( $icons[$i])) : ?>
404
-
405
- <div class="mouseover_field custom_section sfsiICON_<?php echo $i; ?>">
406
- <label>Custom <?php echo $count; ?>:</label>
407
- <input name="sfsi_custom_MouseOverTexts[]" value="<?php echo (isset($sfsiMouseOverTexts[$i]) && $sfsiMouseOverTexts[$i]!='') ?sanitize_text_field($sfsiMouseOverTexts[$i]) : '' ;?>" type="text" file-id="<?php echo $i; ?>" />
408
- </div>
409
-
410
- <?php if($count%2==0): ?>
411
-
412
- <div class="clear"> </div>
413
- <?php endif; ?><?php $count++; endif; endfor; ?>
414
- </div>
415
-
416
- </div>
417
-
418
- </div>
419
- <!-- END mouse over text section -->
420
-
421
- <div class="row new_wind">
422
- <h4>Error reporting</h4>
423
- <div class="row_onl"><p>Suppress error messages?</p>
424
- <ul class="enough_waffling">
425
- <li>
426
- <input name="sfsi_icons_suppress_errors" <?php echo ($sfsi_icons_suppress_errors=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
427
- <label>Yes</label>
428
- </li>
429
- <li>
430
- <input name="sfsi_icons_suppress_errors" <?php echo ($sfsi_icons_suppress_errors=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
431
- <label>No</label>
432
- </li>
433
- </ul>
434
- </div>
435
- </div>
436
-
437
- <?php sfsi_ask_for_help(5); ?>
438
- <!-- SAVE BUTTON SECTION -->
439
- <div class="save_button">
440
- <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
441
- <?php $nonce = wp_create_nonce("update_step5"); ?>
442
- <a href="javascript:;" id="sfsi_save5" title="Save" data-nonce="<?php echo $nonce;?>">Save</a>
443
- </div>
444
- <!-- END SAVE BUTTON SECTION -->
445
-
446
- <a class="sfsiColbtn closeSec" href="javascript:;" >Collapse area</a>
447
- <label class="closeSec"></label>
448
-
449
- <!-- ERROR AND SUCCESS MESSAGE AREA-->
450
- <p class="red_txt errorMsg" style="display:none"> </p>
451
- <p class="green_txt sucMsg" style="display:none"> </p>
452
- <div class="clear"></div>
453
-
454
- </div>
455
- <!-- END Section 5 "Any other wishes for your main icons?"-->
1
+ <?php
2
+ /* unserialize all saved option for section 5 options */
3
+ $icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array() ;
4
+ $option3 = unserialize(get_option('sfsi_section3_options',false));
5
+ $option5 = unserialize(get_option('sfsi_section5_options',false));
6
+
7
+ $custom_icons_order = unserialize($option5['sfsi_CustomIcons_order']);
8
+ if(!isset($option5['sfsi_telegramIcon_order'])){
9
+ $option5['sfsi_telegramIcon_order'] = '11';
10
+ }
11
+ if(!isset($option5['sfsi_vkIcon_order'])){
12
+ $option5['sfsi_vkIcon_order'] = '12';
13
+ }
14
+ if(!isset($option5['sfsi_okIcon_order'])){
15
+ $option5['sfsi_okIcon_order'] = '13';
16
+ }
17
+ if(!isset($option5['sfsi_weiboIcon_order'])){
18
+ $option5['sfsi_weiboIcon_order'] = '14';
19
+ }
20
+ if(!isset($option5['sfsi_wechatIcon_order'])){
21
+ $option5['sfsi_wechatIcon_order'] = '15';
22
+ }
23
+ $icons_order = array(
24
+ $option5['sfsi_rssIcon_order'] => 'rss',
25
+ $option5['sfsi_emailIcon_order'] => 'email',
26
+ $option5['sfsi_facebookIcon_order'] => 'facebook',
27
+ $option5['sfsi_twitterIcon_order'] => 'twitter',
28
+ $option5['sfsi_youtubeIcon_order'] => 'youtube',
29
+ $option5['sfsi_pinterestIcon_order']=> 'pinterest',
30
+ $option5['sfsi_linkedinIcon_order'] => 'linkedin',
31
+ $option5['sfsi_instagramIcon_order']=> 'instagram',
32
+ $option5['sfsi_telegramIcon_order']=> 'telegram',
33
+ $option5['sfsi_vkIcon_order']=> 'vk',
34
+ $option5['sfsi_okIcon_order']=> 'ok',
35
+ $option5['sfsi_weiboIcon_order']=> 'weibo',
36
+ $option5['sfsi_wechatIcon_order']=> 'wechat',
37
+
38
+ ) ;
39
+
40
+ /*
41
+ * Sanitize, escape and validate values
42
+ */
43
+ $option5['sfsi_icons_size'] = (isset($option5['sfsi_icons_size']))
44
+ ? intval($option5['sfsi_icons_size'])
45
+ : '';
46
+ $option5['sfsi_icons_spacing'] = (isset($option5['sfsi_icons_spacing']))
47
+ ? intval($option5['sfsi_icons_spacing'])
48
+ : '';
49
+ $option5['sfsi_icons_Alignment'] = (isset($option5['sfsi_icons_Alignment']))
50
+ ? sanitize_text_field($option5['sfsi_icons_Alignment'])
51
+ : '';
52
+ $option5['sfsi_icons_perRow'] = (isset($option5['sfsi_icons_perRow']))
53
+ ? intval($option5['sfsi_icons_perRow'])
54
+ : '';
55
+ $option5['sfsi_icons_ClickPageOpen'] = (isset($option5['sfsi_icons_ClickPageOpen']))
56
+ ? sanitize_text_field($option5['sfsi_icons_ClickPageOpen'])
57
+ :'';
58
+ $option5['sfsi_icons_stick'] = (isset($option5['sfsi_icons_stick']))
59
+ ? sanitize_text_field($option5['sfsi_icons_stick'])
60
+ : '';
61
+ $option5['sfsi_rss_MouseOverText'] = (isset($option5['sfsi_rss_MouseOverText']))
62
+ ? sanitize_text_field($option5['sfsi_rss_MouseOverText'])
63
+ : '';
64
+ $option5['sfsi_email_MouseOverText'] = (isset($option5['sfsi_email_MouseOverText']))
65
+ ? sanitize_text_field($option5['sfsi_email_MouseOverText'])
66
+ :'';
67
+ $option5['sfsi_twitter_MouseOverText'] = (isset($option5['sfsi_twitter_MouseOverText']))
68
+ ? sanitize_text_field($option5['sfsi_twitter_MouseOverText'])
69
+ : '';
70
+ $option5['sfsi_facebook_MouseOverText'] = (isset($option5['sfsi_facebook_MouseOverText']))
71
+ ? sanitize_text_field($option5['sfsi_facebook_MouseOverText'])
72
+ : '';
73
+ $option5['sfsi_linkedIn_MouseOverText'] = (isset($option5['sfsi_linkedIn_MouseOverText']))
74
+ ? sanitize_text_field($option5['sfsi_linkedIn_MouseOverText'])
75
+ : '';
76
+ $option5['sfsi_pinterest_MouseOverText'] = (isset($option5['sfsi_pinterest_MouseOverText']))
77
+ ? sanitize_text_field($option5['sfsi_pinterest_MouseOverText'])
78
+ : '';
79
+ $option5['sfsi_youtube_MouseOverText'] = (isset($option5['sfsi_youtube_MouseOverText']))
80
+ ? sanitize_text_field($option5['sfsi_youtube_MouseOverText'])
81
+ : '';
82
+ $option5['sfsi_instagram_MouseOverText'] = (isset($option5['sfsi_instagram_MouseOverText']))
83
+ ? sanitize_text_field($option5['sfsi_instagram_MouseOverText'])
84
+ : '';
85
+ $option5['sfsi_telegram_MouseOverText'] = (isset($option5['sfsi_telegram_MouseOverText']))
86
+ ? sanitize_text_field($option5['sfsi_telegram_MouseOverText'])
87
+ : '';
88
+ $option5['sfsi_vk_MouseOverText'] = (isset($option5['sfsi_vk_MouseOverText']))
89
+ ? sanitize_text_field($option5['sfsi_vk_MouseOverText'])
90
+ : '';
91
+ $option5['sfsi_ok_MouseOverText'] = (isset($option5['sfsi_ok_MouseOverText']))
92
+ ? sanitize_text_field($option5['sfsi_ok_MouseOverText'])
93
+ : '';
94
+ $option5['sfsi_weibo_MouseOverText'] = (isset($option5['sfsi_weibo_MouseOverText']))
95
+ ? sanitize_text_field($option5['sfsi_weibo_MouseOverText'])
96
+ : '';
97
+ $option5['sfsi_wechat_MouseOverText'] = (isset($option5['sfsi_wechat_MouseOverText']))
98
+ ? sanitize_text_field($option5['sfsi_wechat_MouseOverText'])
99
+ : '';
100
+ $sfsi_icons_suppress_errors = (isset($option5['sfsi_icons_suppress_errors']))
101
+ ? sanitize_text_field($option5['sfsi_icons_suppress_errors'])
102
+ : 'no';
103
+ if(is_array($custom_icons_order) )
104
+ {
105
+ foreach($custom_icons_order as $data)
106
+ {
107
+ $icons_order[$data['order']] = $data;
108
+ }
109
+ }
110
+ ksort($icons_order);
111
+ ?>
112
+
113
+ <!-- Section 5 "Any other wishes for your main icons?" main div Start -->
114
+ <div class="tab5">
115
+ <h4>Order of your icons</h4>
116
+ <!-- icon drag drop section start here -->
117
+ <ul class="share_icon_order" >
118
+ <?php
119
+ $ctn = 0;
120
+ foreach($icons_order as $index=>$icn) :
121
+
122
+ switch ($icn) :
123
+ case 'rss' :?>
124
+ <li class="rss_section" data-index="<?php echo $index; ?>" id="sfsi_rssIcon_order">
125
+ <a href="#" title="RSS"><img src="<?php echo SFSI_PLUGURL; ?>images/rss.png" alt="RSS" /></a>
126
+ </li>
127
+ <?php break; ?><?php case 'email' :?>
128
+ <li class="email_section " data-index="<?php echo $index; ?>" id="sfsi_emailIcon_order">
129
+ <a href="#" title="Email"><img src="<?php echo SFSI_PLUGURL; ?>images/<?php echo $email_image; ?>" alt="Email" class="icon_img" /></a>
130
+ </li>
131
+ <?php break; ?><?php case 'facebook' :?>
132
+ <li class="facebook_section " data-index="<?php echo $index; ?>" id="sfsi_facebookIcon_order">
133
+ <a href="#" title="Facebook"><img src="<?php echo SFSI_PLUGURL; ?>images/facebook.png" alt="Facebook" /></a>
134
+ </li>
135
+ <?php break; ?><?php case 'twitter' :?>
136
+ <li class="twitter_section " data-index="<?php echo $index; ?>" id="sfsi_twitterIcon_order">
137
+ <a href="#" title="Twitter" ><img src="<?php echo SFSI_PLUGURL; ?>images/twitter.png" alt="Twitter" /></a>
138
+ </li>
139
+ <?php break; ?><?php case 'youtube' :?>
140
+ <li class="youtube_section " data-index="<?php echo $index; ?>" id="sfsi_youtubeIcon_order">
141
+ <a href="#" title="YouTube" ><img src="<?php echo SFSI_PLUGURL; ?>images/youtube.png" alt="YouTube" /></a>
142
+ </li>
143
+ <?php break; ?><?php case 'pinterest' :?>
144
+ <li class="pinterest_section " data-index="<?php echo $index; ?>" id="sfsi_pinterestIcon_order">
145
+ <a href="#" title="Pinterest" ><img src="<?php echo SFSI_PLUGURL; ?>images/pinterest.png" alt="Pinterest" /></a>
146
+ </li>
147
+ <?php break; ?><?php case 'linkedin' :?>
148
+ <li class="linkedin_section " data-index="<?php echo $index; ?>" id="sfsi_linkedinIcon_order">
149
+ <a href="#" title="Linked In" ><img src="<?php echo SFSI_PLUGURL; ?>images/linked_in.png" alt="Linked In" /></a>
150
+ </li>
151
+ <?php break; ?><?php case 'instagram' :?>
152
+ <li class="instagram_section " data-index="<?php echo $index; ?>" id="sfsi_instagramIcon_order">
153
+ <a href="#" title="Instagram" ><img src="<?php echo SFSI_PLUGURL; ?>images/instagram.png" alt="Instagram" /></a>
154
+ </li>
155
+ <?php break; ?><?php case 'telegram' :?>
156
+ <li class="telegram_section " data-index="<?php echo $index; ?>" id="sfsi_telegramIcon_order">
157
+ <a href="#" title="telegram" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_telegram.png" height="54px;" alt="telegram" /></a>
158
+ </li>
159
+ <?php break; ?><?php case 'vk' :?>
160
+ <li class="vk_section " data-index="<?php echo $index; ?>" id="sfsi_vkIcon_order">
161
+ <a href="#" title="vk" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_vk.png" height="54px;" alt="vk" /></a>
162
+ </li>
163
+ <?php break; ?><?php case 'ok' :?>
164
+ <li class="ok_section " data-index="<?php echo $index; ?>" id="sfsi_okIcon_order">
165
+ <a href="#" title="ok" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_ok.png" height="54px;" alt="ok" /></a>
166
+ </li>
167
+ <?php break; ?><?php case 'weibo' :?>
168
+ <li class="weibo_section " data-index="<?php echo $index; ?>" id="sfsi_weiboIcon_order">
169
+ <a href="#" title="weibo" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_weibo.png" height="54px;" alt="weibo" /></a>
170
+ </li>
171
+ <?php break; ?><?php case 'wechat' :?>
172
+ <li class="wechat_section " data-index="<?php echo $index; ?>" id="sfsi_wechatIcon_order">
173
+ <a href="#" title="wechat" ><img src="<?php echo SFSI_PLUGURL; ?>images/icons_theme/default/default_wechat.png" height="54px;" alt="wechat" /></a>
174
+ </li>
175
+ <?php break; ?><?php default :?><?php if(isset($icons[$icn['ele']]) && !empty($icons[$icn['ele']]) && filter_var($icons[$icn['ele']], FILTER_VALIDATE_URL) ): ?>
176
+ <li class="custom_iconOrder sfsiICON_<?php echo $icn['ele']; ?>" data-index="<?php echo $index; ?>" element-id="<?php echo $icn['ele']; ?>" >
177
+ <a href="#" title="Custom Icon" ><img src="<?php echo $icons[$icn['ele']]; ?>" alt="Linked In" class="sfcm" /></a>
178
+ </li>
179
+ <?php endif; ?><?php break; ?><?php endswitch; ?><?php endforeach; ?>
180
+
181
+ </ul> <!-- END icon drag drop section start here -->
182
+
183
+ <span class="drag_drp">(Drag &amp; Drop)</span>
184
+ <!-- icon's size and spacing section start here -->
185
+ <div class="row">
186
+ <h4>Size &amp; spacing of your icons</h4>
187
+ <div class="icons_size"><span>Size:</span><input name="sfsi_icons_size" value="<?php echo ($option5['sfsi_icons_size']!='') ? $option5['sfsi_icons_size'] : '' ;?>" type="text" /><ins>pixels wide &amp; tall</ins> <span class="last">Spacing between icons:</span><input name="sfsi_icons_spacing" type="text" value="<?php echo ($option5['sfsi_icons_spacing']!='') ? $option5['sfsi_icons_spacing'] : '' ;?>" /><ins>Pixels</ins></div>
188
+
189
+ <div class="icons_prem_disc">
190
+ <p class="sfsi_prem_plu_desc"><b>New: </b>The Premium Plugin also allows you to define the vertical distance between the icons (and set this differently for mobile vs. desktop): <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" style="cursor:pointer;border-bottom: 1px solid #12a252;color: #12a252 !important;font-weight:bold" class="sfisi_font_bold" target="_blank">Go premium now.<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_spacings&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more.</a>
191
+ </div>
192
+
193
+ </div>
194
+
195
+ <div class="row">
196
+ <h4>Alignments</h4>
197
+ <div class="icons_size">
198
+ <div style="width: 210px;float: left;position: relative;">
199
+ <span>Alignment of icons:</span>
200
+ <ins class="sfsi_icons_other_allign" style="position: absolute;bottom: -22px;left: 0;width: 200px;color: rgb(128,136,145);">
201
+ (with respect to each other)
202
+ </ins>
203
+ </div>
204
+ <div class="field">
205
+ <select name="sfsi_icons_Alignment" id="sfsi_icons_Alignment" class="styled">
206
+ <option value="center" <?php echo ($option5['sfsi_icons_Alignment']=='center') ? 'selected="selected"' : '' ;?>>Centered</option>
207
+ <option value="right" <?php echo ($option5['sfsi_icons_Alignment']=='right') ? 'selected="selected"' : '' ;?>>Right</option>
208
+ <option value="left" <?php echo ($option5['sfsi_icons_Alignment']=='left') ? 'selected="selected"' : '' ;?>>Left</option>
209
+ </select>
210
+ </div>
211
+ <span>Icons per row:</span>
212
+ <input name="sfsi_icons_perRow" type="text" value="<?php echo ($option5['sfsi_icons_perRow']!='') ? $option5['sfsi_icons_perRow'] : '' ;?>" />
213
+ <ins class="leave_empty">Leave empty if you don't want to <br /> define this</ins>
214
+ </div>
215
+
216
+ <div class= "sfsi_new_prmium_follw" style="margin-top: 38px;">
217
+ <p><b>New: </b>The Premium Plugin gives several more alignment options: <br>- &nbsp;&nbsp; Show icons vertically<br>- &nbsp;&nbsp; Align icons within a widget (left, right, centered)<br>- &nbsp;&nbsp; Align icons within the «container» where you place them via shortcode (left, right, centered) <br><a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_alignment_options&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
218
+ </div>
219
+
220
+ </div>
221
+
222
+ <div class="row new_wind">
223
+ <h4>New window</h4>
224
+ <div class="row_onl"><p>If a user clicks on your icons, do you want to open the page in a new window?
225
+ </p>
226
+ <ul class="enough_waffling">
227
+ <li>
228
+ <input name="sfsi_icons_ClickPageOpen" <?php echo ($option5['sfsi_icons_ClickPageOpen']=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
229
+ <label>Yes</label>
230
+ </li>
231
+ <li>
232
+ <input name="sfsi_icons_ClickPageOpen" <?php echo ($option5['sfsi_icons_ClickPageOpen']=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
233
+ <label>No</label>
234
+ </li>
235
+ </ul>
236
+ </div>
237
+ </div>
238
+
239
+
240
+ <!-- icon's floating and stick section start here -->
241
+ <div class="row sticking">
242
+
243
+ <h4>Sticky icons</h4>
244
+
245
+ <div class="clear float_options" <?php if($option5['sfsi_icons_stick']=='yes') :?> style="display:none" <?php endif;?>>
246
+
247
+
248
+ </div>
249
+
250
+ <div class="space">
251
+
252
+ <p class="list">Make icons stick?</p>
253
+
254
+ <ul class="enough_waffling">
255
+
256
+ <li>
257
+ <input name="sfsi_icons_stick" <?php echo ($option5['sfsi_icons_stick']=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
258
+ <label>Yes</label>
259
+ </li>
260
+
261
+ <li>
262
+ <input name="sfsi_icons_stick" <?php echo ($option5['sfsi_icons_stick']=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
263
+ <label>No</label>
264
+ </li>
265
+
266
+ </ul>
267
+
268
+ <p>
269
+ If you select «Yes» here, then the icons which you placed via <span style="text-decoration: underline;"><b>widget</b></span> or <span style="text-decoration: underline;"><b>shortcode</b></span> will still be visible on the screen as user scrolls down your page, i.e. they will stick at the top.</p>
270
+
271
+ <p>
272
+ This is not to be confused with making the icons permanently placed in the same position, which is possible in the <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium"><b>Premium Plugin</b></a>.
273
+ </p>
274
+
275
+ </div>
276
+
277
+
278
+ </div><!-- END icon's floating and stick section -->
279
+
280
+ <!--************* Sharing texts & pictures section STARTS *****************************-->
281
+
282
+ <div class="row sfsi_custom_social_data_setting" id="custom_social_data_setting">
283
+
284
+ <h4>Sharing texts & pictures?</h4>
285
+ <p>On the pages where you edit your posts/pages, you’ll see a (new) section where you can define which pictures & text should be shared. This extra section is displayed on the following:</p>
286
+
287
+ <?php
288
+ $checkedS = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? 'checked="checked"': '';
289
+ $checked = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? '': 'checked="checked"';
290
+ $checkedVal = (isset($option5['sfsi_custom_social_hide'])) ? $option5['sfsi_custom_social_hide']: 'no';
291
+ ?>
292
+ <div class="social_data_post_types">
293
+ <ul class="socialPostTypesUl">
294
+ <li>
295
+ <div class="radio_section tb_4_ck">
296
+ <input type="checkbox" <?php echo $checked; ?> value="page" class="styled" />
297
+ <label class="cstmdsplsub">Page</label>
298
+ </div>
299
+ </li>
300
+ <li>
301
+ <div class="radio_section tb_4_ck">
302
+ <input type="checkbox" <?php echo $checked; ?> value="post" class="styled" />
303
+ <label class="cstmdsplsub">Post</label>
304
+ </div>
305
+ </li>
306
+ </ul>
307
+
308
+ <ul class="sfsi_show_hide_section">
309
+ <li>
310
+ <div class="radio_section tb_4_ck">
311
+ <input name="sfsi_custom_social_hide" type="checkbox" <?php echo $checkedS; ?> value="<?php echo $checkedVal; ?>" class="styled" />
312
+ <label class="cstmdsplsub">Hide section for all</label>
313
+ </div>
314
+ </li>
315
+ </ul>
316
+ </div>
317
+
318
+ <div class="sfsi_new_prmium_follw sfsi_social_sharing" style="margin-bottom: 15px;">
319
+ <p>Note: This feature is currently only available in the Premium Plugin. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=define_pic_and_text&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a>
320
+ </p>
321
+ </div>
322
+ </div>
323
+
324
+ <!--******************** Sharing texts & pictures section CLOSES ************************************************-->
325
+
326
+ <!-- mouse over text section start here -->
327
+ <div class="row mouse_txt">
328
+ <h4>Mouseover text</h4>
329
+ <p>
330
+ If you’ve given your icon only one function (i.e. no pop-up where user can perform different actions) then you can define
331
+ here what text will be displayed if a user moves his mouse over the icon:
332
+ </p>
333
+ <div class="space">
334
+ <div class="clear"></div>
335
+ <div class="mouseover_field rss_section">
336
+ <label>RSS:</label><input name="sfsi_rss_MouseOverText" value="<?php echo ($option5['sfsi_rss_MouseOverText']!='') ? $option5['sfsi_rss_MouseOverText'] : '' ;?>" type="text" />
337
+ </div>
338
+ <div class="mouseover_field email_section">
339
+ <label>Email:</label><input name="sfsi_email_MouseOverText" value="<?php echo ($option5['sfsi_email_MouseOverText']!='') ? $option5['sfsi_email_MouseOverText'] : '' ;?>" type="text" />
340
+ </div>
341
+
342
+ <div class="clear">
343
+ <div class="mouseover_field twitter_section">
344
+ <label>Twitter:</label>
345
+ <input name="sfsi_twitter_MouseOverText" value="<?php echo ($option5['sfsi_twitter_MouseOverText']!='') ? $option5['sfsi_twitter_MouseOverText'] : '' ;?>" type="text" />
346
+ </div>
347
+ <div class="mouseover_field facebook_section">
348
+ <label>Facebook:</label>
349
+ <input name="sfsi_facebook_MouseOverText" value="<?php echo ($option5['sfsi_facebook_MouseOverText']!='') ? $option5['sfsi_facebook_MouseOverText'] : '' ;?>" type="text" />
350
+ </div>
351
+ </div>
352
+ <div class="clear">
353
+ <div class="mouseover_field linkedin_section">
354
+ <label>LinkedIn:</label>
355
+ <input name="sfsi_linkedIn_MouseOverText" value="<?php echo ($option5['sfsi_linkedIn_MouseOverText']!='') ? $option5['sfsi_linkedIn_MouseOverText'] : '' ;?>" type="text" />
356
+ </div>
357
+ </div>
358
+ <div class="clear">
359
+ <div class="mouseover_field pinterest_section">
360
+ <label>Pinterest:</label>
361
+ <input name="sfsi_pinterest_MouseOverText" value="<?php echo ($option5['sfsi_pinterest_MouseOverText']!='') ? $option5['sfsi_pinterest_MouseOverText'] : '' ;?>" type="text" />
362
+ </div>
363
+ <div class="mouseover_field youtube_section">
364
+ <label>Youtube:</label>
365
+ <input name="sfsi_youtube_MouseOverText" value="<?php echo ($option5['sfsi_youtube_MouseOverText']!='') ? $option5['sfsi_youtube_MouseOverText'] : '' ;?>" type="text" />
366
+ </div>
367
+ </div>
368
+ <div class="clear">
369
+ <div class="mouseover_field instagram_section">
370
+ <label>Instagram:</label>
371
+ <input name="sfsi_instagram_MouseOverText" value="<?php echo ($option5['sfsi_instagram_MouseOverText']!='') ? $option5['sfsi_instagram_MouseOverText'] : '' ;?>" type="text" />
372
+ </div>
373
+ <div class="mouseover_field telegram_section">
374
+ <label>Telegram:</label>
375
+ <input name="sfsi_telegram_MouseOverText" value="<?php echo ($option5['sfsi_telegram_MouseOverText']!='') ? $option5['sfsi_telegram_MouseOverText'] : '' ;?>" type="text" />
376
+ </div>
377
+ </div>
378
+ <div class="clear">
379
+ <div class="mouseover_field vk_section">
380
+ <label>VK:</label>
381
+ <input name="sfsi_vk_MouseOverText" value="<?php echo ($option5['sfsi_vk_MouseOverText']!='') ? $option5['sfsi_vk_MouseOverText'] : '' ;?>" type="text" />
382
+ </div>
383
+ <div class="mouseover_field ok_section">
384
+ <label>Ok:</label>
385
+ <input name="sfsi_ok_MouseOverText" value="<?php echo ($option5['sfsi_ok_MouseOverText']!='') ? $option5['sfsi_ok_MouseOverText'] : '' ;?>" type="text" />
386
+ </div>
387
+ </div>
388
+ <div class="clear">
389
+ <div class="mouseover_field weibo_section">
390
+ <label>Weibo:</label>
391
+ <input name="sfsi_weibo_MouseOverText" value="<?php echo ($option5['sfsi_weibo_MouseOverText']!='') ? $option5['sfsi_weibo_MouseOverText'] : '' ;?>" type="text" />
392
+ </div>
393
+ <div class="mouseover_field wechat_section">
394
+ <label>WeChat:</label>
395
+ <input name="sfsi_wechat_MouseOverText" value="<?php echo ($option5['sfsi_wechat_MouseOverText']!='') ? $option5['sfsi_wechat_MouseOverText'] : '' ;?>" type="text" />
396
+ </div>
397
+ </div>
398
+ <div class="clear"> </div>
399
+ <div class="custom_m">
400
+ <?php
401
+ $sfsiMouseOverTexts = unserialize($option5['sfsi_custom_MouseOverTexts']);
402
+ $count = 1; for($i=$first_key; $i <= $endkey; $i++) :
403
+ ?><?php if(!empty( $icons[$i])) : ?>
404
+
405
+ <div class="mouseover_field custom_section sfsiICON_<?php echo $i; ?>">
406
+ <label>Custom <?php echo $count; ?>:</label>
407
+ <input name="sfsi_custom_MouseOverTexts[]" value="<?php echo (isset($sfsiMouseOverTexts[$i]) && $sfsiMouseOverTexts[$i]!='') ?sanitize_text_field($sfsiMouseOverTexts[$i]) : '' ;?>" type="text" file-id="<?php echo $i; ?>" />
408
+ </div>
409
+
410
+ <?php if($count%2==0): ?>
411
+
412
+ <div class="clear"> </div>
413
+ <?php endif; ?><?php $count++; endif; endfor; ?>
414
+ </div>
415
+
416
+ </div>
417
+
418
+ </div>
419
+ <!-- END mouse over text section -->
420
+
421
+ <div class="row new_wind">
422
+ <h4>Error reporting</h4>
423
+ <div class="row_onl"><p>Suppress error messages?</p>
424
+ <ul class="enough_waffling">
425
+ <li>
426
+ <input name="sfsi_icons_suppress_errors" <?php echo ($sfsi_icons_suppress_errors=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" />
427
+ <label>Yes</label>
428
+ </li>
429
+ <li>
430
+ <input name="sfsi_icons_suppress_errors" <?php echo ($sfsi_icons_suppress_errors=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" />
431
+ <label>No</label>
432
+ </li>
433
+ </ul>
434
+ </div>
435
+ </div>
436
+
437
+ <?php sfsi_ask_for_help(5); ?>
438
+ <!-- SAVE BUTTON SECTION -->
439
+ <div class="save_button">
440
+ <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
441
+ <?php $nonce = wp_create_nonce("update_step5"); ?>
442
+ <a href="javascript:;" id="sfsi_save5" title="Save" data-nonce="<?php echo $nonce;?>">Save</a>
443
+ </div>
444
+ <!-- END SAVE BUTTON SECTION -->
445
+
446
+ <a class="sfsiColbtn closeSec" href="javascript:;" >Collapse area</a>
447
+ <label class="closeSec"></label>
448
+
449
+ <!-- ERROR AND SUCCESS MESSAGE AREA-->
450
+ <p class="red_txt errorMsg" style="display:none"> </p>
451
+ <p class="green_txt sucMsg" style="display:none"> </p>
452
+ <div class="clear"></div>
453
+
454
+ </div>
455
+ <!-- END Section 5 "Any other wishes for your main icons?"-->
views/sfsi_option_view6.php CHANGED
@@ -1,498 +1,498 @@
1
- <?php
2
- /* unserialize all saved option for section 6 options */
3
-
4
- $option6 = unserialize(get_option('sfsi_section6_options', false));
5
-
6
- /**
7
-
8
- * Sanitize, escape and validate values
9
-
10
- */
11
-
12
- $option6['sfsi_show_Onposts'] = (isset($option6['sfsi_show_Onposts'])) ? sanitize_text_field($option6['sfsi_show_Onposts']) : 'no';
13
-
14
- $option6['sfsi_show_Onbottom'] = (isset($option6['sfsi_show_Onbottom'])) ? sanitize_text_field($option6['sfsi_show_Onbottom']) : '';
15
-
16
- $option6['sfsi_icons_postPositon'] = (isset($option6['sfsi_icons_postPositon'])) ? sanitize_text_field($option6['sfsi_icons_postPositon']) : '';
17
-
18
- $option6['sfsi_icons_alignment'] = (isset($option6['sfsi_icons_alignment'])) ? sanitize_text_field($option6['sfsi_icons_alignment']) : '';
19
-
20
- $option6['sfsi_rss_countsDisplay'] = (isset($option6['sfsi_rss_countsDisplay'])) ? sanitize_text_field($option6['sfsi_rss_countsDisplay']) : '';
21
-
22
- $option6['sfsi_textBefor_icons'] = (isset($option6['sfsi_textBefor_icons'])) ? sanitize_text_field($option6['sfsi_textBefor_icons']) : '';
23
-
24
- $option6['sfsi_icons_DisplayCounts'] = (isset($option6['sfsi_icons_DisplayCounts'])) ? sanitize_text_field($option6['sfsi_icons_DisplayCounts']) : '';
25
-
26
- $option6['sfsi_rectsub'] = (isset($option6['sfsi_rectsub'])) ? sanitize_text_field($option6['sfsi_rectsub']) : '';
27
-
28
- $option6['sfsi_rectfb'] = (isset($option6['sfsi_rectfb'])) ? sanitize_text_field($option6['sfsi_rectfb']) : '';
29
-
30
- $option6['sfsi_rectshr'] = (isset($option6['sfsi_rectshr'])) ? sanitize_text_field($option6['sfsi_rectshr']) : '';
31
-
32
- $option6['sfsi_recttwtr'] = (isset($option6['sfsi_recttwtr'])) ? sanitize_text_field($option6['sfsi_recttwtr']) : '';
33
-
34
- $option6['sfsi_rectpinit'] = (isset($option6['sfsi_rectpinit'])) ? sanitize_text_field($option6['sfsi_rectpinit']) : '';
35
-
36
- $option6['sfsi_rectfbshare'] = (isset($option6['sfsi_rectfbshare'])) ? sanitize_text_field($option6['sfsi_rectfbshare']) : '';
37
-
38
- $option6['sfsi_display_button_type'] = (isset($option6['sfsi_display_button_type']))
39
- ? sanitize_text_field($option6['sfsi_display_button_type'])
40
- : '';
41
- $option6['sfsi_show_premium_placement_box'] = (isset($option6['sfsi_show_premium_placement_box']))
42
- ? sanitize_text_field($option6['sfsi_show_premium_placement_box'])
43
- : 'yes';
44
- $option6['sfsi_responsive_icons_end_post'] = (isset($option6['sfsi_responsive_icons_end_post']))
45
- ? sanitize_text_field($option6['sfsi_responsive_icons_end_post'])
46
- : 'no';
47
- $option6['sfsi_share_count'] = (isset($option6['sfsi_share_count']))
48
- ? sanitize_text_field($option6['sfsi_share_count'])
49
- : 'no';
50
-
51
- $sfsi_responsive_icons_default = array(
52
- "default_icons" => array(
53
- "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
54
- "Twitter" => array("active" => "yes", "text" => "Tweet", "url" => ""),
55
- "Follow" => array("active" => "yes", "text" => "Follow us", "url" => ""),
56
- ),
57
- "custom_icons" => array(),
58
- "settings" => array(
59
- "icon_size" => "Medium",
60
- "icon_width_type" => "Fully responsive",
61
- "icon_width_size" => 240,
62
- "edge_type" => "Round",
63
- "edge_radius" => 5,
64
- "style" => "Gradient",
65
- "margin" => 10,
66
- "text_align" => "Centered",
67
- "show_count" => "no",
68
- "counter_color" => "#aaaaaa",
69
- "counter_bg_color" => "#fff",
70
- "share_count_text" => "SHARES"
71
- )
72
- );
73
- $sfsi_responsive_icons = (isset($option6["sfsi_responsive_icons"]) ? $option6["sfsi_responsive_icons"] : $sfsi_responsive_icons_default);
74
- if (!isset($option6['sfsi_rectsub'])) {
75
- $option6['sfsi_rectsub'] = 'no';
76
- }
77
-
78
- if (!isset($option6['sfsi_rectfb'])) {
79
- $option6['sfsi_rectfb'] = 'yes';
80
- }
81
-
82
- if (!isset($option6['sfsi_recttwtr'])) {
83
- $option6['sfsi_recttwtr'] = 'no';
84
- }
85
-
86
- if (!isset($option6['sfsi_rectpinit'])) {
87
- $option6['sfsi_rectpinit'] = 'no';
88
- }
89
-
90
- if (!isset($option6['sfsi_rectfbshare'])) {
91
- $option6['sfsi_rectfbshare'] = 'no';
92
- }
93
- ?>
94
- <!-- Section 6 "Do you want to display icons at the end of every post?" main div Start -->
95
-
96
- <div class="tab6">
97
- <ul class="sfsi_icn_listing8">
98
-
99
- <li class="sfsibeforeafterpostselector">
100
- <div class="radio_section tb_4_ck"></div>
101
- <div class="sfsi_right_info">
102
- <ul class="sfsi_tab_3_icns sfsi_shwthmbfraftr" style="margin:0">
103
- <li onclick="sfsi_togglbtmsection('sfsi_toggleonlystndrshrng, .sfsi_responsive_hide', 'sfsi_toggleonlyrspvshrng, .sfsi_responsive_show', this);" class="clckbltglcls sfsi_border_left_0">
104
- <input name="sfsi_display_button_type" <?php echo ($option6['sfsi_display_button_type'] == 'standard_buttons') ? 'checked="true"' : ''; ?> type="radio" value="standard_buttons" class="styled" />
105
- <label class="labelhdng4">
106
- Original icons
107
- </label>
108
- </li>
109
- <li onclick="sfsi_togglbtmsection('sfsi_toggleonlyrspvshrng, .sfsi_responsive_show', 'sfsi_toggleonlystndrshrng, .sfsi_responsive_hide', this);" class="clckbltglcls sfsi_border_left_0">
110
- <input name="sfsi_display_button_type" <?php echo ($option6['sfsi_display_button_type'] == 'responsive_button') ? 'checked="true"' : ''; ?> type="radio" value="responsive_button" class="styled" />
111
- <label class="labelhdng4">
112
- Responsive icons
113
- </label>
114
- </li>
115
- <?php if ($option6['sfsi_display_button_type'] == 'standard_buttons') : $display = "display:block";
116
- else : $display = "display:none";
117
- endif; ?>
118
- <li class="sfsi_toggleonlystndrshrng sfsi_border_left_0" style="<?php echo $display; ?>">
119
- <div class="radiodisplaysection" style="<?php echo $display; ?>">
120
-
121
- <p class="cstmdisplaysharingtxt cstmdisextrpdng">
122
- The selections you made so far were to display the subscriptions/ social media icons for your site in general (in a widget on the sidebar). You can also display icons at the end of every post, encouraging users to subscribe/like/share after they’ve read it. The following buttons will be added:
123
- </p>
124
-
125
- <!-- icons example section -->
126
- <div class="social_icon_like1 cstmdsplyulwpr sfsi_center">
127
-
128
- <ul>
129
- <li>
130
- <div class="radio_section tb_4_ck"><input name="sfsi_rectsub" <?php echo ($option6['sfsi_rectsub'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectsub" type="checkbox" value="yes" class="styled" /></div>
131
-
132
- <a href="#" title="Subscribe Follow" class="cstmdsplsub">
133
- <img src="<?php echo SFSI_PLUGURL; ?>images/follow_subscribe.png" alt="Subscribe Follow" />
134
- </a>
135
- </li>
136
- <li>
137
- <div class="radio_section tb_4_ck"><input name="sfsi_rectfb" <?php echo ($option6['sfsi_rectfb'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectfb" type="checkbox" value="yes" class="styled" /></div>
138
-
139
- <a href="#" title="Facebook Like">
140
- <img src="<?php echo SFSI_PLUGURL; ?>images/like.jpg" alt="Facebook Like" />
141
- </a>
142
- </li>
143
- <li>
144
- <div class="radio_section tb_4_ck"><input name="sfsi_rectfbshare" <?php echo ($option6['sfsi_rectfbshare'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectfbshare" type="checkbox" value="yes" class="styled" /></div>
145
- <a href="#" title="Facebook Share">
146
- <img src="<?php echo SFSI_PLUGURL; ?>images/fbshare.png" alt="Facebook Share" />
147
- </a>
148
- </li>
149
-
150
- <li>
151
-
152
- <div class="radio_section tb_4_ck"><input name="sfsi_recttwtr" <?php echo ($option6['sfsi_recttwtr'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_recttwtr" type="checkbox" value="yes" class="styled" /></div>
153
-
154
- <a href="#" title="twitter" class="cstmdspltwtr">
155
-
156
- <img src="<?php echo SFSI_PLUGURL; ?>images/twiiter.png" alt="Twitter like" />
157
- </a>
158
-
159
- </li>
160
-
161
- <li>
162
-
163
- <div class="radio_section tb_4_ck"><input name="sfsi_rectpinit" <?php echo ($option6['sfsi_rectpinit'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectpinit" type="checkbox" value="yes" class="styled" /></div>
164
-
165
- <a href="#" title="Pin It">
166
- <img src="<?php echo SFSI_PLUGURL; ?>images/pinit.png" alt="Pin It" />
167
- </a>
168
- </li>
169
- </ul>
170
- </div><!-- icons position section -->
171
-
172
- <p class="clear">Those are usually all you need: </p>
173
-
174
- <ul class="usually">
175
- <li>1. The follow-icon ensures that your visitors subscribe to your newsletter</li>
176
- <li>2. Facebook is No.1 in «liking», so it’s a must have</li>
177
- <li>3. The Tweet-button allows quick tweeting of your article</li>
178
- <li></li>
179
- <li></li>
180
- </ul>
181
- <?php if ($option6['sfsi_show_premium_placement_box'] == 'yes') { ?>
182
- <p class="sfsi_prem_plu_desc ">
183
- <b>New: </b>We also added a Linkedin share-icon in the Premium Plugin. <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" style="border-bottom: 1px solid #12a252;color: #12a252 !important;cursor:pointer;" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usm_settings_page&utm_campaign=linkedin_icon&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more</a>
184
- </p>
185
- <?php } ?>
186
- <div class="options">
187
- <label class="heading-label" style="width:auto!important;margin-top: 11px;margin-right: 11px;">
188
- <b>So: do you want to display those at the end of every post?</b>
189
- </label>
190
- <ul style="display:flex">
191
- <li style="min-width: 200px">
192
- <input name="sfsi_show_Onposts" <?php echo ($option6['sfsi_show_Onposts'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
193
- <label class="labelhdng4" style="width: auto;">
194
- Yes
195
- </label>
196
- </li>
197
- <li>
198
- <input name="sfsi_show_Onposts" <?php echo ($option6['sfsi_show_Onposts'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
199
- <label class="labelhdng4" style="width: auto;">
200
- No
201
- </label>
202
- </li>
203
-
204
- </div>
205
- <div class="row PostsSettings_section">
206
-
207
- <h4>Options:</h4>
208
-
209
- <div class="options">
210
-
211
- <label class="first">Text to appear before the sharing icons:</label><input name="sfsi_textBefor_icons" type="text" value="<?php echo ($option6['sfsi_textBefor_icons'] != '') ? $option6['sfsi_textBefor_icons'] : ''; ?>" />
212
-
213
- </div>
214
-
215
- <!-- by developer - 28-05-2019 -->
216
-
217
- <div class="options">
218
- <p><b>New:</b> In the Premium Plugin you can choose to display the text before the sharing icons in a font of your choice. You can also define the<b> font size, type</b>, and the <b>margins below/above the icons</b>. <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_placement_options&utm_medium=banner" target="_blank" style="color:#00a0d2 !important; text-decoration: none !important;">Check it out.</a></p>
219
- </div>
220
-
221
- <!-- end -->
222
- <div class="options">
223
- <label>Alignment of share icons: </label>
224
- <div class="field"><select name="sfsi_icons_alignment" id="sfsi_icons_alignment" class="styled">
225
- <option value="left" <?php echo ($option6['sfsi_icons_alignment'] == 'left') ? 'selected="selected"' : ''; ?>>Left</option>
226
- <!--<option value="center" <?php //echo ($option6['sfsi_icons_alignment']=='center') ? 'selected="selected"' : '' ;
227
- ?>>Center</option>-->
228
- <option value="right" <?php echo ($option6['sfsi_icons_alignment'] == 'right') ? 'selected="selected"' : ''; ?>>Right</option>
229
- </select>
230
- </div>
231
- </div>
232
- <div class="options">
233
-
234
- <label>Do you want to display the counts?</label>
235
- <div class="field"><select name="sfsi_icons_DisplayCounts" id="sfsi_icons_DisplayCounts" class="styled">
236
- <option value="yes" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'yes') ? 'selected="true"' : ''; ?>>YES</option>
237
- <option value="no" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'no') ? 'selected="true"' : ''; ?>>NO</option>
238
- </select>
239
- </div>
240
- </div>
241
-
242
- </div>
243
- <!-- by developer - 28-5-2019 -->
244
-
245
- <div class="sfsi_new_prmium_follw">
246
- <p><b>New:</b> In our Premium Plugin you have many more placement options, e.g. place the icons you selected under question 1, place them also on your homepage (instead of only post’s pages), place them before posts (instead of only after posts) etc. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">See all features</a><!-- <a href="https://www.ultimatelysocial.com/usm-premium/?https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_placement_options&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a> -->
247
- </p>
248
- </div>
249
- </div>
250
- </li>
251
- <?php if ($option6['sfsi_display_button_type'] == 'responsive_button') : $display = "display:block";
252
- else : $display = "display:none";
253
- endif; ?>
254
- <li class="sfsi_toggleonlyrspvshrng" style="<?php echo $display; ?>">
255
- <label style="width: 80%;width:calc( 100% - 102px );font-family: helveticaregular;font-size: 18px;color: #5c6267;margin: 10px 0px;">These are responsive & independent from the icons you selected elsewhere in the plugin. Preview:</label>
256
- <div style="width: 80%; margin-left:5px; width:calc( 100% - 102px );">
257
- <div class="sfsi_responsive_icon_preview" style="width:calc( 100% - 50px )">
258
-
259
- <?php echo sfsi_social_responsive_buttons(null, $option6, true); ?>
260
- </div> <!-- end sfsi_responsive_icon_preview -->
261
- </div>
262
- <ul >
263
- <li class="sfsi_responsive_default_icon_container sfsi_border_left_0 " style="margin: 10px 0px">
264
- <label class="heading-label select-icons">
265
- Select Icons
266
- </label>
267
- </li>
268
- <?php foreach ($sfsi_responsive_icons['default_icons'] as $icon => $icon_config) :
269
- ?>
270
- <li class="sfsi_responsive_default_icon_container sfsi_vertical_center sfsi_border_left_0">
271
- <div class="radio_section tb_4_ck">
272
- <input name="sfsi_responsive_<?php echo $icon; ?>_display" <?php echo ($icon_config['active'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_responsive_<?php echo $icon; ?>_display" type="checkbox" value="yes" class="styled" data-icon="<?php echo $icon; ?>" />
273
- </div>
274
- <span class="sfsi_icon_container">
275
- <div class="sfsi_responsive_icon_item_container sfsi_responsive_icon_<?php echo strtolower($icon); ?>_container" style="word-break:break-all;padding-left:0">
276
- <div style="display: inline-block;height: 40px;width: 40px;text-align: center;vertical-align: middle!important;float: left;">
277
- <img style="float:none" src="<?php echo SFSI_PLUGURL; ?>images/responsive-icon/<?php echo $icon; ?><?php echo 'Follow' === $icon ? '.png' : '.svg'; ?>"></div>
278
- <span> <?php echo $icon_config["text"]; ?> </span>
279
- </div>
280
- </span>
281
- <input type="text" class="sfsi_responsive_input" name="sfsi_responsive_<?php echo $icon ?>_input" value="<?php echo $icon_config["text"]; ?>" />
282
- <a href="#" class="sfsi_responsive_default_url_toggler" style="text-decoration: none;">Define URL*</a>
283
- <input style="display:none" class="sfsi_responsive_url_input" type="text" placeholder="Enter url" name="sfsi_responsive_<?php echo $icon ?>_url_input" value="<?php echo $icon_config["url"]; ?>" />
284
- <a href="#" class="sfsi_responsive_default_url_hide" style="display:none"><span class="sfsi_cancel_text">Cancel</span><span class="sfsi_cancel_icon">&times;</span></a>
285
- </li>
286
-
287
- <?php endforeach; ?>
288
- </ul>
289
- &nbsp;
290
- <p style="font-size:16px !important;padding-top: 0px;">
291
- <span>* All icons have «sharing» feature enabled by default. If you want to give them a different function (e.g link to your Facebook page) then please click on «Define url» next to the icon.</span>
292
- </p>
293
- <?php if ($option6['sfsi_show_premium_placement_box'] == 'yes') { ?>
294
- <div class="sfsi_new_prmium_follw" style="width: 91%;">
295
- <p style="font-size:20px !important">
296
- <b>New: </b>In the Premium Plugin, we also added: Pinterest, Linkedin, WhatsApp, VK, OK, Telegram, Weibo, WeChat, Xing and the option to add custom icons. There are more important options to add custom icons. There are more placement options too, e.g. place the responsive icons before/after posts/pages, show them only on desktop/mobile, insert them manually (via shortcode).<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=responsive_icons&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> See all features</a>
297
- </p>
298
- </div>
299
- <?php } ?>
300
-
301
- <div class="options">
302
- <label class="heading-label" style="width:auto!important;margin-top: 11px;margin-right: 11px;">
303
- <b>So: do you want to display those at the end of every post?</b>
304
- </label>
305
- <ul style="display:flex">
306
- <li style="min-width: 200px">
307
- <input name="sfsi_responsive_icons_end_post" <?php echo ($option6['sfsi_responsive_icons_end_post'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
308
- <label class="labelhdng4" style="width: auto;">
309
- Yes
310
- </label>
311
- </li>
312
- <li>
313
- <input name="sfsi_responsive_icons_end_post" <?php echo ($option6['sfsi_responsive_icons_end_post'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
314
- <label class="labelhdng4" style="width: auto;">
315
- No
316
- </label>
317
- </li>
318
- </div>
319
- </li>
320
-
321
- <!-- sfsi_responsive_icons_end_post -->
322
- <li class="sfsi_responsive_icon_option_li sfsi_responsive_show " style="<?php echo ($option6['sfsi_responsive_icons_end_post'] == 'yes')?'display:block':'display:none' ?>">
323
- <label class="options heading-label" style="margin: 0px 0px 12px 0px;">
324
- Design options
325
- </label>
326
- <div class="options sfsi_margin_top_0 ">
327
- <label class="first">
328
- Icons size:
329
- </label>
330
- <div class="field">
331
- <div style="display:inline-block">
332
- <select name="sfsi_responsive_icons_settings_icon_size" class="styled">
333
- <option value="Small" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Small") ? 'selected="selected"' : ""; ?>>
334
- Small
335
- </option>
336
- <option value="Medium" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Medium") ? 'selected="selected"' : ""; ?>>
337
- Medium
338
- </option>
339
- <option value="Large" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Large") ? 'selected="selected"' : ""; ?>>
340
- Large
341
- </option>
342
- </select>
343
- </div>
344
- </div>
345
- </div>
346
-
347
- <div class="options sfsi_margin_top_0 ">
348
- <label class="first">
349
- Icons width:
350
- </label>
351
- <div class="field">
352
- <div style="display:inline-block">
353
- <select name="sfsi_responsive_icons_settings_icon_width_type" class="styled">
354
- <option value="Fixed icon width" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] === "Fixed icon width") ? 'selected="selected"' : ""; ?>>
355
- Fixed icon width
356
- </option>
357
- <option value="Fully responsive" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] === "Fully responsive") ? 'selected="selected"' : ""; ?>>
358
- Fully responsive
359
- </option>
360
- </select>
361
- </div>
362
- <div class="sfsi_responsive_icons_icon_width sfsi_inputSec" style='display:<?php echo (isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] == 'Fully responsive') ? 'none' : 'inline-block'; ?>'>
363
- <span style="width:auto!important">of</span>
364
- <input type="number" value="<?php echo isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_size"]) ? $sfsi_responsive_icons["settings"]["icon_width_size"] : 140; ?>" name="sfsi_responsive_icons_sttings_icon_width_size" style="float:none" />
365
- </select>
366
- <span class="sfsi_span_after_input">pixels</span>
367
- </div>
368
- </div>
369
- </div>
370
- <div class="options sfsi_inputSec textBefor_icons_fontcolor sfsi_margin_top_0">
371
- <label class="first">
372
- Edges:
373
- </label>
374
- <div class="field">
375
- <div style="display:inline-block">
376
- <select name="sfsi_responsive_icons_settings_edge_type" class="styled">
377
- <option value="Round" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] === "Round") ? 'selected="selected"' : ""; ?>>
378
- Round
379
- </option>
380
- <option value="Sharp" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] === "Sharp") ? 'selected="selected"' : ""; ?>>
381
- Sharp
382
- </option>
383
- </select>
384
- </div>
385
- <span style="width:auto!important;font-size: 17px;color: #5A6570; <?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>">with border radius</span>
386
- </div>
387
- <div class="field-sfsi_responsive_icons_settings_edge_radius" style="position:absolute;margin-left: 6px;<?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : 'display:inline-block'; ?>">
388
- <select name="sfsi_responsive_icons_settings_edge_radius" id="sfsi_icons_alignment" class="styled">
389
- <?php for ($i = 1; $i <= 20; $i++) : ?>
390
- <option value="<?php echo $i; ?>" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_radius"]) && $sfsi_responsive_icons["settings"]["edge_radius"] == $i) ? 'selected="selected"' : ''; ?>>
391
- <?php echo $i; ?>
392
- </option>
393
- <?php endfor; ?>
394
- </select>
395
- </div>
396
- <!-- <span style=" <?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>">pixels</span> -->
397
-
398
- </div>
399
-
400
- <div class="options sfsi_margin_top_0">
401
- <label class="first">
402
- Style:
403
- </label>
404
- <div class="field">
405
- <div style="display:inline-block">
406
- <select name="sfsi_responsive_icons_settings_style" class="styled">
407
- <option value="Flat" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["style"]) && $sfsi_responsive_icons["settings"]["style"] === "Flat") ? 'selected="selected"' : ""; ?>>
408
- Flat
409
- </option>
410
- <option value="Gradient" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["style"]) && $sfsi_responsive_icons["settings"]["style"] === "Gradient") ? 'selected="selected"' : ""; ?>>
411
- Gradient
412
- </option>
413
- </select>
414
- </div>
415
- </div>
416
- </div>
417
-
418
- <div class="options sfsi_margin_top_0 sfsi_inputSec">
419
- <label class="first">
420
- Margin between icons:
421
- </label>
422
- <div class="field">
423
- <input type="number" value="<?php echo isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["margin"]) ? $sfsi_responsive_icons["settings"]["margin"] : 0; ?>" name="sfsi_responsive_icons_settings_margin" style="float:none" />
424
- <span class="span_after_input">pixels</span>
425
- </div>
426
- </div>
427
-
428
- <div class="options sfsi_margin_top_0">
429
- <label class="first">
430
- Text on icons:
431
- </label>
432
- <div class="field">
433
- <div style="display:inline-block">
434
- <select name="sfsi_responsive_icons_settings_text_align" class="styled">
435
- <option value="Left aligned" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["text_align"]) && $sfsi_responsive_icons["settings"]["text_align"] === "Left aligned") ? 'selected="selected"' : ""; ?>>
436
- Left aligned
437
- </option>
438
- <option value="Centered" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["text_align"]) && $sfsi_responsive_icons["settings"]["text_align"] === "Centered") ? 'selected="selected"' : ""; ?>>
439
- Centered
440
- </option>
441
- </select>
442
- </div>
443
- </div>
444
- </div>
445
- </li>
446
- <li class="sfsi_responsive_icon_option_li sfsi_responsive_show" style="<?php echo $display; ?>">
447
- <label class=" options heading-label">
448
- Share count
449
- </label>
450
- <div class="options sfsi_margin_top_0">
451
- <label style="width:auto!important;font-size: 16px;">
452
- Show the total share count on the left of your icons. It will only be visible if the individual counts are set up under <a href="#" style="text-decoration: none;font-size: 16px;" onclick="event.preventDefault();sfsi_scroll_to_div(\'ui-id-9\')">question 5</a>.
453
- </label>
454
-
455
- </div>
456
- <ul class="sfsi_tab_3_icns sfsi_shwthmbfraftr ">
457
- <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl(null ,'sfsi_premium_responsive_icon_share_count', this);sfsi_responsive_toggle_count();" >
458
- <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
459
- <label class="labelhdng4">
460
- Yes
461
- </label>
462
- </li>
463
- <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl('sfsi_responsive_icon_share_count', null, this);sfsi_responsive_toggle_count();">
464
- <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
465
- <label class="labelhdng4">
466
- No
467
- </label>
468
- </li>
469
- </ul>
470
- </li>
471
- </div>
472
- </li>
473
- </ul>
474
-
475
- <?php sfsi_ask_for_help(8); ?>
476
-
477
- <!-- SAVE BUTTON SECTION -->
478
- <div class="save_button">
479
- <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
480
- <?php $nonce = wp_create_nonce("update_step6"); ?>
481
- <a href="javascript:;" id="sfsi_save6" title="Save" data-nonce="<?php echo $nonce; ?>">
482
- Save
483
- </a>
484
- </div>
485
- <!-- END SAVE BUTTON SECTION -->
486
-
487
- <a class="sfsiColbtn closeSec" href="javascript:;">
488
- Collapse area
489
- </a>
490
- <label class="closeSec"></label>
491
-
492
- <!-- ERROR AND SUCCESS MESSAGE AREA-->
493
- <p class="red_txt errorMsg" style="display:none"> </p>
494
- <p class="green_txt sucMsg" style="display:none"> </p>
495
- <div class="clear"></div>
496
-
497
- </div>
498
  <!-- END Section 6 "Do you want to display icons at the end of every post?" -->
1
+ <?php
2
+ /* unserialize all saved option for section 6 options */
3
+
4
+ $option6 = unserialize(get_option('sfsi_section6_options', false));
5
+
6
+ /**
7
+
8
+ * Sanitize, escape and validate values
9
+
10
+ */
11
+
12
+ $option6['sfsi_show_Onposts'] = (isset($option6['sfsi_show_Onposts'])) ? sanitize_text_field($option6['sfsi_show_Onposts']) : 'no';
13
+
14
+ $option6['sfsi_show_Onbottom'] = (isset($option6['sfsi_show_Onbottom'])) ? sanitize_text_field($option6['sfsi_show_Onbottom']) : '';
15
+
16
+ $option6['sfsi_icons_postPositon'] = (isset($option6['sfsi_icons_postPositon'])) ? sanitize_text_field($option6['sfsi_icons_postPositon']) : '';
17
+
18
+ $option6['sfsi_icons_alignment'] = (isset($option6['sfsi_icons_alignment'])) ? sanitize_text_field($option6['sfsi_icons_alignment']) : '';
19
+
20
+ $option6['sfsi_rss_countsDisplay'] = (isset($option6['sfsi_rss_countsDisplay'])) ? sanitize_text_field($option6['sfsi_rss_countsDisplay']) : '';
21
+
22
+ $option6['sfsi_textBefor_icons'] = (isset($option6['sfsi_textBefor_icons'])) ? sanitize_text_field($option6['sfsi_textBefor_icons']) : '';
23
+
24
+ $option6['sfsi_icons_DisplayCounts'] = (isset($option6['sfsi_icons_DisplayCounts'])) ? sanitize_text_field($option6['sfsi_icons_DisplayCounts']) : '';
25
+
26
+ $option6['sfsi_rectsub'] = (isset($option6['sfsi_rectsub'])) ? sanitize_text_field($option6['sfsi_rectsub']) : '';
27
+
28
+ $option6['sfsi_rectfb'] = (isset($option6['sfsi_rectfb'])) ? sanitize_text_field($option6['sfsi_rectfb']) : '';
29
+
30
+ $option6['sfsi_rectshr'] = (isset($option6['sfsi_rectshr'])) ? sanitize_text_field($option6['sfsi_rectshr']) : '';
31
+
32
+ $option6['sfsi_recttwtr'] = (isset($option6['sfsi_recttwtr'])) ? sanitize_text_field($option6['sfsi_recttwtr']) : '';
33
+
34
+ $option6['sfsi_rectpinit'] = (isset($option6['sfsi_rectpinit'])) ? sanitize_text_field($option6['sfsi_rectpinit']) : '';
35
+
36
+ $option6['sfsi_rectfbshare'] = (isset($option6['sfsi_rectfbshare'])) ? sanitize_text_field($option6['sfsi_rectfbshare']) : '';
37
+
38
+ $option6['sfsi_display_button_type'] = (isset($option6['sfsi_display_button_type']))
39
+ ? sanitize_text_field($option6['sfsi_display_button_type'])
40
+ : '';
41
+ $option6['sfsi_show_premium_placement_box'] = (isset($option6['sfsi_show_premium_placement_box']))
42
+ ? sanitize_text_field($option6['sfsi_show_premium_placement_box'])
43
+ : 'yes';
44
+ $option6['sfsi_responsive_icons_end_post'] = (isset($option6['sfsi_responsive_icons_end_post']))
45
+ ? sanitize_text_field($option6['sfsi_responsive_icons_end_post'])
46
+ : 'no';
47
+ $option6['sfsi_share_count'] = (isset($option6['sfsi_share_count']))
48
+ ? sanitize_text_field($option6['sfsi_share_count'])
49
+ : 'no';
50
+
51
+ $sfsi_responsive_icons_default = array(
52
+ "default_icons" => array(
53
+ "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
54
+ "Twitter" => array("active" => "yes", "text" => "Tweet", "url" => ""),
55
+ "Follow" => array("active" => "yes", "text" => "Follow us", "url" => ""),
56
+ ),
57
+ "custom_icons" => array(),
58
+ "settings" => array(
59
+ "icon_size" => "Medium",
60
+ "icon_width_type" => "Fully responsive",
61
+ "icon_width_size" => 240,
62
+ "edge_type" => "Round",
63
+ "edge_radius" => 5,
64
+ "style" => "Gradient",
65
+ "margin" => 10,
66
+ "text_align" => "Centered",
67
+ "show_count" => "no",
68
+ "counter_color" => "#aaaaaa",
69
+ "counter_bg_color" => "#fff",
70
+ "share_count_text" => "SHARES"
71
+ )
72
+ );
73
+ $sfsi_responsive_icons = (isset($option6["sfsi_responsive_icons"]) ? $option6["sfsi_responsive_icons"] : $sfsi_responsive_icons_default);
74
+ if (!isset($option6['sfsi_rectsub'])) {
75
+ $option6['sfsi_rectsub'] = 'no';
76
+ }
77
+
78
+ if (!isset($option6['sfsi_rectfb'])) {
79
+ $option6['sfsi_rectfb'] = 'yes';
80
+ }
81
+
82
+ if (!isset($option6['sfsi_recttwtr'])) {
83
+ $option6['sfsi_recttwtr'] = 'no';
84
+ }
85
+
86
+ if (!isset($option6['sfsi_rectpinit'])) {
87
+ $option6['sfsi_rectpinit'] = 'no';
88
+ }
89
+
90
+ if (!isset($option6['sfsi_rectfbshare'])) {
91
+ $option6['sfsi_rectfbshare'] = 'no';
92
+ }
93
+ ?>
94
+ <!-- Section 6 "Do you want to display icons at the end of every post?" main div Start -->
95
+
96
+ <div class="tab6">
97
+ <ul class="sfsi_icn_listing8">
98
+
99
+ <li class="sfsibeforeafterpostselector">
100
+ <div class="radio_section tb_4_ck"></div>
101
+ <div class="sfsi_right_info">
102
+ <ul class="sfsi_tab_3_icns sfsi_shwthmbfraftr" style="margin:0">
103
+ <li onclick="sfsi_togglbtmsection('sfsi_toggleonlystndrshrng, .sfsi_responsive_hide', 'sfsi_toggleonlyrspvshrng, .sfsi_responsive_show', this);" class="clckbltglcls sfsi_border_left_0">
104
+ <input name="sfsi_display_button_type" <?php echo ($option6['sfsi_display_button_type'] == 'standard_buttons') ? 'checked="true"' : ''; ?> type="radio" value="standard_buttons" class="styled" />
105
+ <label class="labelhdng4">
106
+ Original icons
107
+ </label>
108
+ </li>
109
+ <li onclick="sfsi_togglbtmsection('sfsi_toggleonlyrspvshrng, .sfsi_responsive_show', 'sfsi_toggleonlystndrshrng, .sfsi_responsive_hide', this);" class="clckbltglcls sfsi_border_left_0">
110
+ <input name="sfsi_display_button_type" <?php echo ($option6['sfsi_display_button_type'] == 'responsive_button') ? 'checked="true"' : ''; ?> type="radio" value="responsive_button" class="styled" />
111
+ <label class="labelhdng4">
112
+ Responsive icons
113
+ </label>
114
+ </li>
115
+ <?php if ($option6['sfsi_display_button_type'] == 'standard_buttons') : $display = "display:block";
116
+ else : $display = "display:none";
117
+ endif; ?>
118
+ <li class="sfsi_toggleonlystndrshrng sfsi_border_left_0" style="<?php echo $display; ?>">
119
+ <div class="radiodisplaysection" style="<?php echo $display; ?>">
120
+
121
+ <p class="cstmdisplaysharingtxt cstmdisextrpdng">
122
+ The selections you made so far were to display the subscriptions/ social media icons for your site in general (in a widget on the sidebar). You can also display icons at the end of every post, encouraging users to subscribe/like/share after they’ve read it. The following buttons will be added:
123
+ </p>
124
+
125
+ <!-- icons example section -->
126
+ <div class="social_icon_like1 cstmdsplyulwpr sfsi_center">
127
+
128
+ <ul>
129
+ <li>
130
+ <div class="radio_section tb_4_ck"><input name="sfsi_rectsub" <?php echo ($option6['sfsi_rectsub'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectsub" type="checkbox" value="yes" class="styled" /></div>
131
+
132
+ <a href="#" title="Subscribe Follow" class="cstmdsplsub">
133
+ <img src="<?php echo SFSI_PLUGURL; ?>images/follow_subscribe.png" alt="Subscribe Follow" />
134
+ </a>
135
+ </li>
136
+ <li>
137
+ <div class="radio_section tb_4_ck"><input name="sfsi_rectfb" <?php echo ($option6['sfsi_rectfb'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectfb" type="checkbox" value="yes" class="styled" /></div>
138
+
139
+ <a href="#" title="Facebook Like">
140
+ <img src="<?php echo SFSI_PLUGURL; ?>images/like.jpg" alt="Facebook Like" />
141
+ </a>
142
+ </li>
143
+ <li>
144
+ <div class="radio_section tb_4_ck"><input name="sfsi_rectfbshare" <?php echo ($option6['sfsi_rectfbshare'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectfbshare" type="checkbox" value="yes" class="styled" /></div>
145
+ <a href="#" title="Facebook Share">
146
+ <img src="<?php echo SFSI_PLUGURL; ?>images/fbshare.png" alt="Facebook Share" />
147
+ </a>
148
+ </li>
149
+
150
+ <li>
151
+
152
+ <div class="radio_section tb_4_ck"><input name="sfsi_recttwtr" <?php echo ($option6['sfsi_recttwtr'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_recttwtr" type="checkbox" value="yes" class="styled" /></div>
153
+
154
+ <a href="#" title="twitter" class="cstmdspltwtr">
155
+
156
+ <img src="<?php echo SFSI_PLUGURL; ?>images/twiiter.png" alt="Twitter like" />
157
+ </a>
158
+
159
+ </li>
160
+
161
+ <li>
162
+
163
+ <div class="radio_section tb_4_ck"><input name="sfsi_rectpinit" <?php echo ($option6['sfsi_rectpinit'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_rectpinit" type="checkbox" value="yes" class="styled" /></div>
164
+
165
+ <a href="#" title="Pin It">
166
+ <img src="<?php echo SFSI_PLUGURL; ?>images/pinit.png" alt="Pin It" />
167
+ </a>
168
+ </li>
169
+ </ul>
170
+ </div><!-- icons position section -->
171
+
172
+ <p class="clear">Those are usually all you need: </p>
173
+
174
+ <ul class="usually">
175
+ <li>1. The follow-icon ensures that your visitors subscribe to your newsletter</li>
176
+ <li>2. Facebook is No.1 in «liking», so it’s a must have</li>
177
+ <li>3. The Tweet-button allows quick tweeting of your article</li>
178
+ <li></li>
179
+ <li></li>
180
+ </ul>
181
+ <?php if ($option6['sfsi_show_premium_placement_box'] == 'yes') { ?>
182
+ <p class="sfsi_prem_plu_desc ">
183
+ <b>New: </b>We also added a Linkedin share-icon in the Premium Plugin. <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" style="border-bottom: 1px solid #12a252;color: #12a252 !important;cursor:pointer;" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usm_settings_page&utm_campaign=linkedin_icon&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more</a>
184
+ </p>
185
+ <?php } ?>
186
+ <div class="options">
187
+ <label class="heading-label" style="width:auto!important;margin-top: 11px;margin-right: 11px;">
188
+ <b>So: do you want to display those at the end of every post?</b>
189
+ </label>
190
+ <ul style="display:flex">
191
+ <li style="min-width: 200px">
192
+ <input name="sfsi_show_Onposts" <?php echo ($option6['sfsi_show_Onposts'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
193
+ <label class="labelhdng4" style="width: auto;">
194
+ Yes
195
+ </label>
196
+ </li>
197
+ <li>
198
+ <input name="sfsi_show_Onposts" <?php echo ($option6['sfsi_show_Onposts'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
199
+ <label class="labelhdng4" style="width: auto;">
200
+ No
201
+ </label>
202
+ </li>
203
+
204
+ </div>
205
+ <div class="row PostsSettings_section">
206
+
207
+ <h4>Options:</h4>
208
+
209
+ <div class="options">
210
+
211
+ <label class="first">Text to appear before the sharing icons:</label><input name="sfsi_textBefor_icons" type="text" value="<?php echo ($option6['sfsi_textBefor_icons'] != '') ? $option6['sfsi_textBefor_icons'] : ''; ?>" />
212
+
213
+ </div>
214
+
215
+ <!-- by developer - 28-05-2019 -->
216
+
217
+ <div class="options">
218
+ <p><b>New:</b> In the Premium Plugin you can choose to display the text before the sharing icons in a font of your choice. You can also define the<b> font size, type</b>, and the <b>margins below/above the icons</b>. <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_placement_options&utm_medium=banner" target="_blank" style="color:#00a0d2 !important; text-decoration: none !important;">Check it out.</a></p>
219
+ </div>
220
+
221
+ <!-- end -->
222
+ <div class="options">
223
+ <label>Alignment of share icons: </label>
224
+ <div class="field"><select name="sfsi_icons_alignment" id="sfsi_icons_alignment" class="styled">
225
+ <option value="left" <?php echo ($option6['sfsi_icons_alignment'] == 'left') ? 'selected="selected"' : ''; ?>>Left</option>
226
+ <!--<option value="center" <?php //echo ($option6['sfsi_icons_alignment']=='center') ? 'selected="selected"' : '' ;
227
+ ?>>Center</option>-->
228
+ <option value="right" <?php echo ($option6['sfsi_icons_alignment'] == 'right') ? 'selected="selected"' : ''; ?>>Right</option>
229
+ </select>
230
+ </div>
231
+ </div>
232
+ <div class="options">
233
+
234
+ <label>Do you want to display the counts?</label>
235
+ <div class="field"><select name="sfsi_icons_DisplayCounts" id="sfsi_icons_DisplayCounts" class="styled">
236
+ <option value="yes" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'yes') ? 'selected="true"' : ''; ?>>YES</option>
237
+ <option value="no" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'no') ? 'selected="true"' : ''; ?>>NO</option>
238
+ </select>
239
+ </div>
240
+ </div>
241
+
242
+ </div>
243
+ <!-- by developer - 28-5-2019 -->
244
+
245
+ <div class="sfsi_new_prmium_follw">
246
+ <p><b>New:</b> In our Premium Plugin you have many more placement options, e.g. place the icons you selected under question 1, place them also on your homepage (instead of only post’s pages), place them before posts (instead of only after posts) etc. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">See all features</a><!-- <a href="https://www.ultimatelysocial.com/usm-premium/?https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_placement_options&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a> -->
247
+ </p>
248
+ </div>
249
+ </div>
250
+ </li>
251
+ <?php if ($option6['sfsi_display_button_type'] == 'responsive_button') : $display = "display:block";
252
+ else : $display = "display:none";
253
+ endif; ?>
254
+ <li class="sfsi_toggleonlyrspvshrng" style="<?php echo $display; ?>">
255
+ <label style="width: 80%;width:calc( 100% - 102px );font-family: helveticaregular;font-size: 18px;color: #5c6267;margin: 10px 0px;">These are responsive & independent from the icons you selected elsewhere in the plugin. Preview:</label>
256
+ <div style="width: 80%; margin-left:5px; width:calc( 100% - 102px );">
257
+ <div class="sfsi_responsive_icon_preview" style="width:calc( 100% - 50px )">
258
+
259
+ <?php echo sfsi_social_responsive_buttons(null, $option6, true); ?>
260
+ </div> <!-- end sfsi_responsive_icon_preview -->
261
+ </div>
262
+ <ul >
263
+ <li class="sfsi_responsive_default_icon_container sfsi_border_left_0 " style="margin: 10px 0px">
264
+ <label class="heading-label select-icons">
265
+ Select Icons
266
+ </label>
267
+ </li>
268
+ <?php foreach ($sfsi_responsive_icons['default_icons'] as $icon => $icon_config) :
269
+ ?>
270
+ <li class="sfsi_responsive_default_icon_container sfsi_vertical_center sfsi_border_left_0">
271
+ <div class="radio_section tb_4_ck">
272
+ <input name="sfsi_responsive_<?php echo $icon; ?>_display" <?php echo ($icon_config['active'] == 'yes') ? 'checked="true"' : ''; ?> id="sfsi_responsive_<?php echo $icon; ?>_display" type="checkbox" value="yes" class="styled" data-icon="<?php echo $icon; ?>" />
273
+ </div>
274
+ <span class="sfsi_icon_container">
275
+ <div class="sfsi_responsive_icon_item_container sfsi_responsive_icon_<?php echo strtolower($icon); ?>_container" style="word-break:break-all;padding-left:0">
276
+ <div style="display: inline-block;height: 40px;width: 40px;text-align: center;vertical-align: middle!important;float: left;">
277
+ <img style="float:none" src="<?php echo SFSI_PLUGURL; ?>images/responsive-icon/<?php echo $icon; ?><?php echo 'Follow' === $icon ? '.png' : '.svg'; ?>"></div>
278
+ <span> <?php echo $icon_config["text"]; ?> </span>
279
+ </div>
280
+ </span>
281
+ <input type="text" class="sfsi_responsive_input" name="sfsi_responsive_<?php echo $icon ?>_input" value="<?php echo $icon_config["text"]; ?>" />
282
+ <a href="#" class="sfsi_responsive_default_url_toggler" style="text-decoration: none;">Define URL*</a>
283
+ <input style="display:none" class="sfsi_responsive_url_input" type="text" placeholder="Enter url" name="sfsi_responsive_<?php echo $icon ?>_url_input" value="<?php echo $icon_config["url"]; ?>" />
284
+ <a href="#" class="sfsi_responsive_default_url_hide" style="display:none"><span class="sfsi_cancel_text">Cancel</span><span class="sfsi_cancel_icon">&times;</span></a>
285
+ </li>
286
+
287
+ <?php endforeach; ?>
288
+ </ul>
289
+ &nbsp;
290
+ <p style="font-size:16px !important;padding-top: 0px;">
291
+ <span>* All icons have «sharing» feature enabled by default. If you want to give them a different function (e.g link to your Facebook page) then please click on «Define url» next to the icon.</span>
292
+ </p>
293
+ <?php if ($option6['sfsi_show_premium_placement_box'] == 'yes') { ?>
294
+ <div class="sfsi_new_prmium_follw" style="width: 91%;">
295
+ <p style="font-size:20px !important">
296
+ <b>New: </b>In the Premium Plugin, we also added: Pinterest, Linkedin, WhatsApp, VK, OK, Telegram, Weibo, WeChat, Xing and the option to add custom icons. There are more important options to add custom icons. There are more placement options too, e.g. place the responsive icons before/after posts/pages, show them only on desktop/mobile, insert them manually (via shortcode).<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=responsive_icons&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> See all features</a>
297
+ </p>
298
+ </div>
299
+ <?php } ?>
300
+
301
+ <div class="options">
302
+ <label class="heading-label" style="width:auto!important;margin-top: 11px;margin-right: 11px;">
303
+ <b>So: do you want to display those at the end of every post?</b>
304
+ </label>
305
+ <ul style="display:flex">
306
+ <li style="min-width: 200px">
307
+ <input name="sfsi_responsive_icons_end_post" <?php echo ($option6['sfsi_responsive_icons_end_post'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
308
+ <label class="labelhdng4" style="width: auto;">
309
+ Yes
310
+ </label>
311
+ </li>
312
+ <li>
313
+ <input name="sfsi_responsive_icons_end_post" <?php echo ($option6['sfsi_responsive_icons_end_post'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
314
+ <label class="labelhdng4" style="width: auto;">
315
+ No
316
+ </label>
317
+ </li>
318
+ </div>
319
+ </li>
320
+
321
+ <!-- sfsi_responsive_icons_end_post -->
322
+ <li class="sfsi_responsive_icon_option_li sfsi_responsive_show " style="<?php echo ($option6['sfsi_responsive_icons_end_post'] == 'yes')?'display:block':'display:none' ?>">
323
+ <label class="options heading-label" style="margin: 0px 0px 12px 0px;">
324
+ Design options
325
+ </label>
326
+ <div class="options sfsi_margin_top_0 ">
327
+ <label class="first">
328
+ Icons size:
329
+ </label>
330
+ <div class="field">
331
+ <div style="display:inline-block">
332
+ <select name="sfsi_responsive_icons_settings_icon_size" class="styled">
333
+ <option value="Small" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Small") ? 'selected="selected"' : ""; ?>>
334
+ Small
335
+ </option>
336
+ <option value="Medium" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Medium") ? 'selected="selected"' : ""; ?>>
337
+ Medium
338
+ </option>
339
+ <option value="Large" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_size"]) && $sfsi_responsive_icons["settings"]["icon_size"] === "Large") ? 'selected="selected"' : ""; ?>>
340
+ Large
341
+ </option>
342
+ </select>
343
+ </div>
344
+ </div>
345
+ </div>
346
+
347
+ <div class="options sfsi_margin_top_0 ">
348
+ <label class="first">
349
+ Icons width:
350
+ </label>
351
+ <div class="field">
352
+ <div style="display:inline-block">
353
+ <select name="sfsi_responsive_icons_settings_icon_width_type" class="styled">
354
+ <option value="Fixed icon width" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] === "Fixed icon width") ? 'selected="selected"' : ""; ?>>
355
+ Fixed icon width
356
+ </option>
357
+ <option value="Fully responsive" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] === "Fully responsive") ? 'selected="selected"' : ""; ?>>
358
+ Fully responsive
359
+ </option>
360
+ </select>
361
+ </div>
362
+ <div class="sfsi_responsive_icons_icon_width sfsi_inputSec" style='display:<?php echo (isset($sfsi_responsive_icons["settings"]["icon_width_type"]) && $sfsi_responsive_icons["settings"]["icon_width_type"] == 'Fully responsive') ? 'none' : 'inline-block'; ?>'>
363
+ <span style="width:auto!important">of</span>
364
+ <input type="number" value="<?php echo isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["icon_width_size"]) ? $sfsi_responsive_icons["settings"]["icon_width_size"] : 140; ?>" name="sfsi_responsive_icons_sttings_icon_width_size" style="float:none" />
365
+ </select>
366
+ <span class="sfsi_span_after_input">pixels</span>
367
+ </div>
368
+ </div>
369
+ </div>
370
+ <div class="options sfsi_inputSec textBefor_icons_fontcolor sfsi_margin_top_0">
371
+ <label class="first">
372
+ Edges:
373
+ </label>
374
+ <div class="field">
375
+ <div style="display:inline-block">
376
+ <select name="sfsi_responsive_icons_settings_edge_type" class="styled">
377
+ <option value="Round" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] === "Round") ? 'selected="selected"' : ""; ?>>
378
+ Round
379
+ </option>
380
+ <option value="Sharp" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] === "Sharp") ? 'selected="selected"' : ""; ?>>
381
+ Sharp
382
+ </option>
383
+ </select>
384
+ </div>
385
+ <span style="width:auto!important;font-size: 17px;color: #5A6570; <?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>">with border radius</span>
386
+ </div>
387
+ <div class="field-sfsi_responsive_icons_settings_edge_radius" style="position:absolute;margin-left: 6px;<?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : 'display:inline-block'; ?>">
388
+ <select name="sfsi_responsive_icons_settings_edge_radius" id="sfsi_icons_alignment" class="styled">
389
+ <?php for ($i = 1; $i <= 20; $i++) : ?>
390
+ <option value="<?php echo $i; ?>" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["edge_radius"]) && $sfsi_responsive_icons["settings"]["edge_radius"] == $i) ? 'selected="selected"' : ''; ?>>
391
+ <?php echo $i; ?>
392
+ </option>
393
+ <?php endfor; ?>
394
+ </select>
395
+ </div>
396
+ <!-- <span style=" <?php echo (isset($sfsi_responsive_icons["settings"]["edge_type"]) && $sfsi_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>">pixels</span> -->
397
+
398
+ </div>
399
+
400
+ <div class="options sfsi_margin_top_0">
401
+ <label class="first">
402
+ Style:
403
+ </label>
404
+ <div class="field">
405
+ <div style="display:inline-block">
406
+ <select name="sfsi_responsive_icons_settings_style" class="styled">
407
+ <option value="Flat" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["style"]) && $sfsi_responsive_icons["settings"]["style"] === "Flat") ? 'selected="selected"' : ""; ?>>
408
+ Flat
409
+ </option>
410
+ <option value="Gradient" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["style"]) && $sfsi_responsive_icons["settings"]["style"] === "Gradient") ? 'selected="selected"' : ""; ?>>
411
+ Gradient
412
+ </option>
413
+ </select>
414
+ </div>
415
+ </div>
416
+ </div>
417
+
418
+ <div class="options sfsi_margin_top_0 sfsi_inputSec">
419
+ <label class="first">
420
+ Margin between icons:
421
+ </label>
422
+ <div class="field">
423
+ <input type="number" value="<?php echo isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["margin"]) ? $sfsi_responsive_icons["settings"]["margin"] : 0; ?>" name="sfsi_responsive_icons_settings_margin" style="float:none" />
424
+ <span class="span_after_input">pixels</span>
425
+ </div>
426
+ </div>
427
+
428
+ <div class="options sfsi_margin_top_0">
429
+ <label class="first">
430
+ Text on icons:
431
+ </label>
432
+ <div class="field">
433
+ <div style="display:inline-block">
434
+ <select name="sfsi_responsive_icons_settings_text_align" class="styled">
435
+ <option value="Left aligned" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["text_align"]) && $sfsi_responsive_icons["settings"]["text_align"] === "Left aligned") ? 'selected="selected"' : ""; ?>>
436
+ Left aligned
437
+ </option>
438
+ <option value="Centered" <?php echo (isset($sfsi_responsive_icons["settings"]) && isset($sfsi_responsive_icons["settings"]["text_align"]) && $sfsi_responsive_icons["settings"]["text_align"] === "Centered") ? 'selected="selected"' : ""; ?>>
439
+ Centered
440
+ </option>
441
+ </select>
442
+ </div>
443
+ </div>
444
+ </div>
445
+ </li>
446
+ <li class="sfsi_responsive_icon_option_li sfsi_responsive_show" style="<?php echo $display; ?>">
447
+ <label class=" options heading-label">
448
+ Share count
449
+ </label>
450
+ <div class="options sfsi_margin_top_0">
451
+ <label style="width:auto!important;font-size: 16px;">
452
+ Show the total share count on the left of your icons. It will only be visible if the individual counts are set up under <a href="#" style="text-decoration: none;font-size: 16px;" onclick="event.preventDefault();sfsi_scroll_to_div(\'ui-id-9\')">question 5</a>.
453
+ </label>
454
+
455
+ </div>
456
+ <ul class="sfsi_tab_3_icns sfsi_shwthmbfraftr ">
457
+ <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl(null ,'sfsi_premium_responsive_icon_share_count', this);sfsi_responsive_toggle_count();" >
458
+ <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
459
+ <label class="labelhdng4">
460
+ Yes
461
+ </label>
462
+ </li>
463
+ <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl('sfsi_responsive_icon_share_count', null, this);sfsi_responsive_toggle_count();">
464
+ <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
465
+ <label class="labelhdng4">
466
+ No
467
+ </label>
468
+ </li>
469
+ </ul>
470
+ </li>
471
+ </div>
472
+ </li>
473
+ </ul>
474
+
475
+ <?php sfsi_ask_for_help(8); ?>
476
+
477
+ <!-- SAVE BUTTON SECTION -->
478
+ <div class="save_button">
479
+ <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
480
+ <?php $nonce = wp_create_nonce("update_step6"); ?>
481
+ <a href="javascript:;" id="sfsi_save6" title="Save" data-nonce="<?php echo $nonce; ?>">
482
+ Save
483
+ </a>
484
+ </div>
485
+ <!-- END SAVE BUTTON SECTION -->
486
+
487
+ <a class="sfsiColbtn closeSec" href="javascript:;">
488
+ Collapse area
489
+ </a>
490
+ <label class="closeSec"></label>
491
+
492
+ <!-- ERROR AND SUCCESS MESSAGE AREA-->
493
+ <p class="red_txt errorMsg" style="display:none"> </p>
494
+ <p class="green_txt sucMsg" style="display:none"> </p>
495
+ <div class="clear"></div>
496
+
497
+ </div>
498
  <!-- END Section 6 "Do you want to display icons at the end of every post?" -->
views/sfsi_option_view8.php CHANGED
@@ -1,955 +1,955 @@
1
- <?php
2
-
3
- /* unserialize all saved option for section 8 options */
4
-
5
- $option8 = unserialize(get_option('sfsi_section8_options', false));
6
-
7
- $feedId = sanitize_text_field(get_option('sfsi_feed_id', false));
8
-
9
- /*
10
-
11
- * Sanitize, escape and validate values
12
-
13
- */
14
-
15
- $option8['sfsi_form_adjustment'] = (isset($option8['sfsi_form_adjustment'])) ? sanitize_text_field($option8['sfsi_form_adjustment']) : '';
16
-
17
- $option8['sfsi_form_height'] = (isset($option8['sfsi_form_height'])) ? intval($option8['sfsi_form_height']) : '';
18
-
19
- $option8['sfsi_form_width'] = (isset($option8['sfsi_form_width'])) ? intval($option8['sfsi_form_width']) : '';
20
-
21
- $option8['sfsi_form_border'] = (isset($option8['sfsi_form_border'])) ? sanitize_text_field($option8['sfsi_form_border']) : '';
22
-
23
- $option8['sfsi_form_border_thickness'] = (isset($option8['sfsi_form_border_thickness'])) ? intval($option8['sfsi_form_border_thickness']) : '';
24
-
25
- $option8['sfsi_form_border_color'] = (isset($option8['sfsi_form_border_color'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_border_color']) : '';
26
-
27
- $option8['sfsi_form_background'] = (isset($option8['sfsi_form_background'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_background']) : '';
28
-
29
- $option8['sfsi_form_heading_text'] = (isset($option8['sfsi_form_heading_text'])) ? sanitize_text_field($option8['sfsi_form_heading_text']) : '';
30
-
31
- $option8['sfsi_form_heading_font'] = (isset($option8['sfsi_form_heading_font'])) ? sanitize_text_field($option8['sfsi_form_heading_font']) : '';
32
-
33
- $option8['sfsi_form_heading_fontstyle'] = (isset($option8['sfsi_form_heading_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_heading_fontstyle']) : '';
34
-
35
- $option8['sfsi_form_heading_fontcolor'] = (isset($option8['sfsi_form_heading_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_heading_fontcolor']) : '';
36
-
37
- $option8['sfsi_form_heading_fontsize'] = (isset($option8['sfsi_form_heading_fontsize'])) ? intval($option8['sfsi_form_heading_fontsize']) : '';
38
-
39
- $option8['sfsi_form_heading_fontalign'] = (isset($option8['sfsi_form_heading_fontalign'])) ? sanitize_text_field($option8['sfsi_form_heading_fontalign']) : '';
40
-
41
- $option8['sfsi_form_field_text'] = (isset($option8['sfsi_form_field_text'])) ? sanitize_text_field($option8['sfsi_form_field_text']) : '';
42
-
43
- $option8['sfsi_form_field_font'] = (isset($option8['sfsi_form_field_font'])) ? sanitize_text_field($option8['sfsi_form_field_font']) : '';
44
-
45
- $option8['sfsi_form_field_fontstyle'] = (isset($option8['sfsi_form_field_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_field_fontstyle']) : '';
46
-
47
- $option8['sfsi_form_field_fontcolor'] = (isset($option8['sfsi_form_field_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']) : '';
48
-
49
- $option8['sfsi_form_field_fontsize'] = (isset($option8['sfsi_form_field_fontsize'])) ? intval($option8['sfsi_form_field_fontsize']) : '';
50
-
51
- $option8['sfsi_form_field_fontalign'] = (isset($option8['sfsi_form_field_fontalign'])) ? sanitize_text_field($option8['sfsi_form_field_fontalign']) : '';
52
-
53
- $option8['sfsi_form_button_text'] = (isset($option8['sfsi_form_button_text'])) ? sanitize_text_field($option8['sfsi_form_button_text']) : '';
54
-
55
- $option8['sfsi_form_button_font'] = (isset($option8['sfsi_form_button_font'])) ? sanitize_text_field($option8['sfsi_form_button_font']) : '';
56
-
57
- $option8['sfsi_form_button_fontstyle'] = (isset($option8['sfsi_form_button_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_button_fontstyle']) : '';
58
-
59
- $option8['sfsi_form_button_fontcolor'] = (isset($option8['sfsi_form_button_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_button_fontcolor']) : '';
60
-
61
- $option8['sfsi_form_button_fontsize'] = (isset($option8['sfsi_form_button_fontsize'])) ? intval($option8['sfsi_form_button_fontsize']) : '';
62
-
63
- $option8['sfsi_form_button_fontalign'] = (isset($option8['sfsi_form_button_fontalign'])) ? sanitize_text_field($option8['sfsi_form_button_fontalign']) : '';
64
-
65
- $option8['sfsi_form_button_background'] = (isset($option8['sfsi_form_button_background'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_button_background']) : '';
66
-
67
- ?>
68
-
69
- <!-- Section 8 "Do you want to show a subscription form (increases sign ups)?" main div Start -->
70
-
71
- <div class="tab8">
72
-
73
- <div class="sfsi_curlerrorNotification">
74
-
75
- <?php sfsi_curl_error_notification(); ?>
76
-
77
- </div>
78
-
79
- <?php
80
-
81
- $connectToFeed = "http://www.specificfeeds.com/?" . base64_encode("userprofile=wordpress&feed_id=" . $feedId);
82
-
83
- ?>
84
-
85
- <p>
86
-
87
- In addition to the email- and follow-icon you can also show a subscription form which maximizes chances that people subscribe to your site.
88
-
89
- </p>
90
-
91
- <p class='sfsi_subscribe_popbox_link'>
92
-
93
- To get access to the emails who subscribe, interesting statistics about your subscribers, alerts when people subscribe or unsubscribe and to tailor the sender name & the subject line of the emails, please
94
-
95
- <a class="pop-up" href="javascript:" data-id="sfsi_feedClaimingOverlay">
96
-
97
- click here.
98
-
99
- </a>
100
-
101
- </p>
102
-
103
- <div class="sfsi_tab8_container">
104
-
105
- <!--Section 1-->
106
-
107
- <div class="sfsi_tab8_subcontainer">
108
-
109
- <!-- <h3 class="sfsi_section_title">Preview:</h3> -->
110
-
111
- <h4 class="sfsi_section_title">Preview:</h4>
112
-
113
- <div class="like_pop_box">
114
-
115
- <?php get_sfsiSubscriptionForm(); ?>
116
-
117
- </div>
118
-
119
- </div>
120
-
121
- <!--Section 2-->
122
-
123
- <div class="sfsi_tab8_subcontainer sfsi_seprater">
124
-
125
- <!-- <h3 class="sfsi_section_title">Place it on your site</h3> -->
126
-
127
- <h4 class="sfsi_section_title">Place it on your site</h4>
128
-
129
- <label class="sfsi_label_text">You can place the form by different methods:</label>
130
-
131
- <ul class="sfsi_form_info">
132
-
133
- <li><b>1. Widget:</b> Go to the <a target="_blank" href="<?php echo site_url() ?>/wp-admin/widgets.php">widget settings</a> and drag & drop it to the sidebar.
134
-
135
- </li>
136
-
137
- <li><b>2. Shortcode:</b> Use the shortcode <b>[USM_form]</b> to place it into your codes</li>
138
-
139
- <li><b>3. Copy & paste HTML code:</b></li>
140
-
141
- </ul>
142
-
143
- <div class="sfsi_html" style="display: none;">
144
-
145
- <?php
146
-
147
- $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
148
-
149
- $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
150
-
151
- $url = $url . $sfsi_feediid . '/8/';
152
-
153
- ?>
154
-
155
- <div class="sfsi_subscribe_Popinner" style="padding: 18px 0px;">
156
-
157
- <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="<?php echo $url ?>" style="margin: 0px 20px;">
158
-
159
- <h5 style="margin: 0 0 10px; padding: 0;">Get new posts by email:</h5>
160
-
161
- <div style="margin: 5px 0; width: 100%;">
162
-
163
- <input style="padding: 10px 0px !important; width: 100% !important;" type="email" placeholder="Enter your email" value="" name="data[Widget][email]" />
164
-
165
- </div>
166
-
167
- <div style="margin: 5px 0; width: 100%;">
168
-
169
- <input style="padding: 10px 0px !important; width: 100% !important;" type="submit" name="subscribe" value="Subscribe" /><input type="hidden" name="data[Widget][feed_id]" value="<?php echo $sfsi_feediid ?>"><input type="hidden" name="data[Widget][feedtype]" value="8">
170
-
171
- </div>
172
-
173
- </form>
174
-
175
- </div>
176
-
177
- </div>
178
-
179
- <div class="sfsi_subscription_html">
180
-
181
- <xmp id="selectable" onclick="selectText('selectable')">
182
-
183
- <?php get_sfsiSubscriptionForm(); ?>
184
-
185
- </xmp>
186
-
187
- </div>
188
-
189
- </div>
190
-
191
- <!--Section 3-->
192
-
193
- <div class="sfsi_tab8_subcontainer sfsi_seprater">
194
-
195
- <!-- <h3 class="sfsi_section_title">Define text & design (optional)</h3> -->
196
-
197
- <h4 class="sfsi_section_title">Define text & design (optional)</h4>
198
-
199
- <h5 class="sfsi_section_subtitle">Overall size & border</h5>
200
-
201
- <!--Left Section-->
202
-
203
- <div class="sfsi_left_container">
204
-
205
- <?php get_sfsiSubscriptionForm(); ?>
206
-
207
- </div>
208
-
209
- <!--Right Section-->
210
-
211
- <div class="sfsi_right_container">
212
-
213
- <div class="row_tab">
214
-
215
- <label class="sfsi_heding">Adjust size to space on the website?</label>
216
-
217
- <ul class="border_shadow">
218
-
219
- <li>
220
-
221
- <input type="radio" class="styled" value="yes" name="sfsi_form_adjustment" <?php echo isChecked($option8['sfsi_form_adjustment'], 'yes'); ?>>
222
-
223
- <label>Yes</label>
224
-
225
- </li>
226
-
227
- <li>
228
-
229
- <input type="radio" class="styled" value="no" name="sfsi_form_adjustment" <?php echo isChecked($option8['sfsi_form_adjustment'], 'no'); ?>>
230
-
231
- <label>No</label>
232
-
233
- </li>
234
-
235
- </ul>
236
-
237
- </div>
238
-
239
- <!--Row Section-->
240
-
241
- <div class="row_tab" style="<?php echo ($option8['sfsi_form_adjustment'] == 'yes') ? "display:none" : ''; ?>">
242
-
243
- <div class="sfsi_field">
244
-
245
- <label>Height</label>
246
-
247
- <input name="sfsi_form_height" type="text" value="<?php echo ($option8['sfsi_form_height'] != '') ? $option8['sfsi_form_height'] : ''; ?>" class="small rec-inp" /><span class="pix">pixels</span>
248
-
249
- </div>
250
-
251
- <div class="sfsi_field">
252
-
253
- <label>Width</label>
254
-
255
- <input name="sfsi_form_width" type="text" value="<?php echo ($option8['sfsi_form_width'] != '') ? $option8['sfsi_form_width'] : ''; ?>" class="small rec-inp" /><span class="pix">pixels</span>
256
-
257
- </div>
258
-
259
- </div>
260
-
261
- <!--Row Section-->
262
-
263
- <div class="row_tab">
264
-
265
- <label class="sfsi_heding">Border?</label>
266
-
267
- <ul class="border_shadow">
268
-
269
- <li>
270
-
271
- <input type="radio" class="styled" value="yes" name="sfsi_form_border" <?php echo isChecked($option8['sfsi_form_border'], 'yes'); ?>>
272
-
273
- <label>Yes</label>
274
-
275
- </li>
276
-
277
- <li>
278
-
279
- <input type="radio" class="styled" value="no" name="sfsi_form_border" <?php echo isChecked($option8['sfsi_form_border'], 'no'); ?>>
280
-
281
- <label>No</label>
282
-
283
- </li>
284
-
285
- </ul>
286
-
287
- </div>
288
-
289
- <!--Row Section-->
290
-
291
- <div class="row_tab" style="<?php echo ($option8['sfsi_form_border'] == 'no') ? "display:none" : ''; ?>">
292
-
293
- <div class="sfsi_field">
294
-
295
- <label>Thickness</label>
296
-
297
- <input name="sfsi_form_border_thickness" type="text" value="<?php echo ($option8['sfsi_form_border_thickness'] != '')
298
-
299
- ? $option8['sfsi_form_border_thickness'] : '';
300
-
301
- ?>" class="small rec-inp" /><span class="pix">pixels</span>
302
-
303
- </div>
304
-
305
- <div class="sfsi_field">
306
-
307
- <label>Color</label>
308
-
309
- <input id="sfsi_form_border_color" data-default-color="#b5b5b5" type="text" name="sfsi_form_border_color" value="<?php echo ($option8['sfsi_form_border_color'] != '')
310
-
311
- ? $option8['sfsi_form_border_color'] : '';
312
-
313
- ?>">
314
-
315
- <!--div class="color_box">
316
-
317
- <div class="corner"></div>
318
-
319
- <div id="sfsiFormBorderColor" class="color_box1" style="background: <?php
320
- ?>"></div>
321
-
322
- </div-->
323
-
324
- </div>
325
-
326
- </div>
327
-
328
- <!--Row Section-->
329
-
330
- <div class="row_tab">
331
-
332
- <label class="sfsi_heding autowidth">Background color:</label>
333
-
334
- <div class="sfsi_field">
335
-
336
- <input id="sfsi_form_background" data-default-color="#b5b5b5" type="text" name="sfsi_form_background" value="<?php echo ($option8['sfsi_form_background'] != '')
337
-
338
- ? $option8['sfsi_form_background'] : '';
339
-
340
- ?>">
341
-
342
- <!--div class="color_box">
343
-
344
- <div class="corner"></div>
345
-
346
- <div id="sfsiFormBackground" class="color_box1" style="background: <?php
347
- ?>"></div>
348
-
349
- </div-->
350
-
351
- </div>
352
-
353
- </div>
354
-
355
- <!--Row Section-->
356
-
357
- </div>
358
-
359
- </div>
360
-
361
- <!--Section 4-->
362
-
363
- <div class="sfsi_tab8_subcontainer sfsi_seprater">
364
-
365
- <h5 class="sfsi_section_subtitle">Text above the entry field</h5>
366
-
367
- <!--Left Section-->
368
-
369
- <div class="sfsi_left_container">
370
-
371
- <?php get_sfsiSubscriptionForm("h5"); ?>
372
-
373
- </div>
374
-
375
- <!--Right Section-->
376
-
377
- <div class="sfsi_right_container">
378
-
379
- <div class="row_tab">
380
-
381
- <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
382
-
383
- <div class="sfsi_field">
384
-
385
- <input type="text" class="small new-inp" name="sfsi_form_heading_text" value="<?php echo ($option8['sfsi_form_heading_text'] != '')
386
-
387
- ? $option8['sfsi_form_heading_text'] : '';
388
-
389
- ?>" />
390
-
391
- </div>
392
-
393
- </div>
394
-
395
- <!--Row Section-->
396
-
397
- <div class="row_tab">
398
-
399
- <div class="sfsi_field">
400
-
401
- <label class="sfsi_same_width">Font:</label>
402
-
403
- <?php sfsi_get_font("sfsi_form_heading_font", $option8['sfsi_form_heading_font']); ?>
404
-
405
- </div>
406
-
407
- <div class="sfsi_field">
408
-
409
- <label>Font style:</label>
410
-
411
- <?php sfsi_get_fontstyle("sfsi_form_heading_fontstyle", $option8['sfsi_form_heading_fontstyle']); ?>
412
-
413
- </div>
414
-
415
- </div>
416
-
417
- <!--Row Section-->
418
-
419
- <div class="row_tab">
420
-
421
- <div class="sfsi_field">
422
-
423
- <label class="sfsi_same_width">Font color:</label>
424
-
425
- <div class="sfsi_field" style="padding-top:0px;">
426
-
427
- <input type="text" name="sfsi_form_heading_fontcolor" data-default-color="#b5b5b5" id="sfsi_form_heading_fontcolor" value="<?php echo ($option8['sfsi_form_heading_fontcolor'] != '')
428
-
429
- ? $option8['sfsi_form_heading_fontcolor'] : '';
430
-
431
- ?>">
432
-
433
- </div>
434
-
435
- <!--div class="color_box">
436
-
437
- <div class="corner"></div>
438
-
439
- <div class="color_box1" id="sfsiFormHeadingFontcolor" style="background: <?php //echo ($option8['sfsi_form_heading_fontcolor']!='') ? $option8['sfsi_form_heading_fontcolor'] : '' ;
440
-
441
- ?>"></div>
442
-
443
- </div-->
444
-
445
- </div>
446
-
447
- <div class="sfsi_field">
448
-
449
- <label>Font size:</label>
450
-
451
- <input type="text" class="small rec-inp" name="sfsi_form_heading_fontsize" value="<?php echo ($option8['sfsi_form_heading_fontsize'] != '')
452
-
453
- ? $option8['sfsi_form_heading_fontsize'] : ''; ?>" />
454
-
455
- <span class="pix">pixels</span>
456
-
457
- </div>
458
-
459
- </div>
460
-
461
- <!--Row Section-->
462
-
463
- <div class="row_tab">
464
-
465
- <div class="sfsi_field">
466
-
467
- <label class="sfsi_same_width">Alignment:</label>
468
-
469
- <?php sfsi_get_alignment("sfsi_form_heading_fontalign", $option8['sfsi_form_heading_fontalign']); ?>
470
-
471
- </div>
472
-
473
- </div>
474
-
475
- <!--End Section-->
476
-
477
- </div>
478
-
479
- </div>
480
-
481
- <!--Section 5-->
482
-
483
- <div class="sfsi_tab8_subcontainer sfsi_seprater">
484
-
485
- <h5 class="sfsi_section_subtitle">Entry field</h5>
486
-
487
- <!--Left Section-->
488
-
489
- <div class="sfsi_left_container">
490
-
491
- <?php get_sfsiSubscriptionForm("email"); ?>
492
-
493
- </div>
494
-
495
- <!--Right Section-->
496
-
497
- <div class="sfsi_right_container">
498
-
499
- <div class="row_tab">
500
-
501
- <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
502
-
503
- <div class="sfsi_field">
504
-
505
- <input type="text" class="small new-inp" name="sfsi_form_field_text" value="<?php echo ($option8['sfsi_form_field_text'] != '')
506
-
507
- ? $option8['sfsi_form_field_text'] : '';
508
-
509
- ?>" />
510
-
511
- </div>
512
-
513
- </div>
514
-
515
- <!--Row Section-->
516
-
517
- <div class="row_tab">
518
-
519
- <div class="sfsi_field">
520
-
521
- <label class="sfsi_same_width">Font:</label>
522
-
523
- <?php sfsi_get_font("sfsi_form_field_font", $option8['sfsi_form_field_font']); ?>
524
-
525
- </div>
526
-
527
- <div class="sfsi_field">
528
-
529
- <label>Font style:</label>
530
-
531
- <?php sfsi_get_fontstyle("sfsi_form_field_fontstyle", $option8['sfsi_form_field_fontstyle']); ?>
532
-
533
- </div>
534
-
535
- </div>
536
-
537
- <!--Row Section-->
538
-
539
- <div class="row_tab">
540
-
541
- <input type="hidden" name="sfsi_form_field_fontcolor" value="">
542
-
543
- <!--<div class="sfsi_field">
544
-
545
- <label class="sfsi_same_width">Font color</label>
546
-
547
- <input type="text" name="sfsi_form_field_fontcolor" class="small color-code" id="sfsi_form_field_fontcolor" value="<?php //echo ($option8['sfsi_form_field_fontcolor']!='')
548
-
549
- //? $option8['sfsi_form_field_fontcolor'] : '' ;
550
-
551
- ?>">
552
-
553
- <div class="color_box">
554
-
555
- <div class="corner"></div>
556
-
557
- <div class="color_box1" id="sfsiFormFieldFontcolor" style="background: <?php //echo ($option8['sfsi_form_field_fontcolor']!='') ? $option8['sfsi_form_field_fontcolor'] : '' ;
558
-
559
- ?>"></div>
560
-
561
- </div>
562
-
563
- </div>-->
564
-
565
- <div class="sfsi_field">
566
-
567
- <label class="sfsi_same_width">Alignment:</label>
568
-
569
- <?php sfsi_get_alignment("sfsi_form_field_fontalign", $option8['sfsi_form_field_fontalign']); ?>
570
-
571
- </div>
572
-
573
- <div class="sfsi_field">
574
-
575
- <label>Font size:</label>
576
-
577
- <input type="text" class="small rec-inp" name="sfsi_form_field_fontsize" value="<?php echo ($option8['sfsi_form_field_fontsize'] != '')
578
-
579
- ? $option8['sfsi_form_field_fontsize'] : ''; ?>" />
580
-
581
- <span class="pix">pixels</span>
582
-
583
- </div>
584
-
585
- </div>
586
-
587
- <!--End Section-->
588
-
589
- </div>
590
-
591
- </div>
592
-
593
- <!--Section 6-->
594
-
595
- <div class="sfsi_tab8_subcontainer">
596
-
597
- <h5 class="sfsi_section_subtitle">Subscribe button</h5>
598
-
599
- <!--Left Section-->
600
-
601
- <div class="sfsi_left_container">
602
-
603
- <?php get_sfsiSubscriptionForm("submit"); ?>
604
-
605
- </div>
606
-
607
- <!--Right Section-->
608
-
609
- <div class="sfsi_right_container">
610
-
611
- <div class="row_tab">
612
-
613
- <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
614
-
615
- <div class="sfsi_field">
616
-
617
- <input type="text" class="small new-inp" name="sfsi_form_button_text" value="<?php echo ($option8['sfsi_form_button_text'] != '')
618
-
619
- ? $option8['sfsi_form_button_text'] : '';
620
-
621
- ?>" />
622
-
623
- </div>
624
-
625
- </div>
626
-
627
- <!--Row Section-->
628
-
629
- <div class="row_tab">
630
-
631
- <div class="sfsi_field">
632
-
633
- <label class="sfsi_same_width">Font:</label>
634
-
635
- <?php sfsi_get_font("sfsi_form_button_font", $option8['sfsi_form_button_font']); ?>
636
-
637
- </div>
638
-
639
- <div class="sfsi_field">
640
-
641
- <label>Font style:</label>
642
-
643
- <?php sfsi_get_fontstyle("sfsi_form_button_fontstyle", $option8['sfsi_form_button_fontstyle']); ?>
644
-
645
- </div>
646
-
647
- </div>
648
-
649
- <!--Row Section-->
650
-
651
- <div class="row_tab">
652
-
653
- <div class="sfsi_field">
654
-
655
- <label class="sfsi_same_width">Font color:</label>
656
-
657
- <div class="sfsi_field" style="padding-top:0px;">
658
-
659
- <input type="text" name="sfsi_form_button_fontcolor" data-default-color="#b5b5b5" id="sfsi_form_button_fontcolor" value="<?php echo ($option8['sfsi_form_button_fontcolor'] != '')
660
-
661
- ? $option8['sfsi_form_button_fontcolor'] : '';
662
-
663
- ?>">
664
-
665
- </div>
666
-
667
- <!--div class="color_box">
668
-
669
- <div class="corner"></div>
670
-
671
- <div class="color_box1" id="sfsiFormButtonFontcolor" style="background: <?php //echo ($option8['sfsi_form_button_fontcolor']!='') ? $option8['sfsi_form_button_fontcolor'] : '' ;
672
-
673
- ?>"></div>
674
-
675
- </div-->
676
-
677
- </div>
678
-
679
- <div class="sfsi_field">
680
-
681
- <label>Font size:</label>
682
-
683
- <input type="text" class="small rec-inp" name="sfsi_form_button_fontsize" value="<?php echo ($option8['sfsi_form_button_fontsize'] != '')
684
-
685
- ? $option8['sfsi_form_button_fontsize'] : ''; ?>" />
686
-
687
- <span class="pix">pixels</span>
688
-
689
- </div>
690
-
691
- </div>
692
-
693
- <!--Row Section-->
694
-
695
- <div class="row_tab">
696
-
697
- <div class="sfsi_field">
698
-
699
- <label class="sfsi_same_width">Alignment:</label>
700
-
701
- <?php sfsi_get_alignment("sfsi_form_button_fontalign", $option8['sfsi_form_button_fontalign']); ?>
702
-
703
- </div>
704
-
705
- </div>
706
-
707
- <!--Row Section-->
708
-
709
- <div class="row_tab">
710
-
711
- <div class="sfsi_field">
712
-
713
- <label class="sfsi_same_width">Button color:</label>
714
-
715
- <div class="sfsi_field">
716
-
717
- <input type="text" name="sfsi_form_button_background" data-default-color="#b5b5b5" id="sfsi_form_button_background" value="<?php echo ($option8['sfsi_form_button_background'] != '')
718
-
719
- ? $option8['sfsi_form_button_background'] : '';
720
-
721
- ?>">
722
-
723
- </div>
724
-
725
- <!--div class="color_box">
726
-
727
- <div class="corner"></div>
728
-
729
- <div class="color_box1" id="sfsiFormButtonBackground" style="background: <?php //echo ($option8['sfsi_form_button_background']!='') ? $option8['sfsi_form_button_background'] : '' ;
730
-
731
- ?>"></div>
732
-
733
- </div-->
734
-
735
- </div>
736
-
737
- </div>
738
-
739
- <!--End Section-->
740
-
741
- </div>
742
-
743
- </div>
744
-
745
- <!-- by developer 28-5-2019 -->
746
-
747
- <div class="row_tab">
748
-
749
- <p><b>New:</b> In the Premium Plugin you can choose to display the text on subscribe form in a font already present in your theme.</b> <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=subscribe_form_note&utm_medium=link" target="_blank" style="color:#00a0d2 !important; text-decoration: none !important;">Check it out.</a></p>
750
-
751
- </div>
752
-
753
- <!-- end -->
754
-
755
- <!--Section End-->
756
-
757
- </div>
758
-
759
- <?php sfsi_ask_for_help(8); ?>
760
-
761
- <!-- SAVE BUTTON SECTION -->
762
-
763
- <div class="save_button">
764
-
765
- <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" alt="error" />
766
-
767
- <?php $nonce = wp_create_nonce("update_step8"); ?>
768
-
769
- <a href="javascript:;" id="sfsi_save8" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
770
-
771
- </div>
772
-
773
- <!-- END SAVE BUTTON SECTION -->
774
-
775
- <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
776
-
777
- <label class="closeSec"></label>
778
-
779
- <!-- ERROR AND SUCCESS MESSAGE AREA-->
780
-
781
- <p class="red_txt errorMsg" style="display:none"> </p>
782
-
783
- <p class="green_txt sucMsg" style="display:none"> </p>
784
-
785
- <div class="clear"></div>
786
-
787
- </div>
788
-
789
- <!-- END Section 8 "Do you want to show a subscription form (increases sign ups)?" main div Start -->
790
-
791
- <?php
792
-
793
- function isChecked($givenVal, $value)
794
-
795
- {
796
-
797
- if ($givenVal == $value)
798
-
799
- return 'checked="true"';
800
-
801
- else
802
-
803
- return '';
804
- }
805
-
806
- function isSeletcted($givenVal, $value)
807
-
808
- {
809
-
810
- if ($givenVal == $value)
811
-
812
- return 'selected="true"';
813
-
814
- else
815
-
816
- return '';
817
- }
818
-
819
- function sfsi_get_font($name, $value)
820
-
821
- {
822
-
823
- ?>
824
-
825
- <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
826
-
827
- <option value="Arial, Helvetica, sans-serif" <?php echo isSeletcted("Arial, Helvetica, sans-serif", $value) ?>>
828
-
829
- Arial
830
-
831
- </option>
832
-
833
- <option value="Arial Black, Gadget, sans-serif" <?php echo isSeletcted("Arial Black, Gadget, sans-serif", $value) ?>>
834
-
835
- Arial Black
836
-
837
- </option>
838
-
839
- <option value="Calibri" <?php echo isSeletcted("Calibri", $value) ?>>Calibri</option>
840
-
841
- <option value="Comic Sans MS" <?php echo isSeletcted("Comic Sans MS", $value) ?>>Comic Sans MS</option>
842
-
843
- <option value="Courier New" <?php echo isSeletcted("Courier New", $value) ?>>Courier New</option>
844
-
845
- <option value="Georgia" <?php echo isSeletcted("Georgia", $value) ?>>Georgia</option>
846
-
847
- <option value="Helvetica,Arial,sans-serif" <?php echo isSeletcted("Helvetica,Arial,sans-serif", $value) ?>>
848
-
849
- Helvetica
850
-
851
- </option>
852
-
853
- <option value="Impact" <?php echo isSeletcted("Impact", $value) ?>>Impact</option>
854
-
855
- <option value="Lucida Console" <?php echo isSeletcted("Lucida Console", $value) ?>>Lucida Console</option>
856
-
857
- <option value="Tahoma,Geneva" <?php echo isSeletcted("Tahoma,Geneva", $value) ?>>Tahoma</option>
858
-
859
- <option value="Times New Roman" <?php echo isSeletcted("Times New Roman", $value) ?>>Times New Roman</option>
860
-
861
- <option value="Trebuchet MS" <?php echo isSeletcted("Trebuchet MS", $value) ?>>Trebuchet MS</option>
862
-
863
- <option value="Verdana" <?php echo isSeletcted("Verdana", $value) ?>>Verdana</option>
864
-
865
- </select>
866
-
867
- <?php
868
-
869
- }
870
-
871
- function sfsi_get_fontstyle($name, $value)
872
-
873
- {
874
-
875
- ?>
876
-
877
- <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
878
-
879
- <option value="normal" <?php echo isSeletcted("normal", $value) ?>>Normal</option>
880
-
881
- <option value="inherit" <?php echo isSeletcted("inherit", $value) ?>>Inherit</option>
882
-
883
- <option value="oblique" <?php echo isSeletcted("oblique", $value) ?>>Oblique</option>
884
-
885
- <option value="italic" <?php echo isSeletcted("italic", $value) ?>>Italic</option>
886
-
887
- <option value="bold" <?php echo isSeletcted("bold", $value) ?>>Bold</option>
888
-
889
- </select>
890
-
891
- <?php
892
-
893
- }
894
-
895
- function sfsi_get_alignment($name, $value)
896
-
897
- {
898
-
899
- ?>
900
-
901
- <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
902
-
903
- <option value="left" <?php echo isSeletcted("left", $value) ?>>Left Align</option>
904
-
905
- <option value="center" <?php echo isSeletcted("center", $value) ?>>Centered</option>
906
-
907
- <option value="right" <?php echo isSeletcted("right", $value) ?>>Right Align</option>
908
-
909
- </select>
910
-
911
- <?php
912
-
913
- }
914
-
915
- function get_sfsiSubscriptionForm($hglht = null)
916
-
917
- {
918
-
919
- ?>
920
-
921
- <div class="sfsi_subscribe_Popinner">
922
-
923
- <div class="form-overlay"></div>
924
-
925
- <form method="post">
926
-
927
- <h5 <?php if ($hglht == "h5") {
928
- echo 'class="sfsi_highlight"';
929
- } ?>>Get new posts by email:</h5>
930
-
931
- <div class="sfsi_subscription_form_field">
932
-
933
- <input type="email" name="data[Widget][email]" placeholder="Enter your email" value="" <?php if ($hglht == "email") {
934
- echo 'class="sfsi_highlight"';
935
- } ?> />
936
-
937
- </div>
938
-
939
- <div class="sfsi_subscription_form_field">
940
-
941
- <input type="submit" name="subscribe" value="Subscribe" <?php if ($hglht == "submit") {
942
- echo 'class="sfsi_highlight"';
943
- } ?> />
944
-
945
- </div>
946
-
947
- </form>
948
-
949
- </div>
950
-
951
- <?php
952
-
953
- }
954
-
955
  ?>
1
+ <?php
2
+
3
+ /* unserialize all saved option for section 8 options */
4
+
5
+ $option8 = unserialize(get_option('sfsi_section8_options', false));
6
+
7
+ $feedId = sanitize_text_field(get_option('sfsi_feed_id', false));
8
+
9
+ /*
10
+
11
+ * Sanitize, escape and validate values
12
+
13
+ */
14
+
15
+ $option8['sfsi_form_adjustment'] = (isset($option8['sfsi_form_adjustment'])) ? sanitize_text_field($option8['sfsi_form_adjustment']) : '';
16
+
17
+ $option8['sfsi_form_height'] = (isset($option8['sfsi_form_height'])) ? intval($option8['sfsi_form_height']) : '';
18
+
19
+ $option8['sfsi_form_width'] = (isset($option8['sfsi_form_width'])) ? intval($option8['sfsi_form_width']) : '';
20
+
21
+ $option8['sfsi_form_border'] = (isset($option8['sfsi_form_border'])) ? sanitize_text_field($option8['sfsi_form_border']) : '';
22
+
23
+ $option8['sfsi_form_border_thickness'] = (isset($option8['sfsi_form_border_thickness'])) ? intval($option8['sfsi_form_border_thickness']) : '';
24
+
25
+ $option8['sfsi_form_border_color'] = (isset($option8['sfsi_form_border_color'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_border_color']) : '';
26
+
27
+ $option8['sfsi_form_background'] = (isset($option8['sfsi_form_background'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_background']) : '';
28
+
29
+ $option8['sfsi_form_heading_text'] = (isset($option8['sfsi_form_heading_text'])) ? sanitize_text_field($option8['sfsi_form_heading_text']) : '';
30
+
31
+ $option8['sfsi_form_heading_font'] = (isset($option8['sfsi_form_heading_font'])) ? sanitize_text_field($option8['sfsi_form_heading_font']) : '';
32
+
33
+ $option8['sfsi_form_heading_fontstyle'] = (isset($option8['sfsi_form_heading_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_heading_fontstyle']) : '';
34
+
35
+ $option8['sfsi_form_heading_fontcolor'] = (isset($option8['sfsi_form_heading_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_heading_fontcolor']) : '';
36
+
37
+ $option8['sfsi_form_heading_fontsize'] = (isset($option8['sfsi_form_heading_fontsize'])) ? intval($option8['sfsi_form_heading_fontsize']) : '';
38
+
39
+ $option8['sfsi_form_heading_fontalign'] = (isset($option8['sfsi_form_heading_fontalign'])) ? sanitize_text_field($option8['sfsi_form_heading_fontalign']) : '';
40
+
41
+ $option8['sfsi_form_field_text'] = (isset($option8['sfsi_form_field_text'])) ? sanitize_text_field($option8['sfsi_form_field_text']) : '';
42
+
43
+ $option8['sfsi_form_field_font'] = (isset($option8['sfsi_form_field_font'])) ? sanitize_text_field($option8['sfsi_form_field_font']) : '';
44
+
45
+ $option8['sfsi_form_field_fontstyle'] = (isset($option8['sfsi_form_field_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_field_fontstyle']) : '';
46
+
47
+ $option8['sfsi_form_field_fontcolor'] = (isset($option8['sfsi_form_field_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_field_fontcolor']) : '';
48
+
49
+ $option8['sfsi_form_field_fontsize'] = (isset($option8['sfsi_form_field_fontsize'])) ? intval($option8['sfsi_form_field_fontsize']) : '';
50
+
51
+ $option8['sfsi_form_field_fontalign'] = (isset($option8['sfsi_form_field_fontalign'])) ? sanitize_text_field($option8['sfsi_form_field_fontalign']) : '';
52
+
53
+ $option8['sfsi_form_button_text'] = (isset($option8['sfsi_form_button_text'])) ? sanitize_text_field($option8['sfsi_form_button_text']) : '';
54
+
55
+ $option8['sfsi_form_button_font'] = (isset($option8['sfsi_form_button_font'])) ? sanitize_text_field($option8['sfsi_form_button_font']) : '';
56
+
57
+ $option8['sfsi_form_button_fontstyle'] = (isset($option8['sfsi_form_button_fontstyle'])) ? sanitize_text_field($option8['sfsi_form_button_fontstyle']) : '';
58
+
59
+ $option8['sfsi_form_button_fontcolor'] = (isset($option8['sfsi_form_button_fontcolor'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_button_fontcolor']) : '';
60
+
61
+ $option8['sfsi_form_button_fontsize'] = (isset($option8['sfsi_form_button_fontsize'])) ? intval($option8['sfsi_form_button_fontsize']) : '';
62
+
63
+ $option8['sfsi_form_button_fontalign'] = (isset($option8['sfsi_form_button_fontalign'])) ? sanitize_text_field($option8['sfsi_form_button_fontalign']) : '';
64
+
65
+ $option8['sfsi_form_button_background'] = (isset($option8['sfsi_form_button_background'])) ? sfsi_sanitize_hex_color($option8['sfsi_form_button_background']) : '';
66
+
67
+ ?>
68
+
69
+ <!-- Section 8 "Do you want to show a subscription form (increases sign ups)?" main div Start -->
70
+
71
+ <div class="tab8">
72
+
73
+ <div class="sfsi_curlerrorNotification">
74
+
75
+ <?php sfsi_curl_error_notification(); ?>
76
+
77
+ </div>
78
+
79
+ <?php
80
+
81
+ $connectToFeed = "http://www.specificfeeds.com/?" . base64_encode("userprofile=wordpress&feed_id=" . $feedId);
82
+
83
+ ?>
84
+
85
+ <p>
86
+
87
+ In addition to the email- and follow-icon you can also show a subscription form which maximizes chances that people subscribe to your site.
88
+
89
+ </p>
90
+
91
+ <p class='sfsi_subscribe_popbox_link'>
92
+
93
+ To get access to the emails who subscribe, interesting statistics about your subscribers, alerts when people subscribe or unsubscribe and to tailor the sender name & the subject line of the emails, please
94
+
95
+ <a class="pop-up" href="javascript:" data-id="sfsi_feedClaimingOverlay">
96
+
97
+ click here.
98
+
99
+ </a>
100
+
101
+ </p>
102
+
103
+ <div class="sfsi_tab8_container">
104
+
105
+ <!--Section 1-->
106
+
107
+ <div class="sfsi_tab8_subcontainer">
108
+
109
+ <!-- <h3 class="sfsi_section_title">Preview:</h3> -->
110
+
111
+ <h4 class="sfsi_section_title">Preview:</h4>
112
+
113
+ <div class="like_pop_box">
114
+
115
+ <?php get_sfsiSubscriptionForm(); ?>
116
+
117
+ </div>
118
+
119
+ </div>
120
+
121
+ <!--Section 2-->
122
+
123
+ <div class="sfsi_tab8_subcontainer sfsi_seprater">
124
+
125
+ <!-- <h3 class="sfsi_section_title">Place it on your site</h3> -->
126
+
127
+ <h4 class="sfsi_section_title">Place it on your site</h4>
128
+
129
+ <label class="sfsi_label_text">You can place the form by different methods:</label>
130
+
131
+ <ul class="sfsi_form_info">
132
+
133
+ <li><b>1. Widget:</b> Go to the <a target="_blank" href="<?php echo site_url() ?>/wp-admin/widgets.php">widget settings</a> and drag & drop it to the sidebar.
134
+
135
+ </li>
136
+
137
+ <li><b>2. Shortcode:</b> Use the shortcode <b>[USM_form]</b> to place it into your codes</li>
138
+
139
+ <li><b>3. Copy & paste HTML code:</b></li>
140
+
141
+ </ul>
142
+
143
+ <div class="sfsi_html" style="display: none;">
144
+
145
+ <?php
146
+
147
+ $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
148
+
149
+ $url = "https://www.specificfeeds.com/widgets/subscribeWidget/";
150
+
151
+ $url = $url . $sfsi_feediid . '/8/';
152
+
153
+ ?>
154
+
155
+ <div class="sfsi_subscribe_Popinner" style="padding: 18px 0px;">
156
+
157
+ <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="<?php echo $url ?>" style="margin: 0px 20px;">
158
+
159
+ <h5 style="margin: 0 0 10px; padding: 0;">Get new posts by email:</h5>
160
+
161
+ <div style="margin: 5px 0; width: 100%;">
162
+
163
+ <input style="padding: 10px 0px !important; width: 100% !important;" type="email" placeholder="Enter your email" value="" name="data[Widget][email]" />
164
+
165
+ </div>
166
+
167
+ <div style="margin: 5px 0; width: 100%;">
168
+
169
+ <input style="padding: 10px 0px !important; width: 100% !important;" type="submit" name="subscribe" value="Subscribe" /><input type="hidden" name="data[Widget][feed_id]" value="<?php echo $sfsi_feediid ?>"><input type="hidden" name="data[Widget][feedtype]" value="8">
170
+
171
+ </div>
172
+
173
+ </form>
174
+
175
+ </div>
176
+
177
+ </div>
178
+
179
+ <div class="sfsi_subscription_html">
180
+
181
+ <xmp id="selectable" onclick="selectText('selectable')">
182
+
183
+ <?php get_sfsiSubscriptionForm(); ?>
184
+
185
+ </xmp>
186
+
187
+ </div>
188
+
189
+ </div>
190
+
191
+ <!--Section 3-->
192
+
193
+ <div class="sfsi_tab8_subcontainer sfsi_seprater">
194
+
195
+ <!-- <h3 class="sfsi_section_title">Define text & design (optional)</h3> -->
196
+
197
+ <h4 class="sfsi_section_title">Define text & design (optional)</h4>
198
+
199
+ <h5 class="sfsi_section_subtitle">Overall size & border</h5>
200
+
201
+ <!--Left Section-->
202
+
203
+ <div class="sfsi_left_container">
204
+
205
+ <?php get_sfsiSubscriptionForm(); ?>
206
+
207
+ </div>
208
+
209
+ <!--Right Section-->
210
+
211
+ <div class="sfsi_right_container">
212
+
213
+ <div class="row_tab">
214
+
215
+ <label class="sfsi_heding">Adjust size to space on the website?</label>
216
+
217
+ <ul class="border_shadow">
218
+
219
+ <li>
220
+
221
+ <input type="radio" class="styled" value="yes" name="sfsi_form_adjustment" <?php echo isChecked($option8['sfsi_form_adjustment'], 'yes'); ?>>
222
+
223
+ <label>Yes</label>
224
+
225
+ </li>
226
+
227
+ <li>
228
+
229
+ <input type="radio" class="styled" value="no" name="sfsi_form_adjustment" <?php echo isChecked($option8['sfsi_form_adjustment'], 'no'); ?>>
230
+
231
+ <label>No</label>
232
+
233
+ </li>
234
+
235
+ </ul>
236
+
237
+ </div>
238
+
239
+ <!--Row Section-->
240
+
241
+ <div class="row_tab" style="<?php echo ($option8['sfsi_form_adjustment'] == 'yes') ? "display:none" : ''; ?>">
242
+
243
+ <div class="sfsi_field">
244
+
245
+ <label>Height</label>
246
+
247
+ <input name="sfsi_form_height" type="text" value="<?php echo ($option8['sfsi_form_height'] != '') ? $option8['sfsi_form_height'] : ''; ?>" class="small rec-inp" /><span class="pix">pixels</span>
248
+
249
+ </div>
250
+
251
+ <div class="sfsi_field">
252
+
253
+ <label>Width</label>
254
+
255
+ <input name="sfsi_form_width" type="text" value="<?php echo ($option8['sfsi_form_width'] != '') ? $option8['sfsi_form_width'] : ''; ?>" class="small rec-inp" /><span class="pix">pixels</span>
256
+
257
+ </div>
258
+
259
+ </div>
260
+
261
+ <!--Row Section-->
262
+
263
+ <div class="row_tab">
264
+
265
+ <label class="sfsi_heding">Border?</label>
266
+
267
+ <ul class="border_shadow">
268
+
269
+ <li>
270
+
271
+ <input type="radio" class="styled" value="yes" name="sfsi_form_border" <?php echo isChecked($option8['sfsi_form_border'], 'yes'); ?>>
272
+
273
+ <label>Yes</label>
274
+
275
+ </li>
276
+
277
+ <li>
278
+
279
+ <input type="radio" class="styled" value="no" name="sfsi_form_border" <?php echo isChecked($option8['sfsi_form_border'], 'no'); ?>>
280
+
281
+ <label>No</label>
282
+
283
+ </li>
284
+
285
+ </ul>
286
+
287
+ </div>
288
+
289
+ <!--Row Section-->
290
+
291
+ <div class="row_tab" style="<?php echo ($option8['sfsi_form_border'] == 'no') ? "display:none" : ''; ?>">
292
+
293
+ <div class="sfsi_field">
294
+
295
+ <label>Thickness</label>
296
+
297
+ <input name="sfsi_form_border_thickness" type="text" value="<?php echo ($option8['sfsi_form_border_thickness'] != '')
298
+
299
+ ? $option8['sfsi_form_border_thickness'] : '';
300
+
301
+ ?>" class="small rec-inp" /><span class="pix">pixels</span>
302
+
303
+ </div>
304
+
305
+ <div class="sfsi_field">
306
+
307
+ <label>Color</label>
308
+
309
+ <input id="sfsi_form_border_color" data-default-color="#b5b5b5" type="text" name="sfsi_form_border_color" value="<?php echo ($option8['sfsi_form_border_color'] != '')
310
+
311
+ ? $option8['sfsi_form_border_color'] : '';
312
+
313
+ ?>">
314
+
315
+ <!--div class="color_box">
316
+
317
+ <div class="corner"></div>
318
+
319
+ <div id="sfsiFormBorderColor" class="color_box1" style="background: <?php
320
+ ?>"></div>
321
+
322
+ </div-->
323
+
324
+ </div>
325
+
326
+ </div>
327
+
328
+ <!--Row Section-->
329
+
330
+ <div class="row_tab">
331
+
332
+ <label class="sfsi_heding autowidth">Background color:</label>
333
+
334
+ <div class="sfsi_field">
335
+
336
+ <input id="sfsi_form_background" data-default-color="#b5b5b5" type="text" name="sfsi_form_background" value="<?php echo ($option8['sfsi_form_background'] != '')
337
+
338
+ ? $option8['sfsi_form_background'] : '';
339
+
340
+ ?>">
341
+
342
+ <!--div class="color_box">
343
+
344
+ <div class="corner"></div>
345
+
346
+ <div id="sfsiFormBackground" class="color_box1" style="background: <?php
347
+ ?>"></div>
348
+
349
+ </div-->
350
+
351
+ </div>
352
+
353
+ </div>
354
+
355
+ <!--Row Section-->
356
+
357
+ </div>
358
+
359
+ </div>
360
+
361
+ <!--Section 4-->
362
+
363
+ <div class="sfsi_tab8_subcontainer sfsi_seprater">
364
+
365
+ <h5 class="sfsi_section_subtitle">Text above the entry field</h5>
366
+
367
+ <!--Left Section-->
368
+
369
+ <div class="sfsi_left_container">
370
+
371
+ <?php get_sfsiSubscriptionForm("h5"); ?>
372
+
373
+ </div>
374
+
375
+ <!--Right Section-->
376
+
377
+ <div class="sfsi_right_container">
378
+
379
+ <div class="row_tab">
380
+
381
+ <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
382
+
383
+ <div class="sfsi_field">
384
+
385
+ <input type="text" class="small new-inp" name="sfsi_form_heading_text" value="<?php echo ($option8['sfsi_form_heading_text'] != '')
386
+
387
+ ? $option8['sfsi_form_heading_text'] : '';
388
+
389
+ ?>" />
390
+
391
+ </div>
392
+
393
+ </div>
394
+
395
+ <!--Row Section-->
396
+
397
+ <div class="row_tab">
398
+
399
+ <div class="sfsi_field">
400
+
401
+ <label class="sfsi_same_width">Font:</label>
402
+
403
+ <?php sfsi_get_font("sfsi_form_heading_font", $option8['sfsi_form_heading_font']); ?>
404
+
405
+ </div>
406
+
407
+ <div class="sfsi_field">
408
+
409
+ <label>Font style:</label>
410
+
411
+ <?php sfsi_get_fontstyle("sfsi_form_heading_fontstyle", $option8['sfsi_form_heading_fontstyle']); ?>
412
+
413
+ </div>
414
+
415
+ </div>
416
+
417
+ <!--Row Section-->
418
+
419
+ <div class="row_tab">
420
+
421
+ <div class="sfsi_field">
422
+
423
+ <label class="sfsi_same_width">Font color:</label>
424
+
425
+ <div class="sfsi_field" style="padding-top:0px;">
426
+
427
+ <input type="text" name="sfsi_form_heading_fontcolor" data-default-color="#b5b5b5" id="sfsi_form_heading_fontcolor" value="<?php echo ($option8['sfsi_form_heading_fontcolor'] != '')
428
+
429
+ ? $option8['sfsi_form_heading_fontcolor'] : '';
430
+
431
+ ?>">
432
+
433
+ </div>
434
+
435
+ <!--div class="color_box">
436
+
437
+ <div class="corner"></div>
438
+
439
+ <div class="color_box1" id="sfsiFormHeadingFontcolor" style="background: <?php //echo ($option8['sfsi_form_heading_fontcolor']!='') ? $option8['sfsi_form_heading_fontcolor'] : '' ;
440
+
441
+ ?>"></div>
442
+
443
+ </div-->
444
+
445
+ </div>
446
+
447
+ <div class="sfsi_field">
448
+
449
+ <label>Font size:</label>
450
+
451
+ <input type="text" class="small rec-inp" name="sfsi_form_heading_fontsize" value="<?php echo ($option8['sfsi_form_heading_fontsize'] != '')
452
+
453
+ ? $option8['sfsi_form_heading_fontsize'] : ''; ?>" />
454
+
455
+ <span class="pix">pixels</span>
456
+
457
+ </div>
458
+
459
+ </div>
460
+
461
+ <!--Row Section-->
462
+
463
+ <div class="row_tab">
464
+
465
+ <div class="sfsi_field">
466
+
467
+ <label class="sfsi_same_width">Alignment:</label>
468
+
469
+ <?php sfsi_get_alignment("sfsi_form_heading_fontalign", $option8['sfsi_form_heading_fontalign']); ?>
470
+
471
+ </div>
472
+
473
+ </div>
474
+
475
+ <!--End Section-->
476
+
477
+ </div>
478
+
479
+ </div>
480
+
481
+ <!--Section 5-->
482
+
483
+ <div class="sfsi_tab8_subcontainer sfsi_seprater">
484
+
485
+ <h5 class="sfsi_section_subtitle">Entry field</h5>
486
+
487
+ <!--Left Section-->
488
+
489
+ <div class="sfsi_left_container">
490
+
491
+ <?php get_sfsiSubscriptionForm("email"); ?>
492
+
493
+ </div>
494
+
495
+ <!--Right Section-->
496
+
497
+ <div class="sfsi_right_container">
498
+
499
+ <div class="row_tab">
500
+
501
+ <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
502
+
503
+ <div class="sfsi_field">
504
+
505
+ <input type="text" class="small new-inp" name="sfsi_form_field_text" value="<?php echo ($option8['sfsi_form_field_text'] != '')
506
+
507
+ ? $option8['sfsi_form_field_text'] : '';
508
+
509
+ ?>" />
510
+
511
+ </div>
512
+
513
+ </div>
514
+
515
+ <!--Row Section-->
516
+
517
+ <div class="row_tab">
518
+
519
+ <div class="sfsi_field">
520
+
521
+ <label class="sfsi_same_width">Font:</label>
522
+
523
+ <?php sfsi_get_font("sfsi_form_field_font", $option8['sfsi_form_field_font']); ?>
524
+
525
+ </div>
526
+
527
+ <div class="sfsi_field">
528
+
529
+ <label>Font style:</label>
530
+
531
+ <?php sfsi_get_fontstyle("sfsi_form_field_fontstyle", $option8['sfsi_form_field_fontstyle']); ?>
532
+
533
+ </div>
534
+
535
+ </div>
536
+
537
+ <!--Row Section-->
538
+
539
+ <div class="row_tab">
540
+
541
+ <input type="hidden" name="sfsi_form_field_fontcolor" value="">
542
+
543
+ <!--<div class="sfsi_field">
544
+
545
+ <label class="sfsi_same_width">Font color</label>
546
+
547
+ <input type="text" name="sfsi_form_field_fontcolor" class="small color-code" id="sfsi_form_field_fontcolor" value="<?php //echo ($option8['sfsi_form_field_fontcolor']!='')
548
+
549
+ //? $option8['sfsi_form_field_fontcolor'] : '' ;
550
+
551
+ ?>">
552
+
553
+ <div class="color_box">
554
+
555
+ <div class="corner"></div>
556
+
557
+ <div class="color_box1" id="sfsiFormFieldFontcolor" style="background: <?php //echo ($option8['sfsi_form_field_fontcolor']!='') ? $option8['sfsi_form_field_fontcolor'] : '' ;
558
+
559
+ ?>"></div>
560
+
561
+ </div>
562
+
563
+ </div>-->
564
+
565
+ <div class="sfsi_field">
566
+
567
+ <label class="sfsi_same_width">Alignment:</label>
568
+
569
+ <?php sfsi_get_alignment("sfsi_form_field_fontalign", $option8['sfsi_form_field_fontalign']); ?>
570
+
571
+ </div>
572
+
573
+ <div class="sfsi_field">
574
+
575
+ <label>Font size:</label>
576
+
577
+ <input type="text" class="small rec-inp" name="sfsi_form_field_fontsize" value="<?php echo ($option8['sfsi_form_field_fontsize'] != '')
578
+
579
+ ? $option8['sfsi_form_field_fontsize'] : ''; ?>" />
580
+
581
+ <span class="pix">pixels</span>
582
+
583
+ </div>
584
+
585
+ </div>
586
+
587
+ <!--End Section-->
588
+
589
+ </div>
590
+
591
+ </div>
592
+
593
+ <!--Section 6-->
594
+
595
+ <div class="sfsi_tab8_subcontainer">
596
+
597
+ <h5 class="sfsi_section_subtitle">Subscribe button</h5>
598
+
599
+ <!--Left Section-->
600
+
601
+ <div class="sfsi_left_container">
602
+
603
+ <?php get_sfsiSubscriptionForm("submit"); ?>
604
+
605
+ </div>
606
+
607
+ <!--Right Section-->
608
+
609
+ <div class="sfsi_right_container">
610
+
611
+ <div class="row_tab">
612
+
613
+ <label class="sfsi_heding fixwidth sfsi_same_width">Text:</label>
614
+
615
+ <div class="sfsi_field">
616
+
617
+ <input type="text" class="small new-inp" name="sfsi_form_button_text" value="<?php echo ($option8['sfsi_form_button_text'] != '')
618
+
619
+ ? $option8['sfsi_form_button_text'] : '';
620
+
621
+ ?>" />
622
+
623
+ </div>
624
+
625
+ </div>
626
+
627
+ <!--Row Section-->
628
+
629
+ <div class="row_tab">
630
+
631
+ <div class="sfsi_field">
632
+
633
+ <label class="sfsi_same_width">Font:</label>
634
+
635
+ <?php sfsi_get_font("sfsi_form_button_font", $option8['sfsi_form_button_font']); ?>
636
+
637
+ </div>
638
+
639
+ <div class="sfsi_field">
640
+
641
+ <label>Font style:</label>
642
+
643
+ <?php sfsi_get_fontstyle("sfsi_form_button_fontstyle", $option8['sfsi_form_button_fontstyle']); ?>
644
+
645
+ </div>
646
+
647
+ </div>
648
+
649
+ <!--Row Section-->
650
+
651
+ <div class="row_tab">
652
+
653
+ <div class="sfsi_field">
654
+
655
+ <label class="sfsi_same_width">Font color:</label>
656
+
657
+ <div class="sfsi_field" style="padding-top:0px;">
658
+
659
+ <input type="text" name="sfsi_form_button_fontcolor" data-default-color="#b5b5b5" id="sfsi_form_button_fontcolor" value="<?php echo ($option8['sfsi_form_button_fontcolor'] != '')
660
+
661
+ ? $option8['sfsi_form_button_fontcolor'] : '';
662
+
663
+ ?>">
664
+
665
+ </div>
666
+
667
+ <!--div class="color_box">
668
+
669
+ <div class="corner"></div>
670
+
671
+ <div class="color_box1" id="sfsiFormButtonFontcolor" style="background: <?php //echo ($option8['sfsi_form_button_fontcolor']!='') ? $option8['sfsi_form_button_fontcolor'] : '' ;
672
+
673
+ ?>"></div>
674
+
675
+ </div-->
676
+
677
+ </div>
678
+
679
+ <div class="sfsi_field">
680
+
681
+ <label>Font size:</label>
682
+
683
+ <input type="text" class="small rec-inp" name="sfsi_form_button_fontsize" value="<?php echo ($option8['sfsi_form_button_fontsize'] != '')
684
+
685
+ ? $option8['sfsi_form_button_fontsize'] : ''; ?>" />
686
+
687
+ <span class="pix">pixels</span>
688
+
689
+ </div>
690
+
691
+ </div>
692
+
693
+ <!--Row Section-->
694
+
695
+ <div class="row_tab">
696
+
697
+ <div class="sfsi_field">
698
+
699
+ <label class="sfsi_same_width">Alignment:</label>
700
+
701
+ <?php sfsi_get_alignment("sfsi_form_button_fontalign", $option8['sfsi_form_button_fontalign']); ?>
702
+
703
+ </div>
704
+
705
+ </div>
706
+
707
+ <!--Row Section-->
708
+
709
+ <div class="row_tab">
710
+
711
+ <div class="sfsi_field">
712
+
713
+ <label class="sfsi_same_width">Button color:</label>
714
+
715
+ <div class="sfsi_field">
716
+
717
+ <input type="text" name="sfsi_form_button_background" data-default-color="#b5b5b5" id="sfsi_form_button_background" value="<?php echo ($option8['sfsi_form_button_background'] != '')
718
+
719
+ ? $option8['sfsi_form_button_background'] : '';
720
+
721
+ ?>">
722
+
723
+ </div>
724
+
725
+ <!--div class="color_box">
726
+
727
+ <div class="corner"></div>
728
+
729
+ <div class="color_box1" id="sfsiFormButtonBackground" style="background: <?php //echo ($option8['sfsi_form_button_background']!='') ? $option8['sfsi_form_button_background'] : '' ;
730
+
731
+ ?>"></div>
732
+
733
+ </div-->
734
+
735
+ </div>
736
+
737
+ </div>
738
+
739
+ <!--End Section-->
740
+
741
+ </div>
742
+
743
+ </div>
744
+
745
+ <!-- by developer 28-5-2019 -->
746
+
747
+ <div class="row_tab">
748
+
749
+ <p><b>New:</b> In the Premium Plugin you can choose to display the text on subscribe form in a font already present in your theme.</b> <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=subscribe_form_note&utm_medium=link" target="_blank" style="color:#00a0d2 !important; text-decoration: none !important;">Check it out.</a></p>
750
+
751
+ </div>
752
+
753
+ <!-- end -->
754
+
755
+ <!--Section End-->
756
+
757
+ </div>
758
+
759
+ <?php sfsi_ask_for_help(8); ?>
760
+
761
+ <!-- SAVE BUTTON SECTION -->
762
+
763
+ <div class="save_button">
764
+
765
+ <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" alt="error" />
766
+
767
+ <?php $nonce = wp_create_nonce("update_step8"); ?>
768
+
769
+ <a href="javascript:;" id="sfsi_save8" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
770
+
771
+ </div>
772
+
773
+ <!-- END SAVE BUTTON SECTION -->
774
+
775
+ <a class="sfsiColbtn closeSec" href="javascript:;">Collapse area</a>
776
+
777
+ <label class="closeSec"></label>
778
+
779
+ <!-- ERROR AND SUCCESS MESSAGE AREA-->
780
+
781
+ <p class="red_txt errorMsg" style="display:none"> </p>
782
+
783
+ <p class="green_txt sucMsg" style="display:none"> </p>
784
+
785
+ <div class="clear"></div>
786
+
787
+ </div>
788
+
789
+ <!-- END Section 8 "Do you want to show a subscription form (increases sign ups)?" main div Start -->
790
+
791
+ <?php
792
+
793
+ function isChecked($givenVal, $value)
794
+
795
+ {
796
+
797
+ if ($givenVal == $value)
798
+
799
+ return 'checked="true"';
800
+
801
+ else
802
+
803
+ return '';
804
+ }
805
+
806
+ function isSeletcted($givenVal, $value)
807
+
808
+ {
809
+
810
+ if ($givenVal == $value)
811
+
812
+ return 'selected="true"';
813
+
814
+ else
815
+
816
+ return '';
817
+ }
818
+
819
+ function sfsi_get_font($name, $value)
820
+
821
+ {
822
+
823
+ ?>
824
+
825
+ <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
826
+
827
+ <option value="Arial, Helvetica, sans-serif" <?php echo isSeletcted("Arial, Helvetica, sans-serif", $value) ?>>
828
+
829
+ Arial
830
+
831
+ </option>
832
+
833
+ <option value="Arial Black, Gadget, sans-serif" <?php echo isSeletcted("Arial Black, Gadget, sans-serif", $value) ?>>
834
+
835
+ Arial Black
836
+
837
+ </option>
838
+
839
+ <option value="Calibri" <?php echo isSeletcted("Calibri", $value) ?>>Calibri</option>
840
+
841
+ <option value="Comic Sans MS" <?php echo isSeletcted("Comic Sans MS", $value) ?>>Comic Sans MS</option>
842
+
843
+ <option value="Courier New" <?php echo isSeletcted("Courier New", $value) ?>>Courier New</option>
844
+
845
+ <option value="Georgia" <?php echo isSeletcted("Georgia", $value) ?>>Georgia</option>
846
+
847
+ <option value="Helvetica,Arial,sans-serif" <?php echo isSeletcted("Helvetica,Arial,sans-serif", $value) ?>>
848
+
849
+ Helvetica
850
+
851
+ </option>
852
+
853
+ <option value="Impact" <?php echo isSeletcted("Impact", $value) ?>>Impact</option>
854
+
855
+ <option value="Lucida Console" <?php echo isSeletcted("Lucida Console", $value) ?>>Lucida Console</option>
856
+
857
+ <option value="Tahoma,Geneva" <?php echo isSeletcted("Tahoma,Geneva", $value) ?>>Tahoma</option>
858
+
859
+ <option value="Times New Roman" <?php echo isSeletcted("Times New Roman", $value) ?>>Times New Roman</option>
860
+
861
+ <option value="Trebuchet MS" <?php echo isSeletcted("Trebuchet MS", $value) ?>>Trebuchet MS</option>
862
+
863
+ <option value="Verdana" <?php echo isSeletcted("Verdana", $value) ?>>Verdana</option>
864
+
865
+ </select>
866
+
867
+ <?php
868
+
869
+ }
870
+
871
+ function sfsi_get_fontstyle($name, $value)
872
+
873
+ {
874
+
875
+ ?>
876
+
877
+ <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
878
+
879
+ <option value="normal" <?php echo isSeletcted("normal", $value) ?>>Normal</option>
880
+
881
+ <option value="inherit" <?php echo isSeletcted("inherit", $value) ?>>Inherit</option>
882
+
883
+ <option value="oblique" <?php echo isSeletcted("oblique", $value) ?>>Oblique</option>
884
+
885
+ <option value="italic" <?php echo isSeletcted("italic", $value) ?>>Italic</option>
886
+
887
+ <option value="bold" <?php echo isSeletcted("bold", $value) ?>>Bold</option>
888
+
889
+ </select>
890
+
891
+ <?php
892
+
893
+ }
894
+
895
+ function sfsi_get_alignment($name, $value)
896
+
897
+ {
898
+
899
+ ?>
900
+
901
+ <select name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="select-same">
902
+
903
+ <option value="left" <?php echo isSeletcted("left", $value) ?>>Left Align</option>
904
+
905
+ <option value="center" <?php echo isSeletcted("center", $value) ?>>Centered</option>
906
+
907
+ <option value="right" <?php echo isSeletcted("right", $value) ?>>Right Align</option>
908
+
909
+ </select>
910
+
911
+ <?php
912
+
913
+ }
914
+
915
+ function get_sfsiSubscriptionForm($hglht = null)
916
+
917
+ {
918
+
919
+ ?>
920
+
921
+ <div class="sfsi_subscribe_Popinner">
922
+
923
+ <div class="form-overlay"></div>
924
+
925
+ <form method="post">
926
+
927
+ <h5 <?php if ($hglht == "h5") {
928
+ echo 'class="sfsi_highlight"';
929
+ } ?>>Get new posts by email:</h5>
930
+
931
+ <div class="sfsi_subscription_form_field">
932
+
933
+ <input type="email" name="data[Widget][email]" placeholder="Enter your email" value="" <?php if ($hglht == "email") {
934
+ echo 'class="sfsi_highlight"';
935
+ } ?> />
936
+
937
+ </div>
938
+
939
+ <div class="sfsi_subscription_form_field">
940
+
941
+ <input type="submit" name="subscribe" value="Subscribe" <?php if ($hglht == "submit") {
942
+ echo 'class="sfsi_highlight"';
943
+ } ?> />
944
+
945
+ </div>
946
+
947
+ </form>
948
+
949
+ </div>
950
+
951
+ <?php
952
+
953
+ }
954
+
955
  ?>
views/subviews/que4/animatethem.php CHANGED
@@ -1,235 +1,235 @@
1
- <!--icon Animation section start -->
2
-
3
- <div class="sub_row stand sec_new" style="margin-left: 0px;">
4
-
5
- <h4>Animate them</h4>
6
-
7
- <div id="animationSection" class="radio_section tab_3_option">
8
-
9
- <input name="sfsi_mouseOver" <?php echo ( $option3['sfsi_mouseOver']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
10
-
11
- <label>
12
-
13
- Mouse-Over effects
14
-
15
- </label>
16
-
17
- <div class="col-md-12 rowmarginleft45 mouse-over-effects <?php echo ( $option3['sfsi_mouseOver']=='yes') ? 'show' : 'hide' ;?>">
18
-
19
- <div class="row">
20
-
21
- <input value="same_icons" name="sfsi_mouseOver_effect_type" <?php echo ( $option3['sfsi_mouseOver_effect_type']=='same_icons') ? 'checked=checked' : '' ;?> type="radio" class="styled"/>
22
-
23
- <label>Same-icon effects</label>
24
-
25
- </div><!-- row closes -->
26
-
27
- <div class="row rowpadding10 same_icons_effects <?php echo ( $option3['sfsi_mouseOver_effect_type']=='same_icons') ? 'show' : 'hide' ;?>">
28
-
29
- <div class="effectContainer bottommargin30">
30
-
31
- <div class="effectName">
32
-
33
-
34
-
35
- <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="fade_in" <?php echo ( $option3['sfsi_mouseOver_effect']=='fade_in') ? 'checked="true"' : '' ;?>>
36
-
37
-
38
-
39
- <label>
40
-
41
- <span>Fade In</span>
42
-
43
- <span>(Icons turn from shadow to full color)</span>
44
-
45
- </label>
46
-
47
- </div>
48
-
49
- <div class="effectName">
50
-
51
-
52
-
53
- <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="scale" <?php echo ( $option3['sfsi_mouseOver_effect']=='scale') ? 'checked="true"' : '' ;?>>
54
-
55
- <label>
56
-
57
- <span> Scale</span>
58
-
59
- <span>(Icons become bigger)</span>
60
-
61
- </label>
62
-
63
- </div>
64
-
65
- </div>
66
-
67
- <div class="effectContainer">
68
-
69
- <div class="effectName">
70
-
71
-
72
-
73
- <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="combo" <?php echo ( $option3['sfsi_mouseOver_effect']=='combo') ? 'checked="true"' : '' ;?>>
74
-
75
-
76
-
77
- <label>
78
-
79
- <span>Combo</span>
80
-
81
- <span>(Both fade in and scale effects)</span>
82
-
83
- </label>
84
-
85
- </div>
86
-
87
- <div disabled class="effectName inactiveSection">
88
-
89
- <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="fade_out" <?php echo ( $option3['sfsi_mouseOver_effect']=='fade_out') ? 'checked="true"' : '' ;?>>
90
-
91
-
92
-
93
- <label>
94
-
95
- <span>Fade Out</span>
96
-
97
- <span>(Icons turn from full color to shadow)</span>
98
-
99
- </label>
100
-
101
- </div>
102
-
103
- </div>
104
-
105
-
106
-
107
- <div class="row rowmarginleft45 mouseover-premium-notice">
108
-
109
- <label>Greyed-out options are available in the</label>
110
-
111
- <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=same_icon_effects&utm_medium=link">Premium Plugin</a>
112
-
113
- </div>
114
-
115
- </div><!-- row closes -->
116
-
117
- <div class="row zerobottompadding other_icons_effects">
118
-
119
- <input value="other_icons" name="sfsi_mouseOver_effect_type" <?php echo ( $option3['sfsi_mouseOver_effect_type']=='other_icons') ? 'checked=checked' : '' ;?> type="radio" class="styled"/>
120
-
121
- <label>Show other icons on mouse-over (Only applied for Desktop Icons)</label>
122
-
123
- </div><!-- row closes -->
124
-
125
- <div class="row rowpadding10 rowmarginleft35 other_icons_effects_options <?php echo ( $option3['sfsi_mouseOver_effect_type']=='other_icons') ? 'show' : 'hide' ;?>">
126
-
127
-
128
-
129
- <div disabled class="col-md-12 inactiveSection other_icons_effects_options_container">
130
-
131
-
132
-
133
- <?php
134
-
135
- $arrDefaultIcons = unserialize(SFSI_ALLICONS);
136
-
137
- $arrActiveStdDesktopIcons = sfsi_get_displayed_std_desktop_icons($option1);
138
-
139
- $arrActiveCustomDesktopicons = sfsi_get_displayed_custom_desktop_icons($option1);
140
-
141
- foreach ($arrDefaultIcons as $key => $iconName):
142
-
143
- sfsi_icon_generate_other_icon_effect_admin_html($iconName,$arrActiveStdDesktopIcons);
144
-
145
- endforeach;
146
-
147
- if(isset($arrActiveCustomDesktopicons) && !empty($arrActiveCustomDesktopicons) && is_array($arrActiveCustomDesktopicons))
148
-
149
- {
150
-
151
- $i = 1;
152
-
153
- foreach ($arrActiveCustomDesktopicons as $index => $imgUrl) {
154
-
155
- if(!empty($imgUrl)){
156
-
157
- sfsi_icon_generate_other_icon_effect_admin_html("custom",$arrActiveCustomDesktopicons,$index, $imgUrl,$i);
158
-
159
- $i++;
160
-
161
- }
162
-
163
- }
164
-
165
- }
166
-
167
- ?>
168
-
169
- </div>
170
-
171
- <div disabled class="col-md-12 inactiveSection rowmarginleft15 topmargin10">
172
-
173
-
174
-
175
- <label>Transition effect to those icons</label>
176
-
177
- <select name="mouseover_other_icons_transition_effect">
178
-
179
-
180
-
181
- <option <?php echo 'noeffect'== $mouseover_other_icons_transition_effect? "selected=selected" : ""; ?> value="noeffect">No effect</option>
182
-
183
- <option <?php echo 'flip'== $mouseover_other_icons_transition_effect? "selected=selected" : ""; ?> value="flip">Flip</option>
184
-
185
- </select>
186
-
187
- </div>
188
-
189
- <div class="row mouseover-premium-notice rowmarginleft25">
190
-
191
- <label>Above options are available in the</label>
192
-
193
- <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=different_icon_mouseover&utm_medium=link">Premium Plugin</a>
194
-
195
- </div>
196
-
197
- </div><!-- row closes -->
198
-
199
- </div><!-- col-md-12 closes -->
200
-
201
- </div><!-- #animationSection closes -->
202
-
203
- <div class="Shuffle_auto"><p class="radio_section tab_3_option">
204
-
205
- <input name="sfsi_shuffle_icons" <?php echo ( $option3['sfsi_shuffle_icons']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
206
-
207
- <label>Shuffle them automatically</label>
208
-
209
- <div class="sub_sub_box shuffle_sub" >
210
-
211
- <p class="radio_section tab_3_option">
212
-
213
- <input name="sfsi_shuffle_Firstload" <?php echo ( $option3['sfsi_shuffle_Firstload']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
214
-
215
- <label>When the site is first loaded</label>
216
-
217
- </p>
218
-
219
- <p class="radio_section tab_3_option">
220
-
221
- <input name="sfsi_shuffle_interval" <?php echo ( $option3['sfsi_shuffle_interval']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
222
-
223
- <label>Every</label>
224
-
225
- <input class="smal_inpt" type="text" name="sfsi_shuffle_intervalTime" value="<?php echo ( $option3['sfsi_shuffle_intervalTime']!='') ? $option3['sfsi_shuffle_intervalTime'] : '' ;?>"><label>seconds</label>
226
-
227
- </p>
228
-
229
- </div>
230
-
231
- </div>
232
-
233
- </div>
234
-
235
  <!--END icon Animation section start -->
1
+ <!--icon Animation section start -->
2
+
3
+ <div class="sub_row stand sec_new" style="margin-left: 0px;">
4
+
5
+ <h4>Animate them</h4>
6
+
7
+ <div id="animationSection" class="radio_section tab_3_option">
8
+
9
+ <input name="sfsi_mouseOver" <?php echo ( $option3['sfsi_mouseOver']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
10
+
11
+ <label>
12
+
13
+ Mouse-Over effects
14
+
15
+ </label>
16
+
17
+ <div class="col-md-12 rowmarginleft45 mouse-over-effects <?php echo ( $option3['sfsi_mouseOver']=='yes') ? 'show' : 'hide' ;?>">
18
+
19
+ <div class="row">
20
+
21
+ <input value="same_icons" name="sfsi_mouseOver_effect_type" <?php echo ( $option3['sfsi_mouseOver_effect_type']=='same_icons') ? 'checked=checked' : '' ;?> type="radio" class="styled"/>
22
+
23
+ <label>Same-icon effects</label>
24
+
25
+ </div><!-- row closes -->
26
+
27
+ <div class="row rowpadding10 same_icons_effects <?php echo ( $option3['sfsi_mouseOver_effect_type']=='same_icons') ? 'show' : 'hide' ;?>">
28
+
29
+ <div class="effectContainer bottommargin30">
30
+
31
+ <div class="effectName">
32
+
33
+
34
+
35
+ <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="fade_in" <?php echo ( $option3['sfsi_mouseOver_effect']=='fade_in') ? 'checked="true"' : '' ;?>>
36
+
37
+
38
+
39
+ <label>
40
+
41
+ <span>Fade In</span>
42
+
43
+ <span>(Icons turn from shadow to full color)</span>
44
+
45
+ </label>
46
+
47
+ </div>
48
+
49
+ <div class="effectName">
50
+
51
+
52
+
53
+ <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="scale" <?php echo ( $option3['sfsi_mouseOver_effect']=='scale') ? 'checked="true"' : '' ;?>>
54
+
55
+ <label>
56
+
57
+ <span> Scale</span>
58
+
59
+ <span>(Icons become bigger)</span>
60
+
61
+ </label>
62
+
63
+ </div>
64
+
65
+ </div>
66
+
67
+ <div class="effectContainer">
68
+
69
+ <div class="effectName">
70
+
71
+
72
+
73
+ <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="combo" <?php echo ( $option3['sfsi_mouseOver_effect']=='combo') ? 'checked="true"' : '' ;?>>
74
+
75
+
76
+
77
+ <label>
78
+
79
+ <span>Combo</span>
80
+
81
+ <span>(Both fade in and scale effects)</span>
82
+
83
+ </label>
84
+
85
+ </div>
86
+
87
+ <div disabled class="effectName inactiveSection">
88
+
89
+ <input class="styled" type="radio" name="sfsi_same_icons_mouseOver_effect" value="fade_out" <?php echo ( $option3['sfsi_mouseOver_effect']=='fade_out') ? 'checked="true"' : '' ;?>>
90
+
91
+
92
+
93
+ <label>
94
+
95
+ <span>Fade Out</span>
96
+
97
+ <span>(Icons turn from full color to shadow)</span>
98
+
99
+ </label>
100
+
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+
107
+ <div class="row rowmarginleft45 mouseover-premium-notice">
108
+
109
+ <label>Greyed-out options are available in the</label>
110
+
111
+ <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=same_icon_effects&utm_medium=link">Premium Plugin</a>
112
+
113
+ </div>
114
+
115
+ </div><!-- row closes -->
116
+
117
+ <div class="row zerobottompadding other_icons_effects">
118
+
119
+ <input value="other_icons" name="sfsi_mouseOver_effect_type" <?php echo ( $option3['sfsi_mouseOver_effect_type']=='other_icons') ? 'checked=checked' : '' ;?> type="radio" class="styled"/>
120
+
121
+ <label>Show other icons on mouse-over (Only applied for Desktop Icons)</label>
122
+
123
+ </div><!-- row closes -->
124
+
125
+ <div class="row rowpadding10 rowmarginleft35 other_icons_effects_options <?php echo ( $option3['sfsi_mouseOver_effect_type']=='other_icons') ? 'show' : 'hide' ;?>">
126
+
127
+
128
+
129
+ <div disabled class="col-md-12 inactiveSection other_icons_effects_options_container">
130
+
131
+
132
+
133
+ <?php
134
+
135
+ $arrDefaultIcons = unserialize(SFSI_ALLICONS);
136
+
137
+ $arrActiveStdDesktopIcons = sfsi_get_displayed_std_desktop_icons($option1);
138
+
139
+ $arrActiveCustomDesktopicons = sfsi_get_displayed_custom_desktop_icons($option1);
140
+
141
+ foreach ($arrDefaultIcons as $key => $iconName):
142
+
143
+ sfsi_icon_generate_other_icon_effect_admin_html($iconName,$arrActiveStdDesktopIcons);
144
+
145
+ endforeach;
146
+
147
+ if(isset($arrActiveCustomDesktopicons) && !empty($arrActiveCustomDesktopicons) && is_array($arrActiveCustomDesktopicons))
148
+
149
+ {
150
+
151
+ $i = 1;
152
+
153
+ foreach ($arrActiveCustomDesktopicons as $index => $imgUrl) {
154
+
155
+ if(!empty($imgUrl)){
156
+
157
+ sfsi_icon_generate_other_icon_effect_admin_html("custom",$arrActiveCustomDesktopicons,$index, $imgUrl,$i);
158
+
159
+ $i++;
160
+
161
+ }
162
+
163
+ }
164
+
165
+ }
166
+
167
+ ?>
168
+
169
+ </div>
170
+
171
+ <div disabled class="col-md-12 inactiveSection rowmarginleft15 topmargin10">
172
+
173
+
174
+
175
+ <label>Transition effect to those icons</label>
176
+
177
+ <select name="mouseover_other_icons_transition_effect">
178
+
179
+
180
+
181
+ <option <?php echo 'noeffect'== $mouseover_other_icons_transition_effect? "selected=selected" : ""; ?> value="noeffect">No effect</option>
182
+
183
+ <option <?php echo 'flip'== $mouseover_other_icons_transition_effect? "selected=selected" : ""; ?> value="flip">Flip</option>
184
+
185
+ </select>
186
+
187
+ </div>
188
+
189
+ <div class="row mouseover-premium-notice rowmarginleft25">
190
+
191
+ <label>Above options are available in the</label>
192
+
193
+ <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=different_icon_mouseover&utm_medium=link">Premium Plugin</a>
194
+
195
+ </div>
196
+
197
+ </div><!-- row closes -->
198
+
199
+ </div><!-- col-md-12 closes -->
200
+
201
+ </div><!-- #animationSection closes -->
202
+
203
+ <div class="Shuffle_auto"><p class="radio_section tab_3_option">
204
+
205
+ <input name="sfsi_shuffle_icons" <?php echo ( $option3['sfsi_shuffle_icons']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
206
+
207
+ <label>Shuffle them automatically</label>
208
+
209
+ <div class="sub_sub_box shuffle_sub" >
210
+
211
+ <p class="radio_section tab_3_option">
212
+
213
+ <input name="sfsi_shuffle_Firstload" <?php echo ( $option3['sfsi_shuffle_Firstload']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
214
+
215
+ <label>When the site is first loaded</label>
216
+
217
+ </p>
218
+
219
+ <p class="radio_section tab_3_option">
220
+
221
+ <input name="sfsi_shuffle_interval" <?php echo ( $option3['sfsi_shuffle_interval']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
222
+
223
+ <label>Every</label>
224
+
225
+ <input class="smal_inpt" type="text" name="sfsi_shuffle_intervalTime" value="<?php echo ( $option3['sfsi_shuffle_intervalTime']!='') ? $option3['sfsi_shuffle_intervalTime'] : '' ;?>"><label>seconds</label>
226
+
227
+ </p>
228
+
229
+ </div>
230
+
231
+ </div>
232
+
233
+ </div>
234
+
235
  <!--END icon Animation section start -->