Version Description
- Update: Security Patch.
Download this release
Release Info
Developer | socialdude |
Plugin | Social Share Icons & Social Share Buttons |
Version | 3.0.7 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.7
- helpers/common_helper.php +10 -1
- libs/controllers/sfsi_buttons_controller.php +11 -3
- libs/controllers/sfsi_class_theme_check.php +3 -3
- libs/controllers/sfsi_iconsUpload_contoller.php +2 -2
- libs/controllers/sfsi_socialhelper.php +95 -28
- libs/sfsi_install_uninstall.php +1 -1
- readme.txt +11 -4
- ultimate_social_media_icons.php +30 -3
- views/sfsi_option_view1.php +4 -1
- views/sfsi_option_view5.php +1 -1
- views/sfsi_options_view.php +0 -1
helpers/common_helper.php
CHANGED
@@ -207,4 +207,13 @@ if(!function_exists('sfsi_plus_generate_other_icon_effect_admin_html')){
|
|
207 |
}
|
208 |
|
209 |
}
|
210 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
}
|
208 |
|
209 |
}
|
210 |
+
}
|
211 |
+
if ( ! function_exists('sfsi_plus_write_log')) {
|
212 |
+
function sfsi_plus_write_log ( $log ) {
|
213 |
+
if ( is_array( $log ) || is_object( $log ) ) {
|
214 |
+
error_log( print_r( $log, true ) );
|
215 |
+
} else {
|
216 |
+
error_log( $log );
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
libs/controllers/sfsi_buttons_controller.php
CHANGED
@@ -973,7 +973,9 @@ function sfsiplusremoveFooter()
|
|
973 |
add_action('wp_ajax_getIconPreview','sfsiPlusGetIconPreview');
|
974 |
function sfsiPlusGetIconPreview()
|
975 |
{
|
976 |
-
extract($_POST);
|
|
|
|
|
977 |
echo '<img src="'.$iconname."/icon_".$iconValue.'.png" >';
|
978 |
die;
|
979 |
}
|
@@ -987,7 +989,11 @@ function sfsiplus_curlerrornotification()
|
|
987 |
add_action('wp_ajax_getForm','sfsiPlusGetForm');
|
988 |
function sfsiPlusGetForm()
|
989 |
{
|
990 |
-
extract($_POST);
|
|
|
|
|
|
|
|
|
991 |
?>
|
992 |
<xmp>
|
993 |
<div class="sfsi_subscribe_Popinner">
|
@@ -1209,7 +1215,9 @@ add_action('wp_ajax_sfsiplusOfflineChatMessage','sfsi_plus_OfflineChatMessage');
|
|
1209 |
|
1210 |
function sfsi_plus_OfflineChatMessage(){
|
1211 |
error_reporting(0);
|
1212 |
-
extract($_POST);
|
|
|
|
|
1213 |
$body="<table><tr><th>Site:</th><td>".home_url()."</td></tr><tr><th>Email:</th><td>".$email."</td></tr><tr><th>Message:</th><td>".$message."</td></tr></table>";
|
1214 |
$sent=wp_mail('help@ultimatelysocial.com',"New question from user",$body,array('Content-Type: text/html; charset=UTF-8'));
|
1215 |
if(isset($sent)&&(true===$sent)){
|
973 |
add_action('wp_ajax_getIconPreview','sfsiPlusGetIconPreview');
|
974 |
function sfsiPlusGetIconPreview()
|
975 |
{
|
976 |
+
// extract($_POST);
|
977 |
+
$iconname = isset($_POST) && isset($_POST['iconname']) ? sanitize_text_field($_POST['iconname']):'';
|
978 |
+
$iconValue = isset($_POST) && isset($_POST['iconValue']) ? sanitize_text_field($_POST['iconValue']):'';
|
979 |
echo '<img src="'.$iconname."/icon_".$iconValue.'.png" >';
|
980 |
die;
|
981 |
}
|
989 |
add_action('wp_ajax_getForm','sfsiPlusGetForm');
|
990 |
function sfsiPlusGetForm()
|
991 |
{
|
992 |
+
// extract($_POST);
|
993 |
+
$heading = isset($_POST) && isset($_POST['heading'])?sanitize_text_field($_POST['heading']):'';
|
994 |
+
$placeholder = isset($_POST) && isset($_POST['placeholder'])?sanitize_text_field($_POST['placeholder']):'';
|
995 |
+
$button = isset($_POST) && isset($_POST['button'])?sanitize_text_field($_POST['button']):'';
|
996 |
+
|
997 |
?>
|
998 |
<xmp>
|
999 |
<div class="sfsi_subscribe_Popinner">
|
1215 |
|
1216 |
function sfsi_plus_OfflineChatMessage(){
|
1217 |
error_reporting(0);
|
1218 |
+
// extract($_POST);
|
1219 |
+
$email = isset($_POST) && isset($_POST['email']) ? sanitize_text_field($_POST['email']) : '';
|
1220 |
+
$message = isset($_POST) && isset($_POST['message']) ? sanitize_textarea_field($_POST['message']) : '';
|
1221 |
$body="<table><tr><th>Site:</th><td>".home_url()."</td></tr><tr><th>Email:</th><td>".$email."</td></tr><tr><th>Message:</th><td>".$message."</td></tr></table>";
|
1222 |
$sent=wp_mail('help@ultimatelysocial.com',"New question from user",$body,array('Content-Type: text/html; charset=UTF-8'));
|
1223 |
if(isset($sent)&&(true===$sent)){
|
libs/controllers/sfsi_class_theme_check.php
CHANGED
@@ -302,12 +302,12 @@ class sfsi_plus_ThemeCheck
|
|
302 |
public function sfsi_plus_GetMetaKeywords($domainname){
|
303 |
$url = get_bloginfo('url');
|
304 |
$res= wp_remote_get($url);
|
305 |
-
$meta_local =
|
306 |
if ( is_array( $res ) && ! is_wp_error( $res ) ) {
|
307 |
$body = $res['body']; // use the content
|
308 |
-
$meta =
|
309 |
if(false==class_exists("DomDocument")) {
|
310 |
-
$metas=
|
311 |
preg_match_all( '/\<meta.+name="(\w*)".+content="(.*)"/i', $body, $metas);
|
312 |
preg_match_all( '/\<meta.+property="og:(\w*)".+content="(.*)"/i', $body, $metas2);
|
313 |
// $metas[1]=array_merge($metas[1],$metas2[1]);
|
302 |
public function sfsi_plus_GetMetaKeywords($domainname){
|
303 |
$url = get_bloginfo('url');
|
304 |
$res= wp_remote_get($url);
|
305 |
+
$meta_local = array("title"=>array(),"description"=>array(),"keyword"=>array());
|
306 |
if ( is_array( $res ) && ! is_wp_error( $res ) ) {
|
307 |
$body = $res['body']; // use the content
|
308 |
+
$meta = array();
|
309 |
if(false==class_exists("DomDocument")) {
|
310 |
+
$metas=array();
|
311 |
preg_match_all( '/\<meta.+name="(\w*)".+content="(.*)"/i', $body, $metas);
|
312 |
preg_match_all( '/\<meta.+property="og:(\w*)".+content="(.*)"/i', $body, $metas2);
|
313 |
// $metas[1]=array_merge($metas[1],$metas2[1]);
|
libs/controllers/sfsi_iconsUpload_contoller.php
CHANGED
@@ -220,8 +220,8 @@ add_action('wp_ajax_plus_UploadIcons','sfsi_plus_UploadIcons');
|
|
220 |
/* uplaod custom icon {change by monad}*/
|
221 |
function sfsi_plus_UploadIcons()
|
222 |
{
|
223 |
-
extract($_POST);
|
224 |
-
|
225 |
$upload_dir = wp_upload_dir();
|
226 |
$ThumbSquareSize = 100; //Thumbnail will be 57X57
|
227 |
$Quality = 90; //jpeg quality
|
220 |
/* uplaod custom icon {change by monad}*/
|
221 |
function sfsi_plus_UploadIcons()
|
222 |
{
|
223 |
+
// extract($_POST);
|
224 |
+
$custom_imgurl = isset($_POST) && isset($_POST['custom_imgurl']) ? sanitize_text_field($_POST['custom_imgurl']):'';
|
225 |
$upload_dir = wp_upload_dir();
|
226 |
$ThumbSquareSize = 100; //Thumbnail will be 57X57
|
227 |
$Quality = 90; //jpeg quality
|
libs/controllers/sfsi_socialhelper.php
CHANGED
@@ -522,40 +522,44 @@ class sfsi_plus_SocialHelper
|
|
522 |
$sfsi_plus_instagram_sf_count = unserialize(get_option('sfsi_plus_instagram_sf_count',false));
|
523 |
|
524 |
/*if date is empty (for decrease request count)*/
|
|
|
|
|
|
|
|
|
525 |
|
526 |
-
|
527 |
-
if(empty($sfsi_plus_instagram_sf_count["date_sf"]))
|
528 |
{
|
529 |
-
$sfsi_plus_instagram_sf_count["date_sf"] = strtotime(date("Y-m-d"));
|
530 |
-
$counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
531 |
-
$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
532 |
-
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
|
|
533 |
}
|
534 |
else
|
535 |
{
|
536 |
-
$phpVersion = phpVersion();
|
537 |
-
if($phpVersion >= '5.3')
|
538 |
-
{
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
}
|
547 |
// var_dump($sfsi_plus_instagram_sf_count,isset($diff),$sfsi_plus_instagram_sf_count["date_sf"],date("Y-m-d", $sfsi_plus_instagram_sf_count["date_sf"]),date('Y-m-d'),$diff , $diff->format("%a"));die();
|
548 |
-
if((isset($diff) && $diff->format("%a") >= 1)||$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"]=="")
|
549 |
-
{
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
}
|
555 |
-
else
|
556 |
-
{
|
557 |
$counts = $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"];
|
558 |
-
}
|
559 |
|
560 |
}
|
561 |
|
@@ -566,6 +570,64 @@ class sfsi_plus_SocialHelper
|
|
566 |
|
567 |
return $counts;
|
568 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
570 |
/* get no of subscribers from specificfeeds for current blog count*/
|
571 |
public function sfsi_plus_getFeedSubscriberCount($feedid)
|
@@ -582,8 +644,13 @@ class sfsi_plus_SocialHelper
|
|
582 |
'sslverify' => true
|
583 |
);
|
584 |
$resp = wp_remote_post( 'https://www.specificfeeds.com/wordpress/wpCountSubscriber', $args );
|
585 |
-
$httpcode = wp_remote_retrieve_response_code($resp);
|
586 |
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
if($httpcode == 200){
|
588 |
|
589 |
if(!empty($resp["body"]))
|
522 |
$sfsi_plus_instagram_sf_count = unserialize(get_option('sfsi_plus_instagram_sf_count',false));
|
523 |
|
524 |
/*if date is empty (for decrease request count)*/
|
525 |
+
if(WP_DEBUG_LOG==true){
|
526 |
+
sfsi_plus_write_log('retrive sf count');
|
527 |
+
sfsi_plus_write_log($sfsi_plus_instagram_sf_count);
|
528 |
+
}
|
529 |
|
530 |
+
if(empty($sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"]))
|
|
|
531 |
{
|
532 |
+
// $sfsi_plus_instagram_sf_count["date_sf"] = strtotime(date("Y-m-d"));
|
533 |
+
// $counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
534 |
+
// $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
535 |
+
// update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
536 |
+
$counts=0;
|
537 |
}
|
538 |
else
|
539 |
{
|
540 |
+
// $phpVersion = phpVersion();
|
541 |
+
// if($phpVersion >= '5.3')
|
542 |
+
// {
|
543 |
+
// $diff = date_diff(
|
544 |
+
// date_create(
|
545 |
+
// date("Y-m-d", $sfsi_plus_instagram_sf_count["date_sf"])
|
546 |
+
// ),
|
547 |
+
// date_create(
|
548 |
+
// date("Y-m-d")
|
549 |
+
// ));
|
550 |
+
// }
|
551 |
// var_dump($sfsi_plus_instagram_sf_count,isset($diff),$sfsi_plus_instagram_sf_count["date_sf"],date("Y-m-d", $sfsi_plus_instagram_sf_count["date_sf"]),date('Y-m-d'),$diff , $diff->format("%a"));die();
|
552 |
+
// if((isset($diff) && $diff->format("%a") >= 1)||$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"]=="")
|
553 |
+
// {
|
554 |
+
// $sfsi_plus_instagram_sf_count["date_sf"] = strtotime(date("Y-m-d"));
|
555 |
+
// $counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
556 |
+
// $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
557 |
+
// update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
558 |
+
// }
|
559 |
+
// else
|
560 |
+
// {
|
561 |
$counts = $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"];
|
562 |
+
// }
|
563 |
|
564 |
}
|
565 |
|
570 |
|
571 |
return $counts;
|
572 |
}
|
573 |
+
public function SFSI_getFeedSubscriberFetch($feedid)
|
574 |
+
{
|
575 |
+
$sfsi_plus_instagram_sf_count = unserialize(get_option('sfsi_plus_instagram_sf_count',false));
|
576 |
+
|
577 |
+
/*if date is empty (for decrease request count)*/
|
578 |
+
if(WP_DEBUG_LOG==true){
|
579 |
+
sfsi_plus_write_log('debugging cron job fetch sf');
|
580 |
+
sfsi_plus_write_log('old count');
|
581 |
+
sfsi_plus_write_log($sfsi_plus_instagram_sf_count);
|
582 |
+
}
|
583 |
+
|
584 |
+
// if(empty($sfsi_plus_instagram_sf_count["date_sf"]))
|
585 |
+
// {
|
586 |
+
$sfsi_plus_instagram_sf_count["date_sf"] = strtotime(date("Y-m-d"));
|
587 |
+
$counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
588 |
+
$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
589 |
+
if(WP_DEBUG_LOG==true){
|
590 |
+
sfsi_plus_write_log('updated count');
|
591 |
+
sfsi_plus_write_log($sfsi_plus_instagram_sf_count);
|
592 |
+
sfsi_plus_write_log('sf_count_updated');
|
593 |
+
}
|
594 |
+
update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
595 |
+
// }
|
596 |
+
// else
|
597 |
+
// {
|
598 |
+
// $phpVersion = phpVersion();
|
599 |
+
// if($phpVersion >= '5.3')
|
600 |
+
// {
|
601 |
+
// $diff = date_diff(
|
602 |
+
// date_create(
|
603 |
+
// date("Y-m-d", $sfsi_plus_instagram_sf_count["date_sf"])
|
604 |
+
// ),
|
605 |
+
// date_create(
|
606 |
+
// date("Y-m-d")
|
607 |
+
// ));
|
608 |
+
// }
|
609 |
+
// var_dump($sfsi_plus_instagram_sf_count,isset($diff),$sfsi_plus_instagram_sf_count["date_sf"],date("Y-m-d", $sfsi_plus_instagram_sf_count["date_sf"]),date('Y-m-d'),$diff , $diff->format("%a"));die();
|
610 |
+
// if((isset($diff) && $diff->format("%a") >= 1)||$sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"]=="")
|
611 |
+
// {
|
612 |
+
// $sfsi_plus_instagram_sf_count["date_sf"] = strtotime(date("Y-m-d"));
|
613 |
+
// $counts = $this->sfsi_plus_getFeedSubscriberCount($feedid);
|
614 |
+
// $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"] = $counts;
|
615 |
+
// update_option('sfsi_plus_instagram_sf_count', serialize($sfsi_plus_instagram_sf_count));
|
616 |
+
// }
|
617 |
+
// else
|
618 |
+
// {
|
619 |
+
// $counts = $sfsi_plus_instagram_sf_count["sfsi_plus_sf_count"];
|
620 |
+
// }
|
621 |
+
|
622 |
+
// }
|
623 |
+
|
624 |
+
if(empty($counts) || $counts == "O")
|
625 |
+
{
|
626 |
+
$counts = 0;
|
627 |
+
}
|
628 |
+
|
629 |
+
return $counts;
|
630 |
+
}
|
631 |
|
632 |
/* get no of subscribers from specificfeeds for current blog count*/
|
633 |
public function sfsi_plus_getFeedSubscriberCount($feedid)
|
644 |
'sslverify' => true
|
645 |
);
|
646 |
$resp = wp_remote_post( 'https://www.specificfeeds.com/wordpress/wpCountSubscriber', $args );
|
|
|
647 |
|
648 |
+
$httpcode = wp_remote_retrieve_response_code($resp);
|
649 |
+
if(WP_DEBUG_LOG==true){
|
650 |
+
sfsi_plus_write_log('returned response for wpCountSubscriber');
|
651 |
+
sfsi_plus_write_log($resp);
|
652 |
+
sfsi_plus_write_log($httpcode);
|
653 |
+
}
|
654 |
if($httpcode == 200){
|
655 |
|
656 |
if(!empty($resp["body"]))
|
libs/sfsi_install_uninstall.php
CHANGED
@@ -12,7 +12,7 @@ function sfsi_plus_update_plugin()
|
|
12 |
}
|
13 |
|
14 |
//Install version
|
15 |
-
update_option("sfsi_plus_pluginVersion", "3.
|
16 |
|
17 |
if(!get_option('sfsi_plus_serverphpVersionnotification'))
|
18 |
{
|
12 |
}
|
13 |
|
14 |
//Install version
|
15 |
+
update_option("sfsi_plus_pluginVersion", "3.07");
|
16 |
|
17 |
if(!get_option('sfsi_plus_serverphpVersionnotification'))
|
18 |
{
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: socialsharepro
|
|
3 |
Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.1
|
6 |
-
Stable tag: 3.0.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -444,10 +444,17 @@ The premium plugin offrs many more social buttons from other social media platfo
|
|
444 |
|
445 |
|
446 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
= 3.0.5 =
|
448 |
-
* Update: Theme
|
449 |
* Update: Deprecated Google plus
|
450 |
-
* Updated:
|
451 |
|
452 |
= 3.0.4 =
|
453 |
* Updated: Security patch in freemius.
|
@@ -823,5 +830,5 @@ The premium plugin offrs many more social buttons from other social media platfo
|
|
823 |
|
824 |
== Upgrade Notice ==
|
825 |
|
826 |
-
= 3.0.
|
827 |
* Please update
|
3 |
Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.1
|
6 |
+
Stable tag: 3.0.7
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
444 |
|
445 |
|
446 |
== Changelog ==
|
447 |
+
= 3.0.7 =
|
448 |
+
* Update: Security Patch.
|
449 |
+
|
450 |
+
= 3.0.6 =
|
451 |
+
* Update: security update.
|
452 |
+
* Update: save button not working.
|
453 |
+
|
454 |
= 3.0.5 =
|
455 |
+
* Update: Theme cheker dom error updated.
|
456 |
* Update: Deprecated Google plus
|
457 |
+
* Updated: css changes to make icons more symetric.
|
458 |
|
459 |
= 3.0.4 =
|
460 |
* Updated: Security patch in freemius.
|
830 |
|
831 |
== Upgrade Notice ==
|
832 |
|
833 |
+
= 3.0.7 =
|
834 |
* Please update
|
ultimate_social_media_icons.php
CHANGED
@@ -7,7 +7,7 @@ Author: social share pro
|
|
7 |
Text Domain: ultimate-social-media-plus
|
8 |
Domain Path: /languages
|
9 |
Author URI: http://socialshare.pro/
|
10 |
-
Version: 3.0.
|
11 |
License: GPLv2
|
12 |
*/
|
13 |
|
@@ -16,6 +16,7 @@ sfsi_plus_error_reporting();
|
|
16 |
global $wpdb;
|
17 |
/* define the Root for URL and Document */
|
18 |
|
|
|
19 |
// Create a helper function for easy SDK access.
|
20 |
function sfsi_plus_freemius() {
|
21 |
global $usmp_fs;
|
@@ -51,7 +52,8 @@ function sfsi_plus_freemius() {
|
|
51 |
//do_action('usmp_fs_loaded');
|
52 |
|
53 |
define('SFSI_PLUS_DOCROOT', dirname(__FILE__));
|
54 |
-
define('SFSI_PLUS_PLUGURL', plugin_dir_url(__FILE__));
|
|
|
55 |
define('SFSI_PLUS_WEBROOT', str_replace(getcwd(), home_url(), dirname(__FILE__)));
|
56 |
define('SFSI_PLUS_DOMAIN', 'ultimate-social-media-plus');
|
57 |
define('SFSI_PLUS_SUPPORT_FORM','https://goo.gl/jySrSF');
|
@@ -103,7 +105,7 @@ register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
|
|
103 |
//register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
|
104 |
|
105 |
/*Plugin version setup*/
|
106 |
-
if(!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.
|
107 |
{
|
108 |
add_action("init", "sfsi_plus_update_plugin");
|
109 |
}
|
@@ -968,6 +970,31 @@ function sfsi_plus_getdomain($url)
|
|
968 |
return false;
|
969 |
}
|
970 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
971 |
/* redirect setting page hook */
|
972 |
add_action('admin_init', 'sfsi_plus_plugin_redirect');
|
973 |
function sfsi_plus_plugin_redirect()
|
7 |
Text Domain: ultimate-social-media-plus
|
8 |
Domain Path: /languages
|
9 |
Author URI: http://socialshare.pro/
|
10 |
+
Version: 3.0.7
|
11 |
License: GPLv2
|
12 |
*/
|
13 |
|
16 |
global $wpdb;
|
17 |
/* define the Root for URL and Document */
|
18 |
|
19 |
+
|
20 |
// Create a helper function for easy SDK access.
|
21 |
function sfsi_plus_freemius() {
|
22 |
global $usmp_fs;
|
52 |
//do_action('usmp_fs_loaded');
|
53 |
|
54 |
define('SFSI_PLUS_DOCROOT', dirname(__FILE__));
|
55 |
+
// define('SFSI_PLUS_PLUGURL', plugin_dir_url(__FILE__));
|
56 |
+
define('SFSI_PLUS_PLUGURL', site_url().'/wp-content/plugins/ultimate-social-media-plus/');
|
57 |
define('SFSI_PLUS_WEBROOT', str_replace(getcwd(), home_url(), dirname(__FILE__)));
|
58 |
define('SFSI_PLUS_DOMAIN', 'ultimate-social-media-plus');
|
59 |
define('SFSI_PLUS_SUPPORT_FORM','https://goo.gl/jySrSF');
|
105 |
//register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
|
106 |
|
107 |
/*Plugin version setup*/
|
108 |
+
if(!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.07)
|
109 |
{
|
110 |
add_action("init", "sfsi_plus_update_plugin");
|
111 |
}
|
970 |
return false;
|
971 |
}
|
972 |
|
973 |
+
// add custom interval
|
974 |
+
function sfsi_plus_cron_add_minute( $schedules ) {
|
975 |
+
// Adds once every minute to the existing schedules.
|
976 |
+
$schedules['everyday'] = array(
|
977 |
+
'interval' => 60,
|
978 |
+
'display' => __( 'Once Every 24 hr' )
|
979 |
+
);
|
980 |
+
return $schedules;
|
981 |
+
}
|
982 |
+
add_filter( 'cron_schedules', 'sfsi_plus_cron_add_minute' );
|
983 |
+
// create a scheduled event (if it does not exist already)
|
984 |
+
function sfsi_plus_sf_instagram_count_fetcher(){
|
985 |
+
$sfsi_plus_SocialHelper= new sfsi_plus_SocialHelper();
|
986 |
+
$feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id',false));
|
987 |
+
return $sfsi_plus_SocialHelper->SFSI_getFeedSubscriberFetch();
|
988 |
+
}
|
989 |
+
function sfsi_plus_cronstarter_activation() {
|
990 |
+
sfsi_plus_write_log(wp_next_scheduled( 'sfsi_plus_sf_instagram_count_fetcher' ));
|
991 |
+
if( !wp_next_scheduled( 'sfsi_plus_sf_instagram_count_fetcher' ) ) {
|
992 |
+
wp_schedule_event( time(), 'everyday', 'sfsi_plus_sf_instagram_count_fetcher' );
|
993 |
+
}
|
994 |
+
}
|
995 |
+
// and make sure it's called whenever WordPress loads
|
996 |
+
add_action('wp', 'sfsi_plus_cronstarter_activation');
|
997 |
+
|
998 |
/* redirect setting page hook */
|
999 |
add_action('admin_init', 'sfsi_plus_plugin_redirect');
|
1000 |
function sfsi_plus_plugin_redirect()
|
views/sfsi_option_view1.php
CHANGED
@@ -265,7 +265,10 @@
|
|
265 |
|
266 |
<!-- Custom icon section start here -->
|
267 |
<?php
|
268 |
-
$icons= ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array() ;
|
|
|
|
|
|
|
269 |
$total_icons=count($icons);
|
270 |
end($icons);
|
271 |
$endkey=key($icons);
|
265 |
|
266 |
<!-- Custom icon section start here -->
|
267 |
<?php
|
268 |
+
$icons= (isset($option1['sfsi_custom_files'])) ? unserialize($option1['sfsi_custom_files']) : array() ;
|
269 |
+
if(!is_array($icons)){
|
270 |
+
$icons=array();
|
271 |
+
}
|
272 |
$total_icons=count($icons);
|
273 |
end($icons);
|
274 |
$endkey=key($icons);
|
views/sfsi_option_view5.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/* unserialize all saved option for section 5 options */
|
4 |
-
$icons = ($option1['sfsi_custom_files']) ? unserialize($option1['sfsi_custom_files']) : array() ;
|
5 |
|
6 |
$option3 = unserialize(get_option('sfsi_plus_section3_options',false));
|
7 |
|
1 |
<?php
|
2 |
|
3 |
/* unserialize all saved option for section 5 options */
|
4 |
+
$icons = (isset($option1['sfsi_custom_files'])) ? unserialize($option1['sfsi_custom_files']) : array() ;
|
5 |
|
6 |
$option3 = unserialize(get_option('sfsi_plus_section3_options',false));
|
7 |
|
views/sfsi_options_view.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
|
4 |
</div>
|
5 |
<!-- END Loader Image section -->
|
6 |
-
|
7 |
<!-- javascript error loader -->
|
8 |
<div class="error" id="sfsi_onload_errors" style="margin-left: 60px;display: none;">
|
9 |
<p>
|
3 |
|
4 |
</div>
|
5 |
<!-- END Loader Image section -->
|
|
|
6 |
<!-- javascript error loader -->
|
7 |
<div class="error" id="sfsi_onload_errors" style="margin-left: 60px;display: none;">
|
8 |
<p>
|