Version Description
- Add Yahoo as social login option in dafault apps.
- Fixed Permalink issue.
- Added Customizable text for OTP email notification.
- Fixed session issue for account linking.
Download this release
Release Info
Developer | cyberlord92 |
Plugin | Social Login |
Version | 7.1.4 |
Comparing to | |
See all releases |
Code changes from version 7.1.3 to 7.1.4
- class-mo-openid-login-widget.php +174 -65
- includes/images/icons/yahoo.png +0 -0
- includes/js/settings_popup.js +1 -1
- includes/js/social/fb_comment.js +1 -1
- includes/js/social_login.js +1 -1
- miniorange_openid_sso_settings.php +23 -18
- miniorange_openid_sso_settings_page.php +92 -35
- readme.txt +13 -1
- uninstall.php +2 -0
class-mo-openid-login-widget.php
CHANGED
@@ -46,7 +46,7 @@ if(mo_openid_is_customer_registered()) {
|
|
46 |
}
|
47 |
|
48 |
$selected_theme = get_option('mo_openid_login_theme');
|
49 |
-
$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');
|
50 |
$spacebetweenicons = get_option('mo_login_icon_space');
|
51 |
$customWidth = get_option('mo_login_icon_custom_width');
|
52 |
$customHeight = get_option('mo_login_icon_custom_height');
|
@@ -69,6 +69,7 @@ if(mo_openid_is_customer_registered()) {
|
|
69 |
$vkontakte_custom_app = $this->if_custom_app_exists('vkontakte');
|
70 |
$amazon_custom_app = $this->if_custom_app_exists('amazon');
|
71 |
$instagram_custom_app = $this->if_custom_app_exists('instagram');
|
|
|
72 |
|
73 |
if(get_option('mo_openid_gdpr_consent_enable')) {
|
74 |
$gdpr_setting = "disabled='disabled'";
|
@@ -215,6 +216,15 @@ if(mo_openid_is_customer_registered()) {
|
|
215 |
<a class="<?php if(get_option('mo_openid_gdpr_consent_enable')){echo "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; ?> <?php if(get_option('mo_openid_gdpr_consent_enable')){echo "dis";} ?> login-button"></a>
|
216 |
<?php }
|
217 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
|
219 |
}
|
220 |
?>
|
@@ -331,6 +341,16 @@ if(mo_openid_is_customer_registered()) {
|
|
331 |
<a class="<?php if(get_option('mo_openid_gdpr_consent_enable')){echo "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>
|
332 |
<?php }
|
333 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
|
335 |
|
336 |
}
|
@@ -407,7 +427,7 @@ if(mo_openid_is_customer_registered()) {
|
|
407 |
$html = '';
|
408 |
//$this->error_message();
|
409 |
$selected_theme = isset( $atts['shape'] )? $atts['shape'] : get_option('mo_openid_login_theme');
|
410 |
-
$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');
|
411 |
$spacebetweenicons = isset( $atts['space'] )? $atts['space'] : get_option('mo_login_icon_space');
|
412 |
$customWidth = isset( $atts['width'] )? $atts['width'] : get_option('mo_login_icon_custom_width');
|
413 |
$customHeight = isset( $atts['height'] )? $atts['height'] : get_option('mo_login_icon_custom_height');
|
@@ -433,6 +453,7 @@ if(mo_openid_is_customer_registered()) {
|
|
433 |
$vkontakte_custom_app = $this->if_custom_app_exists('vkontakte');
|
434 |
$amazon_custom_app = $this->if_custom_app_exists('amazon');
|
435 |
$instagram_custom_app = $this->if_custom_app_exists('instagram');
|
|
|
436 |
|
437 |
if($selected_theme == 'longbuttonwithtext'){
|
438 |
$selected_theme = 'longbutton';
|
@@ -474,7 +495,7 @@ if(mo_openid_is_customer_registered()) {
|
|
474 |
|
475 |
if(get_option('mo_openid_gdpr_consent_enable')){
|
476 |
$html .= '<label class="mo-consent"><input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox">';
|
477 |
-
$html .= $consent_message.'</label>';
|
478 |
}
|
479 |
|
480 |
if($customTheme == 'default'){
|
@@ -562,6 +583,15 @@ if(mo_openid_is_customer_registered()) {
|
|
562 |
$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>";
|
563 |
}
|
564 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
|
567 |
|
@@ -642,6 +672,15 @@ if(mo_openid_is_customer_registered()) {
|
|
642 |
$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>";
|
643 |
}
|
644 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
}
|
646 |
$html .= '</div> <br>';
|
647 |
|
@@ -991,6 +1030,7 @@ if(mo_openid_is_customer_registered()) {
|
|
991 |
mo_openid_start_session();
|
992 |
//link account
|
993 |
if(!isset($_POST['mo_openid_create_new_account'])){
|
|
|
994 |
$url = site_url().'/wp-login.php?option=disable-social-login';
|
995 |
header('Location:'. $url);
|
996 |
exit;
|
@@ -998,54 +1038,81 @@ if(mo_openid_is_customer_registered()) {
|
|
998 |
//create new account
|
999 |
else {
|
1000 |
mo_openid_start_session();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
if(get_option('mo_openid_auto_register_enable')) {
|
|
|
1002 |
$random_password = wp_generate_password( 10, false );
|
1003 |
global $wpdb;
|
1004 |
$db_prefix = $wpdb->prefix;
|
1005 |
-
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $
|
1006 |
|
1007 |
if( !empty($username_user_id) ){
|
1008 |
-
$email_explode = explode('@',$
|
1009 |
-
$
|
1010 |
-
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1011 |
if( !empty($username_user_id) ){
|
1012 |
wp_die("Error Code 1: ".get_option('mo_existing_username_error_message'));
|
1013 |
}
|
1014 |
-
$
|
1015 |
}
|
1016 |
|
1017 |
-
$
|
1018 |
|
1019 |
-
if(isset($
|
1020 |
-
$
|
1021 |
}
|
1022 |
|
1023 |
$userdata = array(
|
1024 |
-
'user_login' => $
|
1025 |
-
'user_email' => $
|
1026 |
'user_pass' => $random_password,
|
1027 |
-
'display_name' => $
|
1028 |
-
'first_name' => $
|
1029 |
-
'last_name' => $
|
1030 |
-
'user_url' => $
|
1031 |
);
|
1032 |
|
1033 |
$user_id = wp_insert_user( $userdata);
|
1034 |
|
1035 |
if(is_wp_error( $user_id )) {
|
1036 |
-
|
1037 |
wp_die("Error Code 1: ".get_option('mo_registration_error_message'));
|
1038 |
}
|
1039 |
|
1040 |
-
|
1041 |
|
1042 |
-
|
1043 |
-
|
|
|
|
|
1044 |
}
|
1045 |
|
1046 |
mo_openid_start_session();
|
|
|
1047 |
$_SESSION['mo_login'] = true;
|
1048 |
-
do_action( 'mo_user_register', $user_id
|
1049 |
do_action( 'miniorange_collect_attributes_for_authenticated_user', $user, mo_openid_get_redirect_url());
|
1050 |
do_action( 'wp_login', $user->user_login, $user );
|
1051 |
wp_set_auth_cookie( $user_id, true );
|
@@ -1238,7 +1305,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1238 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1239 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1240 |
|
1241 |
-
echo mo_openid_account_linking_form();
|
1242 |
exit;
|
1243 |
}
|
1244 |
// else register
|
@@ -1266,7 +1333,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1266 |
$user_id = wp_insert_user( $userdata);
|
1267 |
|
1268 |
if(is_wp_error( $user_id )) {
|
1269 |
-
|
1270 |
wp_die("Error Code 2: ".get_option('mo_registration_error_message'));
|
1271 |
}
|
1272 |
|
@@ -1405,7 +1472,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1405 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1406 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1407 |
|
1408 |
-
echo mo_openid_account_linking_form();
|
1409 |
exit;
|
1410 |
}
|
1411 |
|
@@ -1428,7 +1495,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1428 |
|
1429 |
$user_id = wp_insert_user( $userdata);
|
1430 |
if(is_wp_error( $user_id )) {
|
1431 |
-
|
1432 |
wp_die("Error Code 3: ".get_option('mo_registration_error_message'));
|
1433 |
}
|
1434 |
|
@@ -1524,7 +1591,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1524 |
$_SESSION['user_picture'] = $user_picture;
|
1525 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1526 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1527 |
-
echo mo_openid_account_linking_form();
|
1528 |
exit;
|
1529 |
}
|
1530 |
else {
|
@@ -1537,6 +1604,16 @@ if(mo_openid_is_customer_registered()) {
|
|
1537 |
$email = explode('@', $user_email);
|
1538 |
$username = $email[0];
|
1539 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1540 |
if( isset($username_user_id) ){
|
1541 |
echo '<br/>'."Error Code 2: ".get_option('mo_existing_username_error_message');
|
1542 |
exit();
|
@@ -1563,7 +1640,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1563 |
$user_id = wp_insert_user( $userdata);
|
1564 |
|
1565 |
if(is_wp_error( $user_id )) {
|
1566 |
-
|
1567 |
wp_die("Error Code 4: ".get_option('mo_registration_error_message'));
|
1568 |
}
|
1569 |
|
@@ -1613,6 +1690,26 @@ if(mo_openid_is_customer_registered()) {
|
|
1613 |
else{
|
1614 |
$appslist = array();
|
1615 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1616 |
|
1617 |
mo_openid_start_session();
|
1618 |
|
@@ -1620,14 +1717,6 @@ if(mo_openid_is_customer_registered()) {
|
|
1620 |
|
1621 |
if($key == "facebook" && $appname == "facebook"){
|
1622 |
$_SESSION["appname"] = "facebook";
|
1623 |
-
if(get_option('mo_openid_malform_error')) {
|
1624 |
-
$social_app_redirect_uri = site_url() . '/openidcallback/facebook';
|
1625 |
-
|
1626 |
-
}
|
1627 |
-
else {
|
1628 |
-
$social_app_redirect_uri = site_url() . '/openidcallback';
|
1629 |
-
}
|
1630 |
-
|
1631 |
$client_id = $currentapp['clientid'];
|
1632 |
$scope = $currentapp['scope'];
|
1633 |
$login_dialog_url = "https://www.facebook.com/v2.11/dialog/oauth?client_id=".$client_id. '&redirect_uri='. $social_app_redirect_uri .'&response_type=code&scope='.$scope;
|
@@ -1636,15 +1725,6 @@ if(mo_openid_is_customer_registered()) {
|
|
1636 |
else if($key == "google" && $appname == "google"){
|
1637 |
|
1638 |
$_SESSION["appname"] = "google";
|
1639 |
-
if(get_option('mo_openid_malform_error')) {
|
1640 |
-
$social_app_redirect_uri = site_url() . '/openidcallback/google';
|
1641 |
-
|
1642 |
-
}
|
1643 |
-
else {
|
1644 |
-
$social_app_redirect_uri = site_url() . '/openidcallback';
|
1645 |
-
|
1646 |
-
}
|
1647 |
-
|
1648 |
$client_id = $currentapp['clientid'];
|
1649 |
$scope = $currentapp['scope'];
|
1650 |
$login_dialog_url = 'https://accounts.google.com/o/oauth2/auth?redirect_uri=' .$social_app_redirect_uri .'&response_type=code&client_id=' .$client_id .'&scope='.$scope.'&access_type=offline';
|
@@ -1666,7 +1746,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1666 |
exit;
|
1667 |
}
|
1668 |
|
1669 |
-
else if( strpos( $_SERVER['REQUEST_URI'], "
|
1670 |
|
1671 |
if( is_user_logged_in()){
|
1672 |
return;
|
@@ -1683,11 +1763,11 @@ if(mo_openid_is_customer_registered()) {
|
|
1683 |
if($_SESSION['appname']) {
|
1684 |
$appname = $_SESSION['appname'];
|
1685 |
}else {
|
1686 |
-
if (strpos($_SERVER['REQUEST_URI'], "
|
1687 |
$appname = "google";
|
1688 |
}
|
1689 |
|
1690 |
-
if (strpos($_SERVER['REQUEST_URI'], "
|
1691 |
$appname = "facebook";
|
1692 |
|
1693 |
}
|
@@ -1716,10 +1796,24 @@ if(mo_openid_is_customer_registered()) {
|
|
1716 |
$appslist = array();
|
1717 |
}
|
1718 |
if(get_option('mo_openid_malform_error')){
|
1719 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1720 |
}
|
1721 |
else{
|
1722 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1723 |
}
|
1724 |
|
1725 |
foreach($appslist as $key=>$currentapp){
|
@@ -1830,6 +1924,8 @@ if(mo_openid_is_customer_registered()) {
|
|
1830 |
}
|
1831 |
|
1832 |
$profile_json_output = json_decode($output, true);
|
|
|
|
|
1833 |
}
|
1834 |
|
1835 |
$social_app_name = $appname;
|
@@ -1958,7 +2054,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1958 |
$_SESSION['user_picture'] = $user_picture;
|
1959 |
$_SESSION['social_app_name'] = $social_app_name;
|
1960 |
$_SESSION['social_user_id'] = $social_user_id;
|
1961 |
-
echo mo_openid_account_linking_form();
|
1962 |
exit;
|
1963 |
}
|
1964 |
|
@@ -1983,7 +2079,7 @@ if(mo_openid_is_customer_registered()) {
|
|
1983 |
$user_id = wp_insert_user( $userdata);
|
1984 |
|
1985 |
if(is_wp_error( $user_id )) {
|
1986 |
-
|
1987 |
wp_die("Error Code 5: ".get_option('mo_registration_error_message'));
|
1988 |
}
|
1989 |
|
@@ -2078,10 +2174,12 @@ if(mo_openid_is_customer_registered()) {
|
|
2078 |
$_SESSION['user_picture'] = $user_picture;
|
2079 |
$_SESSION['social_app_name'] = $social_app_name;
|
2080 |
$_SESSION['social_user_id'] = $social_user_id;
|
2081 |
-
|
|
|
2082 |
exit;
|
2083 |
}
|
2084 |
else {
|
|
|
2085 |
// this user is a guest
|
2086 |
// auto registration is enabled
|
2087 |
if(get_option('mo_openid_auto_register_enable')) {
|
@@ -2091,6 +2189,16 @@ if(mo_openid_is_customer_registered()) {
|
|
2091 |
$email_array = explode('@', $user_email);
|
2092 |
$username = $email_array[0];
|
2093 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2094 |
if( isset($username_user_id) ){
|
2095 |
echo '<br/>'."Error Code 3: ".get_option('mo_existing_username_error_message');
|
2096 |
exit();
|
@@ -2115,7 +2223,7 @@ if(mo_openid_is_customer_registered()) {
|
|
2115 |
|
2116 |
$user_id = wp_insert_user( $userdata);
|
2117 |
if(is_wp_error( $user_id )) {
|
2118 |
-
|
2119 |
wp_die("Error Code 6: ".get_option('mo_registration_error_message'));
|
2120 |
}
|
2121 |
|
@@ -2328,7 +2436,7 @@ if(mo_openid_is_customer_registered()) {
|
|
2328 |
return $html;
|
2329 |
}
|
2330 |
|
2331 |
-
function mo_openid_account_linking_form(){
|
2332 |
$path = mo_openid_get_wp_style();
|
2333 |
$html = "<head><link rel=\"stylesheet\" href=".$path. " type='text/css' media='all' /><head>
|
2334 |
<body class='login login-action-login wp-core-ui locale-en-us'>
|
@@ -2337,6 +2445,15 @@ if(mo_openid_is_customer_registered()) {
|
|
2337 |
<div style=\"width: 500px; margin: 30px auto;\">
|
2338 |
<form name = 'f' method = 'post' action=''>
|
2339 |
<input type = 'hidden' name = 'option' value = 'mo_openid_account_linking'/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2340 |
<div style = 'background-color:white; padding:12px; position:fixed; top:100px; right: 350px; padding-bottom: 20px;left:350px; overflow:hidden; outline:1px black;border-radius: 5px;'>
|
2341 |
|
2342 |
<br>
|
@@ -2565,15 +2682,10 @@ if(mo_openid_is_customer_registered()) {
|
|
2565 |
$transactionId = hash("sha512", $stringToHash);
|
2566 |
//wp_email function will come here
|
2567 |
$subject= '['.get_bloginfo('name').'] Verify your email';
|
2568 |
-
$message='Dear User,
|
2569 |
-
|
2570 |
-
Your verification code for completing your profile is: '.$otp.'
|
2571 |
-
|
2572 |
-
Please use this code to complete your profile. Do not share this code with anyone.
|
2573 |
|
2574 |
-
|
2575 |
|
2576 |
-
$response = wp_mail($email, $subject
|
2577 |
if($response){
|
2578 |
mo_openid_start_session();
|
2579 |
$_SESSION['mo_otptoken'] = true;
|
@@ -2772,9 +2884,6 @@ Thank you.';
|
|
2772 |
$username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
|
2773 |
$username = preg_replace( '/&.+?;/', '', $username ); // Kill entities
|
2774 |
|
2775 |
-
// If strict, reduce to ASCII and Cyrillic characters for max portability.
|
2776 |
-
if ( $strict )
|
2777 |
-
$username = preg_replace( '|[^a-zあ-ん\p{Han}а-я0-9ㅂㅈㄷㄱ쇼ㅕㅑㅐㅔㅁㄴㅇㄹ호ㅓㅏㅣㅋㅌㅊ퓨ㅜㅡㅃㅉㄸㄲ썌ㅖ _.\-@]|iu', '', $username );
|
2778 |
|
2779 |
$username = trim( $username );
|
2780 |
// Consolidate contiguous whitespace
|
46 |
}
|
47 |
|
48 |
$selected_theme = get_option('mo_openid_login_theme');
|
49 |
+
$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')| get_option('mo_openid_yahoo_enable');
|
50 |
$spacebetweenicons = get_option('mo_login_icon_space');
|
51 |
$customWidth = get_option('mo_login_icon_custom_width');
|
52 |
$customHeight = get_option('mo_login_icon_custom_height');
|
69 |
$vkontakte_custom_app = $this->if_custom_app_exists('vkontakte');
|
70 |
$amazon_custom_app = $this->if_custom_app_exists('amazon');
|
71 |
$instagram_custom_app = $this->if_custom_app_exists('instagram');
|
72 |
+
$yahoo_custom_app = $this->if_custom_app_exists('yahoo');
|
73 |
|
74 |
if(get_option('mo_openid_gdpr_consent_enable')) {
|
75 |
$gdpr_setting = "disabled='disabled'";
|
216 |
<a class="<?php if(get_option('mo_openid_gdpr_consent_enable')){echo "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; ?> <?php if(get_option('mo_openid_gdpr_consent_enable')){echo "dis";} ?> login-button"></a>
|
217 |
<?php }
|
218 |
}
|
219 |
+
if( get_option('mo_openid_yahoo_enable') ) {
|
220 |
+
if($selected_theme == 'longbutton'){
|
221 |
+
?><a rel='nofollow' <?php echo $gdpr_setting; ?> onClick="moOpenIdLogin('yahoo','<?php echo $yahoo_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-yahoo btn-custom-size login-button" > <i style="padding-top:<?php echo $customHeight-35 ?>px !important" class="fa fa-yahoo"></i><?php
|
222 |
+
echo get_option('mo_openid_login_button_customize_text'); ?> Yahoo</a>
|
223 |
+
<?php
|
224 |
+
}else{
|
225 |
+
?><a class=" <?php if(get_option('mo_openid_gdpr_consent_enable')){echo "dis";} ?> login-button" rel='nofollow' title="<?php echo $customTextofTitle ?> Yahoo" onClick="moOpenIdLogin('yahoo','<?php echo $yahoo_custom_app?>');"><img alt='Yahoo' 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/yahoo.png', __FILE__ )?>" class="<?php echo $selected_theme; ?> <?php if(get_option('mo_openid_gdpr_consent_enable')){echo "dis";} ?> login-button" ></a>
|
226 |
+
<?php }
|
227 |
+
}
|
228 |
|
229 |
}
|
230 |
?>
|
341 |
<a class="<?php if(get_option('mo_openid_gdpr_consent_enable')){echo "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>
|
342 |
<?php }
|
343 |
}
|
344 |
+
if( get_option('mo_openid_yahoo_enable') ) {
|
345 |
+
if($selected_theme == 'longbutton'){
|
346 |
+
?> <a rel='nofollow' <?php echo $gdpr_setting; ?>onClick="moOpenIdLogin('yahoo','<?php echo $yahoo_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;background:<?php echo "#".$customBackground?> !important;border-radius:<?php echo $customBoundary ?>px !important;" class="btn-mo btn btn-block btn-social btn-yahoo btn-custom-size login-button" > <i style="padding-top:<?php echo $customHeight-35 ?>px !important" class="fa fa-yahoo"></i><?php
|
347 |
+
echo get_option('mo_openid_login_button_customize_text'); ?> Yahoo</a>
|
348 |
+
<?php }
|
349 |
+
else{ ?>
|
350 |
+
<a class="<?php if(get_option('mo_openid_gdpr_consent_enable')){echo "dis";} ?> login-button" rel='nofollow' onClick="moOpenIdLogin('yahoo','<?php echo $yahoo_custom_app?>');" title="<?php echo $customTextofTitle ?> Yahoo"><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-yahoo custom-login-button <?php echo $selected_theme; ?>" ></i></a>
|
351 |
+
<?php }
|
352 |
+
|
353 |
+
}
|
354 |
|
355 |
|
356 |
}
|
427 |
$html = '';
|
428 |
//$this->error_message();
|
429 |
$selected_theme = isset( $atts['shape'] )? $atts['shape'] : get_option('mo_openid_login_theme');
|
430 |
+
$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')| get_option('mo_openid_yahoo_enable');
|
431 |
$spacebetweenicons = isset( $atts['space'] )? $atts['space'] : get_option('mo_login_icon_space');
|
432 |
$customWidth = isset( $atts['width'] )? $atts['width'] : get_option('mo_login_icon_custom_width');
|
433 |
$customHeight = isset( $atts['height'] )? $atts['height'] : get_option('mo_login_icon_custom_height');
|
453 |
$vkontakte_custom_app = $this->if_custom_app_exists('vkontakte');
|
454 |
$amazon_custom_app = $this->if_custom_app_exists('amazon');
|
455 |
$instagram_custom_app = $this->if_custom_app_exists('instagram');
|
456 |
+
$yahoo_custom_app = $this->if_custom_app_exists('yahoo');
|
457 |
|
458 |
if($selected_theme == 'longbuttonwithtext'){
|
459 |
$selected_theme = 'longbutton';
|
495 |
|
496 |
if(get_option('mo_openid_gdpr_consent_enable')){
|
497 |
$html .= '<label class="mo-consent"><input type="checkbox" onchange="mo_openid_on_consent_change(this,value)" value="1" id="mo_openid_consent_checkbox">';
|
498 |
+
$html .= $consent_message.'</label><br>';
|
499 |
}
|
500 |
|
501 |
if($customTheme == 'default'){
|
583 |
$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>";
|
584 |
}
|
585 |
}
|
586 |
+
if (get_option('mo_openid_yahoo_enable')) {
|
587 |
+
if ($selected_theme == 'longbutton') {
|
588 |
+
$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-yahoo btn-custom-dec login-button' onClick=\"moOpenIdLogin('yahoo','" . $yahoo_custom_app . "');\"> <i style='padding-top:" . ($customHeight - 35) . "px !important' class='fa fa-yahoo'></i>" . $buttonText . " Yahoo</a>";
|
589 |
+
} else {
|
590 |
+
$html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " .
|
591 |
+
$customTextofTitle . " Yahoo' onClick=\"moOpenIdLogin('yahoo','" . $yahoo_custom_app . "');\" ><img alt='Yahoo' style='width:" . $customSize . "px !important;height: " . $customSize . "px !important;margin-left: " . ($spacebetweenicons) . "px !important' src='" . plugins_url('includes/images/icons/yahoo.png', __FILE__) . "' class='login-button " . $selected_theme . "' ></a>";
|
592 |
+
}
|
593 |
+
|
594 |
+
}
|
595 |
}
|
596 |
|
597 |
|
672 |
$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>";
|
673 |
}
|
674 |
}
|
675 |
+
if( get_option('mo_openid_yahoo_enable') ) {
|
676 |
+
if($selected_theme == 'longbutton'){
|
677 |
+
$html .= "<a rel='nofollow' ".$gdpr_setting." onClick=\"moOpenIdLogin('yahoo','" . $yahoo_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-yahoo'></i> " . $buttonText . " Yahoo</a>";
|
678 |
+
}
|
679 |
+
else{
|
680 |
+
$html .= "<a class='".$dis." login-button' rel='nofollow' title= ' ".$customTextofTitle." Yahoo' onClick=\"moOpenIdLogin('yahoo','" . $yahoo_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-yahoo custom-login-button " . $selected_theme . "' ></i></a>";
|
681 |
+
}
|
682 |
+
|
683 |
+
}
|
684 |
}
|
685 |
$html .= '</div> <br>';
|
686 |
|
1030 |
mo_openid_start_session();
|
1031 |
//link account
|
1032 |
if(!isset($_POST['mo_openid_create_new_account'])){
|
1033 |
+
|
1034 |
$url = site_url().'/wp-login.php?option=disable-social-login';
|
1035 |
header('Location:'. $url);
|
1036 |
exit;
|
1038 |
//create new account
|
1039 |
else {
|
1040 |
mo_openid_start_session();
|
1041 |
+
|
1042 |
+
$username = $_POST['username'];
|
1043 |
+
$user_email = $_POST['user_email'];
|
1044 |
+
$first_name = $_POST['first_name'];
|
1045 |
+
$last_name = $_POST['last_name'];
|
1046 |
+
$user_full_name = $_POST['user_full_name'];
|
1047 |
+
$user_url = $_POST['user_url'];
|
1048 |
+
$user_picture = $_POST['user_picture'];
|
1049 |
+
$decrypted_app_name = $_POST['decrypted_app_name'];
|
1050 |
+
$decrypted_user_id = $_POST['decrypted_user_id'];
|
1051 |
+
|
1052 |
+
|
1053 |
if(get_option('mo_openid_auto_register_enable')) {
|
1054 |
+
|
1055 |
$random_password = wp_generate_password( 10, false );
|
1056 |
global $wpdb;
|
1057 |
$db_prefix = $wpdb->prefix;
|
1058 |
+
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $username));
|
1059 |
|
1060 |
if( !empty($username_user_id) ){
|
1061 |
+
$email_explode = explode('@',$user_email );
|
1062 |
+
$user_new_name = $email_explode[0];
|
1063 |
+
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $user_new_name));
|
1064 |
+
$i = 1;
|
1065 |
+
$uname='';
|
1066 |
+
while(!empty($username_user_id) ){
|
1067 |
+
$uname=$user_new_name .'_'.$i;
|
1068 |
+
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
|
1069 |
+
$i++;
|
1070 |
+
if(empty($username_user_id)){
|
1071 |
+
$user_new_name=$uname;
|
1072 |
+
}
|
1073 |
+
}
|
1074 |
+
|
1075 |
if( !empty($username_user_id) ){
|
1076 |
wp_die("Error Code 1: ".get_option('mo_existing_username_error_message'));
|
1077 |
}
|
1078 |
+
$username = $user_new_name;
|
1079 |
}
|
1080 |
|
1081 |
+
$meta_user_url = $user_url;
|
1082 |
|
1083 |
+
if(isset($decrypted_app_name) && !empty($decrypted_app_name) && $decrypted_app_name =='facebook'){
|
1084 |
+
$user_url = '';
|
1085 |
}
|
1086 |
|
1087 |
$userdata = array(
|
1088 |
+
'user_login' => $username,
|
1089 |
+
'user_email' => $user_email,
|
1090 |
'user_pass' => $random_password,
|
1091 |
+
'display_name' => $user_full_name,
|
1092 |
+
'first_name' => $first_name,
|
1093 |
+
'last_name' => $last_name,
|
1094 |
+
'user_url' => $user_url,
|
1095 |
);
|
1096 |
|
1097 |
$user_id = wp_insert_user( $userdata);
|
1098 |
|
1099 |
if(is_wp_error( $user_id )) {
|
1100 |
+
print_r($user_id);
|
1101 |
wp_die("Error Code 1: ".get_option('mo_registration_error_message'));
|
1102 |
}
|
1103 |
|
1104 |
+
update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
|
1105 |
|
1106 |
+
$user = get_user_by('id', $user_id );
|
1107 |
+
|
1108 |
+
if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
|
1109 |
+
update_user_meta($user_id, 'moopenid_user_avatar',$user_picture);
|
1110 |
}
|
1111 |
|
1112 |
mo_openid_start_session();
|
1113 |
+
|
1114 |
$_SESSION['mo_login'] = true;
|
1115 |
+
do_action( 'mo_user_register', $user_id,$meta_user_url);
|
1116 |
do_action( 'miniorange_collect_attributes_for_authenticated_user', $user, mo_openid_get_redirect_url());
|
1117 |
do_action( 'wp_login', $user->user_login, $user );
|
1118 |
wp_set_auth_cookie( $user_id, true );
|
1305 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1306 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1307 |
|
1308 |
+
echo mo_openid_account_linking_form($username,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id);
|
1309 |
exit;
|
1310 |
}
|
1311 |
// else register
|
1333 |
$user_id = wp_insert_user( $userdata);
|
1334 |
|
1335 |
if(is_wp_error( $user_id )) {
|
1336 |
+
print_r($user_id);
|
1337 |
wp_die("Error Code 2: ".get_option('mo_registration_error_message'));
|
1338 |
}
|
1339 |
|
1472 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1473 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1474 |
|
1475 |
+
echo mo_openid_account_linking_form($decrypted_user_name,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id);
|
1476 |
exit;
|
1477 |
}
|
1478 |
|
1495 |
|
1496 |
$user_id = wp_insert_user( $userdata);
|
1497 |
if(is_wp_error( $user_id )) {
|
1498 |
+
print_r($user_id);
|
1499 |
wp_die("Error Code 3: ".get_option('mo_registration_error_message'));
|
1500 |
}
|
1501 |
|
1591 |
$_SESSION['user_picture'] = $user_picture;
|
1592 |
$_SESSION['social_app_name'] = $decrypted_app_name;
|
1593 |
$_SESSION['social_user_id'] = $decrypted_user_id;
|
1594 |
+
echo mo_openid_account_linking_form($decrypted_user_name,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id);
|
1595 |
exit;
|
1596 |
}
|
1597 |
else {
|
1604 |
$email = explode('@', $user_email);
|
1605 |
$username = $email[0];
|
1606 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
1607 |
+
|
1608 |
+
$i = 1;
|
1609 |
+
while(!empty($username_user_id) ){
|
1610 |
+
$uname=$username.'_' . $i;
|
1611 |
+
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
|
1612 |
+
$i++;
|
1613 |
+
if(empty($username_user_id)){
|
1614 |
+
$username= $uname;
|
1615 |
+
}
|
1616 |
+
}
|
1617 |
if( isset($username_user_id) ){
|
1618 |
echo '<br/>'."Error Code 2: ".get_option('mo_existing_username_error_message');
|
1619 |
exit();
|
1640 |
$user_id = wp_insert_user( $userdata);
|
1641 |
|
1642 |
if(is_wp_error( $user_id )) {
|
1643 |
+
print_r($user_id);
|
1644 |
wp_die("Error Code 4: ".get_option('mo_registration_error_message'));
|
1645 |
}
|
1646 |
|
1690 |
else{
|
1691 |
$appslist = array();
|
1692 |
}
|
1693 |
+
if(get_option('mo_openid_malform_error')){
|
1694 |
+
if(get_option( 'permalink_structure' )) {
|
1695 |
+
|
1696 |
+
$social_app_redirect_uri = site_url() .'/openidcallback/'.$appname;
|
1697 |
+
|
1698 |
+
}
|
1699 |
+
else{
|
1700 |
+
$social_app_redirect_uri = site_url() . '/?openidcallback='.$appname;
|
1701 |
+
}
|
1702 |
+
|
1703 |
+
}
|
1704 |
+
else{
|
1705 |
+
if(get_option( 'permalink_structure' )) {
|
1706 |
+
$social_app_redirect_uri = site_url() . '/openidcallback';
|
1707 |
+
|
1708 |
+
}
|
1709 |
+
else{
|
1710 |
+
$social_app_redirect_uri = site_url() .'/?openidcallback';
|
1711 |
+
}
|
1712 |
+
}
|
1713 |
|
1714 |
mo_openid_start_session();
|
1715 |
|
1717 |
|
1718 |
if($key == "facebook" && $appname == "facebook"){
|
1719 |
$_SESSION["appname"] = "facebook";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1720 |
$client_id = $currentapp['clientid'];
|
1721 |
$scope = $currentapp['scope'];
|
1722 |
$login_dialog_url = "https://www.facebook.com/v2.11/dialog/oauth?client_id=".$client_id. '&redirect_uri='. $social_app_redirect_uri .'&response_type=code&scope='.$scope;
|
1725 |
else if($key == "google" && $appname == "google"){
|
1726 |
|
1727 |
$_SESSION["appname"] = "google";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1728 |
$client_id = $currentapp['clientid'];
|
1729 |
$scope = $currentapp['scope'];
|
1730 |
$login_dialog_url = 'https://accounts.google.com/o/oauth2/auth?redirect_uri=' .$social_app_redirect_uri .'&response_type=code&client_id=' .$client_id .'&scope='.$scope.'&access_type=offline';
|
1746 |
exit;
|
1747 |
}
|
1748 |
|
1749 |
+
else if( strpos( $_SERVER['REQUEST_URI'], "openidcallback") !== false ||((strpos( $_SERVER['REQUEST_URI'], "oauth_token")!== false)&&(strpos( $_SERVER['REQUEST_URI'], "oauth_verifier") ) )) {
|
1750 |
|
1751 |
if( is_user_logged_in()){
|
1752 |
return;
|
1763 |
if($_SESSION['appname']) {
|
1764 |
$appname = $_SESSION['appname'];
|
1765 |
}else {
|
1766 |
+
if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/google") !== false ) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=google") !== false )) {
|
1767 |
$appname = "google";
|
1768 |
}
|
1769 |
|
1770 |
+
if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/facebook") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=facebook") !== false )) {
|
1771 |
$appname = "facebook";
|
1772 |
|
1773 |
}
|
1796 |
$appslist = array();
|
1797 |
}
|
1798 |
if(get_option('mo_openid_malform_error')){
|
1799 |
+
if(get_option( 'permalink_structure' )) {
|
1800 |
+
|
1801 |
+
$social_app_redirect_uri = site_url() .'/openidcallback/'.$appname;
|
1802 |
+
|
1803 |
+
}
|
1804 |
+
else{
|
1805 |
+
$social_app_redirect_uri = site_url() . '/?openidcallback='.$appname;
|
1806 |
+
}
|
1807 |
+
|
1808 |
}
|
1809 |
else{
|
1810 |
+
if(get_option( 'permalink_structure' )) {
|
1811 |
+
$social_app_redirect_uri = site_url() . '/openidcallback';
|
1812 |
+
|
1813 |
+
}
|
1814 |
+
else{
|
1815 |
+
$social_app_redirect_uri = site_url() .'/?openidcallback';
|
1816 |
+
}
|
1817 |
}
|
1818 |
|
1819 |
foreach($appslist as $key=>$currentapp){
|
1924 |
}
|
1925 |
|
1926 |
$profile_json_output = json_decode($output, true);
|
1927 |
+
|
1928 |
+
|
1929 |
}
|
1930 |
|
1931 |
$social_app_name = $appname;
|
2054 |
$_SESSION['user_picture'] = $user_picture;
|
2055 |
$_SESSION['social_app_name'] = $social_app_name;
|
2056 |
$_SESSION['social_user_id'] = $social_user_id;
|
2057 |
+
echo mo_openid_account_linking_form($username,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$social_app_name,$social_user_id);
|
2058 |
exit;
|
2059 |
}
|
2060 |
|
2079 |
$user_id = wp_insert_user( $userdata);
|
2080 |
|
2081 |
if(is_wp_error( $user_id )) {
|
2082 |
+
print_r($user_id);
|
2083 |
wp_die("Error Code 5: ".get_option('mo_registration_error_message'));
|
2084 |
}
|
2085 |
|
2174 |
$_SESSION['user_picture'] = $user_picture;
|
2175 |
$_SESSION['social_app_name'] = $social_app_name;
|
2176 |
$_SESSION['social_user_id'] = $social_user_id;
|
2177 |
+
|
2178 |
+
echo mo_openid_account_linking_form($user_name,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$social_app_name,$social_user_id);
|
2179 |
exit;
|
2180 |
}
|
2181 |
else {
|
2182 |
+
|
2183 |
// this user is a guest
|
2184 |
// auto registration is enabled
|
2185 |
if(get_option('mo_openid_auto_register_enable')) {
|
2189 |
$email_array = explode('@', $user_email);
|
2190 |
$username = $email_array[0];
|
2191 |
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
|
2192 |
+
$i = 1;
|
2193 |
+
while(!empty($username_user_id) ){
|
2194 |
+
$uname=$username.'_' . $i;
|
2195 |
+
$username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
|
2196 |
+
$i++;
|
2197 |
+
if(empty($username_user_id)){
|
2198 |
+
$username= $uname;
|
2199 |
+
}
|
2200 |
+
}
|
2201 |
+
|
2202 |
if( isset($username_user_id) ){
|
2203 |
echo '<br/>'."Error Code 3: ".get_option('mo_existing_username_error_message');
|
2204 |
exit();
|
2223 |
|
2224 |
$user_id = wp_insert_user( $userdata);
|
2225 |
if(is_wp_error( $user_id )) {
|
2226 |
+
print_r($user_id);
|
2227 |
wp_die("Error Code 6: ".get_option('mo_registration_error_message'));
|
2228 |
}
|
2229 |
|
2436 |
return $html;
|
2437 |
}
|
2438 |
|
2439 |
+
function mo_openid_account_linking_form($username,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id){
|
2440 |
$path = mo_openid_get_wp_style();
|
2441 |
$html = "<head><link rel=\"stylesheet\" href=".$path. " type='text/css' media='all' /><head>
|
2442 |
<body class='login login-action-login wp-core-ui locale-en-us'>
|
2445 |
<div style=\"width: 500px; margin: 30px auto;\">
|
2446 |
<form name = 'f' method = 'post' action=''>
|
2447 |
<input type = 'hidden' name = 'option' value = 'mo_openid_account_linking'/>
|
2448 |
+
<input type='hidden' name='user_email' value=".$user_email.">
|
2449 |
+
<input type='hidden' name='username' value=".$username.">
|
2450 |
+
<input type='hidden' name='first_name' value=".$first_name.">
|
2451 |
+
<input type='hidden' name='last_name' value=".$last_name.">
|
2452 |
+
<input type='hidden' name='user_full_name' value=".$user_full_name.">
|
2453 |
+
<input type='hidden' name='user_url' value=".$user_url.">
|
2454 |
+
<input type='hidden' name='user_picture' value=".$user_picture.">
|
2455 |
+
<input type='hidden' name='decrypted_app_name' value=".$decrypted_app_name.">
|
2456 |
+
<input type='hidden' name='decrypted_user_id' value=".$decrypted_user_id.">
|
2457 |
<div style = 'background-color:white; padding:12px; position:fixed; top:100px; right: 350px; padding-bottom: 20px;left:350px; overflow:hidden; outline:1px black;border-radius: 5px;'>
|
2458 |
|
2459 |
<br>
|
2682 |
$transactionId = hash("sha512", $stringToHash);
|
2683 |
//wp_email function will come here
|
2684 |
$subject= '['.get_bloginfo('name').'] Verify your email';
|
|
|
|
|
|
|
|
|
|
|
2685 |
|
2686 |
+
$message=str_replace('##otp##', $otp, get_option('custom_otp_msg'));
|
2687 |
|
2688 |
+
$response = wp_mail($email, $subject,$message);
|
2689 |
if($response){
|
2690 |
mo_openid_start_session();
|
2691 |
$_SESSION['mo_otptoken'] = true;
|
2884 |
$username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
|
2885 |
$username = preg_replace( '/&.+?;/', '', $username ); // Kill entities
|
2886 |
|
|
|
|
|
|
|
2887 |
|
2888 |
$username = trim( $username );
|
2889 |
// Consolidate contiguous whitespace
|
includes/images/icons/yahoo.png
ADDED
Binary file
|
includes/js/settings_popup.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(window).load
|
2 |
var elemDiv = document.createElement("div");
|
3 |
elemDiv.id = "mo-openid-content-id";
|
4 |
elemDiv.style.display = "none";
|
1 |
+
jQuery(window).on('load',function () {
|
2 |
var elemDiv = document.createElement("div");
|
3 |
elemDiv.id = "mo-openid-content-id";
|
4 |
elemDiv.style.display = "none";
|
includes/js/social/fb_comment.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(window).load
|
2 |
moOpenidLoadCommentScript();
|
3 |
moOpenIDShowCommentForms();
|
4 |
|
1 |
+
jQuery(window).on('load',function () {
|
2 |
moOpenidLoadCommentScript();
|
3 |
moOpenIDShowCommentForms();
|
4 |
|
includes/js/social_login.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(window).load
|
2 |
|
3 |
// If cookie is set, scroll to the position saved in the cookie.
|
4 |
if ( jQuery.cookie("scroll") !== 'null' ) {
|
1 |
+
jQuery(window).on('load',function () {
|
2 |
|
3 |
// If cookie is set, scroll to the position saved in the cookie.
|
4 |
if ( jQuery.cookie("scroll") !== 'null' ) {
|
miniorange_openid_sso_settings.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
4 |
* Plugin URI: https://www.miniorange.com/social-login
|
5 |
* Description: Allow your users to login, comment and share with social login apps like Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
|
6 |
-
* Version: 7.1.
|
7 |
* Author: social login (miniOrange)
|
8 |
* Author URI: https://www.miniorange.com/social-login
|
9 |
* License: GPL2
|
@@ -14,7 +14,7 @@ include_once dirname( __FILE__ ) . '/class-mo-openid-login-widget.php';
|
|
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', '7.1.
|
18 |
include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
|
19 |
class Miniorange_OpenID_SSO {
|
20 |
|
@@ -225,7 +225,7 @@ class Miniorange_OpenID_SSO {
|
|
225 |
add_option( 'mo_openid_login_widget_customize_logout_text', 'Logout?' );
|
226 |
add_option( 'mo_openid_share_email_subject','I wanted you to see this site' );
|
227 |
add_option( 'mo_openid_share_email_body','Check out this site ##url##' );
|
228 |
-
add_option( 'mo_openid_enable_profile_completion','
|
229 |
add_option( 'moopenid_logo_check','1' );
|
230 |
|
231 |
//profile completion
|
@@ -242,6 +242,15 @@ class Miniorange_OpenID_SSO {
|
|
242 |
add_option( 'mo_email_verify_message','We have sent a verification code to given email. Please verify your account with it.');
|
243 |
add_option( 'mo_email_verify_verification_code_instruction','Enter your verification code');
|
244 |
add_option( 'mo_email_verify_wrong_otp','You have entered an invalid verification code. Enter a valid code.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
|
247 |
|
@@ -668,8 +677,9 @@ class Miniorange_OpenID_SSO {
|
|
668 |
$last_name = sanitize_text_field(isset($_POST['lname'])?$_POST['lname']:'');
|
669 |
$email = sanitize_email( $_POST['email'] );
|
670 |
$phone = sanitize_text_field( isset($_POST['phone'])?$_POST['phone']:'' );
|
671 |
-
$password =
|
672 |
-
$confirmPassword =
|
|
|
673 |
}
|
674 |
|
675 |
update_option( 'mo_openid_admin_company_name', $company);
|
@@ -814,7 +824,7 @@ class Miniorange_OpenID_SSO {
|
|
814 |
return;
|
815 |
} else{
|
816 |
$email = sanitize_email( $_POST['email'] );
|
817 |
-
$password =
|
818 |
}
|
819 |
|
820 |
update_option( 'mo_openid_admin_email', $email );
|
@@ -831,7 +841,6 @@ class Miniorange_OpenID_SSO {
|
|
831 |
update_option( 'mo_openid_message', 'Your account has been retrieved successfully.');
|
832 |
delete_option('mo_openid_verify_customer');
|
833 |
$this->mo_openid_show_success_message();
|
834 |
-
|
835 |
} else {
|
836 |
update_option( 'mo_openid_message', 'Invalid username or password. Please try again.');
|
837 |
$this->mo_openid_show_error_message();
|
@@ -928,6 +937,7 @@ class Miniorange_OpenID_SSO {
|
|
928 |
update_option( 'mo_openid_instagram_enable', isset( $_POST['mo_openid_instagram_enable']) ? $_POST['mo_openid_instagram_enable'] : 0);
|
929 |
update_option( 'mo_openid_twitter_enable', isset( $_POST['mo_openid_twitter_enable']) ? $_POST['mo_openid_twitter_enable'] : 0);
|
930 |
update_option( 'mo_openid_vkontakte_enable', isset( $_POST['mo_openid_vkontakte_enable']) ? $_POST['mo_openid_vkontakte_enable'] : 0);
|
|
|
931 |
|
932 |
update_option( 'mo_openid_default_login_enable', isset( $_POST['mo_openid_default_login_enable']) ? $_POST['mo_openid_default_login_enable'] : 0);
|
933 |
update_option( 'mo_openid_default_register_enable', isset( $_POST['mo_openid_default_register_enable']) ? $_POST['mo_openid_default_register_enable'] : 0);
|
@@ -985,6 +995,9 @@ class Miniorange_OpenID_SSO {
|
|
985 |
update_option('mo_email_verify_message', $_POST['mo_email_verify_message']);
|
986 |
update_option('mo_email_verify_verification_code_instruction', $_POST['mo_email_verify_verification_code_instruction']);
|
987 |
update_option('mo_email_verify_wrong_otp', $_POST['mo_email_verify_wrong_otp']);
|
|
|
|
|
|
|
988 |
}
|
989 |
//account-linking
|
990 |
update_option( 'mo_openid_account_linking_enable', isset( $_POST['mo_openid_account_linking_enable']) ? $_POST['mo_openid_account_linking_enable'] : 0);
|
@@ -1004,17 +1017,9 @@ class Miniorange_OpenID_SSO {
|
|
1004 |
|
1005 |
}
|
1006 |
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
update_option('mo_openid_login_widget_customize_logout_name_text',sanitize_text_field($_POST['mo_openid_login_widget_customize_logout_name_text']));
|
1011 |
-
update_option( 'mo_openid_login_widget_customize_logout_text',sanitize_text_field($_POST['mo_openid_login_widget_customize_logout_text']));
|
1012 |
-
update_option('moopenid_logo_check', isset( $_POST['moopenid_logo_check']) ? $_POST['moopenid_logo_check'] : 0);
|
1013 |
-
|
1014 |
-
}else{
|
1015 |
-
update_option('moopenid_logo_check', isset( $_POST['moopenid_logo_check']) ? $_POST['moopenid_logo_check'] : 0);
|
1016 |
-
}
|
1017 |
-
|
1018 |
update_option('mo_login_openid_login_widget_customize_textcolor',$_POST['mo_login_openid_login_widget_customize_textcolor']);
|
1019 |
update_option('mo_openid_login_theme',$_POST['mo_openid_login_theme'] );
|
1020 |
update_option( 'mo_openid_message', 'Your settings are saved successfully.' );
|
3 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
4 |
* Plugin URI: https://www.miniorange.com/social-login
|
5 |
* Description: Allow your users to login, comment and share with social login apps like Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
|
6 |
+
* Version: 7.1.4
|
7 |
* Author: social login (miniOrange)
|
8 |
* Author URI: https://www.miniorange.com/social-login
|
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', '7.1.4');
|
18 |
include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
|
19 |
class Miniorange_OpenID_SSO {
|
20 |
|
225 |
add_option( 'mo_openid_login_widget_customize_logout_text', 'Logout?' );
|
226 |
add_option( 'mo_openid_share_email_subject','I wanted you to see this site' );
|
227 |
add_option( 'mo_openid_share_email_body','Check out this site ##url##' );
|
228 |
+
add_option( 'mo_openid_enable_profile_completion','0' );
|
229 |
add_option( 'moopenid_logo_check','1' );
|
230 |
|
231 |
//profile completion
|
242 |
add_option( 'mo_email_verify_message','We have sent a verification code to given email. Please verify your account with it.');
|
243 |
add_option( 'mo_email_verify_verification_code_instruction','Enter your verification code');
|
244 |
add_option( 'mo_email_verify_wrong_otp','You have entered an invalid verification code. Enter a valid code.');
|
245 |
+
$message='Dear User,
|
246 |
+
|
247 |
+
Your verification code for completing your profile is: ##otp##
|
248 |
+
|
249 |
+
Please use this code to complete your profile. Do not share this code with anyone.
|
250 |
+
|
251 |
+
Thank you.';
|
252 |
+
|
253 |
+
add_option( 'custom_otp_msg',$message);
|
254 |
|
255 |
|
256 |
|
677 |
$last_name = sanitize_text_field(isset($_POST['lname'])?$_POST['lname']:'');
|
678 |
$email = sanitize_email( $_POST['email'] );
|
679 |
$phone = sanitize_text_field( isset($_POST['phone'])?$_POST['phone']:'' );
|
680 |
+
$password = stripslashes( $_POST['password'] );
|
681 |
+
$confirmPassword = stripslashes( $_POST['confirmPassword'] );
|
682 |
+
|
683 |
}
|
684 |
|
685 |
update_option( 'mo_openid_admin_company_name', $company);
|
824 |
return;
|
825 |
} else{
|
826 |
$email = sanitize_email( $_POST['email'] );
|
827 |
+
$password = stripslashes( $_POST['password'] );
|
828 |
}
|
829 |
|
830 |
update_option( 'mo_openid_admin_email', $email );
|
841 |
update_option( 'mo_openid_message', 'Your account has been retrieved successfully.');
|
842 |
delete_option('mo_openid_verify_customer');
|
843 |
$this->mo_openid_show_success_message();
|
|
|
844 |
} else {
|
845 |
update_option( 'mo_openid_message', 'Invalid username or password. Please try again.');
|
846 |
$this->mo_openid_show_error_message();
|
937 |
update_option( 'mo_openid_instagram_enable', isset( $_POST['mo_openid_instagram_enable']) ? $_POST['mo_openid_instagram_enable'] : 0);
|
938 |
update_option( 'mo_openid_twitter_enable', isset( $_POST['mo_openid_twitter_enable']) ? $_POST['mo_openid_twitter_enable'] : 0);
|
939 |
update_option( 'mo_openid_vkontakte_enable', isset( $_POST['mo_openid_vkontakte_enable']) ? $_POST['mo_openid_vkontakte_enable'] : 0);
|
940 |
+
update_option( 'mo_openid_yahoo_enable', isset( $_POST['mo_openid_yahoo_enable']) ? $_POST['mo_openid_yahoo_enable'] : 0);
|
941 |
|
942 |
update_option( 'mo_openid_default_login_enable', isset( $_POST['mo_openid_default_login_enable']) ? $_POST['mo_openid_default_login_enable'] : 0);
|
943 |
update_option( 'mo_openid_default_register_enable', isset( $_POST['mo_openid_default_register_enable']) ? $_POST['mo_openid_default_register_enable'] : 0);
|
995 |
update_option('mo_email_verify_message', $_POST['mo_email_verify_message']);
|
996 |
update_option('mo_email_verify_verification_code_instruction', $_POST['mo_email_verify_verification_code_instruction']);
|
997 |
update_option('mo_email_verify_wrong_otp', $_POST['mo_email_verify_wrong_otp']);
|
998 |
+
|
999 |
+
$_POST['custom_otp_msg']=stripslashes( $_POST['custom_otp_msg']);
|
1000 |
+
update_option('custom_otp_msg',$_POST['custom_otp_msg']);
|
1001 |
}
|
1002 |
//account-linking
|
1003 |
update_option( 'mo_openid_account_linking_enable', isset( $_POST['mo_openid_account_linking_enable']) ? $_POST['mo_openid_account_linking_enable'] : 0);
|
1017 |
|
1018 |
}
|
1019 |
|
1020 |
+
update_option('mo_openid_login_widget_customize_logout_name_text',sanitize_text_field($_POST['mo_openid_login_widget_customize_logout_name_text']));
|
1021 |
+
update_option( 'mo_openid_login_widget_customize_logout_text',sanitize_text_field($_POST['mo_openid_login_widget_customize_logout_text']));
|
1022 |
+
update_option('moopenid_logo_check', isset( $_POST['moopenid_logo_check']) ? $_POST['moopenid_logo_check'] : 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1023 |
update_option('mo_login_openid_login_widget_customize_textcolor',$_POST['mo_login_openid_login_widget_customize_textcolor']);
|
1024 |
update_option('mo_openid_login_theme',$_POST['mo_openid_login_theme'] );
|
1025 |
update_option( 'mo_openid_message', 'Your settings are saved successfully.' );
|
miniorange_openid_sso_settings_page.php
CHANGED
@@ -431,13 +431,23 @@ function mo_openid_apps_config() {
|
|
431 |
<input type="checkbox" id="windowslive_enable" class="app_enable" name="mo_openid_windowslive_enable" value="1" onchange="previewLoginIcons();"
|
432 |
<?php checked( get_option('mo_openid_windowslive_enable') == 1 );?> /><strong>Windows Live</strong>
|
433 |
</td>
|
434 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
</table>
|
436 |
</td>
|
437 |
</tr></table></td></tr>
|
438 |
<tr>
|
439 |
<td>
|
440 |
<br>
|
|
|
441 |
<hr>
|
442 |
<tr id="custom_icon"><td><table style="width:100%"> <h3>Customize Login Icons</h3>
|
443 |
<p>Customize shape, theme and size of social login icons</p>
|
@@ -552,7 +562,8 @@ function mo_openid_apps_config() {
|
|
552 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_amazon" src="<?php echo plugins_url( 'includes/images/icons/amazon.png', __FILE__ )?>" />
|
553 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_salesforce" src="<?php echo plugins_url( 'includes/images/icons/salesforce.png', __FILE__ )?>" />
|
554 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_windowslive" src="<?php echo plugins_url( 'includes/images/icons/windowslive.png', __FILE__ )?>" />
|
555 |
-
|
|
|
556 |
|
557 |
<div>
|
558 |
<a id="mo_login_button_preview_facebook" class="btn btn-block btn-defaulttheme btn-social btn-facebook btn-custom-size"> <i class="fa fa-facebook"></i><?php
|
@@ -573,8 +584,10 @@ function mo_openid_apps_config() {
|
|
573 |
echo get_option('mo_openid_login_button_customize_text'); ?> Salesforce</a>
|
574 |
<a id="mo_login_button_preview_windowslive" class="btn btn-block btn-defaulttheme btn-social btn-microsoft btn-custom-size"> <i class="fa fa-windows"></i><?php
|
575 |
echo get_option('mo_openid_login_button_customize_text'); ?> Windows</a>
|
576 |
-
|
|
|
577 |
|
|
|
578 |
<div>
|
579 |
<i class="mo_custom_login_icon_preview fa fa-facebook" id="mo_custom_login_icon_preview_facebook" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
580 |
<i class="mo_custom_login_icon_preview fa fa-google-plus" id="mo_custom_login_icon_preview_google" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
@@ -585,8 +598,8 @@ function mo_openid_apps_config() {
|
|
585 |
<i class="mo_custom_login_icon_preview fa fa-amazon" id="amazoncustom" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
586 |
<i class="mo_custom_login_icon_preview fa fa-cloud" id="salesforcecustom" style="margin-bottom:-10px;color:#ffffff;text-align:center;margin-top:5px;" ></i>
|
587 |
<i class="mo_custom_login_icon_preview fa fa-windows" id="mo_custom_login_icon_preview_windows" style="color:#ffffff;text-align:center;margin-top:5px;" ></i>
|
|
|
588 |
</div>
|
589 |
-
|
590 |
<div>
|
591 |
<a id="mo_custom_login_button_preview_facebook" class="btn btn-block btn-customtheme btn-social btn-custom-size"> <i class="fa fa-facebook"></i><?php
|
592 |
echo get_option('mo_openid_login_button_customize_text'); ?> Facebook</a>
|
@@ -606,7 +619,10 @@ function mo_openid_apps_config() {
|
|
606 |
echo get_option('mo_openid_login_button_customize_text'); ?> Salesforce</a>
|
607 |
<a id="mo_custom_login_button_preview_windows" class="btn btn-block btn-customtheme btn-social btn-custom-size"> <i class="fa fa-windows"></i><?php
|
608 |
echo get_option('mo_openid_login_button_customize_text'); ?> Windows</a>
|
609 |
-
|
|
|
|
|
|
|
610 |
</td>
|
611 |
</tr>
|
612 |
<tr>
|
@@ -645,7 +661,6 @@ function mo_openid_apps_config() {
|
|
645 |
value="<?php echo get_option('mo_openid_login_button_customize_text'); ?>" /></td>
|
646 |
</tr>
|
647 |
|
648 |
-
<?php if(get_option('mo_openid_oauth')!='1') {?>
|
649 |
<tr>
|
650 |
<td>
|
651 |
<br>
|
@@ -663,7 +678,7 @@ function mo_openid_apps_config() {
|
|
663 |
<input class="mo_openid_table_textbox" style="width:50%" type="text" name="mo_openid_login_widget_customize_logout_text"
|
664 |
value="<?php echo get_option('mo_openid_login_widget_customize_logout_text'); ?>" /></td>
|
665 |
</tr>
|
666 |
-
|
667 |
<tr><td>
|
668 |
<hr>
|
669 |
<tr id="display_opt"><td><table style="width:100%">
|
@@ -933,12 +948,14 @@ function mo_openid_apps_config() {
|
|
933 |
<tr id="profile_completion_customized_text"><td><h3 style="float: left">Customize Text for Email Verification</h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_email_verify_img()">View Dialogue Box
|
934 |
</a></td></tr> <tr id="email_verify"><td></td></tr><tr id="profile_completion_customized_text"><td><b>1. Enter title of Email Verification form:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 125px" type="text" name="mo_email_verify_title" value="<?php echo get_option('mo_email_verify_title'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>2. Enter Resend OTP button text:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 160px" type="text" name="mo_email_verify_resend_otp_button" value="<?php echo get_option('mo_email_verify_resend_otp_button'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>3. Enter Back button text:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 202px" type="text" name="mo_email_verify_back_button" value="<?php echo get_option('mo_email_verify_back_button'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>4. Enter instruction for Email Verification form:</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_message" value="<?php echo get_option('mo_email_verify_message'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>5. Enter verification code in Email Verification form:</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_verification_code_instruction" value="<?php echo get_option('mo_email_verify_verification_code_instruction'); ?>"/></td></tr>
|
935 |
<tr id="profile_completion_customized_text"><td><b> Enter Message for wrong OTP :</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_wrong_otp" value="<?php echo get_option('mo_email_verify_wrong_otp'); ?>"/></td></tr>
|
|
|
|
|
936 |
<?php } ?>
|
937 |
<tr id="prof_completion"><td> </td></tr>
|
938 |
|
939 |
-
<tr>
|
940 |
-
<script>
|
941 |
|
|
|
|
|
942 |
var custom_link;
|
943 |
var custom_prof_completion;
|
944 |
var custom_link_img;
|
@@ -970,7 +987,7 @@ var checkbox2 = document.getElementById('profile_completion_enable');
|
|
970 |
jQuery("<tr id=\"profile_completion_customized_text\"><td><h3 style=\"float: left\">Customize Text for Profile Completion</h3><a style=\"float: right;margin-right: 300px;margin-top: 20px\" onclick=\"customize_profile_completion_img()\">View Dialogue Box</a></td></tr><tr id=\"profile_completion_img\"><td></td></tr><tr id=\"profile_completion_customized_text\"><td><b>1. Enter title of Profle Completion:</b>\n"+
|
971 |
"\n"+"\t\t\t<input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 145px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_title\" value=\"<?php echo get_option('mo_profile_complete_title'); ?>\" /></td>\n"+"\t</tr><tr id=\"profile_completion_customized_text\"><td><b>2. Enter Username Label text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 175px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_username_label\" value=\"<?php echo get_option('mo_profile_complete_username_label'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>3. Enter Email Label text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 202px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_email_label\" value=\"<?php echo get_option('mo_profile_complete_email_label'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>4. Enter Submit button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 182px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_submit_button\" value=\"<?php echo get_option('mo_profile_complete_submit_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\">\n"+"\t\t<td ><b style=\"margin-top:20px\">5. Enter instruction for Profile Completion :</b> \n"+
|
972 |
" <input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_instruction\" value=\"<?php echo get_option('mo_profile_complete_instruction'); ?>\"/></td>\n"+
|
973 |
-
"\t</tr><tr id=\"profile_completion_customized_text\"><td><b>6. Enter extra instruction for Profile Completion :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_extra_instruction\" value=\"<?php echo get_option('mo_profile_complete_extra_instruction'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>Enter username already exists warning message text :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_uname_exist\" value=\"<?php echo get_option('mo_profile_complete_uname_exist');?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><h3 style=\"float: left\">Customize Text for Email Verification</h3><a style=\"float: right;margin-right: 300px;margin-top: 20px\" onclick=\"customize_email_verify_img();\">View Dialogue Box</a></td></tr><tr id=\"email_verify\"><td></td></tr><tr id=\"profile_completion_customized_text\"><td><b>1. Enter title of Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 125px\" type=\"text\" name=\"mo_email_verify_title\" value=\"<?php echo get_option('mo_email_verify_title'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>2. Enter Resend OTP button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 160px\" type=\"text\" name=\"mo_email_verify_resend_otp_button\" value=\"<?php echo get_option('mo_email_verify_resend_otp_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>3. Enter Back button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 201px\" type=\"text\" name=\"mo_email_verify_back_button\" value=\"<?php echo get_option('mo_email_verify_back_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>4. Enter instruction for Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_message\" value=\"<?php echo get_option('mo_email_verify_message'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>5. Enter verification code in Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_verification_code_instruction\" value=\"<?php echo get_option('mo_email_verify_verification_code_instruction'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b> Enter Message for wrong OTP :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_wrong_otp\" value=\"<?php echo get_option('mo_email_verify_wrong_otp'); ?>\"/></td></tr>").insertBefore(jQuery("#prof_completion"));
|
974 |
custom_prof_completion=2;
|
975 |
}
|
976 |
}
|
@@ -1342,6 +1359,25 @@ function customize_email_verify_img(){
|
|
1342 |
jQuery("#mo_login_button_preview_twitter").hide();
|
1343 |
jQuery("#mo_custom_login_button_preview_twitter").hide();
|
1344 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1345 |
}
|
1346 |
checkLoginButton();
|
1347 |
</script>
|
@@ -3105,10 +3141,15 @@ function mo_openid_shortcode_info(){
|
|
3105 |
}
|
3106 |
|
3107 |
function mo_openid_pricing_info(){
|
|
|
3108 |
if (isset($_POST['update_tour_status'])){
|
3109 |
update_option('mo_openid_tour','1');
|
|
|
3110 |
}
|
3111 |
?>
|
|
|
|
|
|
|
3112 |
<td style="vertical-align:top;width:100%;">
|
3113 |
<div class="mo_openid_table_layout">
|
3114 |
|
@@ -3131,13 +3172,13 @@ function mo_openid_pricing_info(){
|
|
3131 |
<th class="text-center" width="25%"><h3><font color="#ffffff">Standard</h3><p class="mo_plan-desc"></p><h3>$19 - One Time Payment</font><br><br>
|
3132 |
<span>
|
3133 |
|
3134 |
-
<input type="button" id="
|
3135 |
|
3136 |
|
3137 |
</span></h3></th>
|
3138 |
|
3139 |
<th class="text-center" width="25%"><h3><font color="#ffffff">Premium</h3><p class="mo_plan-desc"></p><h3>$49 - One Time Payment</font><br><br><span>
|
3140 |
-
<input type="button" id="
|
3141 |
|
3142 |
|
3143 |
</tr>
|
@@ -3146,16 +3187,16 @@ function mo_openid_pricing_info(){
|
|
3146 |
<tbody class="mo_align-center mo-fa-icon">
|
3147 |
<tr>
|
3148 |
<td><div class="tooltip">Pre-configured Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;">Pre-configured apps are already configured by miniOrange. Login flow will go from plugin to miniOrange service and then to the Social Application and then back to plugin through miniOrange service.</span></div></td>
|
3149 |
-
<td><div class="tooltip">
|
3150 |
-
<td><div class="tooltip">
|
3151 |
-
<td><div class="tooltip">
|
3152 |
|
3153 |
</tr>
|
3154 |
<tr>
|
3155 |
<td><div class="tooltip">Custom Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;"> Using the custom app tab, you can set up your own App ID and secret in the plugin. Login flow will not involve miniOrange in between. Login flow will go from plugin to social media application and then back to plugin.</span></div></td>
|
3156 |
<td>Facebook, Twitter</td>
|
3157 |
-
<td><div class="tooltip">
|
3158 |
-
<td><div class="tooltip">
|
3159 |
|
3160 |
</tr>
|
3161 |
<tr>
|
@@ -3356,12 +3397,15 @@ function mo_openid_pricing_info(){
|
|
3356 |
|
3357 |
<script>
|
3358 |
function upgradeform(planType){
|
|
|
3359 |
jQuery('#requestOrigin').val(planType);
|
3360 |
jQuery('#loginform').submit();
|
|
|
3361 |
}
|
3362 |
function checkLicense(){
|
3363 |
jQuery("#checkLicenseForm").submit();
|
3364 |
}
|
|
|
3365 |
</script>
|
3366 |
|
3367 |
<h3><b><span style="color:#da7587;font-weight:bold;">Refund Policy -</h3>
|
@@ -3903,13 +3947,13 @@ function add_custom_app(){
|
|
3903 |
document.getElementById("instructions").innerHTML = "";
|
3904 |
if(appname=="google"){
|
3905 |
document.getElementById("mo_oauth_scope").value = "";
|
3906 |
-
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 if(get_option('mo_openid_malform_error')){ echo site_url()."/openidcallback/google";} else {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>';
|
3907 |
} else if(appname=="facebook"){
|
3908 |
document.getElementById("mo_oauth_scope").value = "email, public_profile";
|
3909 |
-
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
|
3910 |
} else if(appname=="twitter"){
|
3911 |
document.getElementById("mo_oauth_scope").value = "";
|
3912 |
-
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()
|
3913 |
}
|
3914 |
|
3915 |
}
|
@@ -4040,22 +4084,28 @@ function delete_custom_app($appname){
|
|
4040 |
}
|
4041 |
|
4042 |
function mo_custom_app_instructions($appname){
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
} else if ($appname == "twitter") {
|
4049 |
-
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>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>';
|
4050 |
-
}
|
4051 |
-
}else {
|
4052 |
-
if ($appname == "google") {
|
4053 |
-
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><li>Input scope as <b>https://www.googleapis.com/auth/plus.login+https://www.googleapis.com/auth/plus.profile.emails.read </b></li><li>Go to Social Login tab and configure the icons.</li></ol>';
|
4054 |
-
} else if ($appname == "facebook") {
|
4055 |
-
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>Settings -> Basic</b>. Enter <b>' . str_replace('https://', '', site_url()) . '</b> in <b>App Domain</b>, <b>' . site_url() . '</b> in <b>Website URL </b>, your privacy policy in <b>Privacy Policy URL</b> and select <b>Category</b> of your website .</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><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 </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>';
|
4056 |
-
} else if ($appname == "twitter") {
|
4057 |
-
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>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>';
|
4058 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4059 |
}
|
4060 |
|
4061 |
}
|
@@ -4179,6 +4229,13 @@ function mo_openid_restrict_user() {
|
|
4179 |
return false;
|
4180 |
}
|
4181 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4182 |
|
4183 |
function mo_openid_registeration_modal(){
|
4184 |
update_option('regi_pop_up','yes');
|
431 |
<input type="checkbox" id="windowslive_enable" class="app_enable" name="mo_openid_windowslive_enable" value="1" onchange="previewLoginIcons();"
|
432 |
<?php checked( get_option('mo_openid_windowslive_enable') == 1 );?> /><strong>Windows Live</strong>
|
433 |
</td>
|
434 |
+
<td>
|
435 |
+
<input type="checkbox" id="yahoo_enable" class="app_enable" name="mo_openid_yahoo_enable" value="1" onchange="previewLoginIcons();"
|
436 |
+
<?php checked( get_option('mo_openid_yahoo_enable') == 1 );?> /><strong>Yahoo</strong>
|
437 |
+
</td>
|
438 |
+
<tr>
|
439 |
+
<td>
|
440 |
+
<input type="checkbox" id="wordpress_enable" class="app_enable" name="mo_openid_wordpress_enable" value="1" onchange="previewLoginIcons();"
|
441 |
+
disabled="disabled" /><strong><span style="color: red">*</span>Wordpress</strong>
|
442 |
+
</td>
|
443 |
+
</tr> </tr>
|
444 |
</table>
|
445 |
</td>
|
446 |
</tr></table></td></tr>
|
447 |
<tr>
|
448 |
<td>
|
449 |
<br>
|
450 |
+
<strong><span style="color: red">*</span>Available in standard and premium plugins.</strong>
|
451 |
<hr>
|
452 |
<tr id="custom_icon"><td><table style="width:100%"> <h3>Customize Login Icons</h3>
|
453 |
<p>Customize shape, theme and size of social login icons</p>
|
562 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_amazon" src="<?php echo plugins_url( 'includes/images/icons/amazon.png', __FILE__ )?>" />
|
563 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_salesforce" src="<?php echo plugins_url( 'includes/images/icons/salesforce.png', __FILE__ )?>" />
|
564 |
<img class="mo_login_icon_preview" id="mo_login_icon_preview_windowslive" src="<?php echo plugins_url( 'includes/images/icons/windowslive.png', __FILE__ )?>" />
|
565 |
+
<img class="mo_login_icon_preview" id="mo_login_icon_preview_yahoo" src="<?php echo plugins_url( 'includes/images/icons/yahoo.png', __FILE__ )?>" />
|
566 |
+
</div>
|
567 |
|
568 |
<div>
|
569 |
<a id="mo_login_button_preview_facebook" class="btn btn-block btn-defaulttheme btn-social btn-facebook btn-custom-size"> <i class="fa fa-facebook"></i><?php
|
584 |
echo get_option('mo_openid_login_button_customize_text'); ?> Salesforce</a>
|
585 |
<a id="mo_login_button_preview_windowslive" class="btn btn-block btn-defaulttheme btn-social btn-microsoft btn-custom-size"> <i class="fa fa-windows"></i><?php
|
586 |
echo get_option('mo_openid_login_button_customize_text'); ?> Windows</a>
|
587 |
+
<a id="mo_login_button_preview_yahoo" class="btn btn-block btn-defaulttheme btn-social btn-yahoo btn-custom-size"> <i class="fa fa-yahoo"></i><?php
|
588 |
+
echo get_option('mo_openid_login_button_customize_text'); ?> Yahoo</a>
|
589 |
|
590 |
+
</div>
|
591 |
<div>
|
592 |
<i class="mo_custom_login_icon_preview fa fa-facebook" id="mo_custom_login_icon_preview_facebook" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
593 |
<i class="mo_custom_login_icon_preview fa fa-google-plus" id="mo_custom_login_icon_preview_google" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
598 |
<i class="mo_custom_login_icon_preview fa fa-amazon" id="amazoncustom" style="color:#ffffff;text-align:center;margin-top:5px;"></i>
|
599 |
<i class="mo_custom_login_icon_preview fa fa-cloud" id="salesforcecustom" style="margin-bottom:-10px;color:#ffffff;text-align:center;margin-top:5px;" ></i>
|
600 |
<i class="mo_custom_login_icon_preview fa fa-windows" id="mo_custom_login_icon_preview_windows" style="color:#ffffff;text-align:center;margin-top:5px;" ></i>
|
601 |
+
<i class="mo_custom_login_icon_preview fa fa-yahoo" id="mo_custom_login_icon_preview_yahoo" style="color:#ffffff;text-align:center;margin-top:5px;" ></i>
|
602 |
</div>
|
|
|
603 |
<div>
|
604 |
<a id="mo_custom_login_button_preview_facebook" class="btn btn-block btn-customtheme btn-social btn-custom-size"> <i class="fa fa-facebook"></i><?php
|
605 |
echo get_option('mo_openid_login_button_customize_text'); ?> Facebook</a>
|
619 |
echo get_option('mo_openid_login_button_customize_text'); ?> Salesforce</a>
|
620 |
<a id="mo_custom_login_button_preview_windows" class="btn btn-block btn-customtheme btn-social btn-custom-size"> <i class="fa fa-windows"></i><?php
|
621 |
echo get_option('mo_openid_login_button_customize_text'); ?> Windows</a>
|
622 |
+
<a id="mo_custom_login_button_preview_yahoo" class="btn btn-block btn-customtheme btn-social btn-custom-size"> <i class="fa fa-yahoo"></i><?php
|
623 |
+
echo get_option('mo_openid_login_button_customize_text'); ?> Yahoo</a>
|
624 |
+
|
625 |
+
</div>
|
626 |
</td>
|
627 |
</tr>
|
628 |
<tr>
|
661 |
value="<?php echo get_option('mo_openid_login_button_customize_text'); ?>" /></td>
|
662 |
</tr>
|
663 |
|
|
|
664 |
<tr>
|
665 |
<td>
|
666 |
<br>
|
678 |
<input class="mo_openid_table_textbox" style="width:50%" type="text" name="mo_openid_login_widget_customize_logout_text"
|
679 |
value="<?php echo get_option('mo_openid_login_widget_customize_logout_text'); ?>" /></td>
|
680 |
</tr>
|
681 |
+
|
682 |
<tr><td>
|
683 |
<hr>
|
684 |
<tr id="display_opt"><td><table style="width:100%">
|
948 |
<tr id="profile_completion_customized_text"><td><h3 style="float: left">Customize Text for Email Verification</h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_email_verify_img()">View Dialogue Box
|
949 |
</a></td></tr> <tr id="email_verify"><td></td></tr><tr id="profile_completion_customized_text"><td><b>1. Enter title of Email Verification form:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 125px" type="text" name="mo_email_verify_title" value="<?php echo get_option('mo_email_verify_title'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>2. Enter Resend OTP button text:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 160px" type="text" name="mo_email_verify_resend_otp_button" value="<?php echo get_option('mo_email_verify_resend_otp_button'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>3. Enter Back button text:</b><input class="mo_openid_table_textbox" style="width:50%;margin-left: 202px" type="text" name="mo_email_verify_back_button" value="<?php echo get_option('mo_email_verify_back_button'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>4. Enter instruction for Email Verification form:</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_message" value="<?php echo get_option('mo_email_verify_message'); ?>"/></td></tr><tr id="profile_completion_customized_text"><td><b>5. Enter verification code in Email Verification form:</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_verification_code_instruction" value="<?php echo get_option('mo_email_verify_verification_code_instruction'); ?>"/></td></tr>
|
950 |
<tr id="profile_completion_customized_text"><td><b> Enter Message for wrong OTP :</b><input class="mo_openid_table_textbox" style="width:98%;margin-left: 0px" type="text" name="mo_email_verify_wrong_otp" value="<?php echo get_option('mo_email_verify_wrong_otp'); ?>"/></td></tr>
|
951 |
+
<tr id="profile_completion_customized_text"><td><br><h3> <b>Customized OTP Message:</b> </h3><textarea class="tinymce" rows="6" id="mo_openid_email_message_id" style="width:100%" name="custom_otp_msg" ><?php echo get_option('custom_otp_msg')?></textarea></td></tr>
|
952 |
+
<tr id='profile_completion_customized_text'><td><b>NOTE</b>: Please enter <b>##otp##</b> in message where you want to show otp.</td></tr>
|
953 |
<?php } ?>
|
954 |
<tr id="prof_completion"><td> </td></tr>
|
955 |
|
|
|
|
|
956 |
|
957 |
+
|
958 |
+
<script>
|
959 |
var custom_link;
|
960 |
var custom_prof_completion;
|
961 |
var custom_link_img;
|
987 |
jQuery("<tr id=\"profile_completion_customized_text\"><td><h3 style=\"float: left\">Customize Text for Profile Completion</h3><a style=\"float: right;margin-right: 300px;margin-top: 20px\" onclick=\"customize_profile_completion_img()\">View Dialogue Box</a></td></tr><tr id=\"profile_completion_img\"><td></td></tr><tr id=\"profile_completion_customized_text\"><td><b>1. Enter title of Profle Completion:</b>\n"+
|
988 |
"\n"+"\t\t\t<input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 145px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_title\" value=\"<?php echo get_option('mo_profile_complete_title'); ?>\" /></td>\n"+"\t</tr><tr id=\"profile_completion_customized_text\"><td><b>2. Enter Username Label text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 175px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_username_label\" value=\"<?php echo get_option('mo_profile_complete_username_label'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>3. Enter Email Label text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 202px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_email_label\" value=\"<?php echo get_option('mo_profile_complete_email_label'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>4. Enter Submit button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 182px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_submit_button\" value=\"<?php echo get_option('mo_profile_complete_submit_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\">\n"+"\t\t<td ><b style=\"margin-top:20px\">5. Enter instruction for Profile Completion :</b> \n"+
|
989 |
" <input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_instruction\" value=\"<?php echo get_option('mo_profile_complete_instruction'); ?>\"/></td>\n"+
|
990 |
+
"\t</tr><tr id=\"profile_completion_customized_text\"><td><b>6. Enter extra instruction for Profile Completion :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_extra_instruction\" value=\"<?php echo get_option('mo_profile_complete_extra_instruction'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>Enter username already exists warning message text :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px;margin-bottom:5px\" type=\"text\" name=\"mo_profile_complete_uname_exist\" value=\"<?php echo get_option('mo_profile_complete_uname_exist');?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><h3 style=\"float: left\">Customize Text for Email Verification</h3><a style=\"float: right;margin-right: 300px;margin-top: 20px\" onclick=\"customize_email_verify_img();\">View Dialogue Box</a></td></tr><tr id=\"email_verify\"><td></td></tr><tr id=\"profile_completion_customized_text\"><td><b>1. Enter title of Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 125px\" type=\"text\" name=\"mo_email_verify_title\" value=\"<?php echo get_option('mo_email_verify_title'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>2. Enter Resend OTP button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 160px\" type=\"text\" name=\"mo_email_verify_resend_otp_button\" value=\"<?php echo get_option('mo_email_verify_resend_otp_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>3. Enter Back button text:</b><input class=\"mo_openid_table_textbox\" style=\"width:50%;margin-left: 201px\" type=\"text\" name=\"mo_email_verify_back_button\" value=\"<?php echo get_option('mo_email_verify_back_button'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>4. Enter instruction for Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_message\" value=\"<?php echo get_option('mo_email_verify_message'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b>5. Enter verification code in Email Verification form:</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_verification_code_instruction\" value=\"<?php echo get_option('mo_email_verify_verification_code_instruction'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><b> Enter Message for wrong OTP :</b><input class=\"mo_openid_table_textbox\" style=\"width:98%;margin-left: 0px\" type=\"text\" name=\"mo_email_verify_wrong_otp\" value=\"<?php echo get_option('mo_email_verify_wrong_otp'); ?>\"/></td></tr><tr id=\"profile_completion_customized_text\"><td><br><h3> <b>Customized OTP Message:</b> </h3><textarea class=\"tinymce\" rows=\"6\" style=\"width:100%\" name=\"custom_otp_msg\">"+ <?php echo json_encode(get_option('custom_otp_msg'));?>+"</textarea></td></tr><tr id='profile_completion_customized_text'><td><b>NOTE</b>: Please enter <b>##otp##</b> in message where you want to show otp.</td></tr>").insertBefore(jQuery("#prof_completion"));
|
991 |
custom_prof_completion=2;
|
992 |
}
|
993 |
}
|
1359 |
jQuery("#mo_login_button_preview_twitter").hide();
|
1360 |
jQuery("#mo_custom_login_button_preview_twitter").hide();
|
1361 |
}
|
1362 |
+
if (document.getElementById('yahoo_enable').checked) {
|
1363 |
+
flag = 1;
|
1364 |
+
if(document.getElementById('mo_openid_login_default_radio').checked && !document.getElementById('iconwithtext').checked)
|
1365 |
+
jQuery("#mo_login_icon_preview_yahoo").show();
|
1366 |
+
if(document.getElementById('mo_openid_login_custom_radio').checked && !document.getElementById('iconwithtext').checked)
|
1367 |
+
jQuery("#mo_custom_login_icon_preview_yahoo").show();
|
1368 |
+
if(document.getElementById('mo_openid_login_default_radio').checked && document.getElementById('iconwithtext').checked)
|
1369 |
+
jQuery("#mo_login_button_preview_yahoo").show();
|
1370 |
+
if(document.getElementById('mo_openid_login_custom_radio').checked && document.getElementById('iconwithtext').checked)
|
1371 |
+
jQuery("#mo_custom_login_button_preview_yahoo").show();
|
1372 |
+
}
|
1373 |
+
else if(!document.getElementById('yahoo_enable').checked){
|
1374 |
+
jQuery("#mo_login_icon_preview_yahoo").hide();
|
1375 |
+
jQuery("#mo_custom_login_icon_preview_yahoo").hide();
|
1376 |
+
jQuery("#mo_login_button_preview_yahoo").hide();
|
1377 |
+
jQuery("#mo_custom_login_button_preview_yahoo").hide();
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
|
1381 |
}
|
1382 |
checkLoginButton();
|
1383 |
</script>
|
3141 |
}
|
3142 |
|
3143 |
function mo_openid_pricing_info(){
|
3144 |
+
|
3145 |
if (isset($_POST['update_tour_status'])){
|
3146 |
update_option('mo_openid_tour','1');
|
3147 |
+
|
3148 |
}
|
3149 |
?>
|
3150 |
+
<div id="upgrade_notice" class="notice notice-success is-dismissible" style="width: 94.8%;margin-left: 0.3%;display:none">
|
3151 |
+
<p><strong>How do I activate or download the social login standard/premium plugin? <a href="https://faq.miniorange.com/knowledgebase/activate-download-social-login-premium-plugin/" target="_blank">Click Here</a></strong></p>
|
3152 |
+
</div>
|
3153 |
<td style="vertical-align:top;width:100%;">
|
3154 |
<div class="mo_openid_table_layout">
|
3155 |
|
3172 |
<th class="text-center" width="25%"><h3><font color="#ffffff">Standard</h3><p class="mo_plan-desc"></p><h3>$19 - One Time Payment</font><br><br>
|
3173 |
<span>
|
3174 |
|
3175 |
+
<input type="button" id="upgrade_btn" name="upgrade_btn" class="button button-default button-large" value="Upgrade" onclick="upgradeform('wp_social_login_standard_plan')" />
|
3176 |
|
3177 |
|
3178 |
</span></h3></th>
|
3179 |
|
3180 |
<th class="text-center" width="25%"><h3><font color="#ffffff">Premium</h3><p class="mo_plan-desc"></p><h3>$49 - One Time Payment</font><br><br><span>
|
3181 |
+
<input type="button" id="upgrade_btn" name="upgrade_btn" class="button button-default button-large" value="Upgrade" onclick="upgradeform('wp_social_login_premium_plan')" /> </span></h3></th>
|
3182 |
|
3183 |
|
3184 |
</tr>
|
3187 |
<tbody class="mo_align-center mo-fa-icon">
|
3188 |
<tr>
|
3189 |
<td><div class="tooltip">Pre-configured Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;">Pre-configured apps are already configured by miniOrange. Login flow will go from plugin to miniOrange service and then to the Social Application and then back to plugin through miniOrange service.</span></div></td>
|
3190 |
+
<td><div class="tooltip">9 Apps  <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Salesforce Yahoo</span></div></td>
|
3191 |
+
<td><div class="tooltip">10 Apps  <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Salesforce Yahoo WordPress</span></div></td>
|
3192 |
+
<td><div class="tooltip">10 Apps  <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Salesforce Yahoo WordPress</span></div></td>
|
3193 |
|
3194 |
</tr>
|
3195 |
<tr>
|
3196 |
<td><div class="tooltip">Custom Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;"> Using the custom app tab, you can set up your own App ID and secret in the plugin. Login flow will not involve miniOrange in between. Login flow will go from plugin to social media application and then back to plugin.</span></div></td>
|
3197 |
<td>Facebook, Twitter</td>
|
3198 |
+
<td><div class="tooltip">10 Apps  <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress</span></div></td>
|
3199 |
+
<td><div class="tooltip">10 Apps  <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress</span></div></td>
|
3200 |
|
3201 |
</tr>
|
3202 |
<tr>
|
3397 |
|
3398 |
<script>
|
3399 |
function upgradeform(planType){
|
3400 |
+
jQuery("#upgrade_notice").css("display", "block");
|
3401 |
jQuery('#requestOrigin').val(planType);
|
3402 |
jQuery('#loginform').submit();
|
3403 |
+
|
3404 |
}
|
3405 |
function checkLicense(){
|
3406 |
jQuery("#checkLicenseForm").submit();
|
3407 |
}
|
3408 |
+
|
3409 |
</script>
|
3410 |
|
3411 |
<h3><b><span style="color:#da7587;font-weight:bold;">Refund Policy -</h3>
|
3947 |
document.getElementById("instructions").innerHTML = "";
|
3948 |
if(appname=="google"){
|
3949 |
document.getElementById("mo_oauth_scope").value = "";
|
3950 |
+
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 if(get_option('mo_openid_malform_error')){if(get_option( 'permalink_structure' )){echo site_url()."/openidcallback/google";}else echo site_url()."/?openidcallback=google"; } else{if(get_option( 'permalink_structure' )){echo site_url()."/openidcallback";}else 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>';
|
3951 |
} else if(appname=="facebook"){
|
3952 |
document.getElementById("mo_oauth_scope").value = "email, public_profile";
|
3953 |
+
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>Click on <b>Products</b> from left pane of the page and select <b>Facebook Login</b> and click on <b>Set Up</b> button.</li><li>Click on <b>Web</b>. Enter <b><?php echo site_url(); ?></b> into <b>Site URL</b> than click on <b> Save</b>.</li><li>Goto <b>Settings -> Basic</b> from left pane of the page, Enter <b><?php $str=str_replace('https://','',site_url()); echo $str; ?></b> in <b>App Domain</b>, your privacy policy URL in <b>Privacy Policy URL</b> and select <b>Category</b> of your website. Then click on <b>Save Changes</b>.</li><li>From the left pane, select <b>Facebook Login -> Settings</b>.</li><li>Under Client OAuth Settings section, Enter <b><?php if(get_option('mo_openid_malform_error')){if(get_option( 'permalink_structure' )){echo site_url()."/openidcallback/facebook";}else echo site_url()."/?openidcallback=facebook"; } else{if(get_option( 'permalink_structure' )){echo site_url()."/openidcallback";}else echo site_url()."/?openidcallback"; }?></b> in <b>Valid OAuth Redirect URIs</b> and click on <b>Save Changes</b> button.</li><li>Change your app status from In Development to Live by clicking on OFF (sliding button) beside Status option of the top right corner. Then, click on Confirm button.</li><li>Go to Settings > Basic. Paste your <b>App ID</b> and <b>App Secret</b> provided by Facebook into the fields above.</li><li>Input <b> email, public_profile </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</b></li><li>Click on the <b>Save settings</b> button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
3954 |
} else if(appname=="twitter"){
|
3955 |
document.getElementById("mo_oauth_scope").value = "";
|
3956 |
+
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();?><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>';
|
3957 |
}
|
3958 |
|
3959 |
}
|
4084 |
}
|
4085 |
|
4086 |
function mo_custom_app_instructions($appname){
|
4087 |
+
|
4088 |
+
if(mo_openid_malform_error())
|
4089 |
+
{
|
4090 |
+
if(get_option( 'permalink_structure' )) {
|
4091 |
+
$oauth_redirect_url = site_url() . "/openidcallback/" . $appname;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4092 |
}
|
4093 |
+
else
|
4094 |
+
$oauth_redirect_url = site_url() . "/?openidcallback=" . $appname;
|
4095 |
+
}
|
4096 |
+
else{
|
4097 |
+
if(get_option( 'permalink_structure' )) {
|
4098 |
+
$oauth_redirect_url = site_url() . "/openidcallback";
|
4099 |
+
}else
|
4100 |
+
$oauth_redirect_url = site_url() . "/?openidcallback";
|
4101 |
+
}
|
4102 |
+
|
4103 |
+
if ($appname == "google") {
|
4104 |
+
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>' . $oauth_redirect_url . '</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><li>Input scope as <b>https://www.googleapis.com/auth/plus.login+https://www.googleapis.com/auth/plus.profile.emails.read </b></li><li>Go to Social Login tab and configure the icons.</li></ol>';
|
4105 |
+
} else if ($appname == "facebook") {
|
4106 |
+
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>Click on <b>Products</b> from left pane of the page and select <b>Facebook Login</b> and click on <b>Set Up</b> button.</li><li>Click on <b>Web</b>. Enter <b>' . site_url() . '</b> into <b>Site URL</b> than click on <b> Save</b>.</li><li>Goto <b>Settings -> Basic</b> from left pane of the page, Enter <b>' . str_replace('https://', '', site_url()) . '</b> in <b>App Domain</b>, your privacy policy URL in <b>Privacy Policy URL</b> and select <b>Category</b> of your website. Then click on <b>Save Changes</b>.</li><li>From the left pane, select <b>Facebook Login -> Settings</b>.</li><li>Under Client OAuth Settings section, Enter <b>' . $oauth_redirect_url . '</b> in <b>Valid OAuth Redirect URIs</b> and click on <b>Save Changes</b> button.</li><li>Change your app status from In Development to Live by clicking on OFF (sliding button) beside Status option of the top right corner. Then, click on Confirm button.</li><li>Go to Settings > Basic. Paste your <b>App ID</b> and <b>App Secret</b> provided by Facebook into the fields above.</li><li>Input <b> email, public_profile </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</b></li><li>Click on the <b>Save settings</b> button.</li><li>Go to Social Login tab to configure the display as well as other login settings.</li></ol>';
|
4107 |
+
} else if ($appname == "twitter") {
|
4108 |
+
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() . '<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>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>';
|
4109 |
}
|
4110 |
|
4111 |
}
|
4229 |
return false;
|
4230 |
}
|
4231 |
}
|
4232 |
+
function mo_openid_malform_error() {
|
4233 |
+
if(get_option("mo_openid_malform_error")=='1'){
|
4234 |
+
return true;
|
4235 |
+
} else {
|
4236 |
+
return false;
|
4237 |
+
}
|
4238 |
+
}
|
4239 |
|
4240 |
function mo_openid_registeration_modal(){
|
4241 |
update_option('regi_pop_up','yes');
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.miniorange.com
|
|
4 |
Tags: social login, facebook login, google login, twitter login, Vkontakte login, social, facebook, twitter, google, login, google, social connect, social network login, social plugin, Vkontakte, LinkedIn
|
5 |
Requires at least: 2.0.2
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 7.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -176,6 +176,12 @@ Please email us at info@miniorange.com. You can also submit your query from the
|
|
176 |
|
177 |
|
178 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
= 7.1.3 =
|
180 |
* Minor bug fixes.
|
181 |
|
@@ -599,6 +605,12 @@ Please email us at info@miniorange.com. You can also submit your query from the
|
|
599 |
* First version of Social Login, Social Sharing plugin.
|
600 |
|
601 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
= 7.1.3 =
|
603 |
* Minor bug fixes.
|
604 |
|
4 |
Tags: social login, facebook login, google login, twitter login, Vkontakte login, social, facebook, twitter, google, login, google, social connect, social network login, social plugin, Vkontakte, LinkedIn
|
5 |
Requires at least: 2.0.2
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 7.1.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
176 |
|
177 |
|
178 |
== Changelog ==
|
179 |
+
= 7.1.4 =
|
180 |
+
* Add Yahoo as social login option in dafault apps.
|
181 |
+
* Fixed Permalink issue.
|
182 |
+
* Added Customizable text for OTP email notification.
|
183 |
+
* Fixed session issue for account linking.
|
184 |
+
|
185 |
= 7.1.3 =
|
186 |
* Minor bug fixes.
|
187 |
|
605 |
* First version of Social Login, Social Sharing plugin.
|
606 |
|
607 |
== Upgrade Notice ==
|
608 |
+
= 7.1.4 =
|
609 |
+
* Add Yahoo as social login option in dafault apps.
|
610 |
+
* Fixed Permalink issue.
|
611 |
+
* Added Customizable text for OTP email notification.
|
612 |
+
* Fixed session issue for account linking.
|
613 |
+
|
614 |
= 7.1.3 =
|
615 |
* Minor bug fixes.
|
616 |
|
uninstall.php
CHANGED
@@ -25,6 +25,7 @@
|
|
25 |
delete_option('mo_openid_linkedin_enable');
|
26 |
delete_option('mo_openid_instagram_enable');
|
27 |
delete_option('mo_openid_amazon_enable');
|
|
|
28 |
delete_option('mo_openid_windowslive_enable');
|
29 |
delete_option('mo_openid_vkontakte_enable');
|
30 |
delete_option('mo_openid_default_login_enable');
|
@@ -183,6 +184,7 @@ delete_option( 'mo_account_linking_new_user_instruction');
|
|
183 |
delete_option( 'mo_account_linking_existing_user_instruction');
|
184 |
delete_option( 'mo_account_linking_extra_instruction');
|
185 |
|
|
|
186 |
delete_option( 'regi_pop_up' );
|
187 |
delete_option( 'pop_regi_msg' );
|
188 |
delete_option( 'pop_login_msg' );
|
25 |
delete_option('mo_openid_linkedin_enable');
|
26 |
delete_option('mo_openid_instagram_enable');
|
27 |
delete_option('mo_openid_amazon_enable');
|
28 |
+
delete_option('mo_openid_yahoo_enable');
|
29 |
delete_option('mo_openid_windowslive_enable');
|
30 |
delete_option('mo_openid_vkontakte_enable');
|
31 |
delete_option('mo_openid_default_login_enable');
|
184 |
delete_option( 'mo_account_linking_existing_user_instruction');
|
185 |
delete_option( 'mo_account_linking_extra_instruction');
|
186 |
|
187 |
+
delete_option( 'custom_otp_msg' );
|
188 |
delete_option( 'regi_pop_up' );
|
189 |
delete_option( 'pop_regi_msg' );
|
190 |
delete_option( 'pop_login_msg' );
|