Version Description
- Fixed GDPR related bug.
- Update guide for facebook custom app.
- Fixed facebook related issue.
- Fixed some warnings.
Download this release
Release Info
Developer | cyberlord92 |
Plugin | Social Login |
Version | 6.6.9 |
Comparing to | |
See all releases |
Code changes from version 6.6.8 to 6.6.9
- class-mo-openid-login-widget.php +89 -64
- class-mo-openid-sso-customer.php +67 -1
- includes/css/mo_openid_feedback.css +44 -0
- includes/css/mo_openid_style.css +31 -3
- miniorange_openid_sso_settings.php +116 -12
- miniorange_openid_sso_settings_page.php +24 -20
- mo_openid_feedback_form.php +139 -0
- readme.txt +14 -2
- uninstall.php +9 -0
class-mo-openid-login-widget.php
CHANGED
@@ -36,6 +36,13 @@ if(mo_openid_is_customer_registered()) {
|
|
36 |
|
37 |
public function openidloginForm(){
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
$selected_theme = get_option('mo_openid_login_theme');
|
40 |
$appsConfigured = get_option('mo_openid_google_enable') | get_option('mo_openid_salesforce_enable') | get_option('mo_openid_facebook_enable') | get_option('mo_openid_linkedin_enable') | get_option('mo_openid_instagram_enable') | get_option('mo_openid_amazon_enable') | get_option('mo_openid_windowslive_enable') | get_option('mo_openid_twitter_enable') | get_option('mo_openid_vkontakte_enable');
|
41 |
$spacebetweenicons = get_option('mo_login_icon_space');
|
@@ -65,7 +72,7 @@ if(mo_openid_is_customer_registered()) {
|
|
65 |
$gdpr_setting = "disabled='disabled'";
|
66 |
}
|
67 |
else
|
68 |
-
$gdpr_setting =
|
69 |
|
70 |
$url = get_option('mo_openid_privacy_policy_url');
|
71 |
$text = get_option('mo_openid_privacy_policy_text');
|
@@ -86,23 +93,27 @@ if(mo_openid_is_customer_registered()) {
|
|
86 |
|
87 |
<p style="color:#<?php echo $customTextColor ?>"><?php echo $customText ?>
|
88 |
</p>
|
89 |
-
<?php if(get_option('mo_openid_gdpr_consent_enable')){
|
|
|
90 |
<input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox"><label class="mo-consent"><?php echo $consent_message;?></label>
|
|
|
91 |
<?php }
|
|
|
92 |
if($customTheme == 'default'){
|
93 |
|
94 |
if( get_option('mo_openid_facebook_enable') ) {
|
95 |
if($selected_theme == 'longbutton'){
|
|
|
96 |
?>
|
97 |
|
98 |
<a rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('facebook','<?php echo $facebook_custom_app?>');" style="width:<?php echo $customWidth ?>px !important;padding-top:<?php echo $customHeight-29 ?>px !important;padding-bottom:<?php echo $customHeight-29 ?>px !important;margin-bottom:<?php echo $spacebetweenicons-5 ?>px !important;border-radius:<?php echo $customBoundary ?>px !important;" class="btn-mo btn btn-block btn-social btn-facebook btn-custom-size login-button" > <i style="padding-top:<?php echo $customHeight-35 ?>px !important" class="fa fa-facebook"></i><?php
|
99 |
-
echo get_option('mo_openid_login_button_customize_text');
|
100 |
<?php
|
101 |
|
102 |
-
}else{
|
103 |
-
|
104 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Facebook" onClick="moOpenIdLogin('facebook','<?php echo $facebook_custom_app?>');"><img alt='Facebook' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/facebook.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> btn-mo login-button" ></a>
|
105 |
|
|
|
106 |
<?php }
|
107 |
|
108 |
}
|
@@ -115,7 +126,7 @@ if(mo_openid_is_customer_registered()) {
|
|
115 |
echo get_option('mo_openid_login_button_customize_text'); ?> Google</a>
|
116 |
<?php }
|
117 |
else{ ?>
|
118 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('google','<?php echo $google_custom_app?>');" title="<?php echo $customTextofTitle ?> Google" ><img alt='Google' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/google.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
119 |
<?php
|
120 |
}
|
121 |
}
|
@@ -128,7 +139,7 @@ if(mo_openid_is_customer_registered()) {
|
|
128 |
echo get_option('mo_openid_login_button_customize_text'); ?> Vkontakte</a>
|
129 |
<?php }
|
130 |
else{ ?>
|
131 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('vkontakte','<?php echo $vkontakte_custom_app?>');" title="<?php echo $customTextofTitle ?> Vkontakte" ><img alt='Vkontakte' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/vk.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
132 |
<?php
|
133 |
}
|
134 |
}
|
@@ -141,7 +152,7 @@ if(mo_openid_is_customer_registered()) {
|
|
141 |
else{ ?>
|
142 |
|
143 |
|
144 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Twitter" onClick="moOpenIdLogin('twitter','<?php echo $twitter_custom_app?>');"><img alt='Twitter' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/twitter.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
145 |
<?php }
|
146 |
}
|
147 |
|
@@ -151,7 +162,7 @@ if(mo_openid_is_customer_registered()) {
|
|
151 |
echo get_option('mo_openid_login_button_customize_text'); ?> LinkedIn</a>
|
152 |
<?php }
|
153 |
else{ ?>
|
154 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> LinkedIn" onClick="moOpenIdLogin('linkedin','<?php echo $linkedin_custom_app?>');"><img alt='LinkedIn' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/linkedin.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> btn-mo login-button" ></a>
|
155 |
<?php }
|
156 |
}
|
157 |
|
@@ -163,7 +174,7 @@ if(mo_openid_is_customer_registered()) {
|
|
163 |
else{ ?>
|
164 |
|
165 |
|
166 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Instagram" onClick="moOpenIdLogin('instagram','<?php echo $instagram_custom_app?>');"><img alt='Instagram' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/instagram.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
167 |
<?php }
|
168 |
}
|
169 |
|
@@ -174,7 +185,7 @@ if(mo_openid_is_customer_registered()) {
|
|
174 |
<?php }
|
175 |
else{ ?>
|
176 |
|
177 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Amazon" onClick="moOpenIdLogin('amazon','<?php echo $amazon_custom_app?>');"><img alt='Amazon' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/amazon.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
178 |
<?php }
|
179 |
}
|
180 |
|
@@ -186,7 +197,7 @@ if(mo_openid_is_customer_registered()) {
|
|
186 |
else{ ?>
|
187 |
|
188 |
|
189 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Salesforce" onClick="moOpenIdLogin('salesforce','<?php echo $salesforce_custom_app?>');"><img alt='Salesforce' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/salesforce.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
190 |
<?php }
|
191 |
}
|
192 |
|
@@ -198,7 +209,7 @@ if(mo_openid_is_customer_registered()) {
|
|
198 |
else{ ?>
|
199 |
|
200 |
|
201 |
-
<a rel='nofollow' <?php echo $gdpr_setting; ?>title="<?php echo $customTextofTitle ?> Microsoft" onClick="moOpenIdLogin('windowslive','<?php echo $windowslive_custom_app?>');"><img alt='Windowslive' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/windowslive.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>
|
202 |
<?php }
|
203 |
}
|
204 |
|
@@ -216,7 +227,7 @@ if(mo_openid_is_customer_registered()) {
|
|
216 |
<?php }
|
217 |
else{ ?>
|
218 |
|
219 |
-
<a rel='nofollow'
|
220 |
|
221 |
<?php }
|
222 |
|
@@ -230,7 +241,7 @@ if(mo_openid_is_customer_registered()) {
|
|
230 |
echo get_option('mo_openid_login_button_customize_text'); ?> Google</a>
|
231 |
<?php }
|
232 |
else{ ?>
|
233 |
-
<a rel='nofollow'
|
234 |
<?php
|
235 |
}
|
236 |
}
|
@@ -243,7 +254,7 @@ if(mo_openid_is_customer_registered()) {
|
|
243 |
echo get_option('mo_openid_login_button_customize_text'); ?> Vkontakte</a>
|
244 |
<?php }
|
245 |
else{ ?>
|
246 |
-
<a rel='nofollow'
|
247 |
<?php
|
248 |
}
|
249 |
}
|
@@ -256,7 +267,7 @@ if(mo_openid_is_customer_registered()) {
|
|
256 |
echo get_option('mo_openid_login_button_customize_text'); ?> Twitter</a>
|
257 |
<?php }
|
258 |
else{ ?>
|
259 |
-
<a rel='nofollow'
|
260 |
<?php
|
261 |
}
|
262 |
}
|
@@ -267,7 +278,7 @@ if(mo_openid_is_customer_registered()) {
|
|
267 |
echo get_option('mo_openid_login_button_customize_text'); ?> LinkedIn</a>
|
268 |
<?php }
|
269 |
else{ ?>
|
270 |
-
<a rel='nofollow'
|
271 |
<?php }
|
272 |
}
|
273 |
|
@@ -279,7 +290,7 @@ if(mo_openid_is_customer_registered()) {
|
|
279 |
else{ ?>
|
280 |
|
281 |
|
282 |
-
<a rel='nofollow'
|
283 |
<?php }
|
284 |
}
|
285 |
|
@@ -290,7 +301,7 @@ if(mo_openid_is_customer_registered()) {
|
|
290 |
<?php }
|
291 |
else{ ?>
|
292 |
|
293 |
-
<a rel='nofollow'
|
294 |
<?php }
|
295 |
}
|
296 |
|
@@ -302,7 +313,7 @@ if(mo_openid_is_customer_registered()) {
|
|
302 |
else{ ?>
|
303 |
|
304 |
|
305 |
-
<a
|
306 |
<?php }
|
307 |
}
|
308 |
|
@@ -314,7 +325,7 @@ if(mo_openid_is_customer_registered()) {
|
|
314 |
else{ ?>
|
315 |
|
316 |
|
317 |
-
<a rel='nofollow'
|
318 |
<?php }
|
319 |
}
|
320 |
|
@@ -388,6 +399,7 @@ if(mo_openid_is_customer_registered()) {
|
|
388 |
|
389 |
public function openidloginFormShortCode( $atts ){
|
390 |
|
|
|
391 |
global $post;
|
392 |
$html = '';
|
393 |
//$this->error_message();
|
@@ -453,13 +465,14 @@ if(mo_openid_is_customer_registered()) {
|
|
453 |
$html .= '<label class="mo-consent"><input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox">';
|
454 |
$html .= $consent_message.'</label>';
|
455 |
}
|
|
|
456 |
if($customTheme == 'default'){
|
457 |
|
458 |
if( get_option('mo_openid_facebook_enable') ) {
|
459 |
if($selected_theme == 'longbutton'){
|
460 |
$html .= "<a rel='nofollow' ".$gdpr_setting." style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-facebook btn-custom-dec login-button' onClick=\"moOpenIdLogin('facebook','" .$facebook_custom_app."');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-facebook'></i>" . $buttonText . " Facebook</a>"; }
|
461 |
else{
|
462 |
-
$html .= "<a rel='nofollow'
|
463 |
}
|
464 |
|
465 |
}
|
@@ -470,7 +483,7 @@ if(mo_openid_is_customer_registered()) {
|
|
470 |
}
|
471 |
else{
|
472 |
|
473 |
-
$html .= "<a rel='nofollow'
|
474 |
|
475 |
}
|
476 |
}
|
@@ -483,9 +496,9 @@ if(mo_openid_is_customer_registered()) {
|
|
483 |
}
|
484 |
else{
|
485 |
|
486 |
-
$html .= "<a rel='nofollow'
|
487 |
$vkontakte_custom_app.
|
488 |
-
"');\" title= ' ".$customTextofTitle." Vkontakte'><img alt='Vkontakte' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/vk.png', __FILE__ ) . "' class='
|
489 |
|
490 |
}
|
491 |
}
|
@@ -496,8 +509,8 @@ if(mo_openid_is_customer_registered()) {
|
|
496 |
$twitter_custom_app.
|
497 |
"');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-twitter'></i>" . $buttonText . " Twitter</a>"; }
|
498 |
else{
|
499 |
-
$html .= "<a rel='nofollow'
|
500 |
-
$twitter_custom_app. "');\" ><img alt='Twitter' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/twitter.png', __FILE__ ) . "' class='
|
501 |
}
|
502 |
|
503 |
}
|
@@ -507,35 +520,35 @@ if(mo_openid_is_customer_registered()) {
|
|
507 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-linkedin btn-custom-dec login-button' onClick=\"moOpenIdLogin('linkedin','" .$twitter_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-linkedin'></i>" . $buttonText . " LinkedIn</a>";
|
508 |
}
|
509 |
else{
|
510 |
-
$html .= "<a rel='nofollow'
|
511 |
}
|
512 |
}if( get_option('mo_openid_instagram_enable') ) {
|
513 |
if($selected_theme == 'longbutton'){
|
514 |
$html .= "<a rel='nofollow' ".$gdpr_setting." style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-instagram btn-custom-dec login-button' onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-instagram'></i>" . $buttonText . " Instagram</a>";
|
515 |
}
|
516 |
else{
|
517 |
-
$html .= "<a rel='nofollow'
|
518 |
}
|
519 |
}if( get_option('mo_openid_amazon_enable') ) {
|
520 |
if($selected_theme == 'longbutton'){
|
521 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-soundcloud btn-custom-dec login-button' onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-amazon'></i>" . $buttonText . " Amazon</a>";
|
522 |
}
|
523 |
else{
|
524 |
-
$html .= "<a rel='nofollow'
|
525 |
}
|
526 |
}if( get_option('mo_openid_salesforce_enable') ) {
|
527 |
if($selected_theme == 'longbutton'){
|
528 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-vimeo btn-custom-dec login-button' onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-cloud'></i>" . $buttonText . " Salesforce</a>";
|
529 |
}
|
530 |
else{
|
531 |
-
$html .= "<a rel='nofollow'
|
532 |
}
|
533 |
}if( get_option('mo_openid_windowslive_enable') ) {
|
534 |
if($selected_theme == 'longbutton'){
|
535 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-microsoft btn-custom-dec login-button' onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-windows'></i>" . $buttonText . " Microsoft</a>";
|
536 |
}
|
537 |
else{
|
538 |
-
$html .= "<a rel='nofollow'
|
539 |
}
|
540 |
}
|
541 |
}
|
@@ -548,7 +561,7 @@ if(mo_openid_is_customer_registered()) {
|
|
548 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('facebook','" . $facebook_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-facebook'></i> " . $buttonText . " Facebook</a>";
|
549 |
}
|
550 |
else{
|
551 |
-
$html .= "<a rel='nofollow'
|
552 |
}
|
553 |
|
554 |
}
|
@@ -558,7 +571,7 @@ if(mo_openid_is_customer_registered()) {
|
|
558 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('google','" .$google_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-google-plus'></i> " . $buttonText . " Google</a>";
|
559 |
}
|
560 |
else{
|
561 |
-
$html .= "<a rel='nofollow'
|
562 |
|
563 |
}
|
564 |
}
|
@@ -568,7 +581,7 @@ if(mo_openid_is_customer_registered()) {
|
|
568 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('vkontakte','" . $vkontakte_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-vk'></i> " . $buttonText . " Vkontakte</a>";
|
569 |
}
|
570 |
else{
|
571 |
-
$html .= "<a rel='nofollow'
|
572 |
|
573 |
}
|
574 |
}
|
@@ -578,44 +591,44 @@ if(mo_openid_is_customer_registered()) {
|
|
578 |
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('twitter','" . $twitter_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-twitter'></i> " . $buttonText . " Twitter</a>";
|
579 |
}
|
580 |
else{
|
581 |
-
$html .= "<a rel='nofollow'
|
582 |
}
|
583 |
|
584 |
}
|
585 |
if( get_option('mo_openid_linkedin_enable') ) {
|
586 |
if($selected_theme == 'longbutton'){
|
587 |
-
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('linkedin','" . $
|
588 |
}
|
589 |
else{
|
590 |
-
$html .= "<a rel='nofollow'
|
591 |
}
|
592 |
}if( get_option('mo_openid_instagram_enable') ) {
|
593 |
if($selected_theme == 'longbutton'){
|
594 |
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-instagram'></i> " . $buttonText . " Instagram</a>";
|
595 |
}
|
596 |
else{
|
597 |
-
$html .= "<a rel='nofollow'
|
598 |
}
|
599 |
}if( get_option('mo_openid_amazon_enable') ) {
|
600 |
if($selected_theme == 'longbutton'){
|
601 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-amazon'></i> " . $buttonText . " Amazon</a>";
|
602 |
}
|
603 |
else{
|
604 |
-
$html .= "<a rel='nofollow'
|
605 |
}
|
606 |
}if( get_option('mo_openid_salesforce_enable') ) {
|
607 |
if($selected_theme == 'longbutton'){
|
608 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-cloud'></i> " . $buttonText . " Salesforce</a>";
|
609 |
}
|
610 |
else{
|
611 |
-
$html .= "<a rel='nofollow'
|
612 |
}
|
613 |
}if( get_option('mo_openid_windowslive_enable') ) {
|
614 |
if($selected_theme == 'longbutton'){
|
615 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-windows'></i> " . $buttonText . " Microsoft</a>";
|
616 |
}
|
617 |
else{
|
618 |
-
$html .= "<a rel='nofollow'
|
619 |
}
|
620 |
}
|
621 |
}
|
@@ -664,10 +677,12 @@ if(mo_openid_is_customer_registered()) {
|
|
664 |
if (value == 0) {
|
665 |
jQuery('#mo_openid_consent_checkbox').val(1);
|
666 |
jQuery(".btn-mo").attr("disabled",true);
|
|
|
667 |
}
|
668 |
else {
|
669 |
jQuery('#mo_openid_consent_checkbox').val(0);
|
670 |
jQuery(".btn-mo").attr("disabled",false);
|
|
|
671 |
//jQuery(".btn-mo").removeAttr("disabled");
|
672 |
}
|
673 |
}
|
@@ -681,7 +696,6 @@ if(mo_openid_is_customer_registered()) {
|
|
681 |
document.cookie = cookie_name + "=" + current_url + ";" + expires + ";path=/";
|
682 |
|
683 |
<?php
|
684 |
-
|
685 |
if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
|
686 |
$http = "https://";
|
687 |
} else {
|
@@ -693,18 +707,22 @@ if(mo_openid_is_customer_registered()) {
|
|
693 |
var http = '<?php echo $http;?>';
|
694 |
var http_host = '<?php echo $_SERVER['HTTP_HOST'];?>';
|
695 |
|
696 |
-
|
|
|
697 |
if ( request_uri.indexOf('wp-login.php') !=-1){
|
698 |
var redirect_url = base_url + '/?option=getmosociallogin&app_name=';
|
699 |
|
|
|
700 |
}else {
|
701 |
var redirect_url = http + http_host + request_uri;
|
702 |
if(redirect_url.indexOf('?') != -1){
|
703 |
redirect_url = redirect_url +'&option=getmosociallogin&app_name=';
|
|
|
704 |
}
|
705 |
else
|
706 |
{
|
707 |
redirect_url = redirect_url +'?option=getmosociallogin&app_name=';
|
|
|
708 |
}
|
709 |
}
|
710 |
}
|
@@ -932,7 +950,7 @@ if(mo_openid_is_customer_registered()) {
|
|
932 |
// delete first name, last name, user_url and profile_url from usermeta
|
933 |
global $wpdb;
|
934 |
$id = $_POST['user_id']; $metakey1 = 'first_name'; $metakey2 = 'last_name'; $metakey3 = 'moopenid_user_avatar'; $metakey4 = 'moopenid_user_profile_url';
|
935 |
-
$wpdb->query($wpdb->prepare('DELETE from '.$wpdb->prefix.'usermeta where user_id = %d and meta_key = %s or meta_key = %s or meta_key = %s or meta_key = %s
|
936 |
update_user_meta($id,'mo_openid_data_deleted','1');
|
937 |
exit;
|
938 |
}
|
@@ -979,7 +997,7 @@ if(mo_openid_is_customer_registered()) {
|
|
979 |
$username = $email_explode[0];
|
980 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $username));
|
981 |
if( !empty($username_user_id) ){
|
982 |
-
wp_die(
|
983 |
}
|
984 |
$_SESSION['username'] = $username;
|
985 |
}
|
@@ -1004,7 +1022,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1004 |
|
1005 |
if(is_wp_error( $user_id )) {
|
1006 |
//print_r($user_id);
|
1007 |
-
wp_die(
|
1008 |
}
|
1009 |
|
1010 |
$user = get_user_by('email', $_SESSION['user_email'] );
|
@@ -1081,7 +1099,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1081 |
|
1082 |
$send_content = send_otp_token($user_email);
|
1083 |
if($send_content['status']=='FAILURE'){
|
1084 |
-
$message =
|
1085 |
wp_die($message);
|
1086 |
}
|
1087 |
|
@@ -1101,7 +1119,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1101 |
|
1102 |
$send_content = send_otp_token($user_email);
|
1103 |
if($send_content['status']=='FAILURE'){
|
1104 |
-
$message =
|
1105 |
wp_die($message);
|
1106 |
}
|
1107 |
|
@@ -1132,7 +1150,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1132 |
{
|
1133 |
$send_content = send_otp_token($user_email);
|
1134 |
if($send_content['status']=='FAILURE'){
|
1135 |
-
$message =
|
1136 |
wp_die($message);
|
1137 |
}
|
1138 |
|
@@ -1227,7 +1245,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1227 |
|
1228 |
if(is_wp_error( $user_id )) {
|
1229 |
//print_r($user_id);
|
1230 |
-
wp_die(
|
1231 |
}
|
1232 |
|
1233 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
@@ -1385,7 +1403,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1385 |
$user_id = wp_insert_user( $userdata);
|
1386 |
if(is_wp_error( $user_id )) {
|
1387 |
//print_r($user_id);
|
1388 |
-
wp_die(
|
1389 |
}
|
1390 |
|
1391 |
update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
|
@@ -1489,7 +1507,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1489 |
$username = $email[0];
|
1490 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
1491 |
if( isset($username_user_id) ){
|
1492 |
-
echo '<br/>
|
1493 |
exit();
|
1494 |
}
|
1495 |
}
|
@@ -1515,7 +1533,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1515 |
|
1516 |
if(is_wp_error( $user_id )) {
|
1517 |
//print_r($user_id);
|
1518 |
-
wp_die(
|
1519 |
}
|
1520 |
|
1521 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
@@ -1897,7 +1915,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1897 |
|
1898 |
if(is_wp_error( $user_id )) {
|
1899 |
//print_r($user_id);
|
1900 |
-
wp_die(
|
1901 |
}
|
1902 |
|
1903 |
update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
|
@@ -1998,7 +2016,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1998 |
$username = $email_array[0];
|
1999 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
2000 |
if( isset($username_user_id) ){
|
2001 |
-
echo '<br/>
|
2002 |
exit();
|
2003 |
}
|
2004 |
}
|
@@ -2022,7 +2040,7 @@ if(mo_openid_is_customer_registered()) {
|
|
2022 |
$user_id = wp_insert_user( $userdata);
|
2023 |
if(is_wp_error( $user_id )) {
|
2024 |
//print_r($user_id);
|
2025 |
-
wp_die(
|
2026 |
}
|
2027 |
|
2028 |
mo_openid_start_session();
|
@@ -2379,7 +2397,12 @@ if(mo_openid_is_customer_registered()) {
|
|
2379 |
|
2380 |
if( $option == 'same' ) {
|
2381 |
if(!is_null($current_url)){
|
2382 |
-
$
|
|
|
|
|
|
|
|
|
|
|
2383 |
}
|
2384 |
else{
|
2385 |
if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
|
@@ -2444,6 +2467,7 @@ if(mo_openid_is_customer_registered()) {
|
|
2444 |
$_SESSION['mo_login'] = false;
|
2445 |
wp_set_auth_cookie( $user_id, true );
|
2446 |
$redirect_url = mo_openid_get_redirect_url();
|
|
|
2447 |
wp_redirect($redirect_url);
|
2448 |
exit;
|
2449 |
}
|
@@ -2538,7 +2562,7 @@ Thank you.';
|
|
2538 |
$split_app_name = explode('_', $decrypted_app_name);
|
2539 |
//check to ensure login starts at the click of social login button
|
2540 |
if(empty($split_app_name[0])){
|
2541 |
-
wp_die(
|
2542 |
}
|
2543 |
else {
|
2544 |
return $split_app_name[0];
|
@@ -2547,7 +2571,7 @@ Thank you.';
|
|
2547 |
|
2548 |
function mo_openid_account_linking($messages) {
|
2549 |
if(isset( $_GET['option']) && $_GET['option'] == 'disable-social-login' ){
|
2550 |
-
$messages = '<p class="message">
|
2551 |
}
|
2552 |
return $messages;
|
2553 |
}
|
@@ -2567,11 +2591,11 @@ Thank you.';
|
|
2567 |
global $wpdb;
|
2568 |
$db_prefix = $wpdb->prefix;
|
2569 |
$result = $wpdb->get_var($wpdb->prepare("DELETE from ".$db_prefix."mo_openid_linked_user where user_id = %s ",$user_id));
|
2570 |
-
|
2571 |
/*$wpdb->show_errors();
|
2572 |
$wpdb->print_error();
|
2573 |
exit;*/
|
2574 |
-
wp_die('
|
2575 |
}
|
2576 |
}
|
2577 |
|
@@ -2643,6 +2667,7 @@ Thank you.';
|
|
2643 |
dataType: 'text',
|
2644 |
success:function(result){
|
2645 |
alert('Social Profile Data Deleted successfully. Press OK to continue.');
|
|
|
2646 |
}
|
2647 |
});
|
2648 |
}
|
36 |
|
37 |
public function openidloginForm(){
|
38 |
|
39 |
+
?>
|
40 |
+
<script
|
41 |
+
src="https://code.jquery.com/jquery-1.12.4.js"
|
42 |
+
integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU="
|
43 |
+
crossorigin="anonymous"></script>
|
44 |
+
<?php
|
45 |
+
|
46 |
$selected_theme = get_option('mo_openid_login_theme');
|
47 |
$appsConfigured = get_option('mo_openid_google_enable') | get_option('mo_openid_salesforce_enable') | get_option('mo_openid_facebook_enable') | get_option('mo_openid_linkedin_enable') | get_option('mo_openid_instagram_enable') | get_option('mo_openid_amazon_enable') | get_option('mo_openid_windowslive_enable') | get_option('mo_openid_twitter_enable') | get_option('mo_openid_vkontakte_enable');
|
48 |
$spacebetweenicons = get_option('mo_login_icon_space');
|
72 |
$gdpr_setting = "disabled='disabled'";
|
73 |
}
|
74 |
else
|
75 |
+
$gdpr_setting ='';
|
76 |
|
77 |
$url = get_option('mo_openid_privacy_policy_url');
|
78 |
$text = get_option('mo_openid_privacy_policy_text');
|
93 |
|
94 |
<p style="color:#<?php echo $customTextColor ?>"><?php echo $customText ?>
|
95 |
</p>
|
96 |
+
<?php if(get_option('mo_openid_gdpr_consent_enable')){
|
97 |
+
$consent_message = isset($consent_message) ? $consent_message: ''; ?>
|
98 |
<input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox"><label class="mo-consent"><?php echo $consent_message;?></label>
|
99 |
+
<br>
|
100 |
<?php }
|
101 |
+
|
102 |
if($customTheme == 'default'){
|
103 |
|
104 |
if( get_option('mo_openid_facebook_enable') ) {
|
105 |
if($selected_theme == 'longbutton'){
|
106 |
+
|
107 |
?>
|
108 |
|
109 |
<a rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('facebook','<?php echo $facebook_custom_app?>');" style="width:<?php echo $customWidth ?>px !important;padding-top:<?php echo $customHeight-29 ?>px !important;padding-bottom:<?php echo $customHeight-29 ?>px !important;margin-bottom:<?php echo $spacebetweenicons-5 ?>px !important;border-radius:<?php echo $customBoundary ?>px !important;" class="btn-mo btn btn-block btn-social btn-facebook btn-custom-size login-button" > <i style="padding-top:<?php echo $customHeight-35 ?>px !important" class="fa fa-facebook"></i><?php
|
110 |
+
echo get_option('mo_openid_login_button_customize_text'); ?> Facebook</a>
|
111 |
<?php
|
112 |
|
113 |
+
}else{
|
114 |
+
?>
|
|
|
115 |
|
116 |
+
<a class=" dis login-button" rel='nofollow' title="<?php echo $customTextofTitle ?> Facebook" onClick="moOpenIdLogin('facebook','<?php echo $facebook_custom_app?>');"><img alt='Facebook' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/facebook.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button" ></a>
|
117 |
<?php }
|
118 |
|
119 |
}
|
126 |
echo get_option('mo_openid_login_button_customize_text'); ?> Google</a>
|
127 |
<?php }
|
128 |
else{ ?>
|
129 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('google','<?php echo $google_custom_app?>');" title="<?php echo $customTextofTitle ?> Google" ><img alt='Google' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/google.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button" ></a>
|
130 |
<?php
|
131 |
}
|
132 |
}
|
139 |
echo get_option('mo_openid_login_button_customize_text'); ?> Vkontakte</a>
|
140 |
<?php }
|
141 |
else{ ?>
|
142 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('vkontakte','<?php echo $vkontakte_custom_app?>');" title="<?php echo $customTextofTitle ?> Vkontakte" ><img alt='Vkontakte' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/vk.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button" ></a>
|
143 |
<?php
|
144 |
}
|
145 |
}
|
152 |
else{ ?>
|
153 |
|
154 |
|
155 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Twitter" onClick="moOpenIdLogin('twitter','<?php echo $twitter_custom_app?>');"><img alt='Twitter' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/twitter.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button"></a>
|
156 |
<?php }
|
157 |
}
|
158 |
|
162 |
echo get_option('mo_openid_login_button_customize_text'); ?> LinkedIn</a>
|
163 |
<?php }
|
164 |
else{ ?>
|
165 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> LinkedIn" onClick="moOpenIdLogin('linkedin','<?php echo $linkedin_custom_app?>');"><img alt='LinkedIn' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/linkedin.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis btn-mo login-button" ></a>
|
166 |
<?php }
|
167 |
}
|
168 |
|
174 |
else{ ?>
|
175 |
|
176 |
|
177 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Instagram" onClick="moOpenIdLogin('instagram','<?php echo $instagram_custom_app?>');"><img alt='Instagram' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/instagram.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button"></a>
|
178 |
<?php }
|
179 |
}
|
180 |
|
185 |
<?php }
|
186 |
else{ ?>
|
187 |
|
188 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Amazon" onClick="moOpenIdLogin('amazon','<?php echo $amazon_custom_app?>');"><img alt='Amazon' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/amazon.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button"></a>
|
189 |
<?php }
|
190 |
}
|
191 |
|
197 |
else{ ?>
|
198 |
|
199 |
|
200 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?> title="<?php echo $customTextofTitle ?> Salesforce" onClick="moOpenIdLogin('salesforce','<?php echo $salesforce_custom_app?>');"><img alt='Salesforce' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/salesforce.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> dis login-button" ></a>
|
201 |
<?php }
|
202 |
}
|
203 |
|
209 |
else{ ?>
|
210 |
|
211 |
|
212 |
+
<a class="dis login-button" rel='nofollow' <?php echo $gdpr_setting; ?>title="<?php echo $customTextofTitle ?> Microsoft" onClick="moOpenIdLogin('windowslive','<?php echo $windowslive_custom_app?>');"><img alt='Windowslive' style="width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important" src="<?php echo plugins_url( 'includes/images/icons/windowslive.png', __FILE__ )?>" class="<?php echo $selected_theme; ?>dis login-button"></a>
|
213 |
<?php }
|
214 |
}
|
215 |
|
227 |
<?php }
|
228 |
else{ ?>
|
229 |
|
230 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('facebook','<?php echo $facebook_custom_app?>');" title="<?php echo $customTextofTitle ?> Facebook"><i style="margin-top:10px;!important;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-facebook custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
231 |
|
232 |
<?php }
|
233 |
|
241 |
echo get_option('mo_openid_login_button_customize_text'); ?> Google</a>
|
242 |
<?php }
|
243 |
else{ ?>
|
244 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('google','<?php echo $google_custom_app?>');" title="<?php echo $customTextofTitle ?> Google"><i style="margin-top:10px;!important;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-google-plus custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
245 |
<?php
|
246 |
}
|
247 |
}
|
254 |
echo get_option('mo_openid_login_button_customize_text'); ?> Vkontakte</a>
|
255 |
<?php }
|
256 |
else{ ?>
|
257 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('vkontakte','<?php echo $vkontakte_custom_app?>');" title="<?php echo $customTextofTitle ?> Vkontakte"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-vk custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
258 |
<?php
|
259 |
}
|
260 |
}
|
267 |
echo get_option('mo_openid_login_button_customize_text'); ?> Twitter</a>
|
268 |
<?php }
|
269 |
else{ ?>
|
270 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('twitter','<?php echo $twitter_custom_app?>');" title="<?php echo $customTextofTitle ?> Twitter"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-twitter custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
271 |
<?php
|
272 |
}
|
273 |
}
|
278 |
echo get_option('mo_openid_login_button_customize_text'); ?> LinkedIn</a>
|
279 |
<?php }
|
280 |
else{ ?>
|
281 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('linkedin','<?php echo $linkedin_custom_app?>');" title="<?php echo $customTextofTitle ?> LinkedIn"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-linkedin custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
282 |
<?php }
|
283 |
}
|
284 |
|
290 |
else{ ?>
|
291 |
|
292 |
|
293 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('instagram','<?php echo $instagram_custom_app?>');" title="<?php echo $customTextofTitle ?> Instagram"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-instagram custom-login-button <?php echo $selected_theme; ?>"></i></a>
|
294 |
<?php }
|
295 |
}
|
296 |
|
301 |
<?php }
|
302 |
else{ ?>
|
303 |
|
304 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('amazon','<?php echo $amazon_custom_app?>');" title="<?php echo $customTextofTitle ?> Amazon"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class="fa fa-amazon custom-login-button <?php echo $selected_theme; ?>"></i></a>
|
305 |
<?php }
|
306 |
}
|
307 |
|
313 |
else{ ?>
|
314 |
|
315 |
|
316 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('salesforce','<?php echo $salesforce_custom_app?>');" title="<?php echo $customTextofTitle ?> Salesforce"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px " class="fa fa-cloud custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
317 |
<?php }
|
318 |
}
|
319 |
|
325 |
else{ ?>
|
326 |
|
327 |
|
328 |
+
<a class="dis login-button" rel='nofollow' onClick="moOpenIdLogin('windowslive','<?php echo $windowslive_custom_app?>');" title="<?php echo $customTextofTitle ?> Microsoft"><i style="margin-top:10px;width:<?php echo $customSize?>px !important;height:<?php echo $customSize?>px !important;margin-left:<?php echo $spacebetweenicons-4?>px !important;background:<?php echo "#".$customBackground?> !important;font-size:<?php echo $customSize-16?>px !important;" class=" fa fa-windows custom-login-button <?php echo $selected_theme; ?>"></i></a>
|
329 |
<?php }
|
330 |
}
|
331 |
|
399 |
|
400 |
public function openidloginFormShortCode( $atts ){
|
401 |
|
402 |
+
|
403 |
global $post;
|
404 |
$html = '';
|
405 |
//$this->error_message();
|
465 |
$html .= '<label class="mo-consent"><input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox">';
|
466 |
$html .= $consent_message.'</label>';
|
467 |
}
|
468 |
+
echo "<br>";
|
469 |
if($customTheme == 'default'){
|
470 |
|
471 |
if( get_option('mo_openid_facebook_enable') ) {
|
472 |
if($selected_theme == 'longbutton'){
|
473 |
$html .= "<a rel='nofollow' ".$gdpr_setting." style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-facebook btn-custom-dec login-button' onClick=\"moOpenIdLogin('facebook','" .$facebook_custom_app."');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-facebook'></i>" . $buttonText . " Facebook</a>"; }
|
474 |
else{
|
475 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Facebook' onClick=\"moOpenIdLogin('facebook','" .$facebook_custom_app."');\" ><img alt='Facebook' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/facebook.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
476 |
}
|
477 |
|
478 |
}
|
483 |
}
|
484 |
else{
|
485 |
|
486 |
+
$html .= "<a class='dis login-button' rel='nofollow' onClick=\"moOpenIdLogin('google','".$google_custom_app."');\" title= ' ".$customTextofTitle." Google'><img alt='Google' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/google.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
487 |
|
488 |
}
|
489 |
}
|
496 |
}
|
497 |
else{
|
498 |
|
499 |
+
$html .= "<a class='dis login-button' rel='nofollow' onClick=\"moOpenIdLogin('vkontakte','" .
|
500 |
$vkontakte_custom_app.
|
501 |
+
"');\" title= ' ".$customTextofTitle." Vkontakte'><img alt='Vkontakte' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/vk.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
502 |
|
503 |
}
|
504 |
}
|
509 |
$twitter_custom_app.
|
510 |
"');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-twitter'></i>" . $buttonText . " Twitter</a>"; }
|
511 |
else{
|
512 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Twitter' onClick=\"moOpenIdLogin('twitter','" .
|
513 |
+
$twitter_custom_app. "');\" ><img alt='Twitter' style=' width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/twitter.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
514 |
}
|
515 |
|
516 |
}
|
520 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-linkedin btn-custom-dec login-button' onClick=\"moOpenIdLogin('linkedin','" .$twitter_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-linkedin'></i>" . $buttonText . " LinkedIn</a>";
|
521 |
}
|
522 |
else{
|
523 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." LinkedIn' onClick=\"moOpenIdLogin('linkedin','" . $linkedin_custom_app . "');\" ><img alt='LinkedIn' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/linkedin.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
524 |
}
|
525 |
}if( get_option('mo_openid_instagram_enable') ) {
|
526 |
if($selected_theme == 'longbutton'){
|
527 |
$html .= "<a rel='nofollow' ".$gdpr_setting." style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-instagram btn-custom-dec login-button' onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-instagram'></i>" . $buttonText . " Instagram</a>";
|
528 |
}
|
529 |
else{
|
530 |
+
$html .= "<a class='dis login-button' rel='nofollow' ".$customTextofTitle." Instagram' onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\" ><img alt='Instagram' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/instagram.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
531 |
}
|
532 |
}if( get_option('mo_openid_amazon_enable') ) {
|
533 |
if($selected_theme == 'longbutton'){
|
534 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-soundcloud btn-custom-dec login-button' onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-amazon'></i>" . $buttonText . " Amazon</a>";
|
535 |
}
|
536 |
else{
|
537 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Amazon' onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\" ><img alt='Amazon' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/amazon.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
538 |
}
|
539 |
}if( get_option('mo_openid_salesforce_enable') ) {
|
540 |
if($selected_theme == 'longbutton'){
|
541 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-vimeo btn-custom-dec login-button' onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-cloud'></i>" . $buttonText . " Salesforce</a>";
|
542 |
}
|
543 |
else{
|
544 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Salesforce' onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\" ><img alt='Salesforce' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/salesforce.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
545 |
}
|
546 |
}if( get_option('mo_openid_windowslive_enable') ) {
|
547 |
if($selected_theme == 'longbutton'){
|
548 |
$html .= "<a rel='nofollow' ".$gdpr_setting."style='width: " . $customWidth . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom: " . ($spacebetweenicons-5) . "px !important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-microsoft btn-custom-dec login-button' onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\"> <i style='padding-top:" . ($customHeight-35) . "px !important' class='fa fa-windows'></i>" . $buttonText . " Microsoft</a>";
|
549 |
}
|
550 |
else{
|
551 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Microsoft' onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\" ><img alt='Windowslive' style='width:" . $customSize ."px !important;height: " . $customSize ."px !important;margin-left: " . ($spacebetweenicons) ."px !important' src='" . plugins_url( 'includes/images/icons/windowslive.png', __FILE__ ) . "' class='dis login-button " .$selected_theme . "' ></a>";
|
552 |
}
|
553 |
}
|
554 |
}
|
561 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('facebook','" . $facebook_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-facebook'></i> " . $buttonText . " Facebook</a>";
|
562 |
}
|
563 |
else{
|
564 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Facebook' onClick=\"moOpenIdLogin('facebook','" . $facebook_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-facebook custom-login-button " . $selected_theme . "' ></i></a>";
|
565 |
}
|
566 |
|
567 |
}
|
571 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('google','" .$google_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-google-plus'></i> " . $buttonText . " Google</a>";
|
572 |
}
|
573 |
else{
|
574 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Google' onClick=\"moOpenIdLogin('google','" . $google_custom_app . "');\" title= ' ". $customTextofTitle." Google'><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-google-plus custom-login-button " . $selected_theme . "' ></i></a>";
|
575 |
|
576 |
}
|
577 |
}
|
581 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('vkontakte','" . $vkontakte_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-vk'></i> " . $buttonText . " Vkontakte</a>";
|
582 |
}
|
583 |
else{
|
584 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Vkontakte' onClick=\"moOpenIdLogin('vkontakte','" . $vkontakte_custom_app. "');\" title= ' ". $customTextofTitle." Vkontakte'><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-vk custom-login-button " . $selected_theme . "' ></i></a>";
|
585 |
|
586 |
}
|
587 |
}
|
591 |
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('twitter','" . $twitter_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-twitter'></i> " . $buttonText . " Twitter</a>";
|
592 |
}
|
593 |
else{
|
594 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Twitter' onClick=\"moOpenIdLogin('twitter','" . $twitter_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-twitter custom-login-button " . $selected_theme . "' ></i></a>";
|
595 |
}
|
596 |
|
597 |
}
|
598 |
if( get_option('mo_openid_linkedin_enable') ) {
|
599 |
if($selected_theme == 'longbutton'){
|
600 |
+
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('linkedin','" . $linkedin_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-linkedin'></i> " . $buttonText . " LinkedIn</a>";
|
601 |
}
|
602 |
else{
|
603 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." LinkedIn' onClick=\"moOpenIdLogin('linkedin','" . $linkedin_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-linkedin custom-login-button " . $selected_theme . "' ></i></a>";
|
604 |
}
|
605 |
}if( get_option('mo_openid_instagram_enable') ) {
|
606 |
if($selected_theme == 'longbutton'){
|
607 |
$html .= "<a rel='nofollow' ".$gdpr_setting."onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-instagram'></i> " . $buttonText . " Instagram</a>";
|
608 |
}
|
609 |
else{
|
610 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Instagram' onClick=\"moOpenIdLogin('instagram','" . $instagram_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-instagram custom-login-button " . $selected_theme . "' ></i></a>";
|
611 |
}
|
612 |
}if( get_option('mo_openid_amazon_enable') ) {
|
613 |
if($selected_theme == 'longbutton'){
|
614 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-amazon'></i> " . $buttonText . " Amazon</a>";
|
615 |
}
|
616 |
else{
|
617 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Amazon' onClick=\"moOpenIdLogin('amazon','" . $amazon_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-amazon custom-login-button " . $selected_theme . "' ></i></a>";
|
618 |
}
|
619 |
}if( get_option('mo_openid_salesforce_enable') ) {
|
620 |
if($selected_theme == 'longbutton'){
|
621 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-cloud'></i> " . $buttonText . " Salesforce</a>";
|
622 |
}
|
623 |
else{
|
624 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Salesforce' onClick=\"moOpenIdLogin('salesforce','" . $salesforce_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-cloud custom-login-button " . $selected_theme . "' ></i></a>";
|
625 |
}
|
626 |
}if( get_option('mo_openid_windowslive_enable') ) {
|
627 |
if($selected_theme == 'longbutton'){
|
628 |
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\" style='width:" . ($customWidth) . "px !important;padding-top:" . ($customHeight-29) . "px !important;padding-bottom:" . ($customHeight-29) . "px !important;margin-bottom:" . ($spacebetweenicons-5) . "px !important; background:#" . $customBackground . "!important;border-radius: " .$customBoundary. "px !important;' class='btn btn-mo btn-block btn-social btn-customtheme btn-custom-dec login-button' > <i style='padding-top:" .($customHeight-35) . "px !important' class='fa fa-windows'></i> " . $buttonText . " Microsoft</a>";
|
629 |
}
|
630 |
else{
|
631 |
+
$html .= "<a class='dis login-button' rel='nofollow' title= ' ".$customTextofTitle." Microsoft' onClick=\"moOpenIdLogin('windowslive','" . $windowslive_custom_app . "');\" ><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:#" . $customBackground . " !important;font-size: " . ($customSize-16) . "px !important;' class='fa btn-mo fa-windows custom-login-button " . $selected_theme . "' ></i></a>";
|
632 |
}
|
633 |
}
|
634 |
}
|
677 |
if (value == 0) {
|
678 |
jQuery('#mo_openid_consent_checkbox').val(1);
|
679 |
jQuery(".btn-mo").attr("disabled",true);
|
680 |
+
jQuery(".login-button").addClass("dis");
|
681 |
}
|
682 |
else {
|
683 |
jQuery('#mo_openid_consent_checkbox').val(0);
|
684 |
jQuery(".btn-mo").attr("disabled",false);
|
685 |
+
jQuery(".login-button").removeClass("dis");
|
686 |
//jQuery(".btn-mo").removeAttr("disabled");
|
687 |
}
|
688 |
}
|
696 |
document.cookie = cookie_name + "=" + current_url + ";" + expires + ";path=/";
|
697 |
|
698 |
<?php
|
|
|
699 |
if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
|
700 |
$http = "https://";
|
701 |
} else {
|
707 |
var http = '<?php echo $http;?>';
|
708 |
var http_host = '<?php echo $_SERVER['HTTP_HOST'];?>';
|
709 |
|
710 |
+
if(is_custom_app == 'false'){
|
711 |
+
|
712 |
if ( request_uri.indexOf('wp-login.php') !=-1){
|
713 |
var redirect_url = base_url + '/?option=getmosociallogin&app_name=';
|
714 |
|
715 |
+
|
716 |
}else {
|
717 |
var redirect_url = http + http_host + request_uri;
|
718 |
if(redirect_url.indexOf('?') != -1){
|
719 |
redirect_url = redirect_url +'&option=getmosociallogin&app_name=';
|
720 |
+
|
721 |
}
|
722 |
else
|
723 |
{
|
724 |
redirect_url = redirect_url +'?option=getmosociallogin&app_name=';
|
725 |
+
|
726 |
}
|
727 |
}
|
728 |
}
|
950 |
// delete first name, last name, user_url and profile_url from usermeta
|
951 |
global $wpdb;
|
952 |
$id = $_POST['user_id']; $metakey1 = 'first_name'; $metakey2 = 'last_name'; $metakey3 = 'moopenid_user_avatar'; $metakey4 = 'moopenid_user_profile_url';
|
953 |
+
$wpdb->query($wpdb->prepare('DELETE from '.$wpdb->prefix.'usermeta where user_id = %d and (meta_key = %s or meta_key = %s or meta_key = %s or meta_key = %s)',$id,$metakey1,$metakey2,$metakey3,$metakey4));
|
954 |
update_user_meta($id,'mo_openid_data_deleted','1');
|
955 |
exit;
|
956 |
}
|
997 |
$username = $email_explode[0];
|
998 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $username));
|
999 |
if( !empty($username_user_id) ){
|
1000 |
+
wp_die("Error Code 1: ".get_option('mo_existing_username_error_message'));
|
1001 |
}
|
1002 |
$_SESSION['username'] = $username;
|
1003 |
}
|
1022 |
|
1023 |
if(is_wp_error( $user_id )) {
|
1024 |
//print_r($user_id);
|
1025 |
+
wp_die("Error Code 1: ".get_option('mo_registration_error_message'));
|
1026 |
}
|
1027 |
|
1028 |
$user = get_user_by('email', $_SESSION['user_email'] );
|
1099 |
|
1100 |
$send_content = send_otp_token($user_email);
|
1101 |
if($send_content['status']=='FAILURE'){
|
1102 |
+
$message ="Error Code 1: ".get_option('mo_email_failure_message');
|
1103 |
wp_die($message);
|
1104 |
}
|
1105 |
|
1119 |
|
1120 |
$send_content = send_otp_token($user_email);
|
1121 |
if($send_content['status']=='FAILURE'){
|
1122 |
+
$message ="Error Code 2: ".get_option('mo_email_failure_message');
|
1123 |
wp_die($message);
|
1124 |
}
|
1125 |
|
1150 |
{
|
1151 |
$send_content = send_otp_token($user_email);
|
1152 |
if($send_content['status']=='FAILURE'){
|
1153 |
+
$message ="Error Code 3: ".get_option('mo_email_failure_message');
|
1154 |
wp_die($message);
|
1155 |
}
|
1156 |
|
1245 |
|
1246 |
if(is_wp_error( $user_id )) {
|
1247 |
//print_r($user_id);
|
1248 |
+
wp_die("Error Code 2: ".get_option('mo_registration_error_message'));
|
1249 |
}
|
1250 |
|
1251 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1403 |
$user_id = wp_insert_user( $userdata);
|
1404 |
if(is_wp_error( $user_id )) {
|
1405 |
//print_r($user_id);
|
1406 |
+
wp_die("Error Code 3: ".get_option('mo_registration_error_message'));
|
1407 |
}
|
1408 |
|
1409 |
update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
|
1507 |
$username = $email[0];
|
1508 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
1509 |
if( isset($username_user_id) ){
|
1510 |
+
echo '<br/>'."Error Code 2: ".get_option('mo_existing_username_error_message');
|
1511 |
exit();
|
1512 |
}
|
1513 |
}
|
1533 |
|
1534 |
if(is_wp_error( $user_id )) {
|
1535 |
//print_r($user_id);
|
1536 |
+
wp_die("Error Code 4: ".get_option('mo_registration_error_message'));
|
1537 |
}
|
1538 |
|
1539 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1915 |
|
1916 |
if(is_wp_error( $user_id )) {
|
1917 |
//print_r($user_id);
|
1918 |
+
wp_die("Error Code 5: ".get_option('mo_registration_error_message'));
|
1919 |
}
|
1920 |
|
1921 |
update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
|
2016 |
$username = $email_array[0];
|
2017 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
2018 |
if( isset($username_user_id) ){
|
2019 |
+
echo '<br/>'."Error Code 3: ".get_option('mo_existing_username_error_message');
|
2020 |
exit();
|
2021 |
}
|
2022 |
}
|
2040 |
$user_id = wp_insert_user( $userdata);
|
2041 |
if(is_wp_error( $user_id )) {
|
2042 |
//print_r($user_id);
|
2043 |
+
wp_die("Error Code 6: ".get_option('mo_registration_error_message'));
|
2044 |
}
|
2045 |
|
2046 |
mo_openid_start_session();
|
2397 |
|
2398 |
if( $option == 'same' ) {
|
2399 |
if(!is_null($current_url)){
|
2400 |
+
if(strpos($current_url,get_option('siteurl').'/wp-login.php')!== false)
|
2401 |
+
{
|
2402 |
+
$redirect_url=get_option('siteurl');
|
2403 |
+
}
|
2404 |
+
else
|
2405 |
+
$redirect_url = $current_url;
|
2406 |
}
|
2407 |
else{
|
2408 |
if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
|
2467 |
$_SESSION['mo_login'] = false;
|
2468 |
wp_set_auth_cookie( $user_id, true );
|
2469 |
$redirect_url = mo_openid_get_redirect_url();
|
2470 |
+
|
2471 |
wp_redirect($redirect_url);
|
2472 |
exit;
|
2473 |
}
|
2562 |
$split_app_name = explode('_', $decrypted_app_name);
|
2563 |
//check to ensure login starts at the click of social login button
|
2564 |
if(empty($split_app_name[0])){
|
2565 |
+
wp_die(get_option('mo_manual_login_error_message'));
|
2566 |
}
|
2567 |
else {
|
2568 |
return $split_app_name[0];
|
2571 |
|
2572 |
function mo_openid_account_linking($messages) {
|
2573 |
if(isset( $_GET['option']) && $_GET['option'] == 'disable-social-login' ){
|
2574 |
+
$messages = '<p class="message">'.get_option('mo_account_linking_message').'</p>';
|
2575 |
}
|
2576 |
return $messages;
|
2577 |
}
|
2591 |
global $wpdb;
|
2592 |
$db_prefix = $wpdb->prefix;
|
2593 |
$result = $wpdb->get_var($wpdb->prepare("DELETE from ".$db_prefix."mo_openid_linked_user where user_id = %s ",$user_id));
|
2594 |
+
if($result === false){
|
2595 |
/*$wpdb->show_errors();
|
2596 |
$wpdb->print_error();
|
2597 |
exit;*/
|
2598 |
+
wp_die(get_option('mo_delete_user_error_message'));
|
2599 |
}
|
2600 |
}
|
2601 |
|
2667 |
dataType: 'text',
|
2668 |
success:function(result){
|
2669 |
alert('Social Profile Data Deleted successfully. Press OK to continue.');
|
2670 |
+
window.location.reload(true);
|
2671 |
}
|
2672 |
});
|
2673 |
}
|
class-mo-openid-sso-customer.php
CHANGED
@@ -326,6 +326,72 @@ class CustomerOpenID {
|
|
326 |
return $content;
|
327 |
}
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
function submit_contact_us( $email, $phone, $query ) {
|
330 |
global $current_user;
|
331 |
$current_user = wp_get_current_user();
|
@@ -419,4 +485,4 @@ class CustomerOpenID {
|
|
419 |
curl_close($ch);
|
420 |
return $content;
|
421 |
}
|
422 |
-
}?>
|
326 |
return $content;
|
327 |
}
|
328 |
|
329 |
+
function mo_openid_send_email_alert($email,$phone,$message){
|
330 |
+
|
331 |
+
// $hostname = Utilities::getHostname();
|
332 |
+
$hostname = get_site_option('mo_openid_host_name') ;
|
333 |
+
$url = $hostname.'/moas/api/notify/send';
|
334 |
+
$ch = curl_init($url);
|
335 |
+
|
336 |
+
// $customer_details = Utilities::getCustomerDetails();
|
337 |
+
$customerKey = $this->defaultCustomerKey;
|
338 |
+
$apiKey = $this->defaultApiKey;
|
339 |
+
|
340 |
+
$currentTimeInMillis= round(microtime(true) * 1000);
|
341 |
+
$stringToHash = $customerKey . number_format($currentTimeInMillis, 0, '', '') . $apiKey;
|
342 |
+
$hashValue = hash("sha512", $stringToHash);
|
343 |
+
$customerKeyHeader = "Customer-Key: " . $customerKey;
|
344 |
+
$timestampHeader = "Timestamp: " . number_format($currentTimeInMillis, 0, '', '');
|
345 |
+
$authorizationHeader= "Authorization: " . $hashValue;
|
346 |
+
$fromEmail = $email;
|
347 |
+
$subject = "MiniOrange Social Login Plugin Feedback: ".$email;
|
348 |
+
$site_url=site_url();
|
349 |
+
|
350 |
+
$user= get_userdata(get_current_user_id());
|
351 |
+
|
352 |
+
|
353 |
+
$query =" MiniOrange Social Login [Free] ";
|
354 |
+
$content='<div >Hello, <br><br>First Name :'.$user->user_firstname.'<br><br>Last Name :'.$user->user_lastname.' <br><br>Company :<a href="'.$_SERVER['SERVER_NAME'].'" target="_blank" >'.$_SERVER['SERVER_NAME'].'</a><br><br>Phone Number :'.$phone.'<br><br><b>Email :<a href="mailto:'.$fromEmail.'" target="_blank">'.$fromEmail.'</a></b><br><br><b>Plugin Deactivated: '.$query.'</b><br><br><b>Reason: '.$message.'</b></div>';
|
355 |
+
|
356 |
+
|
357 |
+
$fields = array(
|
358 |
+
'customerKey' => $customerKey,
|
359 |
+
'sendEmail' => true,
|
360 |
+
'email' => array(
|
361 |
+
'customerKey' => $customerKey,
|
362 |
+
'fromEmail' => $fromEmail,
|
363 |
+
'bccEmail' => 'socialloginsupport@miniorange.com',
|
364 |
+
'fromName' => 'miniOrange',
|
365 |
+
'toEmail' => 'socialloginsupport@miniorange.com',
|
366 |
+
'toName' => 'socialloginsupport@miniorange.com',
|
367 |
+
'subject' => $subject,
|
368 |
+
'content' => $content
|
369 |
+
),
|
370 |
+
);
|
371 |
+
$field_string = json_encode($fields);
|
372 |
+
|
373 |
+
|
374 |
+
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
375 |
+
curl_setopt( $ch, CURLOPT_ENCODING, "" );
|
376 |
+
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
377 |
+
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
|
378 |
+
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); # required for https urls
|
379 |
+
|
380 |
+
curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
|
381 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", $customerKeyHeader,
|
382 |
+
$timestampHeader, $authorizationHeader));
|
383 |
+
curl_setopt( $ch, CURLOPT_POST, true);
|
384 |
+
curl_setopt( $ch, CURLOPT_POSTFIELDS, $field_string);
|
385 |
+
$content = curl_exec($ch);
|
386 |
+
|
387 |
+
if(curl_errno($ch)){
|
388 |
+
return json_encode(array("status"=>'ERROR','statusMessage'=>curl_error($ch)));
|
389 |
+
}
|
390 |
+
curl_close($ch);
|
391 |
+
|
392 |
+
return ($content);
|
393 |
+
}
|
394 |
+
|
395 |
function submit_contact_us( $email, $phone, $query ) {
|
396 |
global $current_user;
|
397 |
$current_user = wp_get_current_user();
|
485 |
curl_close($ch);
|
486 |
return $content;
|
487 |
}
|
488 |
+
}?>
|
includes/css/mo_openid_feedback.css
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.mo_openid_modal {
|
2 |
+
display: none;
|
3 |
+
position: fixed;
|
4 |
+
z-index: 1;
|
5 |
+
padding-top: 100px;
|
6 |
+
left: 100px;
|
7 |
+
top: 0;
|
8 |
+
margin-left:220px;
|
9 |
+
width: 50%;
|
10 |
+
height: 100%;
|
11 |
+
|
12 |
+
}
|
13 |
+
.mo_openid_modal-content {
|
14 |
+
background-color: #fefefe;
|
15 |
+
margin: auto;
|
16 |
+
padding: 20px;
|
17 |
+
border: 1px solid #888;
|
18 |
+
width: 55%;
|
19 |
+
}
|
20 |
+
|
21 |
+
.mo_openid_close {
|
22 |
+
color: #aaaaaa;
|
23 |
+
float: right;
|
24 |
+
font-size: 28px;
|
25 |
+
font-weight: bold;
|
26 |
+
}
|
27 |
+
|
28 |
+
.mo_openid_close:hover,
|
29 |
+
.mo_openid_close:focus {
|
30 |
+
color: #000;
|
31 |
+
text-decoration: none;
|
32 |
+
cursor: pointer;
|
33 |
+
}
|
34 |
+
.alert{
|
35 |
+
padding:5px;
|
36 |
+
margin-bottom:10px;
|
37 |
+
border:1px solid transparent;
|
38 |
+
border-radius:4px
|
39 |
+
}
|
40 |
+
.alert-info{
|
41 |
+
color:#31708f;
|
42 |
+
background-color:#d9edf7;
|
43 |
+
border-color:#bce8f1
|
44 |
+
}
|
includes/css/mo_openid_style.css
CHANGED
@@ -1,4 +1,29 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
font-size:13px;
|
3 |
width:100%;
|
4 |
color:#1B79AE;
|
@@ -132,8 +157,8 @@ div.mo_image_id>a>img.mo_openid_image {
|
|
132 |
.circle{
|
133 |
|
134 |
border-radius: 999px !important;
|
135 |
-
}
|
136 |
|
|
|
137 |
|
138 |
.oval{
|
139 |
border-radius: 4px !important;
|
@@ -194,6 +219,7 @@ a{
|
|
194 |
color:white !important;
|
195 |
padding-top:8px !important;
|
196 |
box-sizing: border-box !important;
|
|
|
197 |
}
|
198 |
|
199 |
.btn-custom-dec{
|
@@ -444,4 +470,6 @@ aside.widget-area>section.widget_mo_openid_sharing_hor_wid>div.mo-openid-app-ico
|
|
444 |
color:#72777c;
|
445 |
padding-bottom: 5px;
|
446 |
}
|
447 |
-
|
|
|
|
1 |
+
.dis{
|
2 |
+
pointer-events: none;
|
3 |
+
}
|
4 |
+
.tooltip{
|
5 |
+
position: relative;
|
6 |
+
display: inline-block;
|
7 |
+
}
|
8 |
+
.tooltip .tooltiptext {
|
9 |
+
visibility: hidden;
|
10 |
+
width: 240px;
|
11 |
+
background-color: black;
|
12 |
+
color: #fff;
|
13 |
+
text-align: center;
|
14 |
+
border-radius: 6px;
|
15 |
+
padding: 5px 0;
|
16 |
+
|
17 |
+
/* Position the tooltip */
|
18 |
+
position: absolute;
|
19 |
+
z-index: 1;
|
20 |
+
}
|
21 |
+
|
22 |
+
.tooltip:hover .tooltiptext {
|
23 |
+
visibility: visible;
|
24 |
+
}
|
25 |
+
|
26 |
+
.mo_openid_help_title {
|
27 |
font-size:13px;
|
28 |
width:100%;
|
29 |
color:#1B79AE;
|
157 |
.circle{
|
158 |
|
159 |
border-radius: 999px !important;
|
|
|
160 |
|
161 |
+
}
|
162 |
|
163 |
.oval{
|
164 |
border-radius: 4px !important;
|
219 |
color:white !important;
|
220 |
padding-top:8px !important;
|
221 |
box-sizing: border-box !important;
|
222 |
+
|
223 |
}
|
224 |
|
225 |
.btn-custom-dec{
|
470 |
color:#72777c;
|
471 |
padding-bottom: 5px;
|
472 |
}
|
473 |
+
.mo-tomato {
|
474 |
+
color: tomato;
|
475 |
+
}
|
miniorange_openid_sso_settings.php
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
5 |
* Plugin URI: https://www.miniorange.com
|
6 |
* Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
|
7 |
-
* Version: 6.6.
|
8 |
* Author: miniOrange
|
9 |
* Author URI: https://www.miniorange.com
|
10 |
* License: GPL2
|
@@ -15,8 +14,8 @@ include_once dirname( __FILE__ ) . '/class-mo-openid-login-widget.php';
|
|
15 |
require('class-mo-openid-sso-customer.php');
|
16 |
require('class-mo-openid-sso-shortcode-buttons.php');
|
17 |
require('class-mo-openid-social-comment.php');
|
18 |
-
define('MO_OPENID_SOCIAL_LOGIN_VERSION', '6.6.
|
19 |
-
|
20 |
class Miniorange_OpenID_SSO {
|
21 |
|
22 |
function __construct() {
|
@@ -31,6 +30,7 @@ class Miniorange_OpenID_SSO {
|
|
31 |
add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_script' ) );
|
32 |
add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) ,5);
|
33 |
add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
|
|
|
34 |
|
35 |
register_deactivation_hook(__FILE__, array( $this, 'mo_openid_deactivate'));
|
36 |
register_activation_hook( __FILE__, array( $this, 'mo_openid_activate' ) );
|
@@ -249,9 +249,20 @@ class Miniorange_OpenID_SSO {
|
|
249 |
add_option('mo_openid_gdpr_consent_enable', 0);
|
250 |
add_option( 'mo_openid_privacy_policy_text', 'terms and conditions');
|
251 |
add_option( 'mo_openid_gdpr_consent_message','I accept the terms and conditions.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
|
253 |
-
}
|
254 |
-
|
255 |
function mo_openid_deactivate() {
|
256 |
delete_option('mo_openid_host_name');
|
257 |
delete_option('mo_openid_transactionId');
|
@@ -374,6 +385,7 @@ class Miniorange_OpenID_SSO {
|
|
374 |
|
375 |
function mo_openid_activate() {
|
376 |
add_option('Activated_Plugin','Plugin-Slug');
|
|
|
377 |
}
|
378 |
|
379 |
function mo_openid_add_social_login(){
|
@@ -506,6 +518,21 @@ class Miniorange_OpenID_SSO {
|
|
506 |
remove_action( 'admin_notices', array( $this, 'mo_openid_error_message') );
|
507 |
add_action( 'admin_notices', array( $this, 'mo_openid_success_message') );
|
508 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
|
510 |
public function mo_openid_check_empty_or_null( $value ) {
|
511 |
if( ! isset( $value ) || empty( $value ) ) {
|
@@ -516,7 +543,6 @@ class Miniorange_OpenID_SSO {
|
|
516 |
|
517 |
function mo_login_widget_openid_options() {
|
518 |
global $wpdb;
|
519 |
-
update_option( 'mo_openid_host_name', 'https://auth.miniorange.com' );
|
520 |
mo_register_openid();
|
521 |
}
|
522 |
|
@@ -535,8 +561,22 @@ class Miniorange_OpenID_SSO {
|
|
535 |
return true;
|
536 |
}
|
537 |
return false;
|
538 |
-
}
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
function miniorange_openid_save_settings(){
|
541 |
|
542 |
if ( current_user_can( 'manage_options' )){
|
@@ -774,8 +814,15 @@ class Miniorange_OpenID_SSO {
|
|
774 |
if(mo_openid_is_customer_registered()) {
|
775 |
update_option( 'mo_openid_google_enable', isset( $_POST['mo_openid_google_enable']) ? $_POST['mo_openid_google_enable'] : 0);
|
776 |
update_option( 'mo_openid_salesforce_enable', isset( $_POST['mo_openid_salesforce_enable']) ? $_POST['mo_openid_salesforce_enable'] : 0);
|
777 |
-
|
778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
update_option( 'mo_openid_windowslive_enable', isset( $_POST['mo_openid_windowslive_enable']) ? $_POST['mo_openid_windowslive_enable'] : 0);
|
780 |
update_option( 'mo_openid_amazon_enable', isset( $_POST['mo_openid_amazon_enable']) ? $_POST['mo_openid_amazon_enable'] : 0);
|
781 |
update_option( 'mo_openid_instagram_enable', isset( $_POST['mo_openid_instagram_enable']) ? $_POST['mo_openid_instagram_enable'] : 0);
|
@@ -1093,6 +1140,63 @@ class Miniorange_OpenID_SSO {
|
|
1093 |
wp_redirect('admin.php?page=mo_openid_settings&tab=custom_app&action=update&app='.urlencode($appname));
|
1094 |
}
|
1095 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
|
1097 |
}
|
1098 |
|
@@ -1293,4 +1397,4 @@ class Miniorange_OpenID_SSO {
|
|
1293 |
}
|
1294 |
|
1295 |
new Miniorange_OpenID_SSO;
|
1296 |
-
?>
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
4 |
* Plugin URI: https://www.miniorange.com
|
5 |
* Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
|
6 |
+
* Version: 6.6.9
|
7 |
* Author: miniOrange
|
8 |
* Author URI: https://www.miniorange.com
|
9 |
* License: GPL2
|
14 |
require('class-mo-openid-sso-customer.php');
|
15 |
require('class-mo-openid-sso-shortcode-buttons.php');
|
16 |
require('class-mo-openid-social-comment.php');
|
17 |
+
define('MO_OPENID_SOCIAL_LOGIN_VERSION', '6.6.9');
|
18 |
+
include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
|
19 |
class Miniorange_OpenID_SSO {
|
20 |
|
21 |
function __construct() {
|
30 |
add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_script' ) );
|
31 |
add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) ,5);
|
32 |
add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
|
33 |
+
add_action( 'admin_footer', array( $this,'mo_openid_feedback_request' ));
|
34 |
|
35 |
register_deactivation_hook(__FILE__, array( $this, 'mo_openid_deactivate'));
|
36 |
register_activation_hook( __FILE__, array( $this, 'mo_openid_activate' ) );
|
249 |
add_option('mo_openid_gdpr_consent_enable', 0);
|
250 |
add_option( 'mo_openid_privacy_policy_text', 'terms and conditions');
|
251 |
add_option( 'mo_openid_gdpr_consent_message','I accept the terms and conditions.');
|
252 |
+
//Error messages option
|
253 |
+
add_option( 'mo_registration_error_message','There was an error in registration. Please contact your administrator.');
|
254 |
+
add_option( 'mo_email_failure_message','Either your SMTP is not configured or you have entered an unmailable email. Please go back and try again.');
|
255 |
+
add_option( 'mo_existing_username_error_message','This username already exists. Please ask the administrator to create your account with a unique username.');
|
256 |
+
add_option( 'mo_manual_login_error_message','There was an error during login. Please try to login/register manually. <a href='.site_url().'>Go back to site</a>');
|
257 |
+
add_option( 'mo_delete_user_error_message','Error deleting user from account linking table');
|
258 |
+
add_option( 'mo_account_linking_message','Link your social account to existing WordPress account by entering username and password.');
|
259 |
+
|
260 |
+
}
|
261 |
+
|
262 |
+
function mo_openid_feedback_request(){
|
263 |
+
mo_openid_display_feedback_form();
|
264 |
+
}
|
265 |
|
|
|
|
|
266 |
function mo_openid_deactivate() {
|
267 |
delete_option('mo_openid_host_name');
|
268 |
delete_option('mo_openid_transactionId');
|
385 |
|
386 |
function mo_openid_activate() {
|
387 |
add_option('Activated_Plugin','Plugin-Slug');
|
388 |
+
update_option( 'mo_openid_host_name', 'https://auth.miniorange.com' );
|
389 |
}
|
390 |
|
391 |
function mo_openid_add_social_login(){
|
518 |
remove_action( 'admin_notices', array( $this, 'mo_openid_error_message') );
|
519 |
add_action( 'admin_notices', array( $this, 'mo_openid_success_message') );
|
520 |
}
|
521 |
+
function mo_openid_success_facebook_message() {
|
522 |
+
$message = 'Other setting are saved sucessfully. For Facebook please setup the Facebook Custome App. '; ?>
|
523 |
+
<script>
|
524 |
+
|
525 |
+
jQuery(document).ready(function() {
|
526 |
+
var message = "<?php echo $message; ?>";
|
527 |
+
jQuery('#mo_openid_msgs').append("<div class='error notice is-dismissible mo_openid_error_container'> <p class='mo_openid_msgs'>" + message + "</p></div>");
|
528 |
+
});
|
529 |
+
</script>
|
530 |
+
<?php }
|
531 |
+
|
532 |
+
private function mo_openid_show_facebook_error_message() {
|
533 |
+
remove_action( 'admin_notices', array( $this, 'mo_openid_error_message') );
|
534 |
+
add_action( 'admin_notices', array( $this, 'mo_openid_success_facebook_message') );
|
535 |
+
}
|
536 |
|
537 |
public function mo_openid_check_empty_or_null( $value ) {
|
538 |
if( ! isset( $value ) || empty( $value ) ) {
|
543 |
|
544 |
function mo_login_widget_openid_options() {
|
545 |
global $wpdb;
|
|
|
546 |
mo_register_openid();
|
547 |
}
|
548 |
|
561 |
return true;
|
562 |
}
|
563 |
return false;
|
564 |
+
}
|
565 |
+
|
566 |
+
public function if_custom_app_exists($app_name){
|
567 |
+
if(get_option('mo_openid_apps_list'))
|
568 |
+
$appslist = get_option('mo_openid_apps_list');
|
569 |
+
else
|
570 |
+
$appslist = array();
|
571 |
+
|
572 |
+
foreach( $appslist as $key => $app){
|
573 |
+
$option = 'mo_openid_enable_custom_app_' . $key;
|
574 |
+
if($app_name == $key && get_option($option) == '1')
|
575 |
+
return true;
|
576 |
+
}
|
577 |
+
return false;
|
578 |
+
}
|
579 |
+
|
580 |
function miniorange_openid_save_settings(){
|
581 |
|
582 |
if ( current_user_can( 'manage_options' )){
|
814 |
if(mo_openid_is_customer_registered()) {
|
815 |
update_option( 'mo_openid_google_enable', isset( $_POST['mo_openid_google_enable']) ? $_POST['mo_openid_google_enable'] : 0);
|
816 |
update_option( 'mo_openid_salesforce_enable', isset( $_POST['mo_openid_salesforce_enable']) ? $_POST['mo_openid_salesforce_enable'] : 0);
|
817 |
+
if($this->if_custom_app_exists('facebook')) {
|
818 |
+
update_option('mo_openid_facebook_enable', isset($_POST['mo_openid_facebook_enable']) ? $_POST['mo_openid_facebook_enable'] : 0);
|
819 |
+
}
|
820 |
+
else if(isset($_POST['mo_openid_facebook_enable'])) {
|
821 |
+
update_option('mo_openid_facebook_enable',0);
|
822 |
+
$this->mo_openid_show_facebook_error_message();
|
823 |
+
|
824 |
+
}
|
825 |
+
update_option( 'mo_openid_linkedin_enable', isset( $_POST['mo_openid_linkedin_enable']) ? $_POST['mo_openid_linkedin_enable'] : 0);
|
826 |
update_option( 'mo_openid_windowslive_enable', isset( $_POST['mo_openid_windowslive_enable']) ? $_POST['mo_openid_windowslive_enable'] : 0);
|
827 |
update_option( 'mo_openid_amazon_enable', isset( $_POST['mo_openid_amazon_enable']) ? $_POST['mo_openid_amazon_enable'] : 0);
|
828 |
update_option( 'mo_openid_instagram_enable', isset( $_POST['mo_openid_instagram_enable']) ? $_POST['mo_openid_instagram_enable'] : 0);
|
1140 |
wp_redirect('admin.php?page=mo_openid_settings&tab=custom_app&action=update&app='.urlencode($appname));
|
1141 |
}
|
1142 |
}
|
1143 |
+
|
1144 |
+
|
1145 |
+
if(isset($_POST['mo_openid_option']) and $_POST['mo_openid_option']=='mo_openid_skip_feedback'){
|
1146 |
+
|
1147 |
+
update_option('mo_openid_feedback_form',1);
|
1148 |
+
deactivate_plugins( '/miniorange-login-openid/miniorange_openid_sso_settings.php' );
|
1149 |
+
|
1150 |
+
}
|
1151 |
+
if(isset($_POST['mo_openid_feedback']) and $_POST['mo_openid_feedback']=='mo_openid_feedback')
|
1152 |
+
{
|
1153 |
+
$message='';
|
1154 |
+
if(isset($_POST['deactivate_plugin']) )
|
1155 |
+
{
|
1156 |
+
$message.=' '. $_POST['deactivate_plugin'];
|
1157 |
+
if($_POST['mo_openid_query_feedback']!='')
|
1158 |
+
{
|
1159 |
+
$message.='. '.$_POST['mo_openid_query_feedback'];
|
1160 |
+
}
|
1161 |
+
|
1162 |
+
$user_info = get_userdata(get_current_user_id());
|
1163 |
+
$email=$user_info->user_email;
|
1164 |
+
//only reason
|
1165 |
+
$phone='';
|
1166 |
+
$contact_us = new CustomerOpenID();
|
1167 |
+
$submited = json_decode( $contact_us->mo_openid_send_email_alert( $email, $phone, $message ), true );
|
1168 |
+
|
1169 |
+
if ( json_last_error() == JSON_ERROR_NONE ) {
|
1170 |
+
if ( is_array( $submited ) && array_key_exists( 'status', $submited ) && $submited['status'] == 'ERROR' )
|
1171 |
+
{
|
1172 |
+
if( isset($submited['message']))
|
1173 |
+
{
|
1174 |
+
update_option('mo_openid_message',$submited['message']);
|
1175 |
+
$this->mo_openid_show_error_message();
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
|
1179 |
+
} else
|
1180 |
+
{
|
1181 |
+
if ( $submited == false )
|
1182 |
+
{
|
1183 |
+
update_option( 'mo_openid_message',"ERROR_WHILE_SUBMITTING_QUERY");
|
1184 |
+
$this->mo_openid_show_success_message();
|
1185 |
+
} else {
|
1186 |
+
|
1187 |
+
update_option('mo_openid_message',"Your response is submitted successfully");
|
1188 |
+
$this->mo_openid_show_success_message();
|
1189 |
+
update_option('mo_openid_feedback_form',1);
|
1190 |
+
}
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
update_option('mo_openid_feedback_form',1);
|
1194 |
+
deactivate_plugins( '/miniorange-login-openid/miniorange_openid_sso_settings.php' );
|
1195 |
+
|
1196 |
+
|
1197 |
+
|
1198 |
+
}
|
1199 |
+
}
|
1200 |
|
1201 |
}
|
1202 |
|
1397 |
}
|
1398 |
|
1399 |
new Miniorange_OpenID_SSO;
|
1400 |
+
?>
|
miniorange_openid_sso_settings_page.php
CHANGED
@@ -294,18 +294,23 @@ function mo_openid_apps_config() {
|
|
294 |
</table>
|
295 |
|
296 |
<table>
|
297 |
-
|
298 |
-
|
299 |
-
<h3>Select Apps</h3>
|
300 |
<p>Select applications to enable social login</p>
|
301 |
|
302 |
<tr>
|
303 |
<td>
|
304 |
-
|
305 |
<tr>
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
<td>
|
310 |
<input type="checkbox" id="google_enable" class="app_enable" name="mo_openid_google_enable" value="1" onchange="previewLoginIcons();"
|
311 |
<?php checked( get_option('mo_openid_google_enable') == 1 );?> /><strong>Google</strong>
|
@@ -715,7 +720,7 @@ function mo_openid_apps_config() {
|
|
715 |
<tr>
|
716 |
<td>
|
717 |
<input type="radio" id="login_redirect_same_page" name="mo_openid_login_redirect" value="same"
|
718 |
-
<?php checked( get_option('mo_openid_login_redirect') == 'same' );?>
|
719 |
</td>
|
720 |
</tr>
|
721 |
<tr>
|
@@ -785,6 +790,7 @@ function mo_openid_apps_config() {
|
|
785 |
<tr>
|
786 |
<td>
|
787 |
<br>
|
|
|
788 |
<hr>
|
789 |
<h3>Registration Options</h3>
|
790 |
</td>
|
@@ -3497,13 +3503,11 @@ function add_custom_app(){
|
|
3497 |
var appname = document.getElementById("mo_oauth_app").value;
|
3498 |
document.getElementById("instructions").innerHTML = "";
|
3499 |
if(appname=="google"){
|
3500 |
-
|
3501 |
} else if(appname=="facebook"){
|
3502 |
-
|
3503 |
} else if(appname=="twitter"){
|
3504 |
-
document.getElementById("instructions").innerHTML = '<br><strong>Instructions to configure Twitter : </strong><ol><li>Go to <a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a> and sign in with your twitter account.</li><li>Click on <b>Create New App</b>.</li> <li>Enter Name, description, website name and callback URL.</li><li><b>Callback URL</b> <br><u>Example of public website, </u><br>if your website URL is =><?php echo site_url();?><br> then your callback URL should be => <?php echo site_url();?>/openidcallback<br><u>Example of localhost,</u><br> Twitter may not accept local IPs so try using 127.0.0.1 instead of localhost.<br> Also make sure your Callback URL is prefixed with the website. <br> Go to Settings-> General and replace "localhost" with "127.0.0.1" in <b>WordPress Address (URL)</b> and <b>Site Address (URL)</b> <br>if your website URL is => http://127.0.0.1/wordpress <br> then your callback URL should be => http://127.0.0.1/wordpress/openidcallback</li><li>Check the developer agreement checkbox and click on <b>Create your Twitter Application</b>.Under <b>Keys and Access Token</b> Tab, you will find your <b>API Key/Secret</b>.Paste them into the fields above.</li><li>Leave the scope field blank.</li><li>Click on the
|
3505 |
-
|
3506 |
-
|
3507 |
}
|
3508 |
|
3509 |
}
|
@@ -3634,13 +3638,13 @@ function delete_custom_app($appname){
|
|
3634 |
}
|
3635 |
|
3636 |
function mo_custom_app_instructions($appname){
|
3637 |
-
|
3638 |
-
|
3639 |
-
|
3640 |
-
|
3641 |
-
|
3642 |
-
|
3643 |
-
|
3644 |
|
3645 |
}
|
3646 |
|
294 |
</table>
|
295 |
|
296 |
<table>
|
297 |
+
<h3>Select Apps</h3>
|
|
|
|
|
298 |
<p>Select applications to enable social login</p>
|
299 |
|
300 |
<tr>
|
301 |
<td>
|
302 |
+
<table style="width:100%">
|
303 |
<tr>
|
304 |
+
<td>
|
305 |
+
<div class="tooltip">
|
306 |
+
|
307 |
+
<input type="checkbox" id="facebook_enable" class="app_enable tooltip" name="mo_openid_facebook_enable" value="1" onchange="previewLoginIcons();"
|
308 |
+
<?php checked( get_option('mo_openid_facebook_enable') == 1 );?> /><strong> Facebook <i class="fa fa-exclamation" aria-hidden="true"> </i> </strong>
|
309 |
+
|
310 |
+
<span class="tooltiptext"> There can be issue in facebook default app. Because of Facebook Policies. For better experience, Please use Facebook <a class="mo-tomato" href='<?php echo admin_url() ?>admin.php?page=mo_openid_settings&tab=custom_app&action=add'>custom app</a>. </span>
|
311 |
+
</div>
|
312 |
+
</td>
|
313 |
+
|
314 |
<td>
|
315 |
<input type="checkbox" id="google_enable" class="app_enable" name="mo_openid_google_enable" value="1" onchange="previewLoginIcons();"
|
316 |
<?php checked( get_option('mo_openid_google_enable') == 1 );?> /><strong>Google</strong>
|
720 |
<tr>
|
721 |
<td>
|
722 |
<input type="radio" id="login_redirect_same_page" name="mo_openid_login_redirect" value="same"
|
723 |
+
<?php checked( get_option('mo_openid_login_redirect') == 'same' );?> /><b>*</b>Same page where user logged in
|
724 |
</td>
|
725 |
</tr>
|
726 |
<tr>
|
790 |
<tr>
|
791 |
<td>
|
792 |
<br>
|
793 |
+
<b>*NOTE</b>: If you login through wordpress default login page after login you will be redirected to Homepage.
|
794 |
<hr>
|
795 |
<h3>Registration Options</h3>
|
796 |
</td>
|
3503 |
var appname = document.getElementById("mo_oauth_app").value;
|
3504 |
document.getElementById("instructions").innerHTML = "";
|
3505 |
if(appname=="google"){
|
3506 |
+
document.getElementById("instructions").innerHTML = '<br><strong>Instructions to configure Google :</strong><ol><li>Visit the Google website for developers <a href="https://console.developers.google.com/project"target="_blank">console.developers.google.com</a>.</li><li>Open the Google API Console Credentials page and go to API Manager -> Credentials</li><li>From the project drop-down, click on + to Create a new project, enter a name for the project, and optionally, edit the provided Project ID. Click Create.</li><li>On the Credentials menu, select Create credentials, then select OAuth client ID.</li><li>You may be prompted to set a product name on the Consent screen. If so, click Configure consent screen, supply the requested information, and click Save to return to the Credentials screen.</li><li>Select Web Application for the Application Type. Enter <b><?php echo site_url()."/openidcallback";?></b> in Authorized redirect URIs.</li><li>Click Create.</li><li>On the page that appears, copy the client ID and client secret to your clipboard, as you will need them to configure above.</li><li>Enable the Google+ API.<ul><li>In the Dashboard menu, click on ENABLE APIS AND SERVICES.</li><li>Type Google+ in search box, select Google+ API and click on Enable.</li></ul></li><li>Input scope as <b>https://www.googleapis.com/auth/userinfo.profile+ https://www.googleapis.com/auth/user.birthday.read+ https://www.googleapis.com/auth/plus.login+ https://www.googleapis.com/auth/plus.profile.emails.read+ https://www.googleapis.com/auth/userinfo.email+ https://www.googleapis.com/auth/plus.me </b></li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
3507 |
} else if(appname=="facebook"){
|
3508 |
+
document.getElementById("instructions").innerHTML = '<br><strong>Instructions to configure Facebook : </strong><ol><li>Go to Facebook developers console <a href="https://developers.facebook.com/apps/" target="_blank">https://developers.facebook.com/apps/</a>. Login with your facebook developer account</li><li>Click on Create a New App/Add new App button</li><li>Enter <b>Display Name</b> and click on Create App ID</li><li>In Add Product select Facebook Login and click on Setup</li><li>Click on Web. Enter your Site URL. From the left pane, select <b>Facebook Login -> Settings</b>.</li><li>Under <b>Client OAuth Settings</b>, enter <b><?php echo site_url()."/openidcallback";?></b> in Valid OAuth redirect URIs and click <b>Save Changes</b>.</li><li>Go to <b>App Review </b>make your app public. After making app public you will see on right top corner your app status changes from <b>In Development</b> to <b>Live</b>.</li><li>Go to Settings > Basic. Paste your App ID and App Secret provided by Facebook into the fields above.</li><li>Input <b> email, public_profile, user_friends </b>as scope.</li><li> If you want to access the <b>user_birthday, user_hometown, user_location</b> of a Facebook user, you need to send your app for review to Facebook. For submitting an app for review, click <a target="_blank" href="https://developers.facebook.com/docs/facebook-login/review/how-to-submit ">here</a>. After your app is reviewed, you can add the scopes you have sent for review in the scope above. If your app is not approved or is in the process of getting approved, let the scope be <b>email, public_profile, user_friends</b> </li><li>Click on the Save settings button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
3509 |
} else if(appname=="twitter"){
|
3510 |
+
document.getElementById("instructions").innerHTML = '<br><strong>Instructions to configure Twitter : </strong><ol><li>Go to <a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a> and sign in with your twitter account.</li><li>Click on <b>Create New App</b>.</li> <li>Enter Name, description, website name and callback URL.</li><li><b>Callback URL</b> <br><u>Example of public website, </u><br>if your website URL is =><?php echo site_url();?><br> then your callback URL should be => <?php echo site_url();?>/openidcallback<br><u>Example of localhost,</u><br> Twitter may not accept local IPs so try using 127.0.0.1 instead of localhost.<br> Also make sure your Callback URL is prefixed with the website. <br> Go to Settings-> General and replace "localhost" with "127.0.0.1" in <b>WordPress Address (URL)</b> and <b>Site Address (URL)</b> <br>if your website URL is => http://127.0.0.1/wordpress <br> then your callback URL should be => http://127.0.0.1/wordpress/openidcallback</li><li>Twitter might ask you to add your phone number to your profile while creating the app.</li><li>Check the developer agreement checkbox and click on <b>Create your Twitter Application</b>.Under <b>Keys and Access Token</b> Tab, you will find your <b>API Key/Secret</b>.Paste them into the fields above.</li><li>Leave the scope field blank.</li><li><u>Instructions to request email address of a user</u>: The “Request email addresses from users” checkbox is available under the app permissions on apps.twitter.com. Privacy Policy URL and Terms of Service URL fields must be completed in the app settings in order for email address access to function. If enabled, users will be informed via the oauth/authorize dialog that your app can access their email address.If the user does not have an email address on their account, or if the email address is not verified, email will not be returned.</li><li>Go to Permissions tab -> Access. Select <b>Read Only</b> type of access.</li><li>Click on the Update settings button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
|
|
|
|
3511 |
}
|
3512 |
|
3513 |
}
|
3638 |
}
|
3639 |
|
3640 |
function mo_custom_app_instructions($appname){
|
3641 |
+
if($appname=="google"){
|
3642 |
+
echo '<br><strong>Instructions to configure Google :</strong><ol><li>Visit the Google website for developers <a href="https://console.developers.google.com/project"target="_blank">console.developers.google.com</a>.</li><li>Open the Google API Console Credentials page and go to API Manager -> Credentials</li><li>From the project drop-down, choose Create a new project, enter a name for the project, and optionally, edit the provided Project ID. Click Create.</li><li>On the Credentials page, select Create credentials, then select OAuth client ID.</li><li>You may be prompted to set a product name on the Consent screen. If so, click Configure consent screen, supply the requested information, and click Save to return to the Credentials screen.</li><li>Select Web Application for the Application Type. Follow the instructions to enter JavaScript origins, redirect URIs, or both. provide <b>'.site_url().'/openidcallback</b> for the Redirect URI.</li><li>Click Create.</li><li>On the page that appears, copy the client ID and client secret to your clipboard, as you will need them to configure above.</li><li>Enable the Google+ API.<ul><li>In the Dashboard menu, click on ENABLE APIS AND SERVICES.</li><li>Type Google+ in search box, select Google+ API and click on Enable.</li></ul></li><li>Input scope as <b>https://www.googleapis.com/auth/userinfo.profile+ https://www.googleapis.com/auth/user.birthday.read+ https://www.googleapis.com/auth/plus.login+ https://www.googleapis.com/auth/plus.profile.emails.read+ https://www.googleapis.com/auth/userinfo.email+ https://www.googleapis.com/auth/plus.me </b></li><li>Go to Social Login tab and configure the icons.</li></ol>';
|
3643 |
+
} else if($appname=="facebook"){
|
3644 |
+
echo '<br><strong>Instructions to configure Facebook : </strong><ol><li>Go to Facebook developers console <a href="https://developers.facebook.com/apps/" target="_blank">https://developers.facebook.com/apps/</a>. Login with your facebook developer account</li><li>Click on Create a New App/Add new App button</li><li>Enter <b>Display Name</b> and click on Create App ID</li><li>In Add Product select Facebook Login and click on Setup</li><li>Click on Web. Enter your Site URL. From the left pane, select <b>Facebook Login -> Settings</b>.</li><li>Under <b>Client OAuth Settings</b>, enter <b>'.site_url().'/openidcallback</b> in Valid OAuth redirect URIs and click <b>Save Changes</b>.</li><li>Go to <b>App Review </b>make your app public. After making app public you will see on right top corner your app status changes from <b>In Development</b> to <b>Live</b>.</li><li>Go to Settings > Basic. Paste your App ID and App Secret provided by Facebook into the fields above.</li><li>Input <b> email, public_profile, user_friends </b>as scope.</li><li> If you want to access the <b>user_birthday, user_hometown, user_location</b> of a Facebook user, you need to send your app for review to Facebook. For submitting an app for review, click <a target="_blank" href="https://developers.facebook.com/docs/facebook-login/review/how-to-submit ">here</a>. After your app is reviewed, you can add the scopes you have sent for review in the scope above. If your app is not approved or is in the process of getting approved, let the scope be <b>email, public_profile, user_friends</b> </li><li>Click on the Save settings button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
3645 |
+
} else if($appname=="twitter"){
|
3646 |
+
echo '<br><strong>Instructions to configure Twitter : </strong><ol><li>Go to <a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a> and sign in with your twitter account.</li><li>Click on <b>Create New App</b>.</li> <li>Enter Name, description, website name and callback URL.</li><li><b>Callback URL</b> <br><u>Example of public website, </u><br>if your website URL is =>'.site_url().'<br> then your callback URL should be => '.site_url().'/openidcallback'.'<br><u>Example of localhost,</u><br> Twitter may not accept local IPs so try using 127.0.0.1 instead of localhost.<br> Also make sure your Callback URL is prefixed with the website. <br> Go to Settings-> General and replace "localhost" with "127.0.0.1" in <b>WordPress Address (URL)</b> and <b>Site Address (URL)</b> <br>if your website URL is => http://127.0.0.1/wordpress <br> then your callback URL should be => http://127.0.0.1/wordpress/openidcallback </li><li>Twitter might ask you to add your phone number to your profile while creating the app.</li><li>Check the developer agreement checkbox and click on <b>Create your Twitter Application</b>.Under <b>Keys and Access Token</b> Tab, you will find your <b>API Key/Secret</b>.Paste them into the fields above.</li><li>Leave the scope field blank.</li><li><u>Instructions to request email address of a user</u>: The “Request email addresses from users” checkbox is available under the app permissions on apps.twitter.com. Privacy Policy URL and Terms of Service URL fields must be completed in the app settings in order for email address access to function. If enabled, users will be informed via the oauth/authorize dialog that your app can access their email address.If the user does not have an email address on their account, or if the email address is not verified, email will not be returned.</li><li>Go to Permissions tab -> Access. Select <b>Read Only</b> type of access.</li><li>Click on the Update settings button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
3647 |
+
}
|
3648 |
|
3649 |
}
|
3650 |
|
mo_openid_feedback_form.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php function mo_openid_display_feedback_form(){
|
2 |
+
if ( 'plugins.php' != basename($_SERVER['PHP_SELF']) ) {
|
3 |
+
return;
|
4 |
+
}
|
5 |
+
wp_enqueue_style( 'wp-pointer' );
|
6 |
+
wp_enqueue_script( 'wp-pointer' );
|
7 |
+
wp_enqueue_script( 'utils' );
|
8 |
+
wp_enqueue_style( 'mo_openid_plugins_page_style', plugins_url( 'includes/css/mo_openid_feedback.css', __FILE__ ) );
|
9 |
+
?>
|
10 |
+
|
11 |
+
</head>
|
12 |
+
<body>
|
13 |
+
|
14 |
+
<!-- The Modal -->
|
15 |
+
<div id="myModal" class="mo_openid_modal">
|
16 |
+
|
17 |
+
<!-- Modal content -->
|
18 |
+
<div class="mo_openid_modal-content">
|
19 |
+
<span class="mo_openid_close">×</span>
|
20 |
+
<h3>What Happened? </h3>
|
21 |
+
<form name="f" method="post" action="" id="mo_openid_feedback">
|
22 |
+
<input type="hidden" name="mo_openid_feedback" value="mo_openid_feedback"/>
|
23 |
+
<div>
|
24 |
+
<p style="margin-left:2%">
|
25 |
+
<?php
|
26 |
+
$deactivate_reasons = array(
|
27 |
+
"Not Working",
|
28 |
+
"Not Receiving OTP During Registration",
|
29 |
+
"Does not have the features I am looking for",
|
30 |
+
"Does not support login with app I am looking for",
|
31 |
+
"Confusing Interface",
|
32 |
+
"Bugs in the plugin",
|
33 |
+
"I dont want to register",
|
34 |
+
"Other Reasons:"
|
35 |
+
);
|
36 |
+
|
37 |
+
|
38 |
+
foreach ( $deactivate_reasons as $deactivate_reasons ) {?>
|
39 |
+
|
40 |
+
<div class="radio" style="padding:1px;margin-left:2%">
|
41 |
+
<label style="font-weight:normal;font-size:14.6px" for="<?php echo $deactivate_reasons; ?>">
|
42 |
+
<input type="radio" name="deactivate_plugin" value="<?php echo $deactivate_reasons;?>" required>
|
43 |
+
<?php echo $deactivate_reasons;?></label>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
|
47 |
+
<?php } ?>
|
48 |
+
<br>
|
49 |
+
|
50 |
+
<textarea id="mo_openid_query_feedback" name="mo_openid_query_feedback" rows="4" style="margin-left:2%" cols="50" placeholder="Write your query here"></textarea>
|
51 |
+
<br><br>
|
52 |
+
<div class="mo_openid_modal-footer" >
|
53 |
+
<input type="submit" name="mo_openid_feedback_submit" class="button button-primary button-large" value="Submit" />
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
</form>
|
57 |
+
<form name="f" method="post" action="" id="mo_openid_feedback_form_close">
|
58 |
+
<input type="hidden" name="mo_openid_option" value="mo_openid_skip_feedback"/>
|
59 |
+
</form>
|
60 |
+
|
61 |
+
</div>
|
62 |
+
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<script>
|
66 |
+
jQuery('a[aria-label="Deactivate Social Login, Social Sharing by miniOrange"]').click(function(){
|
67 |
+
// Get the mo_openid_modal
|
68 |
+
<?php if(!get_option('mo_openid_feedback_form')){ ?>
|
69 |
+
var mo_openid_modal = document.getElementById('myModal');
|
70 |
+
|
71 |
+
// Get the button that opens the mo_openid_modal
|
72 |
+
var btn = document.getElementById("myBtn");
|
73 |
+
|
74 |
+
// Get the <span> element that closes the mo_openid_modal
|
75 |
+
var span = document.getElementsByClassName("mo_openid_close")[0];
|
76 |
+
|
77 |
+
// When the user clicks the button, open the mo_openid_modal
|
78 |
+
|
79 |
+
mo_openid_modal.style.display = "block";
|
80 |
+
|
81 |
+
|
82 |
+
jQuery('input:radio[name="deactivate_plugin"]').click(function () {
|
83 |
+
var reason= jQuery(this).val();
|
84 |
+
jQuery('#mo_openid_query_feedback').removeAttr('required')
|
85 |
+
|
86 |
+
if(reason=='Facing issues During Registration'){
|
87 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Can you please describe the issue in detail?");
|
88 |
+
}else if(reason=="Does not have the features I'm looking for"){
|
89 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Let us know what feature are you looking for");
|
90 |
+
}else if(reason=="Other Reasons:"){
|
91 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Can you let us know the reason for deactivation");
|
92 |
+
jQuery('#mo_openid_query_feedback').prop('required',true);
|
93 |
+
|
94 |
+
}else if(reason=="Not Receiving OTP During Registration"){
|
95 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Can you please describe the issue in detail?");
|
96 |
+
|
97 |
+
}else if(reason=="Bugs in the plugin"){
|
98 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Can you please let us know about the bug in detail?");
|
99 |
+
|
100 |
+
}else if(reason=="Does not support login with app I am looking for"){
|
101 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Let us know which App are you looking for");
|
102 |
+
|
103 |
+
}else if(reason=="Confusing Interface"){
|
104 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Finding it confusing? let us know so that we can improve the interface");
|
105 |
+
|
106 |
+
}else if(reason=="Not Working"){
|
107 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "Can you please describe what is not working?");
|
108 |
+
|
109 |
+
}
|
110 |
+
else if(reason=="I dont want to register"){
|
111 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "");
|
112 |
+
|
113 |
+
}else if(reason=="Login Credentials Not Working"){
|
114 |
+
jQuery('#mo_openid_query_feedback').attr("placeholder", "This is not a major issue please contact info@miniorange.com to get your issue resolved.");
|
115 |
+
|
116 |
+
}
|
117 |
+
});
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
|
122 |
+
// When the user clicks on <span> (x), mo_openid_close the mo_openid_modal
|
123 |
+
span.onclick = function() {
|
124 |
+
mo_openid_modal.style.display = "none";
|
125 |
+
jQuery('#mo_openid_feedback_form_close').submit();
|
126 |
+
}
|
127 |
+
|
128 |
+
// When the user clicks anywhere outside of the mo_openid_modal, mo_openid_close it
|
129 |
+
window.onclick = function(event) {
|
130 |
+
if (event.target == mo_openid_modal) {
|
131 |
+
mo_openid_modal.style.display = "none";
|
132 |
+
}
|
133 |
+
}
|
134 |
+
return false;
|
135 |
+
<?php } ?>
|
136 |
+
});
|
137 |
+
</script><?php
|
138 |
+
}
|
139 |
+
?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: miniOrange, vkontakte
|
|
3 |
Donate link: https://www.miniorange.com
|
4 |
Tags: social login, social, facebook, twitter, google, login, facebook login, google login, google, twitter login, social connect, social network login, social plugin, Vkontakte, LinkedIn
|
5 |
Requires at least: 2.0.2
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 6.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -166,6 +166,12 @@ Please email us at info@miniorange.com. You can also submit your query from the
|
|
166 |
|
167 |
|
168 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
= 6.6.8 =
|
170 |
* Fix for issue during update profile.
|
171 |
* Fixed minor database warnings
|
@@ -542,6 +548,12 @@ Please email us at info@miniorange.com. You can also submit your query from the
|
|
542 |
* First version of Social Login, Social Sharing plugin.
|
543 |
|
544 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
= 6.6.8 =
|
546 |
* Fix for issue during update profile.
|
547 |
* Fixed minor database warnings.
|
3 |
Donate link: https://www.miniorange.com
|
4 |
Tags: social login, social, facebook, twitter, google, login, facebook login, google login, google, twitter login, social connect, social network login, social plugin, Vkontakte, LinkedIn
|
5 |
Requires at least: 2.0.2
|
6 |
+
Tested up to: 4.9.7
|
7 |
+
Stable tag: 6.6.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
166 |
|
167 |
|
168 |
== Changelog ==
|
169 |
+
= 6.6.9 =
|
170 |
+
* Fixed GDPR related bug.
|
171 |
+
* Update guide for facebook custom app.
|
172 |
+
* Fixed facebook related issue.
|
173 |
+
* Fixed some warnings.
|
174 |
+
|
175 |
= 6.6.8 =
|
176 |
* Fix for issue during update profile.
|
177 |
* Fixed minor database warnings
|
548 |
* First version of Social Login, Social Sharing plugin.
|
549 |
|
550 |
== Upgrade Notice ==
|
551 |
+
= 6.6.9 =
|
552 |
+
* Fixed GDPR related bug.
|
553 |
+
* Update guide for facebook custom app.
|
554 |
+
* Fixed facebook related issue.
|
555 |
+
* Fixed some warnings.
|
556 |
+
|
557 |
= 6.6.8 =
|
558 |
* Fix for issue during update profile.
|
559 |
* Fixed minor database warnings.
|
uninstall.php
CHANGED
@@ -150,4 +150,13 @@
|
|
150 |
delete_option( 'mo_openid_privacy_policy_text');
|
151 |
delete_option( 'mo_openid_gdpr_consent_message');
|
152 |
delete_option( 'mo_openid_privacy_policy_url');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
?>
|
150 |
delete_option( 'mo_openid_privacy_policy_text');
|
151 |
delete_option( 'mo_openid_gdpr_consent_message');
|
152 |
delete_option( 'mo_openid_privacy_policy_url');
|
153 |
+
//error message options
|
154 |
+
delete_option('mo_registration_error_message');
|
155 |
+
delete_option('mo_email_failure_message');
|
156 |
+
delete_option( 'mo_existing_username_error_message');
|
157 |
+
delete_option( 'mo_manual_login_error_message');
|
158 |
+
delete_option('mo_delete_user_error_message');
|
159 |
+
delete_option('mo_account_linking_message');
|
160 |
+
|
161 |
+
delete_option( 'mo_openid_feedback_form' );
|
162 |
?>
|