Version Description
- Count issues fixed - please upgrade!
- Style constructor updated to PHP 5
- Text adjustments in admin area
Download this release
Release Info
Developer | socialdude |
Plugin | Social Share Icons & Social Share Buttons |
Version | 1.7 |
Comparing to | |
See all releases |
Code changes from version 1.6 to 1.7
- libs/controllers/sfsi_socialhelper.php +174 -87
- libs/sfsi_install_uninstall.php +15 -1
- libs/sfsi_widget.php +32 -4
- readme.txt +8 -3
- ultimate_social_media_icons.php +6 -1
- views/sfsi_option_view2.php +2 -1
libs/controllers/sfsi_socialhelper.php
CHANGED
@@ -8,23 +8,25 @@ private $url,$timeout=10;
|
|
8 |
/* get twitter followers */
|
9 |
function sfsi_get_tweets($username,$tw_settings)
|
10 |
{
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
23 |
// Extract the follower and tweet counts
|
24 |
if(isset($twitterData->followers_count))
|
25 |
{
|
26 |
-
|
27 |
-
|
28 |
}
|
29 |
else
|
30 |
{
|
@@ -43,7 +45,7 @@ function sfsi_getlinkedin_follower($sfsi_plus_ln_company,$APIsettings)
|
|
43 |
{
|
44 |
require_once(SFSI_PLUS_DOCROOT.'/helpers/linkedin-api/linkedin-api.php');
|
45 |
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
|
46 |
-
$url
|
47 |
$linkedin = new Plus_LinkedIn($APIsettings['sfsi_plus_ln_api_key'], $APIsettings['sfsi_plus_ln_secret_key'],$APIsettings['sfsi_plus_ln_oAuth_user_token'], $url );
|
48 |
$followers = $linkedin->getCompanyFollowersByName($sfsi_plus_ln_company);
|
49 |
if (strpos($followers, '404') === false)
|
@@ -262,7 +264,7 @@ public function sfsiFB_Share($permalink)
|
|
262 |
}
|
263 |
/* create on page google share option */
|
264 |
public function sfsi_Googlelike($permalink)
|
265 |
-
|
266 |
$show_count=0;
|
267 |
$google_html = '<div class="g-plusone" data-href="' . $permalink . '" ';
|
268 |
if($show_count)
|
@@ -290,15 +292,18 @@ public function sfsi_Googlelike($permalink)
|
|
290 |
|
291 |
return $twitter_html;
|
292 |
}
|
293 |
-
|
294 |
-
|
|
|
|
|
295 |
$twitter_html = '<a rel="nofollow" href="http://twitter.com/share" data-count="none" class="sr-twitter-button twitter-share-button" lang="en" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
|
296 |
|
297 |
-
|
298 |
}
|
299 |
|
300 |
/* create on page twitter share icon with count */
|
301 |
-
|
|
|
302 |
if($show_count)
|
303 |
{
|
304 |
$twitter_html = '<a href="http://twitter.com/share" class="sr-twitter-button twitter-share-button" lang="en" data-counturl="'.$permalink.'" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
|
@@ -310,8 +315,9 @@ public function sfsi_Googlelike($permalink)
|
|
310 |
return $twitter_html;
|
311 |
}
|
312 |
|
313 |
-
|
314 |
-
|
|
|
315 |
$option2= unserialize(get_option('sfsi_plus_section2_options',false));
|
316 |
$option4= unserialize(get_option('sfsi_plus_section4_options',false));
|
317 |
if(isset($option2['sfsi_plus_youtubeusernameorid']))
|
@@ -340,80 +346,161 @@ public function sfsi_Googlelike($permalink)
|
|
340 |
$youtube_html = '<div class="g-ytsubscribe" data-channelid="'.$yuser.'" data-layout="default" data-count="hidden"></div>';
|
341 |
}
|
342 |
return $youtube_html;
|
343 |
-
}
|
344 |
-
/* create on page pinit button icon */
|
345 |
-
public function sfsi_PinIt($url='') {
|
346 |
-
$pin_it_html = '<a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" ><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>';
|
347 |
-
return $pin_it_html;
|
348 |
-
}
|
349 |
-
/* get instragram followers */
|
350 |
-
public function sfsi_get_instagramFollowers($user_name)
|
351 |
-
{
|
352 |
-
/* get instagram user id */
|
353 |
-
/*$return_data = $this->file_get_contents_curl('http://jelled.com/ajax/instagram?do=username&username='.$user_name.'&format=json');*/
|
354 |
-
$return_data = $this->get_content_curl('https://api.instagram.com/v1/users/search?q='.$user_name.'&client_id=12d8dcc9abd74f83b0899756adccedc2');
|
355 |
-
$json_string = preg_replace('/^receiveCount\((.*)\)$/', "\\1", $return_data);
|
356 |
-
$json = json_decode($json_string, true);
|
357 |
-
$user_id=$json['data'][0]['id'];
|
358 |
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
}
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
|
398 |
if(!empty($resp))
|
399 |
{
|
400 |
-
|
401 |
-
|
402 |
-
$feeddata=stripslashes_deep($resp->subscriber_count);
|
403 |
-
|
404 |
else
|
405 |
{
|
406 |
$feeddata = 0;
|
407 |
}
|
408 |
return $this->format_num($feeddata);exit;
|
409 |
-
}
|
|
|
410 |
/* check response from a url */
|
411 |
-
private function sfsi_get_http_response_code($url)
|
412 |
-
|
413 |
-
|
414 |
-
|
|
|
415 |
|
416 |
-
}
|
417 |
-
|
418 |
-
|
419 |
?>
|
8 |
/* get twitter followers */
|
9 |
function sfsi_get_tweets($username,$tw_settings)
|
10 |
{
|
11 |
+
require_once(SFSI_PLUS_DOCROOT.'/helpers/twitter-api/twitteroauth.php');
|
12 |
+
$settings = array(
|
13 |
+
'oauth_access_token' => "335692958-JuqG7ArGrblrccHl3veVRFOdg64BUQZ7XpIs8x3Q",
|
14 |
+
'oauth_access_token_secret' => "A1l0LMrAVb3UeBbkpgigQr8O1EgfPcfG5USWg8cTcQyvg",
|
15 |
+
'consumer_key' => "d8OCu7GokBpy7DT17L5X1Q",
|
16 |
+
'consumer_secret' => "HUUEHS5rVSzaY57tICF9dVIaJ3bC5vwSZR9gWqq8QQ"
|
17 |
+
);
|
18 |
+
|
19 |
+
// Replace the four parameters below with the information from your Twitter developer application.
|
20 |
+
$twitterConnection = new Plus_TwitterOAuth($tw_settings['sfsiplus_tw_consumer_key'],$tw_settings['sfsiplus_tw_consumer_secret'], $tw_settings['sfsiplus_tw_oauth_access_token_secret']);
|
21 |
+
|
22 |
+
// Send the API request
|
23 |
+
$twitterData = $twitterConnection->get('users/show', array('screen_name' =>$username));
|
24 |
+
|
25 |
// Extract the follower and tweet counts
|
26 |
if(isset($twitterData->followers_count))
|
27 |
{
|
28 |
+
$followerCount = $twitterData->followers_count;
|
29 |
+
return $followerCount;
|
30 |
}
|
31 |
else
|
32 |
{
|
45 |
{
|
46 |
require_once(SFSI_PLUS_DOCROOT.'/helpers/linkedin-api/linkedin-api.php');
|
47 |
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
|
48 |
+
$url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
|
49 |
$linkedin = new Plus_LinkedIn($APIsettings['sfsi_plus_ln_api_key'], $APIsettings['sfsi_plus_ln_secret_key'],$APIsettings['sfsi_plus_ln_oAuth_user_token'], $url );
|
50 |
$followers = $linkedin->getCompanyFollowersByName($sfsi_plus_ln_company);
|
51 |
if (strpos($followers, '404') === false)
|
264 |
}
|
265 |
/* create on page google share option */
|
266 |
public function sfsi_Googlelike($permalink)
|
267 |
+
{
|
268 |
$show_count=0;
|
269 |
$google_html = '<div class="g-plusone" data-href="' . $permalink . '" ';
|
270 |
if($show_count)
|
292 |
|
293 |
return $twitter_html;
|
294 |
}
|
295 |
+
|
296 |
+
/* create on page twitter share icon */
|
297 |
+
public function sfsi_twitterShare($permalink,$tweettext)
|
298 |
+
{
|
299 |
$twitter_html = '<a rel="nofollow" href="http://twitter.com/share" data-count="none" class="sr-twitter-button twitter-share-button" lang="en" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
|
300 |
|
301 |
+
return $twitter_html;
|
302 |
}
|
303 |
|
304 |
/* create on page twitter share icon with count */
|
305 |
+
public function sfsi_twitterSharewithcount($permalink,$tweettext, $show_count)
|
306 |
+
{
|
307 |
if($show_count)
|
308 |
{
|
309 |
$twitter_html = '<a href="http://twitter.com/share" class="sr-twitter-button twitter-share-button" lang="en" data-counturl="'.$permalink.'" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
|
315 |
return $twitter_html;
|
316 |
}
|
317 |
|
318 |
+
/* create on page youtube subscribe icon */
|
319 |
+
public function sfsi_YouTubeSub($yuser)
|
320 |
+
{
|
321 |
$option2= unserialize(get_option('sfsi_plus_section2_options',false));
|
322 |
$option4= unserialize(get_option('sfsi_plus_section4_options',false));
|
323 |
if(isset($option2['sfsi_plus_youtubeusernameorid']))
|
346 |
$youtube_html = '<div class="g-ytsubscribe" data-channelid="'.$yuser.'" data-layout="default" data-count="hidden"></div>';
|
347 |
}
|
348 |
return $youtube_html;
|
349 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
+
/* create on page pinit button icon */
|
352 |
+
public function sfsi_PinIt($url='')
|
353 |
+
{
|
354 |
+
$pin_it_html = '<a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" ><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>';
|
355 |
+
return $pin_it_html;
|
356 |
+
}
|
357 |
+
|
358 |
+
/* get instragram followers */
|
359 |
+
public function sfsi_get_instagramFollowers($user_name)
|
360 |
+
{
|
361 |
+
$sfsi_plus_instagram_sf_count = unserialize(get_option('sfsi_plus_instagram_sf_count',false));
|
362 |
+
|
363 |
+
/*if date is empty (for decrease request count)*/
|
364 |
+
if(empty($sfsi_plus_instagram_sf_count["date"]))
|
365 |
+
{
|
366 |
+
$sfsi_plus_instagram_sf_count["date"] = strtotime(date("Y-m-d"));
|
367 |
+
$counts = $this->sfsi_plus_get_instagramFollowersCount($user_name);
|
368 |
+
$sfsi_plus_instagram_sf_count["sfsi_plus_instagram_count"] = $counts;
|
369 |
+
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
370 |
+
}
|
371 |
+
else
|
372 |
+
{
|
373 |
+
$diff = date_diff(
|
374 |
+
date_create(
|
375 |
+
date("Y-m-d", $sfsi_plus_instagram_sf_count["date"])
|
376 |
+
),
|
377 |
+
date_create(
|
378 |
+
date("Y-m-d")
|
379 |
+
));
|
380 |
+
if($diff->format("%a") > 1)
|
381 |
+
{
|
382 |
+
$sfsi_plus_instagram_sf_count["date"] = strtotime(date("Y-m-d"));
|
383 |
+
$counts = $this->sfsi_plus_get_instagramFollowersCount($user_name);
|
384 |
+
$sfsi_plus_instagram_sf_count["sfsi_plus_instagram_count"] = $counts;
|
385 |
+
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
386 |
+
}
|
387 |
+
else
|
388 |
+
{
|
389 |
+
$counts = $sfsi_plus_instagram_sf_count["sfsi_plus_instagram_count"];
|
390 |
+
}
|
391 |
+
}
|
392 |
+
return $counts;
|
393 |
+
}
|
394 |
+
|
395 |
+
/* get instragram followers */
|
396 |
+
public function sfsi_plus_get_instagramFollowersCount($user_name)
|
397 |
+
{
|
398 |
+
/* get instagram user id */
|
399 |
+
$return_data = $this->get_content_curl('https://api.instagram.com/v1/users/search?q='.$user_name.'&client_id=12d8dcc9abd74f83b0899756adccedc2');
|
400 |
+
$json_string = preg_replace('/^receiveCount\((.*)\)$/', "\\1", $return_data);
|
401 |
+
$json = json_decode($json_string, true);
|
402 |
+
$user_id = $json['data'][0]['id'];
|
403 |
+
|
404 |
+
$return_data = $this->get_content_curl('https://api.instagram.com/v1/users/'.$user_id.'/?access_token=53042481.ab103e5.0c6f8f50471a4e1f97595f8db529a47a');
|
405 |
+
$json_string = preg_replace('/^receiveCount\((.*)\)$/', "\\1", $return_data);
|
406 |
+
$json = json_decode($json_string, true);
|
407 |
+
return $this->format_num($json['data']['counts']['followed_by'],0);
|
408 |
+
}
|
409 |
+
|
410 |
+
/* create linkedIn follow button */
|
411 |
+
public function sfsi_LinkedInFollow($company_id)
|
412 |
+
{
|
413 |
+
return $ifollow='<script type="IN/FollowCompany" data-id="'.$company_id.'" data-counter="none"></script>';
|
414 |
+
}
|
415 |
+
|
416 |
+
/* create linkedIn recommend button */
|
417 |
+
public function sfsi_LinkedInRecommend($company_name,$product_id)
|
418 |
+
{
|
419 |
+
return $ifollow='<script type="IN/RecommendProduct" data-company="'.$company_name.'" data-product="'.$product_id.'"></script>';
|
420 |
+
}
|
421 |
+
|
422 |
+
/* create linkedIn share button */
|
423 |
+
public function sfsi_LinkedInShare($url='')
|
424 |
+
{
|
425 |
+
$url=(isset($url))? $url : home_url();
|
426 |
+
return $ifollow='<script type="IN/Share" data-url="'.$url.'"></script>';
|
427 |
+
}
|
428 |
+
|
429 |
+
/* get no of subscribers from specificfeeds for current blog */
|
430 |
+
public function SFSI_getFeedSubscriber($feedid)
|
431 |
+
{
|
432 |
+
$sfsi_plus_instagram_sf_count = unserialize(get_option('sfsi_plus_instagram_sf_count',false));
|
433 |
+
|
434 |
+
/*if date is empty (for decrease request count)*/
|
435 |
+
if(empty($sfsi_plus_instagram_sf_count["date"]))
|
436 |
+
{
|
437 |
+
$sfsi_plus_instagram_sf_count["date"] = strtotime(date("Y-m-d"));
|
438 |
+
$counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
439 |
+
$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
440 |
+
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
441 |
+
}
|
442 |
+
else
|
443 |
+
{
|
444 |
+
$diff = date_diff(
|
445 |
+
date_create(
|
446 |
+
date("Y-m-d", $sfsi_plus_instagram_sf_count["date"])
|
447 |
+
),
|
448 |
+
date_create(
|
449 |
+
date("Y-m-d")
|
450 |
+
));
|
451 |
+
if($diff->format("%a") > 1)
|
452 |
+
{
|
453 |
+
$sfsi_plus_instagram_sf_count["date"] = strtotime(date("Y-m-d"));
|
454 |
+
$counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
455 |
+
$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
456 |
+
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
457 |
+
}
|
458 |
+
else
|
459 |
+
{
|
460 |
+
$counts = $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"];
|
461 |
+
}
|
462 |
+
}
|
463 |
+
return $counts;
|
464 |
+
}
|
465 |
+
|
466 |
+
/* get no of subscribers from specificfeeds for current blog count*/
|
467 |
+
public function sfsi_plus_getFeedSubscriberCount($feedid)
|
468 |
+
{
|
469 |
+
$curl = curl_init();
|
470 |
+
|
471 |
+
curl_setopt_array($curl, array(
|
472 |
+
CURLOPT_RETURNTRANSFER => 1,
|
473 |
+
CURLOPT_URL => 'http://www.specificfeeds.com/wordpress/wpCountSubscriber',
|
474 |
+
CURLOPT_USERAGENT => 'sf rss request',
|
475 |
+
CURLOPT_POST => 1,
|
476 |
+
CURLOPT_POSTFIELDS => array(
|
477 |
+
'feed_id' => $feedid,
|
478 |
+
'v' => "newplugincount"
|
479 |
+
)
|
480 |
+
));
|
481 |
+
/* Send the request & save response to $resp */
|
482 |
+
$resp = curl_exec($curl);
|
483 |
|
484 |
if(!empty($resp))
|
485 |
{
|
486 |
+
$resp = json_decode($resp);
|
487 |
+
curl_close($curl);
|
488 |
+
$feeddata = stripslashes_deep($resp->subscriber_count);
|
489 |
+
}
|
490 |
else
|
491 |
{
|
492 |
$feeddata = 0;
|
493 |
}
|
494 |
return $this->format_num($feeddata);exit;
|
495 |
+
}
|
496 |
+
|
497 |
/* check response from a url */
|
498 |
+
private function sfsi_get_http_response_code($url)
|
499 |
+
{
|
500 |
+
$headers = get_headers($url);
|
501 |
+
return substr($headers[0], 9, 3);
|
502 |
+
}
|
503 |
|
504 |
+
}
|
505 |
+
/* end of class */
|
|
|
506 |
?>
|
libs/sfsi_install_uninstall.php
CHANGED
@@ -1,4 +1,17 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
function sfsi_plus_activate_plugin()
|
3 |
{
|
4 |
/* check for CURL enable at server */
|
@@ -16,7 +29,8 @@ function sfsi_plus_activate_plugin()
|
|
16 |
'sfsi_custom_display'=>'',
|
17 |
'sfsi_custom_files'=>'');
|
18 |
add_option('sfsi_plus_section1_options', serialize($options1));
|
19 |
-
$sffeeds=SFSI_PLUS_getFeedUrl();
|
|
|
20 |
/* Links and icons options */
|
21 |
$options2=array('sfsi_plus_rss_url'=>get_bloginfo('rss2_url'),
|
22 |
'sfsi_plus_rss_icons'=>'subscribe',
|
1 |
<?php
|
2 |
+
function sfsi_plus_update_plugin()
|
3 |
+
{
|
4 |
+
//Install version
|
5 |
+
update_option("sfsi_plus_pluginVersion", "1.7");
|
6 |
+
|
7 |
+
/*Extra important options*/
|
8 |
+
$sfsi_plus_instagram_sf_count = array(
|
9 |
+
"date" => "",
|
10 |
+
"sfsi_plus_sf_count" => "",
|
11 |
+
"sfsi_plus_instagram_count" => ""
|
12 |
+
);
|
13 |
+
add_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
14 |
+
}
|
15 |
function sfsi_plus_activate_plugin()
|
16 |
{
|
17 |
/* check for CURL enable at server */
|
29 |
'sfsi_custom_display'=>'',
|
30 |
'sfsi_custom_files'=>'');
|
31 |
add_option('sfsi_plus_section1_options', serialize($options1));
|
32 |
+
$sffeeds = SFSI_PLUS_getFeedUrl();
|
33 |
+
|
34 |
/* Links and icons options */
|
35 |
$options2=array('sfsi_plus_rss_url'=>get_bloginfo('rss2_url'),
|
36 |
'sfsi_plus_rss_icons'=>'subscribe',
|
libs/sfsi_widget.php
CHANGED
@@ -2,11 +2,24 @@
|
|
2 |
/* create SFSI widget */
|
3 |
class Sfsi_Plus_Widget extends WP_Widget
|
4 |
{
|
5 |
-
|
|
|
6 |
{
|
7 |
-
|
8 |
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-plus-widget' );
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
|
12 |
function widget( $args, $instance )
|
@@ -66,7 +79,22 @@ class Sfsi_Plus_Widget extends WP_Widget
|
|
66 |
{
|
67 |
$defaults = array( 'title' =>"" );
|
68 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
?>
|
71 |
<p>
|
72 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'Subscription and Social Icons'); ?></label>
|
2 |
/* create SFSI widget */
|
3 |
class Sfsi_Plus_Widget extends WP_Widget
|
4 |
{
|
5 |
+
|
6 |
+
function __construct()
|
7 |
{
|
8 |
+
$widget_ops = array( 'classname' => 'sfsi_plus', 'description' => __('Ultimate Social Media PLUS widgets', 'Ultimate Social Media PLUS ') );
|
9 |
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'sfsi-plus-widget' );
|
10 |
+
|
11 |
+
parent::__construct(
|
12 |
+
// Base ID of your widget
|
13 |
+
'sfsi-plus-widget',
|
14 |
+
|
15 |
+
// Widget name will appear in UI
|
16 |
+
__('Ultimate Social Media PLUS', 'Ultimate Social Media PLUS'),
|
17 |
+
|
18 |
+
// Widget description
|
19 |
+
$widget_ops,
|
20 |
+
|
21 |
+
$control_ops
|
22 |
+
);
|
23 |
}
|
24 |
|
25 |
function widget( $args, $instance )
|
79 |
{
|
80 |
$defaults = array( 'title' =>"" );
|
81 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
82 |
+
|
83 |
+
if(isset($instance['showf']))
|
84 |
+
{
|
85 |
+
if( $instance['showf'] == 0 && empty($instance['title']))
|
86 |
+
{
|
87 |
+
$instance['title']='Please follow & like us :)';
|
88 |
+
}
|
89 |
+
else
|
90 |
+
{
|
91 |
+
$instance['title'];
|
92 |
+
}
|
93 |
+
}
|
94 |
+
else
|
95 |
+
{
|
96 |
+
$instance['title']='Please follow & like us :)';
|
97 |
+
}
|
98 |
?>
|
99 |
<p>
|
100 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'Subscription and Social Icons'); ?></label>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=seb.r
|
|
4 |
Tags: social media, social media icons, sharing icons, sharing, social media widget, socialmedia, subscription icons, social media pop-up, newsletter, email newsletter, widget
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -73,6 +73,11 @@ Please check out the FAQ on http://ultimatelysocial.com
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
|
|
|
|
76 |
= 1.6 =
|
77 |
* More explanations added how to fix if counts don't work
|
78 |
* Icon files are compressed now for faster loading - thank you ShortPixel.com!
|
@@ -126,5 +131,5 @@ Please check out the FAQ on http://ultimatelysocial.com
|
|
126 |
|
127 |
== Upgrade Notice ==
|
128 |
|
129 |
-
= 1.
|
130 |
-
|
4 |
Tags: social media, social media icons, sharing icons, sharing, social media widget, socialmedia, subscription icons, social media pop-up, newsletter, email newsletter, widget
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.7
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 1.7 =
|
77 |
+
* Count issues fixed - please upgrade!
|
78 |
+
* Style constructor updated to PHP 5
|
79 |
+
* Text adjustments in admin area
|
80 |
+
|
81 |
= 1.6 =
|
82 |
* More explanations added how to fix if counts don't work
|
83 |
* Icon files are compressed now for faster loading - thank you ShortPixel.com!
|
131 |
|
132 |
== Upgrade Notice ==
|
133 |
|
134 |
+
= 1.7 =
|
135 |
+
Count issues fixed - please upgrade!
|
ultimate_social_media_icons.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://ultimatelysocial.com
|
|
5 |
Description: The best social media plugin on the market. And 100% FREE. Allows you to add social media & share icons to your blog (esp. Facebook, Twitter, Email, RSS, Pinterest, Instagram, Google+, LinkedIn, Share-button). It offers a wide range of design options and other features.
|
6 |
Author: UltimatelySocial
|
7 |
Author URI: http://ultimatelysocial.com
|
8 |
-
Version: 1.
|
9 |
License: GPLv2
|
10 |
*/
|
11 |
|
@@ -32,6 +32,11 @@ register_activation_hook(__FILE__, 'sfsi_plus_activate_plugin' );
|
|
32 |
register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
|
33 |
register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
//shortcode for the ultimate social icons {Monad}
|
36 |
add_shortcode("DISPLAY_ULTIMATE_PLUS", "DISPLAY_ULTIMATE_PLUS");
|
37 |
function DISPLAY_ULTIMATE_PLUS($args = null, $content = null)
|
5 |
Description: The best social media plugin on the market. And 100% FREE. Allows you to add social media & share icons to your blog (esp. Facebook, Twitter, Email, RSS, Pinterest, Instagram, Google+, LinkedIn, Share-button). It offers a wide range of design options and other features.
|
6 |
Author: UltimatelySocial
|
7 |
Author URI: http://ultimatelysocial.com
|
8 |
+
Version: 1.7
|
9 |
License: GPLv2
|
10 |
*/
|
11 |
|
32 |
register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
|
33 |
register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
|
34 |
|
35 |
+
if(!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 1.7)
|
36 |
+
{
|
37 |
+
add_action("init", "sfsi_plus_update_plugin");
|
38 |
+
}
|
39 |
+
|
40 |
//shortcode for the ultimate social icons {Monad}
|
41 |
add_shortcode("DISPLAY_ULTIMATE_PLUS", "DISPLAY_ULTIMATE_PLUS");
|
42 |
function DISPLAY_ULTIMATE_PLUS($args = null, $content = null)
|
views/sfsi_option_view2.php
CHANGED
@@ -22,7 +22,8 @@
|
|
22 |
<div class="row sfsiplus_email_section">
|
23 |
<h2 class="sfsicls_email">Email</h2>
|
24 |
<div class="inr_cont">
|
25 |
-
<p>
|
|
|
26 |
<p>Please pick which icon type you want to use:</p>
|
27 |
<ul class="tab_2_email_sec">
|
28 |
<li>
|
22 |
<div class="row sfsiplus_email_section">
|
23 |
<h2 class="sfsicls_email">Email</h2>
|
24 |
<div class="inr_cont">
|
25 |
+
<p>Allows people to subscribe to your site on <a href="http://www.specificfeeds.com/widget/emailsubscribe/<?php echo base64_encode($feedId); ?>/<?php echo base64_encode(8); ?>" target="_new">this screen</a> and receive new posts automatically. The service is 100% FREE, you get full access to the emails & interesting statistics (please <a target="_new" href="http://www.specificfeeds.com/<?php echo $feedId; ?>?getParam=feeds_claims">claim your feed</a> for that) and it also make sense if you already offer an email newsletter <a href="http://specificfeeds.com/rss" target="_new">(learn more)</a>. </p>
|
26 |
+
|
27 |
<p>Please pick which icon type you want to use:</p>
|
28 |
<ul class="tab_2_email_sec">
|
29 |
<li>
|