Plugin Directory

Changeset 2853010


Ignore:
Timestamp:
01/23/2023 04:14:09 PM (3 years ago)
Author:
kalpeshh
Message:

Security fixes.

Location:
miniorange-login-openid/trunk
Files:
2 added
1 deleted
59 edited

Legend:

Unmodified
Added
Removed
  • miniorange-login-openid/trunk/CustomerOpenID.php

    r2687250 r2853010  
    3131    private $defaultApiKey = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq";
    3232
    33     function create_customer(){
     33    function create_customer($password){
    3434        $url = get_option('mo_openid_host_name') . '/moas/rest/customer/add';
    3535        $current_user = wp_get_current_user();
    3636        $this->email        = get_option('mo_openid_admin_email');
    37         $password = get_option('mo_openid_admin_password');
    3837
    3938        $fields = array(
     
    5655        if($response['body']==NULL)
    5756        {
    58             if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
     57            if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)  // phpcs:ignore
    5958                wp_send_json(["error" => 'There was an error creating an account for you. Please try again.']);
    6059            else {
     
    7271    }
    7372
    74     function get_customer_key() {
     73    function get_customer_key($password) {
    7574        $url    = get_option('mo_openid_host_name') . "/moas/rest/customer/key";
    7675        $email  = get_option("mo_openid_admin_email");
    7776
    78         $password = get_option("mo_openid_admin_password");
    7977
    8078        $fields = array(
     
    189187        $query =" MiniOrange Social Login [Free] ";
    190188        $content='<div >Hello, <br><br>First Name :<br><br>Last  Name :
    191                                 <br><br>Company : '.$_SERVER['HTTP_HOST'].'
     189                                <br><br>Company : '.sanitize_text_field($_SERVER['HTTP_HOST']).'
    192190                                <br><br>Phone Number : '.$phone_number.'
    193191                                <br><br>Email : <a href="mailto:'.$fromEmail.'" target="_blank">'.$fromEmail.'</a>
     
    300298        $url = get_option('mo_openid_host_name') . '/moas/rest/customer/contact-us';
    301299        $current_user = wp_get_current_user();
    302         $company = get_option('mo_openid_admin_company_name') ? get_option('mo_openid_admin_company_name') : $_SERVER ['SERVER_NAME'];
     300        $company = get_option('mo_openid_admin_company_name') ? get_option('mo_openid_admin_company_name') : sanitize_text_field($_SERVER ['SERVER_NAME']);
    303301        $first_name = get_option('mo_openid_admin_first_name') ? get_option('mo_openid_admin_first_name') : $current_user->user_firstname;
    304302        $last_name = get_option('mo_openid_admin_last_name') ? get_option('mo_openid_admin_last_name') : $current_user->user_lastname;
     
    529527            return $response;
    530528        } else {
    531             if (isset($_POST['action'])? $_POST['action']== 'mo_register_new_user':0)
     529            if (isset($_POST['action'])? $_POST['action']== 'mo_register_new_user':0) // phpcs:ignore
    532530                wp_send_json(["error" => 'Unable to connect to the Internet. Please try again.']);
    533531            else {
  • miniorange-login-openid/trunk/class-mo-openid-login-widget.php

    r2769271 r2853010  
    11<?php
    2 include "mo-openid-social-login-functions.php";
    3 require_once(ABSPATH.'wp-admin/includes/user.php' );
    4 add_action( 'wp_login', 'mo_openid_link_account', 5, 2);
    5 add_action( 'mo_user_register', 'mo_openid_update_role', 1, 2);
    6 add_action( 'mo_user_register','mo_openid_send_email',1, 2 );
    7 if(get_option('mo_openid_popup_window')=='0') {
    8     add_action('wp_login', 'mo_openid_login_redirect', 11, 2);
    9 }
    10 else {
    11     add_action('wp_login', 'mo_openid_login_redirect_pop_up', 11, 2);
     2require 'mo-openid-social-login-functions.php';
     3require_once ABSPATH . 'wp-admin/includes/user.php';
     4add_action( 'wp_login', 'mo_openid_link_account', 5, 2 );
     5add_action( 'mo_user_register', 'mo_openid_update_role', 1, 2 );
     6add_action( 'mo_user_register', 'mo_openid_send_email', 1, 2 );
     7if ( get_option( 'mo_openid_popup_window' ) == '0' ) {
     8    add_action( 'wp_login', 'mo_openid_login_redirect', 11, 2 );
     9} else {
     10    add_action( 'wp_login', 'mo_openid_login_redirect_pop_up', 11, 2 );
    1211}
    1312add_action( 'delete_user', 'mo_openid_delete_account_linking_rows' );
    1413
    15 add_action('manage_users_custom_column', 'mo_openid_delete_profile_column', 9, 3);
    16 add_filter('manage_users_columns', 'mo_openid_add_custom_column1');
    17 add_action('admin_head', 'mo_openid_delete_social_profile_script');
    18 add_filter( 'login_message', 'mo_openid_account_linking');
    19 add_action('widgets_init', function () {
    20     register_widget("mo_openid_login_wid");
    21 });
    22 add_action('widgets_init', function () {
    23     register_widget("mo_openid_sharing_ver_wid");
    24 });
    25 add_action('widgets_init', function () {
    26     register_widget("mo_openid_sharing_hor_wid");
    27 });
    28 
    29 if (get_option('mo_openid_logout_redirection_enable') == 1) {
    30     add_filter('logout_url', 'mo_openid_redirect_after_logout', 0, 1);
     14add_action( 'manage_users_custom_column', 'mo_openid_delete_profile_column', 9, 3 );
     15add_filter( 'manage_users_columns', 'mo_openid_add_custom_column1' );
     16add_action( 'admin_head', 'mo_openid_delete_social_profile_script' );
     17add_filter( 'login_message', 'mo_openid_account_linking' );
     18add_action(
     19    'widgets_init',
     20    function () {
     21        register_widget( 'mo_openid_login_wid' );
     22    }
     23);
     24add_action(
     25    'widgets_init',
     26    function () {
     27        register_widget( 'mo_openid_sharing_ver_wid' );
     28    }
     29);
     30add_action(
     31    'widgets_init',
     32    function () {
     33        register_widget( 'mo_openid_sharing_hor_wid' );
     34    }
     35);
     36
     37if ( get_option( 'mo_openid_logout_redirection_enable' ) == 1 ) {
     38    add_filter( 'logout_url', 'mo_openid_redirect_after_logout', 0, 1 );
    3139}
    3240
     
    3442class mo_openid_login_wid extends WP_Widget {
    3543
    36     public function __construct() {
    37         parent::__construct(
    38             'mo_openid_login_wid',
    39             'miniOrange Social Login Widget',
    40             array(
    41                 'description' => __( 'Login using Social Apps like Google, Facebook, LinkedIn, Microsoft, Instagram.', 'flw' ),
    42                 'customize_selective_refresh' => true,
    43             )
    44         );
    45     }
    46 
    47     public function widget( $args, $instance ) {
    48         extract( $args );
    49 
    50         echo $args['before_widget'];
    51         $this->openidloginForm();
    52 
    53         echo $args['after_widget'];
    54     }
    55 
    56     public function update( $new_instance, $old_instance ) {
    57         $instance = array();
    58         $instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
    59         return $instance;
    60     }
    61 
    62 
    63     public function openidloginForm(){
    64 
    65         if ($GLOBALS['pagenow'] === 'wp-login.php') {
    66             ?>
    67             <script
    68                     src="https://code.jquery.com/jquery-1.12.4.js"
    69                     integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU="
    70                     crossorigin="anonymous"></script>
    71             <?php
    72         }
    73 
    74         $selected_theme = esc_attr(get_option('mo_openid_login_theme'));
    75         $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_twitter_enable') | get_option('mo_openid_vkontakte_enable') | get_option('mo_openid_yahoo_enable') | get_option('mo_openid_snapchat_enable') | get_option('mo_openid_dribbble_enable') | get_option('mo_openid_discord_enable');
    76         $spacebetweenicons = esc_attr(get_option('mo_login_icon_space'));
    77         $customWidth = esc_attr(get_option('mo_login_icon_custom_width'));
    78         $customHeight = esc_attr(get_option('mo_login_icon_custom_height'));
    79         $customSize = esc_attr(get_option('mo_login_icon_custom_size'));
    80         $customBackground = esc_attr(get_option('mo_login_icon_custom_color'));
    81         $customHoverBackground = esc_attr(get_option('mo_login_icon_custom_hover_color'));
    82         $customSmartBackground1 = esc_attr(get_option('mo_login_icon_custom_smart_color1'));
    83         $customSmartBackground2 = esc_attr(get_option('mo_login_icon_custom_smart_color2'));
    84         $customTheme = esc_attr(get_option('mo_openid_login_custom_theme'));
    85         $customTextofTitle = esc_attr(get_option('mo_openid_login_button_customize_text'));
    86         $customBoundary = esc_attr(get_option('mo_login_icon_custom_boundary'));
    87         $customLogoutName = esc_attr(get_option('mo_openid_login_widget_customize_logout_name_text'));
    88         $customLogoutLink = get_option('mo_openid_login_widget_customize_logout_text');
    89         $customTextColor=esc_attr(get_option('mo_login_openid_login_widget_customize_textcolor'));
    90         $customText=esc_html(get_option('mo_openid_login_widget_customize_text'));
    91         $effectStatus =esc_html(get_option('mo_openid_button_theme_effect'));
    92         $application_pos = get_option('app_pos');
    93 
    94         if(get_option('mo_openid_gdpr_consent_enable')) {
    95             $gdpr_setting = "disabled='disabled'";
    96         }
    97         else
    98             $gdpr_setting ='';
    99 
    100         $url = esc_url(get_option('mo_openid_privacy_policy_url'));
    101         $text = esc_html(get_option('mo_openid_privacy_policy_text'));
    102 
    103         if( !empty($text) && strpos(get_option('mo_openid_gdpr_consent_message'),$text)){
    104             $consent_message = str_replace(get_option('mo_openid_privacy_policy_text'),'<a target="_blank" href="'.$url.'">'.$text.'</a>',get_option('mo_openid_gdpr_consent_message'));
    105         }else if(empty($text)){
    106             $consent_message = get_option('mo_openid_gdpr_consent_message');
    107         }
    108 
    109 
    110         $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
    111         $sign_up_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    112         $mo_URL=strstr($sign_up_url, "?", true);
    113         if($mo_URL) {
    114             setcookie("mo_openid_signup_url",  $mo_URL, time() + (86400 * 30), "/");}
    115         else{
    116             setcookie("mo_openid_signup_url", $sign_up_url, time() + (86400 * 30), "/");}
    117         if(get_option('mo_openid_gdpr_consent_enable'))
    118         {
    119             $dis =  "dis";
    120         }
    121         else{
    122             $dis = '';
    123         }
    124         if( ! is_user_logged_in() ) {
    125             $values=array(
    126                 'appsConfigured' => $appsConfigured,
    127                 'selected_apps' => '',
    128                 'application_pos' => $application_pos,
    129                 'customTextColor' => $customTextColor,
    130                 'customText' => $customText,
    131                 'consent_message' => $consent_message,
    132                 'selected_theme' => $selected_theme,
    133                 'view' => '',
    134                 'gdpr_setting' => $gdpr_setting,
    135                 'spacebetweenicons' => $spacebetweenicons,
    136                 'customWidth' => $customWidth,
    137                 'customHeight' => $customHeight,
    138                 'customBoundary' => $customBoundary,
    139                 'buttonText' => $customTextofTitle,
    140                 'dis' => $dis,
    141                 'customTextofTitle' => $customTextofTitle,
    142                 'customSize' => $customSize,
    143                 'html' => '',
    144                 'customBackground' => $customBackground,
    145                 'customHoverBackground' => $customHoverBackground,
    146                 'customSmartBackground1' => $customSmartBackground1,
    147                 'customSmartBackground2' => $customSmartBackground2,
    148                 'customTheme' => $customTheme,
    149                 'effectStatus'=>$effectStatus
    150             );
    151             $html=$this->display_apps($values);
    152             $html.='<br/>';
    153             echo $html;
    154 
    155         }
    156         else {
    157             global $current_user;
    158             $current_user = wp_get_current_user();
    159             $customLogoutName = str_replace('##username##', $current_user->display_name, $customLogoutName);
    160             $link_with_username = $customLogoutName;
    161             if (empty($customLogoutName)  || empty($customLogoutLink)) {
    162                 ?>
    163                 <div id="logged_in_user" class="mo_openid_login_wid">
    164                     <li><?php echo $link_with_username;?> <a href="<?php echo wp_logout_url( site_url() ); ?>" title="<?php _e('Logout','flw');?>"><?php _e($customLogoutLink,'flw');?></a></li>
    165                 </div>
    166                 <?php
    167             }
    168             else {
    169                 ?>
    170                 <div id="logged_in_user" class="mo_openid_login_wid">
    171                     <li><?php echo $link_with_username;?> <a href="<?php echo wp_logout_url( site_url() ); ?>" title="<?php _e('Logout','flw');?>"><?php _e($customLogoutLink,'flw');?></a></li>
    172                 </div>
    173                 <?php
    174             }
    175         }
    176     }
    177 
    178     public function mo_openid_customize_logo(){
    179         $logo =" <div style='float:left;margin-bottom: 0px;margin-top: 0px;' class='mo_image_id'>
     44    public function __construct() {
     45        parent::__construct(
     46            'mo_openid_login_wid',
     47            'miniOrange Social Login Widget',
     48            array(
     49                'description'                 => __( 'Login using Social Apps like Google, Facebook, LinkedIn.', 'flw' ),
     50                'customize_selective_refresh' => true,
     51            )
     52        );
     53    }
     54
     55    public function widget( $args, $instance ) {
     56        extract( $args );
     57        $allowed_html = array(
     58            'div' => array(
     59                'class' => array(),
     60            ),
     61            'p'   => array( 'style' => array() ),
     62            'a'   => array(
     63                'class'   => array(),
     64                'rel'     => array(),
     65                'style'   => array(),
     66                'onclick' => array(),
     67            ),
     68            'img' => array(
     69                'class' => array(),
     70                'style' => array(),
     71                'src'   => array(),
     72            ),
     73            'i'   => array(
     74                'class' => array(),
     75                'style' => array(),
     76                'src'   => array(),
     77            ),
     78        );
     79        echo wp_kses( $args['before_widget'], $allowed_html );
     80        $this->openidloginForm();
     81
     82        echo wp_kses( $args['after_widget'], $allowed_html );
     83    }
     84
     85    public function update( $new_instance, $old_instance ) {
     86        $instance              = array();
     87        $instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
     88        return $instance;
     89    }
     90
     91
     92    public function openidloginForm() {
     93        $selected_theme         = esc_attr( get_option( 'mo_openid_login_theme' ) );
     94        $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_amazon_enable' ) | get_option( 'mo_openid_twitter_enable' ) | get_option( 'mo_openid_vkontakte_enable' ) | get_option( 'mo_openid_yahoo_enable' ) | get_option( 'mo_openid_snapchat_enable' ) | get_option( 'mo_openid_dribbble_enable' ) | get_option( 'mo_openid_discord_enable' );
     95        $spacebetweenicons      = esc_attr( get_option( 'mo_login_icon_space' ) );
     96        $customWidth            = esc_attr( get_option( 'mo_login_icon_custom_width' ) );
     97        $customHeight           = esc_attr( get_option( 'mo_login_icon_custom_height' ) );
     98        $customSize             = esc_attr( get_option( 'mo_login_icon_custom_size' ) );
     99        $customBackground       = esc_attr( get_option( 'mo_login_icon_custom_color' ) );
     100        $customHoverBackground  = esc_attr( get_option( 'mo_login_icon_custom_hover_color' ) );
     101        $customSmartBackground1 = esc_attr( get_option( 'mo_login_icon_custom_smart_color1' ) );
     102        $customSmartBackground2 = esc_attr( get_option( 'mo_login_icon_custom_smart_color2' ) );
     103        $customTheme            = esc_attr( get_option( 'mo_openid_login_custom_theme' ) );
     104        $customTextofTitle      = esc_attr( get_option( 'mo_openid_login_button_customize_text' ) );
     105        $customBoundary         = esc_attr( get_option( 'mo_login_icon_custom_boundary' ) );
     106        $customLogoutName       = esc_attr( get_option( 'mo_openid_login_widget_customize_logout_name_text' ) );
     107        $customLogoutLink       = esc_attr(get_option( 'mo_openid_login_widget_customize_logout_text' ));
     108        $customTextColor        = esc_attr( get_option( 'mo_login_openid_login_widget_customize_textcolor' ) );
     109        $customText             = esc_html( get_option( 'mo_openid_login_widget_customize_text' ) );
     110        $effectStatus           = esc_html( get_option( 'mo_openid_button_theme_effect' ) );
     111        $application_pos        = esc_attr(get_option( 'app_pos' ));
     112
     113        if ( get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     114            $gdpr_setting = "disabled='disabled'";
     115        } else {
     116            $gdpr_setting = '';
     117        }
     118
     119        $url  = esc_url( get_option( 'mo_openid_privacy_policy_url' ) );
     120        $text = esc_html( get_option( 'mo_openid_privacy_policy_text' ) );
     121
     122        if ( ! empty( $text ) && strpos( get_option( 'mo_openid_gdpr_consent_message' ), $text ) ) {
     123            $consent_message = str_replace( get_option( 'mo_openid_privacy_policy_text' ), '<a target="_blank" href="' . $url . '">' . $text . '</a>', get_option( 'mo_openid_gdpr_consent_message' ) );
     124        } elseif ( empty( $text ) ) {
     125            $consent_message = get_option( 'mo_openid_gdpr_consent_message' );
     126        }
     127
     128        $protocol    = ( ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) || $_SERVER['SERVER_PORT'] == 443 ) ? 'https://' : 'http://';
     129        $sign_up_url = $protocol . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
     130        $mo_URL      = strstr( $sign_up_url, '?', true );
     131        if ( $mo_URL ) {
     132            setcookie( 'mo_openid_signup_url', $mo_URL, time() + ( 86400 * 30 ), '/' );} else {
     133            setcookie( 'mo_openid_signup_url', $sign_up_url, time() + ( 86400 * 30 ), '/' );}
     134            if ( get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     135                $dis = 'dis';
     136            } else {
     137                $dis = '';
     138            }
     139            if ( ! is_user_logged_in() ) {
     140                $values       = array(
     141                    'appsConfigured'         => $appsConfigured,
     142                    'selected_apps'          => '',
     143                    'application_pos'        => $application_pos,
     144                    'customTextColor'        => $customTextColor,
     145                    'customText'             => $customText,
     146                    'consent_message'        => $consent_message,
     147                    'selected_theme'         => $selected_theme,
     148                    'view'                   => '',
     149                    'gdpr_setting'           => $gdpr_setting,
     150                    'spacebetweenicons'      => $spacebetweenicons,
     151                    'customWidth'            => $customWidth,
     152                    'customHeight'           => $customHeight,
     153                    'customBoundary'         => $customBoundary,
     154                    'buttonText'             => $customTextofTitle,
     155                    'dis'                    => $dis,
     156                    'customTextofTitle'      => $customTextofTitle,
     157                    'customSize'             => $customSize,
     158                    'html'                   => '',
     159                    'customBackground'       => $customBackground,
     160                    'customHoverBackground'  => $customHoverBackground,
     161                    'customSmartBackground1' => $customSmartBackground1,
     162                    'customSmartBackground2' => $customSmartBackground2,
     163                    'customTheme'            => $customTheme,
     164                    'effectStatus'           => $effectStatus,
     165                );
     166                $html         = $this->display_apps( $values );
     167                $html        .= '<br/>';
     168                $allowed_html = array(
     169                    'div' => array(
     170                        'class' => array(),
     171                    ),
     172                    'p'   => array( 'style' => array() ),
     173                    'a'   => array(
     174                        'class'   => array(),
     175                        'rel'     => array(),
     176                        'style'   => array(),
     177                        'onclick' => array(),
     178                    ),
     179                    'img' => array(
     180                        'class' => array(),
     181                        'style' => array(),
     182                        'src'   => array(),
     183                    ),
     184                    'i'   => array(
     185                        'class' => array(),
     186                        'style' => array(),
     187                        'src'   => array(),
     188                    ),
     189                );
     190                echo wp_kses( $html, $allowed_html );
     191                // echo $html;
     192
     193            } else {
     194                global $current_user;
     195                $current_user       = wp_get_current_user();
     196                $customLogoutName   = str_replace( '##username##', $current_user->display_name, $customLogoutName );
     197                $link_with_username = $customLogoutName;
     198                if ( empty( $customLogoutName ) || empty( $customLogoutLink ) ) {
     199                    ?>
     200                <div id="logged_in_user" class="mo_openid_login_wid">
     201                    <li><?php echo esc_attr( $link_with_username ); ?> <a href="<?php echo esc_url( wp_logout_url( site_url() ) ); ?>" title="<?php esc_attr_e( 'Logout', 'flw' ); ?>"><?php esc_attr_e( $customLogoutLink, 'flw' ); ?></a></li>
     202                </div>
     203                    <?php
     204                } else {
     205                    ?>
     206                <div id="logged_in_user" class="mo_openid_login_wid">
     207                    <li><?php echo esc_attr( $link_with_username ); ?> <a href="<?php echo esc_url( wp_logout_url( site_url() ) ); ?>" title="<?php esc_attr_e( 'Logout', 'flw' ); ?>"><?php esc_attr_e( $customLogoutLink, 'flw' ); ?></a></li>
     208                </div>
     209                    <?php
     210                }
     211            }
     212    }
     213
     214    public function mo_openid_customize_logo() {
     215        $logo = " <div style='float:left;margin-bottom: 0px;margin-top: 0px;' class='mo_image_id'>
    180216                <a target='_blank' href='https://www.miniorange.com/'>
    181                 <img alt='logo' src='". plugins_url('/includes/images/miniOrange.png',__FILE__) ."' class='mo_openid_image'>
     217                <img alt='logo' src='" . plugins_url( '/includes/images/miniOrange.png', __FILE__ ) . "' class='mo_openid_image'>
    182218                </a>
    183219                </div>
    184220                <br/><br/>";
    185         return $logo;
    186     }
    187 
    188     public function if_custom_app_exists($app_name){
    189 
    190         if(get_option('mo_openid_apps_list'))
    191         {
    192             $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    193             if(isset($appslist[$app_name])) {
    194                 if (get_option('mo_openid_enable_custom_app_' . $app_name))
    195                     return 'true';
    196                 else
    197                     return 'false';
    198             }
    199             else
    200                 return 'false';
    201         }
    202         return 'false';
    203     }
    204 
    205     public function openidloginFormShortCode( $atts ){
    206         global $post;
    207         $html = '';
    208         $apps="";
    209         $selected_theme = isset( $atts['shape'] )? esc_attr($atts['shape']) : esc_attr(get_option('mo_openid_login_theme'));
    210         $selected_apps = isset( $atts['apps'] )? esc_attr($atts['apps']) : "";
    211         $application_pos = get_option('app_pos');
    212         $appsConfigured = get_option('mo_openid_facebook_enable') | get_option('mo_openid_google_enable') | get_option('mo_openid_vkontakte_enable') | get_option('mo_openid_twitter_enable') | get_option('mo_openid_instagram_enable') | get_option('mo_openid_linkedin_enable') |  get_option('mo_openid_amazon_enable') | get_option('mo_openid_salesforce_enable') | get_option('mo_openid_yahoo_enable') | get_option('mo_openid_snapchat_enable') | get_option('mo_openid_dribbble_enable') | get_option('mo_openid_discord_enable');
    213         $spacebetweenicons = isset( $atts['space'] )? esc_attr(intval($atts['space'])) : esc_attr(intval(get_option('mo_login_icon_space')));
    214         $customWidth = isset( $atts['width'] )? esc_attr(intval($atts['width'])) : esc_attr(intval(get_option('mo_login_icon_custom_width')));
    215         $customHeight = isset( $atts['height'] )? esc_attr(intval($atts['height'])) : esc_attr(intval(get_option('mo_login_icon_custom_height')));
    216         $customSize = isset( $atts['size'] )? esc_attr(intval($atts['size'])) : esc_attr(intval(get_option('mo_login_icon_custom_size')));
    217         $customBackground = isset( $atts['background'] )? esc_attr($atts['background']) : esc_attr(get_option('mo_login_icon_custom_color'));
    218         $customHoverBackground = isset( $atts['background_hover'] )? esc_attr($atts['background_hover']) : esc_attr(get_option('mo_login_icon_custom_hover_color'));
    219         $customSmartBackground1 = isset( $atts['background_smart1'] )? esc_attr($atts['background_smart1']) : esc_attr(get_option('mo_login_icon_custom_smart_color1'));
    220         $customSmartBackground2 = isset( $atts['background_smart2'] )? esc_attr($atts['background_smart2']) : esc_attr(get_option('mo_login_icon_custom_smart_color2'));
    221         $effectStatus = isset( $atts['effectStatus'] )? esc_attr($atts['effectStatus']) : esc_attr(get_option('mo_openid_button_theme_effect'));
    222         $customTheme = isset( $atts['theme'] )? esc_attr($atts['theme']) : esc_attr(get_option('mo_openid_login_custom_theme'));
    223         $buttonText = esc_html(get_option('mo_openid_login_button_customize_text'));
    224         $customTextofTitle = esc_attr(get_option('mo_openid_login_button_customize_text'));
    225         $logoutUrl = esc_url(wp_logout_url(site_url()));
    226         $customBoundary = isset( $atts['edge'] )? esc_attr($atts['edge']) : esc_attr(get_option('mo_login_icon_custom_boundary'));
    227         $customLogoutName = esc_attr(get_option('mo_openid_login_widget_customize_logout_name_text'));
    228         $customLogoutLink = get_option('mo_openid_login_widget_customize_logout_text');
    229         $customTextColor= isset( $atts['color'] )? esc_attr($atts['color']) : esc_attr(get_option('mo_login_openid_login_widget_customize_textcolor'));
    230         $customText=isset( $atts['heading'] )? esc_html($atts['heading']) :esc_html(get_option('mo_openid_login_widget_customize_text'));
    231         $view=isset( $atts['view'] )? esc_attr($atts['view']) : "";
    232         $appcnt=isset( $atts['appcnt'] )? esc_attr($atts['appcnt']) : "";
    233         if($selected_theme == 'longbuttonwithtext'){
    234             $selected_theme = 'longbutton';
    235         }
    236 
    237         if($customTheme == 'custombackground'){
    238             $customTheme = 'custom';
    239         }
    240 
    241         if(get_option('mo_openid_gdpr_consent_enable')) {
    242             $gdpr_setting = "disabled='disabled'";
    243         }
    244         else
    245             $gdpr_setting = '';
    246 
    247         $url = esc_url(get_option('mo_openid_privacy_policy_url'));
    248         $text = esc_html(get_option('mo_openid_privacy_policy_text'));
    249 
    250         if( !empty($text) && strpos(get_option('mo_openid_gdpr_consent_message'),$text)){
    251             $consent_message = str_replace(get_option('mo_openid_privacy_policy_text'),'<a target="_blank" href="'.$url.'">'.$text.'</a>',get_option('mo_openid_gdpr_consent_message'));
    252         }else if(empty($text)){
    253             $consent_message = get_option('mo_openid_gdpr_consent_message');
    254         }
    255         if(get_option('mo_openid_gdpr_consent_enable'))
    256         {
    257             $dis =  "dis";
    258         }
    259         else{
    260             $dis = '';
    261         }
    262         $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
    263         $sign_up_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    264         $mo_URL=strstr($sign_up_url, "?", true);
    265         if($mo_URL) {setcookie("mo_openid_signup_url",  $mo_URL, time() + (86400 * 30), "/");}
    266         else{setcookie("mo_openid_signup_url", $sign_up_url, time() + (86400 * 30), "/");}
    267         if( ! is_user_logged_in() ) {
    268 
    269             $values=array(
    270                 'appsConfigured' => $appsConfigured,
    271                 'selected_apps' => $selected_apps,
    272                 'application_pos' => $application_pos,
    273                 'customTextColor' => $customTextColor,
    274                 'customText' => $customText,
    275                 'consent_message' => $consent_message,
    276                 'selected_theme' => $selected_theme,
    277                 'view' => $view,
    278                 'gdpr_setting' => $gdpr_setting,
    279                 'spacebetweenicons' => $spacebetweenicons,
    280                 'customWidth' => $customWidth,
    281                 'customHeight' => $customHeight,
    282                 'customBoundary' => $customBoundary,
    283                 'customHoverBackground' => $customHoverBackground,
    284                 'customSmartBackground1' => $customSmartBackground1,
    285                 'customSmartBackground2' => $customSmartBackground2,
    286                 'buttonText' => $buttonText,
    287                 'dis' => $dis,
    288                 'customTextofTitle' => $customTextofTitle,
    289                 'customSize' => $customSize,
    290                 'html' => $html,
    291                 'customBackground' => $customBackground,
    292                 'customTheme' => $customTheme,
    293                 'effectStatus'=> $effectStatus,
    294                 'appcnt' => $appcnt
    295             );
    296             $html=$this->display_apps($values);
    297 
    298         }else {
    299             global $current_user;
    300             $current_user = wp_get_current_user();
    301             $customLogoutName = str_replace('##username##', $current_user->display_name, $customLogoutName);
    302             $flw = __($customLogoutLink,"flw");
    303             if (empty($customLogoutName)  || empty($customLogoutLink)) {
    304                 $html .= '<div id="logged_in_user" class="mo_openid_login_wid">' . $customLogoutName . ' <a href=' . $logoutUrl .' title=" ' . $flw . '"> ' . $flw . '</a></div>';
    305             }
    306             else {
    307                 $html .= '<div id="logged_in_user" class="mo_openid_login_wid">' . $customLogoutName . ' <a href=' . $logoutUrl .' title=" ' . $flw . '"> ' . $flw . '</a></div>';
    308             }
    309         }
    310         return $html;
    311     }
    312 
    313     public function display_apps($values){
    314         $appsConfigured=$values['appsConfigured'];
    315         $selected_apps=$values['selected_apps'];
    316         $application_pos=$values['application_pos'];
    317         $customTextColor=$values['customTextColor'];
    318         $customText=$values['customText'];
    319         $consent_message=$values['consent_message'];
    320         $gdpr_setting=$values['gdpr_setting'];
    321         $spacebetweenicons=$values['spacebetweenicons'];
    322         $customWidth=$values['customWidth'];
    323         $customHeight=$values['customHeight'];
    324         $customBoundary=$values['customBoundary'];
    325         $buttonText=$values['buttonText'];
    326         $dis=$values['dis'];
    327         $customTextofTitle=$values['customTextofTitle'];
    328         $customSize=$values['customSize'];
    329         $selected_theme=$values['selected_theme'];
    330         $html=$values['html'];
    331         $view=$values['view'];
    332         $customBackground=$values['customBackground'];
    333         $customHoverBackground=$values['customHoverBackground'];
    334         $customSmartBackground1=$values['customSmartBackground1'];
    335         $customSmartBackground2=$values['customSmartBackground2'];
    336         $effectStatus= $values['effectStatus'];
    337         $customTheme=$values['customTheme'];
    338         $appcnt=isset($values['appcnt'])?$values['appcnt']:'';
    339         if( $appsConfigured || $selected_apps!="") {
    340 
    341             if($selected_apps!="")
    342                 $apps=explode(',', $selected_apps);
    343             else
    344                 $apps=explode('#', $application_pos);
    345 
    346             $this->mo_openid_load_login_script();
    347             $html .= "<div class='mo-openid-app-icons'>
    348                      <p style='color:#".$customTextColor."; width: fit-content;'> $customText</p>";
    349             if(get_option('mo_openid_gdpr_consent_enable')){
    350                 $html .= '<label class="mo-consent" style="width: 100%"><input type="checkbox" onchange="mo_openid_on_consent_change(this)" value="1" id="mo_openid_consent_checkbox">';
    351                 $html .=  $consent_message.'</label>';
    352             }
    353             $count = -1;
    354             if($selected_apps!=""){
    355                 if(mo_openid_is_customer_registered())
    356                 {
    357                     foreach ($apps as $select_apps) {
    358                         $app_dis = "";
    359                         if ($selected_theme == 'longbutton') {
    360                             if ($view == "horizontal" && isset($appcnt)) {
    361                                 $count++;
    362                                 if ("".$count == "".$appcnt) {
    363                                     $html .= "<br/>";
    364                                     $count = 0;
    365                                 }
    366                             }
    367                         }
    368                         $app_values= array(
    369                             'gdpr_setting' => $gdpr_setting,
    370                             'spacebetweenicons' => $spacebetweenicons,
    371                             'customWidth' => $customWidth,
    372                             'customHeight' => $customHeight,
    373                             'customBoundary' => $customBoundary,
    374                             'buttonText' => $buttonText,
    375                             'dis' => $dis,
    376                             'customTextofTitle' => $customTextofTitle,
    377                             'customSize' => $customSize,
    378                             'selected_theme' => $selected_theme,
    379                             'html' => $html,
    380                             'view' => $view,
    381                             'customBackground' => $customBackground,
    382                             'customHoverBackground' => $customHoverBackground,
    383                             'customSmartBackground1' => $customSmartBackground1,
    384                             'customSamrtBackground2' => $customSmartBackground2,
    385                             'effectStatus'=> $effectStatus,
    386                             'app_dis' => $app_dis,
    387                             'customTheme' => $customTheme,
    388                             'customer_register' => 'yes',
    389                         );
    390                         $html=$this->select_app($select_apps,$app_values);
    391                     }
    392                 }
    393                 else{
    394                     foreach ($apps as $select_apps) {
    395                         $app_dis = "";
    396                         if ($selected_theme == 'longbutton') {
    397                             if ($view == "horizontal" && isset($appcnt)) {
    398                                 $count++;
    399                                 if ($count == $appcnt) {
    400                                     $html .= "<br/>";
    401                                     $count = 0;
    402                                 }
    403                             }
    404                         }
    405                         $app_values= array(
    406                             'gdpr_setting' => $gdpr_setting,
    407                             'spacebetweenicons' => $spacebetweenicons,
    408                             'customWidth' => $customWidth,
    409                             'customHeight' => $customHeight,
    410                             'customBoundary' => $customBoundary,
    411                             'buttonText' => $buttonText,
    412                             'dis' => $dis,
    413                             'customTextofTitle' => $customTextofTitle,
    414                             'customSize' => $customSize,
    415                             'selected_theme' => $selected_theme,
    416                             'html' => $html,
    417                             'view' => $view,
    418                             'customBackground' => $customBackground,
    419                             'customHoverBackground' => $customHoverBackground,
    420                             'customSmartBackground1' => $customSmartBackground1,
    421                             'customSamrtBackground2' => $customSmartBackground2,
    422                             'effectStatus'=> $effectStatus,
    423                             'app_dis' => $app_dis,
    424                             'customTheme' => $customTheme,
    425                             'customer_register' => 'no',
    426                         );
    427                         $html=$this->select_app($select_apps,$app_values);
    428                     }
    429                 }
    430             }
    431             else{
    432                 foreach ($apps as $select_apps) {
    433                     if (get_option('mo_openid_'.$select_apps.'_enable')) {
    434                         $app_dis = "";
    435                         if ($selected_theme == 'longbutton') {
    436                             if ($view == "horizontal" && isset($appcnt)) {
    437                                 $count++;
    438                                 if ($count == $appcnt) {
    439                                     $html .= "<br/>";
    440                                     $count = 0;
    441                                 }
    442                             }
    443                         }
    444                         $app_values= array(
    445                             'gdpr_setting' => $gdpr_setting,
    446                             'spacebetweenicons' => $spacebetweenicons,
    447                             'customWidth' => $customWidth,
    448                             'customHeight' => $customHeight,
    449                             'customBoundary' => $customBoundary,
    450                             'buttonText' => $buttonText,
    451                             'dis' => $dis,
    452                             'customTextofTitle' => $customTextofTitle,
    453                             'customSize' => $customSize,
    454                             'selected_theme' => $selected_theme,
    455                             'html' => $html,
    456                             'view' => $view,
    457                             'customBackground' => $customBackground,
    458                             'customHoverBackground' => $customHoverBackground,
    459                             'customSmartBackground1' => $customSmartBackground1,
    460                             'customSamrtBackground2' => $customSmartBackground2,
    461                             'effectStatus'=> $effectStatus,
    462                             'app_dis' => $app_dis,
    463                             'customTheme' => $customTheme,
    464                             'customer_register' => 'yes',
    465                         );
    466                         $html=$this->select_app($select_apps,$app_values);
    467                     }
    468                 }
    469             }
    470             $html .= '</div> <br>';
    471         }
    472         else {
    473             $html .= '<div>No apps configured. Please contact your administrator.</div>';
    474         }
    475         if( $appsConfigured && get_option('moopenid_logo_check') == 1 ){
    476             $logo_html=$this->mo_openid_customize_logo();
    477             $html .= $logo_html;
    478         }
    479         return $html;
    480     }
    481 
    482     public function select_app($select_apps,$app_values){
    483         if( get_option('mo_openid_fonawesome_load') == 1)
    484             wp_enqueue_style( 'mo-openid-sl-wp-font-awesome',plugins_url('includes/css/mo-font-awesome.min.css', __FILE__), false );
    485         wp_enqueue_style( 'mo-wp-style-icon',plugins_url('includes/css/mo_openid_login_icons.css?version='.MO_OPENID_SOCIAL_LOGIN_VERSION, __FILE__), false );
    486         wp_enqueue_style( 'mo-wp-bootstrap-social',plugins_url('includes/css/bootstrap-social.css', __FILE__), false );
    487         if( get_option('mo_openid_bootstrap_load') == 1)
    488             wp_enqueue_style( 'mo-wp-bootstrap-main',plugins_url('includes/css/bootstrap.min-preview.css', __FILE__), false );
    489 
    490         $gdpr_setting = $app_values['gdpr_setting'];
    491         $spacebetweenicons = $app_values['spacebetweenicons'];
    492         $customWidth = $app_values['customWidth'];
    493         $customHeight = $app_values['customHeight'];
    494         $customBoundary = $app_values['customBoundary'];
    495         $buttonText = $app_values['buttonText'];
    496         $dis = $app_values['dis'];
    497         $customTextofTitle = $app_values['customTextofTitle'];
    498         $customSize = $app_values['customSize'];
    499         $selected_theme = $app_values['selected_theme'];
    500         $html = $app_values['html'];
    501         $view = $app_values['view'];
    502         $customBackground = $app_values['customBackground'];
    503         $customHoverBackground = $app_values['customHoverBackground'];
    504         $customSmartBackground1 = $app_values['customSmartBackground1'];
    505         $customSmartBackground2 = $app_values['customSamrtBackground2'];
    506         $effectStatus = $app_values['effectStatus'];
    507         $app_dis = $app_values['app_dis'];
    508         $customTheme = $app_values['customTheme'];
    509         $customer_register  = $app_values['customer_register'];
    510 
    511         if($select_apps == 'facebook' || $select_apps == 'fb' || $select_apps == 'dribbble' || $select_apps == 'snapchat' || $select_apps == 'discord'){
    512             if($select_apps=='fb')
    513                 $select_apps='facebook';
    514             $custom_app = esc_attr($this->if_custom_app_exists($select_apps));;
    515             $app_dis == "false" ? $app_dis = "disable" : $app_dis = "";
    516         }
    517         else{
    518             $custom_app = esc_attr($this->if_custom_app_exists($select_apps));
    519             $app_dis = $this->check_capp_reg_cust($customer_register, $custom_app);
    520         }
    521 
    522         $html = $this->add_apps($select_apps, $customTheme, $gdpr_setting, $spacebetweenicons, $customWidth, $customHeight, $customBoundary, $buttonText, $dis, $customTextofTitle, $customSize, $selected_theme, $custom_app, $html, $view, $customBackground, $customHoverBackground,$customSmartBackground1,$customSmartBackground2,$effectStatus, $app_dis);
    523         return $html;
    524     }
    525 
    526     public function check_capp_reg_cust($customer_register,$custom_app)
    527     {
    528         if($customer_register=='no' && $custom_app =='false')
    529             return 'disable';
    530     }
    531     //for shortcode
    532     public function add_apps($app_name,$theme,$gdpr_setting,$spacebetweenicons,$customWidth,$customHeight,$customBoundary,$buttonText,$dis,$customTextofTitle,$customSize,$selected_theme,$custom_app,$html,$view,$customBackground,$customHoverBackground,$customSmartBackground1,$customSmartBackground2,$effectStatus,$app_dis)
    533     {
    534         $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','yahoo'=>'#430297','yandex'=>'#2795e9','instagram'=>'#3f729b','linkedin'=>'#007bb6','amazon'=>'#ff9900','paypal'=>'#0d127a','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','trello'=>'#0079bf','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','kakao'=>'#ffe812','livejournal'=>'#3c1361','naver'=>'#3EAF0E','teamsnap'=>'#ff9a1a','slack'=>'#4c154d','gitlab'=>'#30353e','dropbox'=>'#0061ff','mailru'=>'#0000FF');
    535 
    536         if($customWidth!=='auto'||$customWidth=='Auto'||$customWidth=='AUTO')
    537             $customWidth.='px';
    538         if($theme=="default")
    539         {
    540             $a[] = $app_name;
    541             foreach($a as $app){
    542                 $icon = $app;
    543                 if($app == "vkontakte"){
    544                      $icon = "vk";
    545                 }
    546              
    547                 if($app_name=="google")
    548                 {
    549                     if ($selected_theme == 'longbutton') {
    550                         $html .= "<a  rel='nofollow' " . $gdpr_setting . " style='margin-left: " . $spacebetweenicons . "px !important;background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 40px, rgb(79, 113, 232) 5%) !important;width: " . $customWidth . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom: " . ($spacebetweenicons - 5) . "px !important;border-radius: " . $customBoundary . "px !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;'";
    551                         if ($view == "horizontal") {
    552                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-google mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    553                         } else {
    554                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-google mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    555                         }
    556                         if($app_dis!="disable")
    557                             $html .= "onClick=\"moOpenIdLogin('google','" . $custom_app . "');\"";
    558                         $html.="> <img  class='fa'  style='padding-top:" . ($customHeight - 35) . "px !important; margin-top: 0' src='" . plugins_url('includes/images/icons/g.png', __FILE__) . "'>" . $buttonText . " Google</a>";
    559                     } else {
    560                         $html .= "<a class='" . $dis . " login-button ' rel='nofollow' title= ' " . $customTextofTitle . " Google'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('google','" . $custom_app . "');\""; $html.=" title= ' " . $customTextofTitle . "  google'><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:".$default_color['google'].";font-size: " . ($customSize - 16) . "px !important;text-align:center; padding-top: 8px;color:white'  class='fab fa-google  mo_btn-mo mo_openid-login-button login-button mo_btn_".$effectStatus."_i  " . $selected_theme . "' ></i></a>";
    561                     }
    562                     return $html;
    563                 }else{
    564 
    565                     if ($selected_theme == 'longbutton') {
    566                         $html .= "<a rel='nofollow' " . $gdpr_setting . " style='margin-left: " . $spacebetweenicons . "px !important;width: " . $customWidth . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom: " . ($spacebetweenicons - 5) . "px !important;border-radius: " . $customBoundary . "px !important;'";
    567                         if ($view == "horizontal") {
    568                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-".$icon." mo_btn-custom-dec login-button mo_btn_".$effectStatus." '";
    569                         } else {
    570                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-".$icon." mo_btn-custom-dec login-button mo_btn_".$effectStatus."_i  '";
    571                         }
    572                         if($app_dis!="disable")
    573                             $html .= "onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";
    574                         $html .= "> <i  class='fab fa-".$icon."'  style='padding-top:" . ($customHeight - 35) . "px !important; margin-top: 0' src='" . plugins_url('includes/images/icons/'.$app.'.png', __FILE__) . "'></i>" . $buttonText . " ".ucfirst($app)."</a>";
    575                     } else {
    576                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".$app."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\""; $html.=" title= ' " . $customTextofTitle . "  ".$app."'><i style='margin-top:10px;width:" . $customSize . "px !important;height:" . $customSize . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;background:".$default_color[$app].";font-size: " . ($customSize - 16) . "px !important;text-align:center; padding-top: 8px;color:white'  class='fab fa-".$icon."  mo_btn-mo mo_openid-login-button login-button mo_btn_".$effectStatus."_i  " . $selected_theme . "' ></i></a>";
    577                     }
    578                     return $html;
    579                 }
    580             }
    581         }
    582             else if($theme=="custom"){
    583 
    584                 $a[] = $app_name;
    585                 foreach($a as $app){
    586                     $icon = $app;
    587                     if($app == "vkontakte"){
    588                          $icon = "vk";
    589                     }
    590                     if ($selected_theme == 'longbutton') {
    591                         $html .= "<a rel='nofollow'   " . $gdpr_setting . ""; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" style='margin-left: " . $spacebetweenicons . "px !important;width:" . ($customWidth) . " !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;'";
    592                         if ($view == "horizontal") {
    593                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-customtheme mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    594                         } else {
    595                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-customtheme mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    596                         }
    597                         $html .= "> <i style='padding-top:" . ($customHeight - 35) . "px !important' class='fab fa-".$icon."'></i> " . $buttonText . " ".ucfirst($app)."</a>";
    598                     } else {
    599                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".$app."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" ><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='fab mo_btn-mo fa-".$icon." custom-login-button  mo_btn_".$effectStatus."_i  " . $selected_theme . "' ></i></a>";
    600                     }
    601                     return $html;
    602                 }
    603             }
    604             else if($theme=="white"){
    605 
    606                 $a[] = $app_name;
    607                 foreach($a as $app){
    608                     $icon = $app;
    609                     if($app == "vkontakte"){
    610                          $icon = "vk";
    611                     }
    612                  
    613                     if ($selected_theme == 'longbutton') {
    614                         $html .= "<a rel='nofollow'   " . $gdpr_setting . ""; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" style='border-color:#000000;margin-left: " . $spacebetweenicons . "px !important;width:" . ($customWidth) . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom:" . ($spacebetweenicons - 5) . "px !important; border-radius: " . $customBoundary . "px !important;color:#000000;background:#ffffff'";
    615                         if ($view == "horizontal") {
    616                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-".$app."-white mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus."  '";
    617                         } else {
    618                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-".$app."-white mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus." '";
    619                         }
    620                         if ($app_dis != "disable")
    621                             $html .= "onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";
    622                         $html .= "> <i style='color:".$default_color[$app]."; border-right:#ffffff; padding-top:" . ($customHeight - 35) . "px !important;' class='fab fa-".$icon."'></i>" . $buttonText . " ".ucfirst($app)."</a>";
    623                     } else {
    624                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".ucfirst($app)."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\""; $html.=" title= ' " . $customTextofTitle . "  ".$app."'><i style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . "px !important;height:" . ($customSize-8) . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;color:" . $default_color[$app] . " !important;font-size: " . ($customSize - 14) . "px !important;border: 1px solid black;'  class='fab fa-".$icon." mo_btn-mo  mo_btn_".$effectStatus."_i  " . $selected_theme . "' ></i></a>";
    625                     }
    626                     return $html;
    627                 }
    628             }
    629             else if($theme=="hover"){
    630 
    631                 $a[] = $app_name;
    632                 foreach($a as $app){
    633                     $icon = $app;
    634                     if($app == "vkontakte"){
    635                          $icon = "vk";
    636                     }
    637                    
    638                     if ($selected_theme == 'longbutton') {
    639                         $html .= "<a rel='nofollow' " . $gdpr_setting . " style='border-color:#000000; margin-left: " . $spacebetweenicons . "px !important;width: " . $customWidth . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom: " . ($spacebetweenicons - 5) . "px !important;border-radius: " . $customBoundary . "px !important;'";
    640                         if ($view == "horizontal") {
    641                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-".$icon."-hov mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus." '";
    642                         } else {
    643                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-".$icon."-hov mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    644                         }
    645                         $html .= "onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";
    646                         $html .= "> <i style='color: ".$default_color[$app]."; border-right:#ffffff; padding-top:" . ($customHeight - 35) . "px !important' class='fab fa-".$icon."'></i>" . $buttonText ." ".ucfirst($app_name)."</a>";
    647                     } else {
    648                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".ucfirst($app)."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\""; $html.=" title= ' " . $customTextofTitle . " " .ucfirst($app)."'><i style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . "px !important;height:" . ($customSize-8) . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;color:" . $default_color[$app] . ";font-size: " . ($customSize - 14) . "px !important;border: 1px solid black;'  class='fab fa-".$icon." mo_openid_i".$icon."-hov mo_btn_".$effectStatus."_i   " . $selected_theme . "' ></i></a>";
    649                     }
    650                     return $html;
    651                 }
    652             }
    653             else if($theme=="custom_hover"){
    654 
    655                 $a[] = $app_name;
    656                 foreach($a as $app){
    657                     $icon = $app;
    658                     if($app == "vkontakte"){
    659                          $icon = "vk";
    660                     }
    661                    
    662                     if ($selected_theme == 'longbutton') {
    663                         $html .= "<a rel='nofollow'   " . $gdpr_setting . ""; if($app_dis!="disable") $html.=" onMouseOver=\"this.style.color= 'white';this.style.background= '#".$customHoverBackground."';\"
    664         onMouseOut=\"this.style.color= '#".$customHoverBackground."';this.style.background= 'white';\" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" style='background:white; margin-left: " . $spacebetweenicons . "px !important;width:" . ($customWidth) . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom:" . ($spacebetweenicons - 5) . "px !important; color:#" . $customHoverBackground . ";border-color:#" . $customHoverBackground . "!important;border-radius: " . $customBoundary . "px !important;'";
    665                         if ($view == "horizontal") {
    666                             $html .= "class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social  mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus." '";
    667                         } else {
    668                             $html .= "class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    669                         }
    670                         $html .= "> <i style='padding-top:" . ($customHeight - 35) . "px !important' class='fab fa-".$icon."'></i> " . $buttonText . " ".ucfirst($app)."</a>";
    671                     } else {
    672                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".ucfirst($app)."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";
    673                         $html.=" title= ' " . $customTextofTitle . " " .ucfirst($app)."'><i onMouseOver=\"this.style.color= 'white';this.style.background= '#".$customHoverBackground."';\" onMouseOut=\"this.style.color= '#".$customHoverBackground."';this.style.background= 'white';\"  style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . "px !important;height:" . ($customSize-8) . "px !important;margin-left:" . ($spacebetweenicons) . "px !important;color:#" . $customHoverBackground . ";font-size: " . ($customSize - 14) . "px !important;border: 1px solid #" . $customHoverBackground . ";'  class='fab fa-".$icon."  " . $selected_theme . "  mo_btn_".$effectStatus."_i  ' ></i></a>";
    674                     }
    675                     return $html;
    676                 }
    677             }
    678             else if($theme=="smart"){
    679                 $a[] = $app_name;
    680                 foreach($a as $app){
    681                     $icon = $app;
    682                     if($app == "vkontakte"){
    683                          $icon = "vk";
    684                     }
    685                    
    686                     if ($selected_theme == 'longbutton') {
    687                         $html .= "<a rel='nofollow'   " . $gdpr_setting . ""; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" style='color:#ffffff;background:linear-gradient(90deg,#$customSmartBackground1,#$customSmartBackground2);margin-left: " . $spacebetweenicons . "px !important;width:" . ($customWidth) . " !important;padding-top:" . ($customHeight - 29) . "px !important;padding-bottom:" . ($customHeight - 29) . "px !important;margin-bottom:" . ($spacebetweenicons - 5) . "px !important; border-radius: " . $customBoundary . "px !important;'";
    688                         if ($view == "horizontal") {
    689                             $html .= "class='mo_btn_smart mo_btn-mo mo_btn-block-inline mo_btn-social mo_openid_mo_btn-customtheme mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    690                         } else {
    691                             $html .= "class='mo_btn_smart mo_btn-mo mo_btn-block mo_btn-social mo_openid_mo_btn-customtheme mo_openid_mo_btn-custom-dec login-button mo_btn_".$effectStatus."'";
    692                         }
    693                         $html .= "> <i style='padding-top:" . ($customHeight - 35) . "px !important;' class='fab fa-".$icon."'></i> " . $buttonText . " ".ucfirst($app)."</a>";
    694                     } else {
    695                         $html .= "<a class='" . $dis . " login-button' rel='nofollow' title= ' " . $customTextofTitle . " ".ucfirst($app)."'"; if($app_dis!="disable") $html.=" onClick=\"moOpenIdLogin('".$app."','" . $custom_app . "');\"";$html.=" ><i style='margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . "px !important;height:" . ($customSize-8) . "px !important;margin-left:" . ($spacebetweenicons+4) . "px !important; background:linear-gradient(90deg,#$customSmartBackground1,#$customSmartBackground2)!important;font-size: " . ($customSize - 16) . "px !important;color:white'  class='fab mo_btn-mo fa-".$icon." mo_openid_custom-login-button mo_button_smart_i mo_btn_".$effectStatus."_i " . $selected_theme . "' ></i></a>";
    696                     }
    697                     return $html;
    698                 }
    699             }
    700 
    701     }
    702 
    703     private function mo_openid_load_login_script() {
    704         wp_enqueue_script( 'js-cookie-script',plugins_url('includes/js/mo_openid_jquery.cookie.min.js', __FILE__), array('jquery'));
    705         if(!get_option('mo_openid_gdpr_consent_enable')){?>
    706             <script>
    707                 jQuery(".mo_btn-mo").prop("disabled",false);
    708             </script>
    709         <?php }
    710         ?>
    711         <script type="text/javascript">
    712             jQuery(document).ready(function () {
    713                 jQuery(".login-button").css("cursor", "pointer");
    714             });
    715             function mo_openid_on_consent_change(checkbox){
    716                 if (! checkbox.checked) {
    717                     jQuery('#mo_openid_consent_checkbox').val(1);
    718                     jQuery(".mo_btn-mo").attr("disabled", true);
    719                     jQuery(".login-button").addClass("dis");
    720                 } else {
    721                     jQuery('#mo_openid_consent_checkbox').val(0);
    722                     jQuery(".mo_btn-mo").attr("disabled", false);
    723                     jQuery(".login-button").removeClass("dis");
    724                 }
    725             }
    726 
    727             var perfEntries = performance.getEntriesByType("navigation");
    728 
    729             if (perfEntries[0].type === "back_forward") {
    730                 location.reload(true);
    731             }
    732             function HandlePopupResult(result) {
    733                 window.location = "<?php echo mo_openid_get_redirect_url();?>";
    734             }
    735             function moOpenIdLogin(app_name,is_custom_app) {
    736                 var current_url = window.location.href;
    737                 var cookie_name = "redirect_current_url";
    738                 var d = new Date();
    739                 d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
    740                 var expires = "expires="+d.toUTCString();
    741                 document.cookie = cookie_name + "=" + current_url + ";" + expires + ";path=/";
    742 
    743                 <?php
    744                 if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
    745                     $http = "https://";
    746                 } else {
    747                     $http =  "http://";
    748                 }
    749                 ?>
    750                 var base_url = '<?php echo esc_url(site_url());?>';
    751                 var request_uri = '<?php echo $_SERVER['REQUEST_URI'];?>';
    752                 var http = '<?php echo $http;?>';
    753                 var http_host = '<?php echo $_SERVER['HTTP_HOST'];?>';
    754                 var default_nonce = '<?php echo wp_create_nonce( 'mo-openid-get-social-login-nonce' ); ?>';
    755                 var custom_nonce = '<?php echo wp_create_nonce( 'mo-openid-oauth-app-nonce' ); ?>';
    756 
    757                 if(is_custom_app == 'false'){
    758                     if ( request_uri.indexOf('wp-login.php') !=-1){
    759                         var redirect_url = base_url + '/?option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
    760 
    761                     }else {
    762                         var redirect_url = http + http_host + request_uri;
    763                         if(redirect_url.indexOf('?') != -1){
    764                             redirect_url = redirect_url +'&option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
    765                         }
    766                         else
    767                         {
    768                             redirect_url = redirect_url +'?option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
    769                         }
    770                     }
    771                 }
    772                 else {
    773                     if ( request_uri.indexOf('wp-login.php') !=-1){
    774                         var redirect_url = base_url + '/?option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
    775 
    776 
    777                     }else {
    778                         var redirect_url = http + http_host + request_uri;
    779                         if(redirect_url.indexOf('?') != -1)
    780                             redirect_url = redirect_url +'&option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
    781                         else
    782                             redirect_url = redirect_url +'?option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
    783                     }
    784 
    785                 }
    786                 if( <?php echo get_option('mo_openid_popup_window');?>) {
    787                     var myWindow = window.open(redirect_url + app_name, "", "width=700,height=620");
    788                 }
    789                 else{
    790                     window.location.href = redirect_url + app_name;
    791                 }
    792             }
    793         </script>
    794         <?php
    795     }
     221        return $logo;
     222    }
     223
     224    public function if_custom_app_exists( $app_name ) {
     225
     226        if ( get_option( 'mo_openid_apps_list' ) ) {
     227            $appslist = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     228            if ( isset( $appslist[ $app_name ] ) ) {
     229                if ( get_option( 'mo_openid_enable_custom_app_' . $app_name ) ) {
     230                    return 'true';
     231                } else {
     232                    return 'false';
     233                }
     234            } else {
     235                return 'false';
     236            }
     237        }
     238        return 'false';
     239    }
     240
     241    public function openidloginFormShortCode( $atts ) {
     242        global $post;
     243        $html                   = '';
     244        $apps                   = '';
     245        $selected_theme         = isset( $atts['shape'] ) ? esc_attr( $atts['shape'] ) : esc_attr( get_option( 'mo_openid_login_theme' ) );
     246        $selected_apps          = isset( $atts['apps'] ) ? esc_attr( $atts['apps'] ) : '';
     247        $application_pos        = get_option( 'app_pos' );
     248        $appsConfigured         = get_option( 'mo_openid_facebook_enable' ) | get_option( 'mo_openid_google_enable' ) | get_option( 'mo_openid_vkontakte_enable' ) | get_option( 'mo_openid_twitter_enable' ) | get_option( 'mo_openid_linkedin_enable' ) | get_option( 'mo_openid_amazon_enable' ) | get_option( 'mo_openid_salesforce_enable' ) | get_option( 'mo_openid_yahoo_enable' ) | get_option( 'mo_openid_snapchat_enable' ) | get_option( 'mo_openid_dribbble_enable' ) | get_option( 'mo_openid_discord_enable' );
     249        $spacebetweenicons      = isset( $atts['space'] ) ? esc_attr( intval( $atts['space'] ) ) : esc_attr( intval( get_option( 'mo_login_icon_space' ) ) );
     250        $customWidth            = isset( $atts['width'] ) ? esc_attr( intval( $atts['width'] ) ) : esc_attr( intval( get_option( 'mo_login_icon_custom_width' ) ) );
     251        $customHeight           = isset( $atts['height'] ) ? esc_attr( intval( $atts['height'] ) ) : esc_attr( intval( get_option( 'mo_login_icon_custom_height' ) ) );
     252        $customSize             = isset( $atts['size'] ) ? esc_attr( intval( $atts['size'] ) ) : esc_attr( intval( get_option( 'mo_login_icon_custom_size' ) ) );
     253        $customBackground       = isset( $atts['background'] ) ? esc_attr( $atts['background'] ) : esc_attr( get_option( 'mo_login_icon_custom_color' ) );
     254        $customHoverBackground  = isset( $atts['background_hover'] ) ? esc_attr( $atts['background_hover'] ) : esc_attr( get_option( 'mo_login_icon_custom_hover_color' ) );
     255        $customSmartBackground1 = isset( $atts['background_smart1'] ) ? esc_attr( $atts['background_smart1'] ) : esc_attr( get_option( 'mo_login_icon_custom_smart_color1' ) );
     256        $customSmartBackground2 = isset( $atts['background_smart2'] ) ? esc_attr( $atts['background_smart2'] ) : esc_attr( get_option( 'mo_login_icon_custom_smart_color2' ) );
     257        $effectStatus           = isset( $atts['effectStatus'] ) ? esc_attr( $atts['effectStatus'] ) : esc_attr( get_option( 'mo_openid_button_theme_effect' ) );
     258        $customTheme            = isset( $atts['theme'] ) ? esc_attr( $atts['theme'] ) : esc_attr( get_option( 'mo_openid_login_custom_theme' ) );
     259        $buttonText             = esc_html( get_option( 'mo_openid_login_button_customize_text' ) );
     260        $customTextofTitle      = esc_attr( get_option( 'mo_openid_login_button_customize_text' ) );
     261        $logoutUrl              = esc_url( wp_logout_url( site_url() ) );
     262        $customBoundary         = isset( $atts['edge'] ) ? esc_attr( $atts['edge'] ) : esc_attr( get_option( 'mo_login_icon_custom_boundary' ) );
     263        $customLogoutName       = esc_attr( get_option( 'mo_openid_login_widget_customize_logout_name_text' ) );
     264        $customLogoutLink       = get_option( 'mo_openid_login_widget_customize_logout_text' );
     265        $customTextColor        = isset( $atts['color'] ) ? esc_attr( $atts['color'] ) : esc_attr( get_option( 'mo_login_openid_login_widget_customize_textcolor' ) );
     266        $customText             = isset( $atts['heading'] ) ? esc_html( $atts['heading'] ) : esc_html( get_option( 'mo_openid_login_widget_customize_text' ) );
     267        $view                   = isset( $atts['view'] ) ? esc_attr( $atts['view'] ) : '';
     268        $appcnt                 = isset( $atts['appcnt'] ) ? esc_attr( $atts['appcnt'] ) : '';
     269        if ( $selected_theme == 'longbuttonwithtext' ) {
     270            $selected_theme = 'longbutton';
     271        }
     272
     273        if ( $customTheme == 'custombackground' ) {
     274            $customTheme = 'custom';
     275        }
     276
     277        if ( get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     278            $gdpr_setting = "disabled='disabled'";
     279        } else {
     280            $gdpr_setting = '';
     281        }
     282
     283        $url  = esc_url( get_option( 'mo_openid_privacy_policy_url' ) );
     284        $text = esc_html( get_option( 'mo_openid_privacy_policy_text' ) );
     285
     286        if ( ! empty( $text ) && strpos( get_option( 'mo_openid_gdpr_consent_message' ), $text ) ) {
     287            $consent_message = str_replace( get_option( 'mo_openid_privacy_policy_text' ), '<a target="_blank" href="' . $url . '">' . $text . '</a>', get_option( 'mo_openid_gdpr_consent_message' ) );
     288        } elseif ( empty( $text ) ) {
     289            $consent_message = get_option( 'mo_openid_gdpr_consent_message' );
     290        }
     291        if ( get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     292            $dis = 'dis';
     293        } else {
     294            $dis = '';
     295        }
     296        $protocol    = ( ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) || $_SERVER['SERVER_PORT'] == 443 ) ? 'https://' : 'http://';
     297        $sign_up_url = $protocol . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
     298        $mo_URL      = strstr( $sign_up_url, '?', true );
     299        if ( $mo_URL ) {
     300            setcookie( 'mo_openid_signup_url', $mo_URL, time() + ( 86400 * 30 ), '/' );
     301        } else {
     302            setcookie( 'mo_openid_signup_url', $sign_up_url, time() + ( 86400 * 30 ), '/' );}
     303        if ( ! is_user_logged_in() ) {
     304
     305            $values = array(
     306                'appsConfigured'         => $appsConfigured,
     307                'selected_apps'          => $selected_apps,
     308                'application_pos'        => $application_pos,
     309                'customTextColor'        => $customTextColor,
     310                'customText'             => $customText,
     311                'consent_message'        => $consent_message,
     312                'selected_theme'         => $selected_theme,
     313                'view'                   => $view,
     314                'gdpr_setting'           => $gdpr_setting,
     315                'spacebetweenicons'      => $spacebetweenicons,
     316                'customWidth'            => $customWidth,
     317                'customHeight'           => $customHeight,
     318                'customBoundary'         => $customBoundary,
     319                'customHoverBackground'  => $customHoverBackground,
     320                'customSmartBackground1' => $customSmartBackground1,
     321                'customSmartBackground2' => $customSmartBackground2,
     322                'buttonText'             => $buttonText,
     323                'dis'                    => $dis,
     324                'customTextofTitle'      => $customTextofTitle,
     325                'customSize'             => $customSize,
     326                'html'                   => $html,
     327                'customBackground'       => $customBackground,
     328                'customTheme'            => $customTheme,
     329                'effectStatus'           => $effectStatus,
     330                'appcnt'                 => $appcnt,
     331            );
     332            $html   = $this->display_apps( $values );
     333
     334        } else {
     335            global $current_user;
     336            $current_user     = wp_get_current_user();
     337            $customLogoutName = str_replace( '##username##', $current_user->display_name, $customLogoutName );
     338            $flw              = __( $customLogoutLink, 'flw' );
     339            if ( empty( $customLogoutName ) || empty( $customLogoutLink ) ) {
     340                $html .= '<div id="logged_in_user" class="mo_openid_login_wid">' . esc_attr($customLogoutName) . ' <a href=' . esc_url($logoutUrl) . ' title=" ' . esc_attr($flw) . '"> ' . esc_attr($flw) . '</a></div>';
     341            } else {
     342                $html .= '<div id="logged_in_user" class="mo_openid_login_wid">' .esc_attr($customLogoutName) . ' <a href=' . esc_url($logoutUrl) . ' title=" ' . esc_attr($flw) . '"> ' . esc_attr($flw) . '</a></div>';
     343            }
     344        }
     345        return $html;
     346    }
     347
     348    public function display_apps( $values ) {
     349        $appsConfigured         = $values['appsConfigured'];
     350        $selected_apps          = $values['selected_apps'];
     351        $application_pos        = $values['application_pos'];
     352        $customTextColor        = $values['customTextColor'];
     353        $customText             = $values['customText'];
     354        $consent_message        = $values['consent_message'];
     355        $gdpr_setting           = $values['gdpr_setting'];
     356        $spacebetweenicons      = $values['spacebetweenicons'];
     357        $customWidth            = $values['customWidth'];
     358        $customHeight           = $values['customHeight'];
     359        $customBoundary         = $values['customBoundary'];
     360        $buttonText             = $values['buttonText'];
     361        $dis                    = $values['dis'];
     362        $customTextofTitle      = $values['customTextofTitle'];
     363        $customSize             = $values['customSize'];
     364        $selected_theme         = $values['selected_theme'];
     365        $html                   = $values['html'];
     366        $view                   = $values['view'];
     367        $customBackground       = $values['customBackground'];
     368        $customHoverBackground  = $values['customHoverBackground'];
     369        $customSmartBackground1 = $values['customSmartBackground1'];
     370        $customSmartBackground2 = $values['customSmartBackground2'];
     371        $effectStatus           = $values['effectStatus'];
     372        $customTheme            = $values['customTheme'];
     373        $appcnt                 = isset( $values['appcnt'] ) ? $values['appcnt'] : '';
     374        if ( $appsConfigured || $selected_apps != '' ) {
     375
     376            if ( $selected_apps != '' ) {
     377                $apps = explode( ',', $selected_apps );
     378            } else {
     379                $apps = explode( '#', $application_pos );
     380            }
     381
     382            $this->mo_openid_load_login_script();
     383            $html .= "<div class='mo-openid-app-icons'>
     384                     <p style='color:#" . $customTextColor . "; width: fit-content;'> $customText</p>";
     385            if ( get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     386                $html .= '<label class="mo-consent" style="width: 100%"><input type="checkbox" onchange="mo_openid_on_consent_change(this)" value="1" id="mo_openid_consent_checkbox">';
     387                $html .= $consent_message . '</label>';
     388            }
     389            $count = -1;
     390            if ( $selected_apps != '' ) {
     391                if ( mo_openid_is_customer_registered() ) {
     392                    foreach ( $apps as $select_apps ) {
     393                        $app_dis = '';
     394                        if ( $selected_theme == 'longbutton' ) {
     395                            if ( $view == 'horizontal' && isset( $appcnt ) ) {
     396                                $count++;
     397                                if ( '' . $count == '' . $appcnt ) {
     398                                    $html .= '<br/>';
     399                                    $count = 0;
     400                                }
     401                            }
     402                        }
     403                        $app_values = array(
     404                            'gdpr_setting'           => $gdpr_setting,
     405                            'spacebetweenicons'      => $spacebetweenicons,
     406                            'customWidth'            => $customWidth,
     407                            'customHeight'           => $customHeight,
     408                            'customBoundary'         => $customBoundary,
     409                            'buttonText'             => $buttonText,
     410                            'dis'                    => $dis,
     411                            'customTextofTitle'      => $customTextofTitle,
     412                            'customSize'             => $customSize,
     413                            'selected_theme'         => $selected_theme,
     414                            'html'                   => $html,
     415                            'view'                   => $view,
     416                            'customBackground'       => $customBackground,
     417                            'customHoverBackground'  => $customHoverBackground,
     418                            'customSmartBackground1' => $customSmartBackground1,
     419                            'customSamrtBackground2' => $customSmartBackground2,
     420                            'effectStatus'           => $effectStatus,
     421                            'app_dis'                => $app_dis,
     422                            'customTheme'            => $customTheme,
     423                            'customer_register'      => 'yes',
     424                        );
     425                        $html       = $this->select_app( $select_apps, $app_values );
     426                    }
     427                } else {
     428                    foreach ( $apps as $select_apps ) {
     429                        $app_dis = '';
     430                        if ( $selected_theme == 'longbutton' ) {
     431                            if ( $view == 'horizontal' && isset( $appcnt ) ) {
     432                                $count++;
     433                                if ( $count == $appcnt ) {
     434                                    $html .= '<br/>';
     435                                    $count = 0;
     436                                }
     437                            }
     438                        }
     439                        $app_values = array(
     440                            'gdpr_setting'           => $gdpr_setting,
     441                            'spacebetweenicons'      => $spacebetweenicons,
     442                            'customWidth'            => $customWidth,
     443                            'customHeight'           => $customHeight,
     444                            'customBoundary'         => $customBoundary,
     445                            'buttonText'             => $buttonText,
     446                            'dis'                    => $dis,
     447                            'customTextofTitle'      => $customTextofTitle,
     448                            'customSize'             => $customSize,
     449                            'selected_theme'         => $selected_theme,
     450                            'html'                   => $html,
     451                            'view'                   => $view,
     452                            'customBackground'       => $customBackground,
     453                            'customHoverBackground'  => $customHoverBackground,
     454                            'customSmartBackground1' => $customSmartBackground1,
     455                            'customSamrtBackground2' => $customSmartBackground2,
     456                            'effectStatus'           => $effectStatus,
     457                            'app_dis'                => $app_dis,
     458                            'customTheme'            => $customTheme,
     459                            'customer_register'      => 'no',
     460                        );
     461                        $html       = $this->select_app( $select_apps, $app_values );
     462                    }
     463                }
     464            } else {
     465                foreach ( $apps as $select_apps ) {
     466                    if ( get_option( 'mo_openid_' . $select_apps . '_enable' ) ) {
     467                        $app_dis = '';
     468                        if ( $selected_theme == 'longbutton' ) {
     469                            if ( $view == 'horizontal' && isset( $appcnt ) ) {
     470                                $count++;
     471                                if ( $count == $appcnt ) {
     472                                    $html .= '<br/>';
     473                                    $count = 0;
     474                                }
     475                            }
     476                        }
     477                        $app_values = array(
     478                            'gdpr_setting'           => $gdpr_setting,
     479                            'spacebetweenicons'      => $spacebetweenicons,
     480                            'customWidth'            => $customWidth,
     481                            'customHeight'           => $customHeight,
     482                            'customBoundary'         => $customBoundary,
     483                            'buttonText'             => $buttonText,
     484                            'dis'                    => $dis,
     485                            'customTextofTitle'      => $customTextofTitle,
     486                            'customSize'             => $customSize,
     487                            'selected_theme'         => $selected_theme,
     488                            'html'                   => $html,
     489                            'view'                   => $view,
     490                            'customBackground'       => $customBackground,
     491                            'customHoverBackground'  => $customHoverBackground,
     492                            'customSmartBackground1' => $customSmartBackground1,
     493                            'customSamrtBackground2' => $customSmartBackground2,
     494                            'effectStatus'           => $effectStatus,
     495                            'app_dis'                => $app_dis,
     496                            'customTheme'            => $customTheme,
     497                            'customer_register'      => 'yes',
     498                        );
     499                        $html       = $this->select_app( $select_apps, $app_values );
     500                    }
     501                }
     502            }
     503            $html .= '</div> <br>';
     504        } else {
     505            $html .= '<div>No apps configured. Please contact your administrator.</div>';
     506        }
     507        if ( $appsConfigured && get_option( 'moopenid_logo_check' ) == 1 ) {
     508            $logo_html = $this->mo_openid_customize_logo();
     509            $html     .= $logo_html;
     510        }
     511        return $html;
     512    }
     513
     514    public function select_app( $select_apps, $app_values ) {
     515        if ( get_option( 'mo_openid_fonawesome_load' ) == 1 ) {
     516            wp_enqueue_style( 'mo-openid-sl-wp-font-awesome', plugins_url( 'includes/css/mo-font-awesome.min.css', __FILE__ ), false );
     517        }
     518        wp_enqueue_style( 'mo-wp-style-icon', plugins_url( 'includes/css/mo_openid_login_icons.css?version=' . MO_OPENID_SOCIAL_LOGIN_VERSION, __FILE__ ), false );
     519        wp_enqueue_style( 'mo-wp-bootstrap-social', plugins_url( 'includes/css/bootstrap-social.css', __FILE__ ), false );
     520        if ( get_option( 'mo_openid_bootstrap_load' ) == 1 ) {
     521            wp_enqueue_style( 'mo-wp-bootstrap-main', plugins_url( 'includes/css/bootstrap.min-preview.css', __FILE__ ), false );
     522        }
     523
     524        $gdpr_setting           = $app_values['gdpr_setting'];
     525        $spacebetweenicons      = $app_values['spacebetweenicons'];
     526        $customWidth            = $app_values['customWidth'];
     527        $customHeight           = $app_values['customHeight'];
     528        $customBoundary         = $app_values['customBoundary'];
     529        $buttonText             = $app_values['buttonText'];
     530        $dis                    = $app_values['dis'];
     531        $customTextofTitle      = $app_values['customTextofTitle'];
     532        $customSize             = $app_values['customSize'];
     533        $selected_theme         = $app_values['selected_theme'];
     534        $html                   = $app_values['html'];
     535        $view                   = $app_values['view'];
     536        $customBackground       = $app_values['customBackground'];
     537        $customHoverBackground  = $app_values['customHoverBackground'];
     538        $customSmartBackground1 = $app_values['customSmartBackground1'];
     539        $customSmartBackground2 = $app_values['customSamrtBackground2'];
     540        $effectStatus           = $app_values['effectStatus'];
     541        $app_dis                = $app_values['app_dis'];
     542        $customTheme            = $app_values['customTheme'];
     543        $customer_register      = $app_values['customer_register'];
     544
     545        if ( $select_apps == 'facebook' || $select_apps == 'fb' || $select_apps == 'dribbble' || $select_apps == 'snapchat' || $select_apps == 'discord' ) {
     546            if ( $select_apps == 'fb' ) {
     547                $select_apps = 'facebook';
     548            }
     549            $custom_app = $this->if_custom_app_exists( $select_apps );
     550
     551            $app_dis == 'false' ? $app_dis = 'disable' : $app_dis = '';
     552        } else {
     553            $custom_app = $this->if_custom_app_exists( $select_apps );
     554            $app_dis    = $this->check_capp_reg_cust( $customer_register, $custom_app );
     555        }
     556
     557        $html = $this->add_apps( $select_apps, $customTheme, $gdpr_setting, $spacebetweenicons, $customWidth, $customHeight, $customBoundary, $buttonText, $dis, $customTextofTitle, $customSize, $selected_theme, $custom_app, $html, $view, $customBackground, $customHoverBackground, $customSmartBackground1, $customSmartBackground2, $effectStatus, $app_dis );
     558        return $html;
     559    }
     560
     561    public function check_capp_reg_cust( $customer_register, $custom_app ) {
     562        if ( $customer_register == 'no' && $custom_app == 'false' ) {
     563            return 'disable';
     564        }
     565    }
     566    // for shortcode
     567    public function add_apps( $app_name, $theme, $gdpr_setting, $spacebetweenicons, $customWidth, $customHeight, $customBoundary, $buttonText, $dis, $customTextofTitle, $customSize, $selected_theme, $custom_app, $html, $view, $customBackground, $customHoverBackground, $customSmartBackground1, $customSmartBackground2, $effectStatus, $app_dis ) {
     568        $default_color = array(
     569            'facebook'      => '#1877F2',
     570            'google'        => '#DB4437',
     571            'vkontakte'     => '#466482',
     572            'twitter'       => '#2795e9',
     573            'yahoo'         => '#430297',
     574            'yandex'        => '#2795e9',
     575            'linkedin'      => '#007bb6',
     576            'amazon'        => '#ff9900',
     577            'paypal'        => '#0d127a',
     578            'salesforce'    => '#1ab7ea',
     579            'apple'         => '#000000',
     580            'steam'         => '#000000',
     581            'wordpress'     => '#587ea3',
     582            'pinterest'     => '#cb2027',
     583            'spotify'       => '#19bf61',
     584            'tumblr'        => '#2c4762',
     585            'twitch'        => '#720e9e',
     586            'github'        => '#000000',
     587            'dribbble'      => '#ee66aa',
     588            'flickr'        => '#ff0084',
     589            'stackexchange' => '0000ff',
     590            'snapchat'      => '#fffc00',
     591            'reddit'        => '#ff4301',
     592            'odnoklassniki' => '#f97400',
     593            'foursquare'    => '#f94877',
     594            'wechat'        => '#00c300',
     595            'vimeo'         => '#1ab7ea',
     596            'line'          => '#00c300',
     597            'hubspot'       => '#fa7820',
     598            'trello'        => '#0079bf',
     599            'discord'       => '#7289da',
     600            'meetup'        => '#e51937',
     601            'stackexchange' => '#0000FF',
     602            'wiebo'         => '#df2029',
     603            'kakao'         => '#ffe812',
     604            'livejournal'   => '#3c1361',
     605            'naver'         => '#3EAF0E',
     606            'teamsnap'      => '#ff9a1a',
     607            'slack'         => '#4c154d',
     608            'gitlab'        => '#30353e',
     609            'dropbox'       => '#0061ff',
     610            'mailru'        => '#0000FF',
     611        );
     612
     613        if ( $customWidth !== 'auto' || $customWidth == 'Auto' || $customWidth == 'AUTO' ) {
     614            $customWidth .= 'px';
     615        }
     616        if ( $theme == 'default' ) {
     617            $a[] = $app_name;
     618            foreach ( $a as $app ) {
     619                $icon = $app;
     620                if ( $app == 'vkontakte' ) {
     621                     $icon = 'vk';
     622                }
     623
     624                if ( $app_name == 'google' ) {
     625                    if ( $selected_theme == 'longbutton' ) {
     626                        $html .= '<a  ' . $gdpr_setting . " style='margin-left: " . $spacebetweenicons . 'px !important;  width: ' . $customWidth . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;border-color: #4f71e8; padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom: ' . ( $spacebetweenicons - 5 ) . 'px !important;border-radius: ' . $customBoundary . "px !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;'";
     627                        if ( $view == 'horizontal' ) {
     628                            $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-google mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     629                        } else {
     630                            $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-google mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     631                        }
     632                        if ( $app_dis != 'disable' ) {
     633                            $html .= " onClick=\"moOpenIdLogin('google','" . $custom_app . "');\"";
     634                        }
     635                        $html .= "> <img  class='fa'  style='padding-top:" . ( $customHeight - 35 ) . "px !important; margin-top: 0' src='" . plugins_url( 'includes/images/icons/g.png', __FILE__ ) . "'>" . $buttonText . ' Google</a>';
     636                    } else {
     637                        $html .= "<a class='" . $dis . " login-button ' title= ' " . $customTextofTitle . " Google'";
     638                        if ( $app_dis != 'disable' ) {
     639                            $html .= " onClick=\"moOpenIdLogin('google','" . $custom_app . "');\"";
     640                        } $html .= " title= ' " . $customTextofTitle . "  google'><i style='margin-top:10px;width:" . $customSize . 'px !important;height:' . $customSize . 'px !important;margin-left:' . ( $spacebetweenicons ) . 'px !important;background:' . $default_color['google'] . ';font-size: ' . ( $customSize - 16 ) . "px !important;text-align:center; padding-top: 8px;color:white'  class='fab fa-google  mo_btn-mo mo_openid-login-button login-button mo_btn_" . $effectStatus . '_i  ' . $selected_theme . "' ></i></a>";
     641                    }
     642                    return $html;
     643                } else {
     644
     645                    if ( $selected_theme == 'longbutton' ) {
     646                        $html .= '<a  ' . $gdpr_setting . " style='margin-left: " . $spacebetweenicons . 'px !important;width: ' . $customWidth . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom: ' . ( $spacebetweenicons - 5 ) . 'px !important;border-radius: ' . $customBoundary . "px !important;'";
     647                        if ( $view == 'horizontal' ) {
     648                            $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-" . $icon . ' mo_btn-custom-dec login-button mo_btn_' . $effectStatus . " '";
     649                        } else {
     650                            $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-" . $icon . ' mo_btn-custom-dec login-button mo_btn_' . $effectStatus . "_i  '";
     651                        }
     652                        if ( $app_dis != 'disable' ) {
     653                            $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     654                        }
     655                        $html .= "> <i  class='fab fa-" . $icon . "'  style='padding-top:" . ( $customHeight - 35 ) . "px !important; margin-top: 0' src='" . plugins_url( 'includes/images/icons/' . $app . '.png', __FILE__ ) . "'></i>" . $buttonText . ' ' . ucfirst( $app ) . '</a>';
     656                    } else {
     657                        $html .= "<a class='" . $dis . " login-button'  title= ' " . $customTextofTitle . ' ' . $app . "'";
     658                        if ( $app_dis != 'disable' ) {
     659                            $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     660                        } $html .= " title= ' " . $customTextofTitle . '  ' . $app . "'><i style='margin-top:10px;width:" . $customSize . 'px !important;height:' . $customSize . 'px !important;margin-left:' . ( $spacebetweenicons ) . 'px !important;background:' . $default_color[ $app ] . ';font-size: ' . ( $customSize - 16 ) . "px !important;text-align:center; padding-top: 8px;color:white'  class='fab fa-" . $icon . '  mo_btn-mo mo_openid-login-button login-button mo_btn_' . $effectStatus . '_i  ' . $selected_theme . "' ></i></a>";
     661                    }
     662                    return $html;
     663                }
     664            }
     665        } elseif ( $theme == 'custom' ) {
     666
     667            $a[] = $app_name;
     668            foreach ( $a as $app ) {
     669                $icon = $app;
     670                if ( $app == 'vkontakte' ) {
     671                     $icon = 'vk';
     672                }
     673                if ( $selected_theme == 'longbutton' ) {
     674                    $html .= '<a    ' . $gdpr_setting . '';
     675                    if ( $app_dis != 'disable' ) {
     676                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     677                    }$html .= " style='margin-left: " . $spacebetweenicons . 'px !important;width:' . ( $customWidth ) . ' !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;'";
     678                    if ( $view == 'horizontal' ) {
     679                        $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-customtheme mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     680                    } else {
     681                        $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-customtheme mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     682                    }
     683                    $html .= "> <i style='padding-top:" . ( $customHeight - 35 ) . "px !important' class='fab fa-" . $icon . "'></i> " . $buttonText . ' ' . ucfirst( $app ) . '</a>';
     684                } else {
     685                    $html .= "<a class='" . $dis . " login-button' title= ' " . $customTextofTitle . ' ' . $app . "'";
     686                    if ( $app_dis != 'disable' ) {
     687                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     688                    }$html .= " ><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='fab mo_btn-mo fa-" . $icon . ' custom-login-button  mo_btn_' . $effectStatus . '_i  ' . $selected_theme . "' ></i></a>";
     689                }
     690                return $html;
     691            }
     692        } elseif ( $theme == 'white' ) {
     693
     694            $a[] = $app_name;
     695            foreach ( $a as $app ) {
     696                $icon = $app;
     697                if ( $app == 'vkontakte' ) {
     698                     $icon = 'vk';
     699                }
     700                if ( $selected_theme == 'longbutton' ) {
     701                    $html .= '<a  ' . $gdpr_setting . '';
     702                    if ( $app_dis != 'disable' ) {
     703                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     704                    }$html .= " style='border-color:#000000;margin-left: " . $spacebetweenicons . 'px !important;width:' . ( $customWidth ) . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom:' . ( $spacebetweenicons - 5 ) . 'px !important; border-radius: ' . $customBoundary . "px !important;color:#000000;background:#ffffff'";
     705                    if ( $view == 'horizontal' ) {
     706                        $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-" . $app . '-white mo_openid_mo_btn-custom-dec login-button mo_btn_' . $effectStatus . "  '";
     707                    } else {
     708                        $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-" . $app . '-white mo_openid_mo_btn-custom-dec login-button mo_btn_' . $effectStatus . " '";
     709                    }
     710                    if ( $app_dis != 'disable' ) {
     711                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     712                    }
     713                    $html .= "> <i style='color:" . $default_color[ $app ] . '; border-right:#ffffff; padding-top:' . ( $customHeight - 35 ) . "px !important;' class='fab fa-" . $icon . "'></i>" . $buttonText . ' ' . ucfirst( $app ) . '</a>';
     714                } else {
     715                    $html .= "<a class='" . $dis . " login-button' title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'";
     716                    if ( $app_dis != 'disable' ) {
     717                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     718                    } $html .= " title= ' " . $customTextofTitle . '  ' . $app . "'><i style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . 'px !important;height:' . ( $customSize - 8 ) . 'px !important;margin-left:' . ( $spacebetweenicons ) . 'px !important;color:' . $default_color[ $app ] . ' !important;font-size: ' . ( $customSize - 14 ) . "px !important;border: 1px solid black;'  class='fab fa-" . $icon . ' mo_btn-mo  mo_btn_' . $effectStatus . '_i  ' . $selected_theme . "' ></i></a>";
     719                }
     720                return $html;
     721            }
     722        } elseif ( $theme == 'hover' ) {
     723
     724            $a[] = $app_name;
     725            foreach ( $a as $app ) {
     726                $icon = $app;
     727                if ( $app == 'vkontakte' ) {
     728                     $icon = 'vk';
     729                }
     730                if ( $selected_theme == 'longbutton' ) {
     731                    $html .= '<a ' . $gdpr_setting . " style='border-color:#000000; margin-left: " . $spacebetweenicons . 'px !important;width: ' . $customWidth . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom: ' . ( $spacebetweenicons - 5 ) . 'px !important;border-radius: ' . $customBoundary . "px !important;'";
     732                    if ( $view == 'horizontal' ) {
     733                        $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-" . $icon . '-hov mo_openid_mo_btn-custom-dec login-button mo_btn_' . $effectStatus . " '";
     734                    } else {
     735                        $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-" . $icon . '-hov mo_openid_mo_btn-custom-dec login-button mo_btn_' . $effectStatus . "'";
     736                    }
     737                    $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     738                    $html .= "> <i style='color: " . $default_color[ $app ] . '; border-right:#ffffff; padding-top:' . ( $customHeight - 35 ) . "px !important' class='fab fa-" . $icon . "'></i>" . $buttonText . ' ' . ucfirst( $app_name ) . '</a>';
     739                } else {
     740                    $html .= "<a class='" . $dis . " login-button' title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'";
     741                    if ( $app_dis != 'disable' ) {
     742                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     743                    } $html .= " title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'><i style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . 'px !important;height:' . ( $customSize - 8 ) . 'px !important;margin-left:' . ( $spacebetweenicons ) . 'px !important;color:' . $default_color[ $app ] . ';font-size: ' . ( $customSize - 14 ) . "px !important;border: 1px solid black;'  class='fab fa-" . $icon . ' mo_openid_i' . $icon . '-hov mo_btn_' . $effectStatus . '_i   ' . $selected_theme . "' ></i></a>";
     744                }
     745                return $html;
     746            }
     747        } elseif ( $theme == 'custom_hover' ) {
     748
     749            $a[] = $app_name;
     750            foreach ( $a as $app ) {
     751                $icon = $app;
     752                if ( $app == 'vkontakte' ) {
     753                     $icon = 'vk';
     754                }
     755                if ( $selected_theme == 'longbutton' ) {
     756                    $html .= '<a  ' . $gdpr_setting . ''; if ( $app_dis != 'disable' ) {
     757                        $html .= " onMouseOver=\"this.style.color= 'white';this.style.background= '#" . $customHoverBackground . "';\"
     758        onMouseOut=\"this.style.color= '#" . $customHoverBackground . "';this.style.background= 'white';\" onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     759                    }$html .= " style='background:white; margin-left: " . $spacebetweenicons . 'px !important;width:' . ( $customWidth ) . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom:' . ( $spacebetweenicons - 5 ) . 'px !important; color:#' . $customHoverBackground . ';border-color:#' . $customHoverBackground . '!important;border-radius: ' . $customBoundary . "px !important;'";
     760                    if ( $view == 'horizontal' ) {
     761                        $html .= " class='mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social  mo_openid_mo_btn-custom-dec login-button mo_btn_" . $effectStatus . " '";
     762                    } else {
     763                        $html .= " class='mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_openid_mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     764                    }
     765                    $html .= "> <i style='padding-top:" . ( $customHeight - 35 ) . "px !important' class='fab fa-" . $icon . "'></i> " . $buttonText . ' ' . ucfirst( $app ) . '</a>';
     766                } else {
     767                    $html .= "<a class='" . $dis . " login-button' title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'";
     768                    if ( $app_dis != 'disable' ) {
     769                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     770                    }
     771                    $html .= " title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'><i onMouseOver=\"this.style.color= 'white';this.style.background= '#" . $customHoverBackground . "';\" onMouseOut=\"this.style.color= '#" . $customHoverBackground . "';this.style.background= 'white';\"  style='background:white;margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . 'px !important;height:' . ( $customSize - 8 ) . 'px !important;margin-left:' . ( $spacebetweenicons ) . 'px !important;color:#' . $customHoverBackground . ';font-size: ' . ( $customSize - 14 ) . 'px !important;border: 1px solid #' . $customHoverBackground . ";'  class='fab fa-" . $icon . '  ' . $selected_theme . '  mo_btn_' . $effectStatus . "_i  ' ></i></a>";
     772                }
     773                return $html;
     774            }
     775        } elseif ( $theme == 'smart' ) {
     776            $a[] = $app_name;
     777            foreach ( $a as $app ) {
     778                $icon = $app;
     779                if ( $app == 'vkontakte' ) {
     780                     $icon = 'vk';
     781                }
     782                if ( $selected_theme == 'longbutton' ) {
     783                    $html .= '<a ' . $gdpr_setting . '';
     784                    if ( $app_dis != 'disable' ) {
     785                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     786                    }$html .= " style='color:#ffffff;background:linear-gradient(90deg,#$customSmartBackground1,#$customSmartBackground2);margin-left: " . $spacebetweenicons . 'px !important;width:' . ( $customWidth ) . ' !important;padding-top:' . ( $customHeight - 29 ) . 'px !important;padding-bottom:' . ( $customHeight - 29 ) . 'px !important;margin-bottom:' . ( $spacebetweenicons - 5 ) . 'px !important; border-radius: ' . $customBoundary . "px !important;'";
     787                    if ( $view == 'horizontal' ) {
     788                        $html .= " class='mo_btn_smart mo_btn-mo mo_btn-block-inline mo_btn-social mo_openid_mo_btn-customtheme mo_openid_mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     789                    } else {
     790                        $html .= " class='mo_btn_smart mo_btn-mo mo_btn-block mo_btn-social mo_openid_mo_btn-customtheme mo_openid_mo_btn-custom-dec login-button mo_btn_" . $effectStatus . "'";
     791                    }
     792                    $html .= "> <i style='padding-top:" . ( $customHeight - 35 ) . "px !important;' class='fab fa-" . $icon . "'></i> " . $buttonText . ' ' . ucfirst( $app ) . '</a>';
     793                } else {
     794                    $html .= "<a class='" . $dis . " login-button' title= ' " . $customTextofTitle . ' ' . ucfirst( $app ) . "'";
     795                    if ( $app_dis != 'disable' ) {
     796                        $html .= " onClick=\"moOpenIdLogin('" . $app . "','" . $custom_app . "');\"";
     797                    }$html .= " ><i style='margin-top:10px;text-align:center;padding:7px 0px 1px 0px;box-sizing:initial;width:" . $customSize . 'px !important;height:' . ( $customSize - 8 ) . 'px !important;margin-left:' . ( $spacebetweenicons + 4 ) . "px !important; background:linear-gradient(90deg,#$customSmartBackground1,#$customSmartBackground2)!important;font-size: " . ( $customSize - 16 ) . "px !important;color:white'  class='fab mo_btn-mo fa-" . $icon . ' mo_openid_custom-login-button mo_button_smart_i mo_btn_' . $effectStatus . '_i ' . $selected_theme . "' ></i></a>";
     798                }
     799                return $html;
     800            }
     801        }
     802
     803    }
     804
     805    private function mo_openid_load_login_script() {
     806        wp_enqueue_script( 'js-cookie-script', plugins_url( 'includes/js/mo_openid_jquery.cookie.min.js', __FILE__ ), array( 'jquery' ) );
     807        if ( ! get_option( 'mo_openid_gdpr_consent_enable' ) ) {
     808            ?>
     809            <script>
     810                jQuery(".mo_btn-mo").prop("disabled",false);
     811            </script>
     812            <?php
     813        }
     814        ?>
     815        <script type="text/javascript">
     816            jQuery(document).ready(function () {
     817                jQuery(".login-button").css("cursor", "pointer");
     818            });
     819            function mo_openid_on_consent_change(checkbox){
     820                if (! checkbox.checked) {
     821                    jQuery('#mo_openid_consent_checkbox').val(1);
     822                    jQuery(".mo_btn-mo").attr("disabled", true);
     823                    jQuery(".login-button").addClass("dis");
     824                } else {
     825                    jQuery('#mo_openid_consent_checkbox').val(0);
     826                    jQuery(".mo_btn-mo").attr("disabled", false);
     827                    jQuery(".login-button").removeClass("dis");
     828                }
     829            }
     830
     831            var perfEntries = performance.getEntriesByType("navigation");
     832
     833            if (perfEntries[0].type === "back_forward") {
     834                location.reload(true);
     835            }
     836            function HandlePopupResult(result) {
     837                window.location = "<?php echo esc_url( mo_openid_get_redirect_url() ); ?>";
     838            }
     839            function moOpenIdLogin(app_name,is_custom_app) {
     840                var current_url = window.location.href;
     841                var cookie_name = "redirect_current_url";
     842                var d = new Date();
     843                d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
     844                var expires = "expires="+d.toUTCString();
     845                document.cookie = cookie_name + "=" + current_url + ";" + expires + ";path=/";
     846
     847                <?php
     848                if ( isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) {
     849                    $http = 'https://';
     850                } else {
     851                    $http = 'http://';
     852                }
     853                ?>
     854                var base_url = '<?php echo esc_url( site_url() ); ?>';
     855                var request_uri = '<?php echo esc_attr( sanitize_text_field( $_SERVER['REQUEST_URI'] ) ); ?>';
     856                var http = '<?php echo esc_attr( $http ); ?>';
     857                var http_host = '<?php echo esc_attr( sanitize_text_field( $_SERVER['HTTP_HOST'] ) ); ?>';
     858                var default_nonce = '<?php echo esc_attr( wp_create_nonce( 'mo-openid-get-social-login-nonce' ) ); ?>';
     859                var custom_nonce = '<?php echo esc_attr( wp_create_nonce( 'mo-openid-oauth-app-nonce' ) ); ?>';
     860                if(is_custom_app == 'false'){
     861                    if ( request_uri.indexOf('wp-login.php') !=-1){
     862                        var redirect_url = base_url + '/?option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
     863
     864                    }else {
     865                        var redirect_url = http + http_host + request_uri;
     866                        if(redirect_url.indexOf('?') != -1){
     867                            redirect_url = redirect_url +'&option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
     868                        }
     869                        else
     870                        {
     871                            redirect_url = redirect_url +'?option=getmosociallogin&wp_nonce=' + default_nonce + '&app_name=';
     872                        }
     873                    }
     874
     875                }
     876                else {
     877                    if ( request_uri.indexOf('wp-login.php') !=-1){
     878                        var redirect_url = base_url + '/?option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
     879
     880
     881                    }else {
     882                        var redirect_url = http + http_host + request_uri;
     883                        if(redirect_url.indexOf('?') != -1)
     884                            redirect_url = redirect_url +'&option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
     885                        else
     886                            redirect_url = redirect_url +'?option=oauthredirect&wp_nonce=' + custom_nonce + '&app_name=';
     887                    }
     888
     889                }
     890                if( <?php echo esc_attr( get_option( 'mo_openid_popup_window' ) ); ?>) {
     891                    var myWindow = window.open(redirect_url + app_name, "", "width=700,height=620");
     892                }
     893                else{
     894                    window.location.href = redirect_url + app_name;
     895                }
     896            }
     897        </script>
     898        <?php
     899    }
    796900}
    797901
    798902/**
    799903 * Sharing Widget Horizontal
    800  *
    801904 */
    802905class mo_openid_sharing_hor_wid extends WP_Widget {
    803906
    804     public function __construct() {
    805         parent::__construct(
    806             'mo_openid_sharing_hor_wid',
    807             'miniOrange Sharing - Horizontal',
    808             array(
    809                 'description' => __( 'Share using horizontal widget. Lets you share with Social Apps like Google, Facebook, LinkedIn, Pinterest, Reddit.', 'flw' ),
    810                 'customize_selective_refresh' => true,
    811             )
    812         );
    813     }
    814 
    815     public function widget( $args, $instance ) {
    816         extract( $args );
    817 
    818         echo $args['before_widget'];
    819         $this->show_sharing_buttons_horizontal();
    820 
    821         echo $args['after_widget'];
    822     }
    823 
    824     public function update( $new_instance, $old_instance ) {
    825         $instance = array();
    826         $instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
    827         return $instance;
    828     }
    829 
    830     public function show_sharing_buttons_horizontal(){
    831         global $post;
    832         $title = str_replace('+', '%20', urlencode($post->post_title));
    833         $content=strip_shortcodes( strip_tags( get_the_content() ) );
    834         $post_content=$content;
    835         $excerpt = '';
    836         $landscape = 'horizontal';
    837         include( plugin_dir_path( __FILE__ ) . 'class-mo-openid-social-share.php');
    838     }
     907    public function __construct() {
     908        parent::__construct(
     909            'mo_openid_sharing_hor_wid',
     910            'miniOrange Sharing - Horizontal',
     911            array(
     912                'description'                 => __( 'Share using horizontal widget. Lets you share with Social Apps like Google, Facebook, LinkedIn, Pinterest, Reddit.', 'flw' ),
     913                'customize_selective_refresh' => true,
     914            )
     915        );
     916    }
     917
     918    public function widget( $args, $instance ) {
     919        extract( $args );
     920        $allowed_html = array(
     921            'div' => array(
     922                'class' => array(),
     923            ),
     924            'p'   => array( 'style' => array() ),
     925            'a'   => array(
     926                'class'   => array(),
     927                'rel'     => array(),
     928                'style'   => array(),
     929                'onclick' => array(),
     930            ),
     931            'img' => array(
     932                'class' => array(),
     933                'style' => array(),
     934                'src'   => array(),
     935            ),
     936            'i'   => array(
     937                'class' => array(),
     938                'style' => array(),
     939                'src'   => array(),
     940            ),
     941        );
     942
     943        echo wp_kses( $args['before_widget'], $allowed_html );
     944        $this->show_sharing_buttons_horizontal();
     945
     946        echo wp_kses( $args['after_widget'], $allowed_html );
     947    }
     948
     949    public function update( $new_instance, $old_instance ) {
     950        $instance              = array();
     951        $instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
     952        return $instance;
     953    }
     954
     955    public function show_sharing_buttons_horizontal() {
     956        global $post;
     957        $title        = str_replace( '+', '%20', urlencode( $post->post_title ) );
     958        $content      = strip_shortcodes( strip_tags( get_the_content() ) );
     959        $post_content = $content;
     960        $excerpt      = '';
     961        $landscape    = 'horizontal';
     962        include plugin_dir_path( __FILE__ ) . 'class-mo-openid-social-share.php';
     963    }
    839964
    840965}
     
    843968/**
    844969 * Sharing Vertical Widget
    845  *
    846970 */
    847971class mo_openid_sharing_ver_wid extends WP_Widget {
    848972
    849     public function __construct() {
    850         parent::__construct(
    851             'mo_openid_sharing_ver_wid',
    852             'miniOrange Sharing - Vertical',
    853             array(
    854                 'description' => __( 'Share using a vertical floating widget. Lets you share with Social Apps like Google, Facebook, LinkedIn, Pinterest, Reddit.', 'flw' ),
    855                 'customize_selective_refresh' => true,
    856             )
    857         );
    858     }
    859 
    860     public function widget( $args, $instance ) {
    861         extract( $args );
    862         extract( $instance );
    863 
    864         $wid_title = apply_filters( 'widget_title', $instance['wid_title'] );
    865         $alignment = apply_filters( 'alignment', isset($instance['alignment'])? $instance['alignment'] : 'left');
    866         $left_offset = apply_filters( 'left_offset', isset($instance['left_offset'])? $instance['left_offset'] : '20');
    867         $right_offset = apply_filters( 'right_offset', isset($instance['right_offset'])? $instance['right_offset'] : '0');
    868         $top_offset = apply_filters( 'top_offset', isset($instance['top_offset'])? $instance['top_offset'] : '100');
    869         $space_icons = apply_filters( 'space_icons', isset($instance['space_icons'])? $instance['space_icons'] : '10');
    870 
    871         echo $args['before_widget'];
    872         if ( ! empty( $wid_title ) )
    873             echo $args['before_title'] . $wid_title . $args['after_title'];
    874 
    875         echo "<div style='display:inline-block !important; overflow: visible; z-index: 10000000; padding: 10px; border-radius: 4px; opacity: 1; -webkit-box-sizing: content-box!important; -moz-box-sizing: content-box!important; box-sizing: content-box!important; width:40px; position:fixed;" .(isset($alignment) && $alignment != '' && isset($instance[$alignment.'_offset']) ? esc_attr($alignment) .': '. ( $instance[$alignment.'_offset'] == '' ? 0 : esc_attr($instance[$alignment.'_offset'] )) .'px;' : '').(isset($top_offset) ? 'top: '. ( $top_offset == '' ? 0 : esc_attr($top_offset )) .'px;' : '') ."'>";
    876 
    877         $this->show_sharing_buttons_vertical($space_icons);
    878 
    879         echo '</div>';
    880 
    881         echo $args['after_widget'];
    882     }
    883 
    884     /*Called when user changes configuration in Widget Admin Panel*/
    885     public function update( $new_instance, $old_instance ) {
    886         $instance = $old_instance;
    887         $instance['wid_title'] = strip_tags( $new_instance['wid_title'] );
    888         $instance['alignment'] = $new_instance['alignment'];
    889         $instance['left_offset'] = $new_instance['left_offset'];
    890         $instance['right_offset'] = $new_instance['right_offset'];
    891         $instance['top_offset'] = $new_instance['top_offset'];
    892         $instance['space_icons'] = $new_instance['space_icons'];
    893         return $instance;
    894     }
    895 
    896 
    897     public function show_sharing_buttons_vertical($space_icons){
    898         global $post;
    899         if($post->post_title) {
    900             $title = str_replace('+', '%20', urlencode($post->post_title));
    901         } else {
    902             $title = get_bloginfo( 'name' );
    903         }
    904         $content=strip_shortcodes( strip_tags( get_the_content() ) );
    905         $post_content=$content;
    906         $excerpt = '';
    907         $landscape = 'vertical';
    908 
    909         include( plugin_dir_path( __FILE__ ) . 'class-mo-openid-social-share.php');
    910     }
    911 
    912     /** Widget edit form at admin panel */
    913     function form( $instance ) {
    914         /* Set up default widget settings. */
    915         $defaults = array('alignment' => 'left', 'left_offset' => '20', 'right_offset' => '0', 'top_offset' => '100' , 'space_icons' => '10');
    916 
    917         foreach( $instance as $key => $value ){
    918             $instance[ $key ] = esc_attr( $value );
    919         }
    920 
    921         $instance = wp_parse_args( (array)$instance, $defaults );
    922         ?>
    923         <p>
    924             <script>
    925                 function moOpenIDVerticalSharingOffset(alignment){
    926                     if(alignment == 'left'){
    927                         jQuery('.moVerSharingLeftOffset').css('display', 'block');
    928                         jQuery('.moVerSharingRightOffset').css('display', 'none');
    929                     }else{
    930                         jQuery('.moVerSharingLeftOffset').css('display', 'none');
    931                         jQuery('.moVerSharingRightOffset').css('display', 'block');
    932                     }
    933                 }
    934             </script>
    935             <label for="<?php echo esc_attr($this->get_field_id( 'alignment' )); ?>">Alignment</label>
    936             <select onchange="moOpenIDVerticalSharingOffset(this.value)" style="width: 95%" id="<?php echo esc_attr($this->get_field_id( 'alignment' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'alignment' )); ?>">
    937                 <option value="left" <?php echo $instance['alignment'] == 'left' ? 'selected' : ''; ?>>Left</option>
    938                 <option value="right" <?php echo $instance['alignment'] == 'right' ? 'selected' : ''; ?>>Right</option>
    939             </select>
    940         <div class="moVerSharingLeftOffset" <?php echo $instance['alignment'] == 'right' ? 'style="display: none"' : ''; ?>>
    941             <label for="<?php echo esc_attr($this->get_field_id( 'left_offset' )); ?>">Left Offset</label>
    942             <input style="width: 95%" id="<?php echo esc_attr($this->get_field_id( 'left_offset' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'left_offset' )); ?>" type="text" value="<?php echo $instance['left_offset']; ?>" />px<br/>
    943         </div>
    944         <div class="moVerSharingRightOffset" <?php echo $instance['alignment'] == 'left' ? 'style="display: none"' : ''; ?>>
    945             <label for="<?php echo esc_attr($this->get_field_id( 'right_offset' )); ?>">Right Offset</label>
    946             <input style="width: 95%" id="<?php echo esc_attr($this->get_field_id( 'right_offset' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'right_offset' )); ?>" type="text" value="<?php echo $instance['right_offset']; ?>" />px<br/>
    947         </div>
    948         <label for="<?php echo esc_attr($this->get_field_id( 'top_offset' )); ?>">Top Offset</label>
    949         <input style="width: 95%" id="<?php echo esc_attr($this->get_field_id( 'top_offset' )); ?>" name="<?php echo esc_attr( $this->get_field_name( 'top_offset' )); ?>" type="text" value="<?php echo $instance['top_offset']; ?>" />px<br/>
    950         <label for="<?php echo esc_attr($this->get_field_id( 'space_icons' )); ?>">Space between icons</label>
    951         <input style="width: 95%" id="<?php echo esc_attr($this->get_field_id( 'space_icons' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'space_icons' )); ?>" type="text" value="<?php echo $instance['space_icons']; ?>" />px<br/>
    952         </p>
    953         <?php
    954     }
     973    public function __construct() {
     974        parent::__construct(
     975            'mo_openid_sharing_ver_wid',
     976            'miniOrange Sharing - Vertical',
     977            array(
     978                'description'                 => __( 'Share using a vertical floating widget. Lets you share with Social Apps like Google, Facebook, LinkedIn, Pinterest, Reddit.', 'flw' ),
     979                'customize_selective_refresh' => true,
     980            )
     981        );
     982    }
     983
     984    public function widget( $args, $instance ) {
     985        extract( $args );
     986        extract( $instance );
     987
     988        $wid_title    = apply_filters( 'widget_title', $instance['wid_title'] );
     989        $alignment    = apply_filters( 'alignment', isset( $instance['alignment'] ) ? $instance['alignment'] : 'left' );
     990        $left_offset  = apply_filters( 'left_offset', isset( $instance['left_offset'] ) ? $instance['left_offset'] : '20' );
     991        $right_offset = apply_filters( 'right_offset', isset( $instance['right_offset'] ) ? $instance['right_offset'] : '0' );
     992        $top_offset   = apply_filters( 'top_offset', isset( $instance['top_offset'] ) ? $instance['top_offset'] : '100' );
     993        $space_icons  = apply_filters( 'space_icons', isset( $instance['space_icons'] ) ? $instance['space_icons'] : '10' );
     994
     995        echo esc_attr( $args['before_widget'] );
     996        if ( ! empty( $wid_title ) ) {
     997            echo esc_attr( $args['before_title'] . $wid_title . $args['after_title'] );
     998        }
     999
     1000        echo "<div style='display:inline-block !important; overflow: visible; z-index: 10000000; padding: 10px; border-radius: 4px; opacity: 1; -webkit-box-sizing: content-box!important; -moz-box-sizing: content-box!important; box-sizing: content-box!important; width:40px; position:fixed;" . ( isset( $alignment ) && $alignment != '' && isset( $instance[ $alignment . '_offset' ] ) ? esc_attr( $alignment ) . ': ' . ( esc_attr( $instance[ $alignment . '_offset' ] ) == '' ? 0 : esc_attr( $instance[ $alignment . '_offset' ] ) ) . 'px;' : '' ) . ( isset( $top_offset ) ? 'top: ' . ( esc_attr( $top_offset ) == '' ? 0 : esc_attr( $top_offset ) ) . 'px;' : '' ) . "'>";
     1001
     1002        $this->show_sharing_buttons_vertical( $space_icons );
     1003
     1004        echo '</div>';
     1005
     1006        echo esc_attr( $args['after_widget'] );
     1007    }
     1008
     1009    /*Called when user changes configuration in Widget Admin Panel*/
     1010    public function update( $new_instance, $old_instance ) {
     1011        $instance                 = $old_instance;
     1012        $instance['wid_title']    = strip_tags( $new_instance['wid_title'] );
     1013        $instance['alignment']    = $new_instance['alignment'];
     1014        $instance['left_offset']  = $new_instance['left_offset'];
     1015        $instance['right_offset'] = $new_instance['right_offset'];
     1016        $instance['top_offset']   = $new_instance['top_offset'];
     1017        $instance['space_icons']  = $new_instance['space_icons'];
     1018        return $instance;
     1019    }
     1020
     1021
     1022    public function show_sharing_buttons_vertical( $space_icons ) {
     1023        global $post;
     1024        if ( $post->post_title ) {
     1025            $title = str_replace( '+', '%20', urlencode( $post->post_title ) );
     1026        } else {
     1027            $title = get_bloginfo( 'name' );
     1028        }
     1029        $content      = strip_shortcodes( strip_tags( get_the_content() ) );
     1030        $post_content = $content;
     1031        $excerpt      = '';
     1032        $landscape    = 'vertical';
     1033
     1034        include plugin_dir_path( __FILE__ ) . 'class-mo-openid-social-share.php';
     1035    }
     1036
     1037    /** Widget edit form at admin panel */
     1038    function form( $instance ) {
     1039        /* Set up default widget settings. */
     1040        $defaults = array(
     1041            'alignment'    => 'left',
     1042            'left_offset'  => '20',
     1043            'right_offset' => '0',
     1044            'top_offset'   => '100',
     1045            'space_icons'  => '10',
     1046        );
     1047
     1048        foreach ( $instance as $key => $value ) {
     1049            $instance[ $key ] = esc_attr( $value );
     1050        }
     1051
     1052        $instance = wp_parse_args( (array) $instance, $defaults );
     1053        ?>
     1054        <p>
     1055            <script>
     1056                function moOpenIDVerticalSharingOffset(alignment){
     1057                    if(alignment == 'left'){
     1058                        jQuery('.moVerSharingLeftOffset').css('display', 'block');
     1059                        jQuery('.moVerSharingRightOffset').css('display', 'none');
     1060                    }else{
     1061                        jQuery('.moVerSharingLeftOffset').css('display', 'none');
     1062                        jQuery('.moVerSharingRightOffset').css('display', 'block');
     1063                    }
     1064                }
     1065            </script>
     1066            <label for="<?php echo esc_attr( $this->get_field_id( 'alignment' ) ); ?>">Alignment</label>
     1067            <select onchange="moOpenIDVerticalSharingOffset(this.value)" style="width: 95%" id="<?php echo esc_attr( $this->get_field_id( 'alignment' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'alignment' ) ); ?>">
     1068                <option value="left" <?php echo esc_attr( $instance['alignment'] == 'left' ? 'selected' : '' ); ?>>Left</option>
     1069                <option value="right" <?php echo esc_attr( $instance['alignment'] == 'right' ? 'selected' : '' ); ?>>Right</option>
     1070            </select>
     1071        <div class="moVerSharingLeftOffset" <?php echo esc_attr( $instance['alignment'] == 'right' ? 'style="display: none"' : '' ); ?>>
     1072            <label for="<?php echo esc_attr( $this->get_field_id( 'left_offset' ) ); ?>">Left Offset</label>
     1073            <input style="width: 95%" id="<?php echo esc_attr( $this->get_field_id( 'left_offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'left_offset' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['left_offset'] ); ?>" />px<br/>
     1074        </div>
     1075        <div class="moVerSharingRightOffset" <?php echo esc_attr( $instance['alignment'] == 'left' ? 'style="display: none"' : '' ); ?>>
     1076            <label for="<?php echo esc_attr( $this->get_field_id( 'right_offset' ) ); ?>">Right Offset</label>
     1077            <input style="width: 95%" id="<?php echo esc_attr( $this->get_field_id( 'right_offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'right_offset' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['right_offset'] ); ?>" />px<br/>
     1078        </div>
     1079        <label for="<?php echo esc_attr( $this->get_field_id( 'top_offset' ) ); ?>">Top Offset</label>
     1080        <input style="width: 95%" id="<?php echo esc_attr( $this->get_field_id( 'top_offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'top_offset' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['top_offset'] ); ?>" />px<br/>
     1081        <label for="<?php echo esc_attr( $this->get_field_id( 'space_icons' ) ); ?>">Space between icons</label>
     1082        <input style="width: 95%" id="<?php echo esc_attr( $this->get_field_id( 'space_icons' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'space_icons' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['space_icons'] ); ?>" />px<br/>
     1083        </p>
     1084        <?php
     1085    }
    9551086
    9561087}
    9571088
    958 function mo_openid_disabled_register_message()
    959 {
    960     $message = get_option('mo_openid_register_disabled_message') . ' Go to <a href="' . site_url() . '">Home Page</a>';
    961     wp_die($message);
     1089function mo_openid_disabled_register_message() {
     1090    $message = get_option( 'mo_openid_register_disabled_message' ) . ' Go to <a href="' . site_url() . '">Home Page</a>';
     1091    wp_die( esc_attr( $message ) );
    9621092}
    9631093
    9641094function mo_openid_get_redirect_url() {
    965     $current_url = isset($_COOKIE["redirect_current_url"]) ? $_COOKIE["redirect_current_url"]:get_option('siteurl');
    966     $pos = strpos($_SERVER['REQUEST_URI'], '/openidcallback');
    967 
    968     if ($pos === false) {
    969         $url = str_replace('?option=moopenid','',$_SERVER['REQUEST_URI']);
    970         $current_url = str_replace('?option=moopenid','',$current_url);
    971 
    972     } else {
    973         $temp_array1 = explode('/openidcallback',$_SERVER['REQUEST_URI']);
    974         $url = $temp_array1[0];
    975         $temp_array2 = explode('/openidcallback',$current_url);
    976         $current_url = $temp_array2[0];
    977     }
    978 
    979     $option = get_option( 'mo_openid_login_redirect' );
    980     $redirect_url = site_url();
    981 
    982     if( $option == 'same' ) {
    983         if(!is_null($current_url)){
    984             if(strpos($current_url,get_option('siteurl').'/wp-login.php')!== false)
    985             {
    986                 $redirect_url=get_option('siteurl');
    987             }
    988             else
    989                 $redirect_url = $current_url;
    990         }
    991         else{
    992             if(isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
    993                 $http = "https://";
    994             } else {
    995                 $http =  "http://";
    996             }
    997             $redirect_url = urldecode(html_entity_decode(esc_url($http . $_SERVER["HTTP_HOST"] . $url)));
    998             if(html_entity_decode(esc_url(remove_query_arg('ss_message', $redirect_url))) == wp_login_url() || strpos($_SERVER['REQUEST_URI'],'wp-login.php') !== FALSE || strpos($_SERVER['REQUEST_URI'],'wp-admin') !== FALSE){
    999                 $redirect_url = site_url().'/';
    1000             }
    1001         }
    1002     } else if( $option == 'homepage' ) {
    1003         $redirect_url = site_url();
    1004     } else if( $option == 'dashboard' ) {
    1005         $redirect_url = admin_url();
    1006     } else if( $option == 'custom' ) {
    1007         $redirect_url = get_option('mo_openid_login_redirect_url');
    1008     }else if($option == 'relative') {
    1009         $redirect_url =  site_url() . (null !== get_option('mo_openid_relative_login_redirect_url')?get_option('mo_openid_relative_login_redirect_url'):'');
    1010     }
    1011 
    1012     if(strpos($redirect_url,'?') !== FALSE) {
    1013         $redirect_url .= get_option('mo_openid_auto_register_enable') ? '' : '&autoregister=false';
    1014     } else{
    1015         $redirect_url .= get_option('mo_openid_auto_register_enable') ? '' : '?autoregister=false';
    1016     }
    1017     return $redirect_url;
     1095    $current_url = isset( $_COOKIE['redirect_current_url'] ) ? sanitize_text_field( $_COOKIE['redirect_current_url'] ) : get_option( 'siteurl' );
     1096    $pos         = strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), '/openidcallback' );
     1097
     1098    if ( $pos === false ) {
     1099        $url         = str_replace( '?option=moopenid', '', sanitize_text_field( $_SERVER['REQUEST_URI'] ) );
     1100        $current_url = str_replace( '?option=moopenid', '', $current_url );
     1101
     1102    } else {
     1103        $temp_array1 = explode( '/openidcallback', sanitize_text_field( $_SERVER['REQUEST_URI'] ) );
     1104        $url         = $temp_array1[0];
     1105        $temp_array2 = explode( '/openidcallback', $current_url );
     1106        $current_url = $temp_array2[0];
     1107    }
     1108
     1109    $option       = get_option( 'mo_openid_login_redirect' );
     1110    $redirect_url = site_url();
     1111
     1112    if ( $option == 'same' ) {
     1113        if ( ! is_null( $current_url ) ) {
     1114            if ( strpos( $current_url, get_option( 'siteurl' ) . '/wp-login.php' ) !== false ) {
     1115                $redirect_url = get_option( 'siteurl' );
     1116            } else {
     1117                $redirect_url = $current_url;
     1118            }
     1119        } else {
     1120            if ( isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) {
     1121                $http = 'https://';
     1122            } else {
     1123                $http = 'http://';
     1124            }
     1125            $redirect_url = urldecode( html_entity_decode( esc_url( $http . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . $url ) ) );
     1126            if ( html_entity_decode( esc_url( remove_query_arg( 'ss_message', $redirect_url ) ) ) == wp_login_url() || strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), 'wp-login.php' ) !== false || strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), 'wp-admin' ) !== false ) {
     1127                $redirect_url = site_url() . '/';
     1128            }
     1129        }
     1130    } elseif ( $option == 'homepage' ) {
     1131        $redirect_url = site_url();
     1132    } elseif ( $option == 'dashboard' ) {
     1133        $redirect_url = admin_url();
     1134    } elseif ( $option == 'custom' ) {
     1135        $redirect_url = get_option( 'mo_openid_login_redirect_url' );
     1136    } elseif ( $option == 'relative' ) {
     1137        $redirect_url = site_url() . ( null !== get_option( 'mo_openid_relative_login_redirect_url' ) ? get_option( 'mo_openid_relative_login_redirect_url' ) : '' );
     1138    }
     1139
     1140    if ( strpos( $redirect_url, '?' ) !== false ) {
     1141        $redirect_url .= get_option( 'mo_openid_auto_register_enable' ) ? '' : '&autoregister=false';
     1142    } else {
     1143        $redirect_url .= get_option( 'mo_openid_auto_register_enable' ) ? '' : '?autoregister=false';
     1144    }
     1145    return $redirect_url;
    10181146}
    10191147
    1020 function mo_openid_redirect_after_logout($logout_url)
    1021 {
    1022     if (get_option('mo_openid_logout_redirection_enable')) {
    1023         $logout_redirect_option = get_option('mo_openid_logout_redirect');
    1024         $redirect_url = site_url();
    1025         if ($logout_redirect_option == 'homepage') {
    1026             $redirect_url = $logout_url . '&redirect_to=' . home_url();
    1027         } else if ($logout_redirect_option == 'currentpage') {
    1028             if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
    1029                 $http = "https://";
    1030             } else {
    1031                 $http = "http://";
    1032             }
    1033             $redirect_url = $logout_url . '&redirect_to=' . $http . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'];
    1034         } else if ($logout_redirect_option == 'login') {
    1035             $redirect_url = $logout_url . '&redirect_to=' . site_url() . '/wp-admin';
    1036         } else if ($logout_redirect_option == 'custom') {
    1037             $redirect_url = $logout_url . '&redirect_to=' . site_url() . (null !== get_option('mo_openid_logout_redirect_url') ? get_option('mo_openid_logout_redirect_url') : '');
    1038         }
    1039         return $redirect_url;
    1040     } else {
    1041         return $logout_url;
    1042     }
     1148function mo_openid_redirect_after_logout( $logout_url ) {
     1149    if ( get_option( 'mo_openid_logout_redirection_enable' ) ) {
     1150        $logout_redirect_option = get_option( 'mo_openid_logout_redirect' );
     1151        $redirect_url           = site_url();
     1152        if ( $logout_redirect_option == 'homepage' ) {
     1153            $redirect_url = $logout_url . '&redirect_to=' . home_url();
     1154        } elseif ( $logout_redirect_option == 'currentpage' ) {
     1155            if ( isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) {
     1156                $http = 'https://';
     1157            } else {
     1158                $http = 'http://';
     1159            }
     1160            $redirect_url = $logout_url . '&redirect_to=' . $http . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
     1161        } elseif ( $logout_redirect_option == 'login' ) {
     1162            $redirect_url = $logout_url . '&redirect_to=' . site_url() . '/wp-admin';
     1163        } elseif ( $logout_redirect_option == 'custom' ) {
     1164            $redirect_url = $logout_url . '&redirect_to=' . site_url() . ( null !== get_option( 'mo_openid_logout_redirect_url' ) ? get_option( 'mo_openid_logout_redirect_url' ) : '' );
     1165        }
     1166        return $redirect_url;
     1167    } else {
     1168        return $logout_url;
     1169    }
    10431170
    10441171}
    10451172
    1046 function get_valid_user_based_on_mo_token( $token = '', $fields = 'all' ) {
    1047     if ( empty( $token ) ) {
    1048         return false;
    1049     }
    1050 
    1051     $args = array(
    1052         'fields'     => $fields,
    1053         'meta_key'   => 'mo_expire',
    1054         'order'      => 'DESC',
    1055         'orderby'    => 'meta_value',
    1056         'meta_query' => array(
    1057             0 => array(
    1058                 'key'     => 'mo_token',
    1059                 'value'   => sanitize_text_field( $token ),
    1060                 'compare' => '=',
    1061             ),
    1062         ),
    1063     );
    1064 
    1065     $users = new WP_User_Query( $args );
    1066 
    1067     $users_data = $users->get_results();
    1068 
    1069 
    1070     if ( empty( $users_data ) ) {
    1071         return false;
    1072     }
    1073 
    1074 //    foreach ( $users_data as $key => $user ) {
    1075 //        $expire = get_user_meta( $user->ID, '_wtlwp_expire', true );
    1076 //
    1077 //        if ( is_string( $expire ) && strpos( $expire, '_after_access' ) ) {
    1078 //            $expiry_options = get_expiry_options();
    1079 //            $timestamp      = ! empty( $expiry_options[ $expire ] ) ? $expiry_options[ $expire ]['timestamp'] : 0;
    1080 //            $expire         = get_current_gmt_timestamp() + $timestamp;
    1081 //            update_user_meta( $user->ID, '_wtlwp_expire', $expire );
    1082 //        } elseif ( $expire <= get_current_gmt_timestamp() ) {
    1083 //            unset( $users_data[ $key ] );
    1084 //        }
    1085 //    }
    1086 
    1087     return $users_data;
    1088 
     1173function mo_openid_login_validate() {
     1174
     1175    $present_time_rateus_pop = date( 'Y-m-d' );
     1176    if ( get_option( 'check_ten_rate_us' ) < 5 ) {
     1177        if ( get_option( 'mo_openid_user_activation_date' ) < $present_time_rateus_pop ) {
     1178            update_option( 'mo_openid_rateus_activation', '1' );
     1179            update_option( 'check_ten_rate_us', '6' );
     1180        }
     1181    }
     1182
     1183    if ( isset( $_REQUEST['option'] ) and strpos( sanitize_text_field($_REQUEST['option']), 'getmosociallogin' ) !== false ) {  // phpcs:ignore
     1184        if ( isset( $_REQUEST['wp_nonce'] ) ) {
     1185            $nonce = sanitize_text_field( $_REQUEST['wp_nonce'] );
     1186            if ( ! wp_verify_nonce( $nonce, 'mo-openid-get-social-login-nonce' ) ) {
     1187                wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1188            } else {
     1189                mo_openid_initialize_social_login();
     1190            }
     1191        }
     1192    } elseif ( isset( $_POST['mo_openid_go_back_registration_nonce'] ) and isset( $_POST['option'] ) and $_POST['option'] == 'mo_openid_go_back_registration' ) {
     1193        $nonce = sanitize_text_field( $_POST['mo_openid_go_back_registration_nonce'] );
     1194        if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-register-nonce' ) ) {
     1195            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1196        } else {
     1197            update_option( 'mo_openid_verify_customer', 'true' );
     1198        }
     1199    } elseif ( isset( $_POST['mo_openid_custom_form_submitted_nonce'] ) and isset( $_POST['username'] ) and $_POST['option'] == 'mo_openid_custom_form_submitted' ) {
     1200        $nonce = sanitize_text_field( $_POST['mo_openid_custom_form_submitted_nonce'] );
     1201        if ( ! wp_verify_nonce( $nonce, 'mo-openid-custom-form-submitted-nonce' ) ) {
     1202            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1203        } else {
     1204            global $wpdb;
     1205            $curr_user = get_current_user_id();
     1206            if ( $curr_user != 0 ) {
     1207                update_custom_data( $curr_user );
     1208                header( 'Location:' . get_option( 'profile_completion_page' ) );
     1209                exit;
     1210            }
     1211            $user_picture       = sanitize_text_field( $_POST['user_picture'] );
     1212            $user_url           = sanitize_text_field( $_POST['user_url'] );
     1213            $last_name          = sanitize_text_field( $_POST['last_name'] );
     1214            $username           = sanitize_text_field( $_POST['username'] );
     1215            $user_email         = sanitize_text_field( $_POST['user_email'] );
     1216            $random_password    = sanitize_text_field( $_POST['random_password'] );
     1217            $user_full_name     = sanitize_text_field( $_POST['user_full_name'] );
     1218            $first_name         = sanitize_text_field( $_POST['first_name'] );
     1219            $decrypted_app_name = sanitize_text_field( $_POST['decrypted_app_name'] );
     1220            $decrypted_user_id  = sanitize_text_field( $_POST['decrypted_user_id'] );
     1221            $call               = sanitize_text_field( $_POST['call'] );
     1222            $user_profile_url   = sanitize_text_field( $_POST['user_profile_url'] );
     1223            $social_app_name    = sanitize_text_field( $_POST['social_app_name'] );
     1224            $social_user_id     = sanitize_text_field( $_POST['social_user_id'] );
     1225
     1226            $userdata = array(
     1227                'user_login'   => $username,
     1228                'user_email'   => $user_email,
     1229                'user_pass'    => $random_password,
     1230                'display_name' => $user_full_name,
     1231                'first_name'   => $first_name,
     1232                'last_name'    => $last_name,
     1233                'user_url'     => $user_url,
     1234            );
     1235
     1236            // Checking if username already exist
     1237            $user_name_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_login = %s", $userdata['user_login'] ) );
     1238
     1239            if ( isset( $user_name_user_id ) ) {
     1240                $email_array       = explode( '@', $user_email );
     1241                $user_name         = $email_array[0];
     1242                $user_name_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_login = %s", $user_name ) );
     1243                $i                 = 1;
     1244                while ( ! empty( $user_name_user_id ) ) {
     1245                    $uname             = $user_name . '_' . $i;
     1246                    $user_name_user_id = $wpdb->get_var( $wpdb->prepare( 'SELECT ID FROM ' . $wpdb->prefix . 'users where user_login = %s', $uname ) );
     1247                    $i++;
     1248                    if ( empty( $user_name_user_id ) ) {
     1249                        $userdata['user_login'] = $uname;
     1250                        $username               = $uname;
     1251                    }
     1252                }
     1253
     1254                if ( $i == 1 ) {
     1255                    $userdata['user_login'] = $uname;
     1256                }
     1257
     1258                if ( isset( $user_name_user_id ) ) {
     1259                    echo '<br/>' . 'Error Code Existing Username: ' . esc_attr( get_option( 'mo_existing_username_error_message' ) );
     1260                    exit();
     1261                }
     1262            }
     1263
     1264            $user_id = wp_insert_user( $userdata );
     1265            if ( is_wp_error( $user_id ) ) {
     1266                print_r( $user_id );
     1267                wp_die( 'Error Code ' . esc_attr( $call ) . ': ' . esc_attr( get_option( 'mo_registration_error_message' ) ) );
     1268            }
     1269
     1270            update_option( 'mo_openid_user_count', get_option( 'mo_openid_user_count' ) + 1 );
     1271
     1272            if ( $social_app_name != '' ) {
     1273                $appname = $social_app_name;
     1274            } else {
     1275                $appname = $decrypted_app_name;
     1276            }
     1277
     1278            $session_values = array(
     1279                'username'        => $username,
     1280                'user_email'      => $user_email,
     1281                'user_full_name'  => $user_full_name,
     1282                'first_name'      => $first_name,
     1283                'last_name'       => $last_name,
     1284                'user_url'        => $user_url,
     1285                'user_picture'    => $user_picture,
     1286                'social_app_name' => $appname,
     1287                'social_user_id'  => $social_user_id,
     1288            );
     1289
     1290            mo_openid_start_session_login( $session_values );
     1291            $user = get_user_by( 'id', $user_id );
     1292            update_custom_data( $user_id );
     1293            // registration hook
     1294            do_action( 'mo_user_register', $user_id, $user_profile_url );
     1295            mo_openid_link_account( $user->user_login, $user );
     1296            $linked_email_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_social_app = %s AND identifier = %s', $appname, $social_user_id ) );
     1297            mo_openid_login_user( $linked_email_id, $user_id, $user, $user_picture, 0 );
     1298        }
     1299    } elseif ( isset( $_POST['mo_openid_profile_form_submitted_nonce'] ) and isset( $_POST['option'] ) and $_POST['option'] == 'mo_openid_profile_form_submitted' ) {
     1300        $nonce = sanitize_text_field( $_POST['mo_openid_profile_form_submitted_nonce'] );
     1301        if ( ! wp_verify_nonce( $nonce, 'mo-openid-profile-form-submitted-nonce' ) ) {
     1302            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1303        } else {
     1304            $username           = sanitize_text_field( $_POST['username_field'] );
     1305            $user_email         = sanitize_email( $_POST['email_field'] );
     1306            $user_picture       = sanitize_text_field( $_POST['user_picture'] );
     1307            $user_url           = sanitize_text_field( $_POST['user_url'] );
     1308            $last_name          = sanitize_text_field( $_POST['last_name'] );
     1309            $user_full_name     = sanitize_text_field( $_POST['user_full_name'] );
     1310            $first_name         = sanitize_text_field( $_POST['first_name'] );
     1311            $decrypted_app_name = sanitize_text_field( $_POST['decrypted_app_name'] );
     1312            $decrypted_user_id  = sanitize_text_field( $_POST['decrypted_user_id'] );
     1313            mo_openid_save_profile_completion_form( $username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id );
     1314        }
     1315    } elseif ( isset( $_POST['mo_openid_go_back_login_nonce'] ) and isset( $_POST['option'] ) and $_POST['option'] == 'mo_openid_go_back_login' ) {
     1316        $nonce = sanitize_text_field( $_POST['mo_openid_go_back_login_nonce'] );
     1317        if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-login-nonce' ) ) {
     1318            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1319        } else {
     1320            if ( current_user_can( 'administrator' ) ) {
     1321                update_option( 'mo_openid_registration_status', '' );
     1322                delete_option( 'mo_openid_admin_email' );
     1323                delete_option( 'mo_openid_admin_phone' );
     1324                delete_option( 'mo_openid_admin_customer_key' );
     1325                delete_option( 'mo_openid_verify_customer' );
     1326            }
     1327        }
     1328    } elseif ( isset( $_POST['mo_openid_forgot_password_nonce'] ) and isset( $_POST['option'] ) and $_POST['option'] == 'mo_openid_forgot_password' ) {
     1329        $nonce = sanitize_text_field( $_POST['mo_openid_forgot_password_nonce'] );
     1330        if ( ! wp_verify_nonce( $nonce, 'mo-openid-forgot-password-nonce' ) ) {
     1331            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1332        } else {
     1333            if ( current_user_can( 'administrator' ) ) {
     1334                $email = '';
     1335                if ( mo_openid_check_empty_or_null( $email ) ) {
     1336                    if ( mo_openid_check_empty_or_null( sanitize_email( $_POST['email'] ) ) ) {
     1337                        update_option( 'mo_openid_message', 'No email provided. Please enter your email below to reset password.' );
     1338                        mo_openid_show_error_message();
     1339                        if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1340                            update_option( 'pop_login_msg', get_option( 'mo_openid_message' ) );
     1341                            mo_pop_show_verify_password_page();
     1342                        }
     1343                        return;
     1344                    } else {
     1345                        $email = sanitize_email( $_POST['email'] );
     1346                    }
     1347                }
     1348                $customer = new CustomerOpenID();
     1349                $content  = json_decode( $customer->forgot_password( $email ), true );
     1350                if ( strcasecmp( $content['status'], 'SUCCESS' ) == 0 ) {
     1351                    update_option( 'mo_openid_message', 'You password has been reset successfully. Please enter the new password sent to your registered mail here.' );
     1352                    mo_openid_show_success_message();
     1353                    if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1354                        update_option( 'pop_login_msg', get_option( 'mo_openid_message' ) );
     1355                        mo_pop_show_verify_password_page();
     1356                    }
     1357                } else {
     1358                    update_option( 'mo_openid_message', 'An error occurred while processing your request. Please make sure you are registered in miniOrange with the <b>' . $content['email'] . '</b> email address. ' );
     1359                    mo_openid_show_error_message();
     1360                    if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1361                        update_option( 'pop_login_msg', get_option( 'mo_openid_message' ) );
     1362                        mo_pop_show_verify_password_page();
     1363                    }
     1364                }
     1365            }
     1366        }
     1367    } elseif ( isset( $_POST['mo_openid_connect_register_nonce'] ) and isset( $_POST['option'] ) and sanitize_text_field( $_POST['option'] ) == 'mo_openid_connect_register_customer' ) {  // register the admin to miniOrange
     1368        $nonce = sanitize_text_field( $_POST['mo_openid_connect_register_nonce'] );
     1369        if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
     1370            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1371        } else {
     1372            mo_openid_register_user();
     1373        }
     1374    } elseif ( isset( $_POST['show_login'] ) ) {
     1375        mo_pop_show_verify_password_page();
     1376    } elseif ( isset( $_POST['mo_openid_account_linking_nonce'] ) and isset( $_POST['option'] ) and strpos( sanitize_text_field( $_POST['option'] ), 'mo_openid_account_linking' ) !== false ) {
     1377        $nonce = sanitize_text_field( $_POST['mo_openid_account_linking_nonce'] );
     1378        if ( ! wp_verify_nonce( $nonce, 'mo-openid-account-linking-nonce' ) ) {
     1379            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1380        } else {
     1381            mo_openid_start_session();
     1382            // link account
     1383            if ( ! isset( $_POST['mo_openid_create_new_account'] ) ) {
     1384                $nonce = wp_create_nonce( 'mo-openid-disable-social-login-nonce' );
     1385                $url   = site_url() . '/wp-login.php?option=disable-social-login&wp_nonce=' . $nonce;
     1386                header( 'Location:' . $url );
     1387                exit;
     1388            } //create new account
     1389            else {
     1390                $user_details = array(
     1391                    'username'        => sanitize_text_field( $_POST['username'] ),
     1392                    'user_email'      => sanitize_email( $_POST['user_email'] ),
     1393                    'user_full_name'  => sanitize_text_field( $_POST['user_full_name'] ),
     1394                    'first_name'      => sanitize_text_field( $_POST['first_name'] ),
     1395                    'last_name'       => sanitize_text_field( $_POST['last_name'] ),
     1396                    'user_url'        => sanitize_text_field( $_POST['user_url'] ),
     1397                    'user_picture'    => sanitize_text_field( $_POST['user_picture'] ),
     1398                    'social_app_name' => sanitize_text_field( $_POST['decrypted_app_name'] ),
     1399                    'social_user_id'  => sanitize_text_field( $_POST['decrypted_user_id'] ),
     1400                );
     1401                if ( get_option( 'mo_openid_enable_profile_completion' ) && ( $user_details['user_email'] == '' || $user_details['username'] == '' ) ) { // if newa user and profile completion is enabled
     1402                    echo esc_attr( mo_openid_profile_completion_form( $user_details ) );
     1403                    exit;
     1404                } else {
     1405                    mo_create_new_user( $user_details );
     1406                }
     1407            }
     1408        }
     1409    } elseif ( isset( $_POST['mo_openid_show_profile_form_nonce'] ) and isset( $_POST['option'] ) and strpos( sanitize_text_field( $_POST['option'] ), 'mo_openid_show_profile_form' ) !== false ) {
     1410        $nonce = sanitize_text_field( $_POST['mo_openid_show_profile_form_nonce'] );
     1411        if ( ! wp_verify_nonce( $nonce, 'mo-openid-user-show-profile-form-nonce' ) ) {
     1412            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1413        } else {
     1414
     1415            $user_details = array(
     1416                'username'        => sanitize_text_field( $_POST['username_field'] ),
     1417                'user_email'      => sanitize_email( $_POST['email_field'] ),
     1418                'user_full_name'  => sanitize_text_field( $_POST['user_full_name'] ),
     1419                'first_name'      => sanitize_text_field( $_POST['first_name'] ),
     1420                'last_name'       => sanitize_text_field( $_POST['last_name'] ),
     1421                'user_url'        => sanitize_text_field( $_POST['user_url'] ),
     1422                'user_picture'    => sanitize_text_field( $_POST['user_picture'] ),
     1423                'social_app_name' => sanitize_text_field( $_POST['decrypted_app_name'] ),
     1424                'social_user_id'  => sanitize_text_field( $_POST['decrypted_user_id'] ),
     1425            );
     1426            echo esc_attr( mo_openid_profile_completion_form( $user_details, '1' ) );
     1427            exit;
     1428        }
     1429    } elseif ( ( isset( $_POST['action'] ) ) && ( strpos( sanitize_text_field( $_POST['action'] ), 'delete_social_profile_data' ) !== false ) && isset( $_POST['user_id'] ) ) {
     1430        // delete first name, last name, user_url and profile_url from usermeta
     1431        $id = sanitize_text_field( $_POST['user_id'] );
     1432        mo_openid_delete_social_profile( $id );
     1433    } elseif ( isset( $_REQUEST['option'] ) and strpos( sanitize_text_field( $_REQUEST['option'] ), 'oauthredirect' ) !== false ) {
     1434        if ( isset( $_REQUEST['wp_nonce'] ) ) {
     1435            $nonce = sanitize_text_field( $_REQUEST['wp_nonce'] );
     1436            if ( ! wp_verify_nonce( $nonce, 'mo-openid-oauth-app-nonce' ) ) {
     1437                wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1438            } else {
     1439                $appname = sanitize_text_field( $_REQUEST['app_name'] );
     1440                mo_openid_custom_app_oauth_redirect( $appname );
     1441            }
     1442        }
     1443    } elseif ( isset( $_POST['mo_openid_user_otp_validation_nonce'] ) and isset( $_POST['otp_field'] ) and $_POST['option'] == 'mo_openid_otp_validation' ) {
     1444        $nonce = sanitize_text_field( $_POST['mo_openid_user_otp_validation_nonce'] );
     1445        if ( ! wp_verify_nonce( $nonce, 'mo-openid-user-otp-validation-nonce' ) ) {
     1446            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1447        } else {
     1448            $username           = sanitize_text_field( $_POST['username_field'] );
     1449            $user_email         = sanitize_email( $_POST['email_field'] );
     1450            $transaction_id     = sanitize_text_field( $_POST['transaction_id'] );
     1451            $otp_token          = sanitize_text_field( $_POST['otp_field'] );
     1452            $user_picture       = sanitize_text_field( $_POST['user_picture'] );
     1453            $user_url           = sanitize_text_field( $_POST['user_url'] );
     1454            $last_name          = sanitize_text_field( $_POST['last_name'] );
     1455            $user_full_name     = sanitize_text_field( $_POST['user_full_name'] );
     1456            $first_name         = sanitize_text_field( $_POST['first_name'] );
     1457            $decrypted_app_name = sanitize_text_field( $_POST['decrypted_app_name'] );
     1458            $decrypted_user_id  = sanitize_text_field( $_POST['decrypted_user_id'] );
     1459            if ( isset( $_POST['resend_otp'] ) ) {
     1460                $send_content = send_otp_token( $user_email );
     1461                if ( $send_content['status'] == 'FAILURE' ) {
     1462                    $message = 'Error Code 3: ' . get_option( 'mo_email_failure_message' );
     1463                    wp_die( esc_attr( $message ) );
     1464                }
     1465                $transaction_id = $send_content['tId'];
     1466                $allowed_html   = array(
     1467                    'style' => array(),
     1468                    'head'  => array(),
     1469                    'meta'  => array(
     1470                        'name'    => array(),
     1471                        'content' => array(),
     1472                    ),
     1473                    'link'  => array(
     1474                        'rel'   => array(),
     1475                        'href'  => array(),
     1476                        'type'  => array(),
     1477                        'media' => array(),
     1478                    ),
     1479                    'body'  => array( 'class' => array() ),
     1480                    'div'   => array(
     1481                        'style' => array(),
     1482                        'class' => array(),
     1483                        'id'    => array(),
     1484                    ),
     1485                    'form'  => array(
     1486                        'name'   => array(),
     1487                        'method' => array(),
     1488                        'action' => array(),
     1489                    ),
     1490                    'span'  => array(
     1491                        'style' => array(),
     1492                        'class' => array(),
     1493                        'align' => array(),
     1494                    ),
     1495                    'p'     => array(),
     1496                    'br'    => array(),
     1497                    'label' => array( 'for' => array() ),
     1498                    'input' => array(
     1499                        'type'  => array(),
     1500                        'class' => array(),
     1501                        'name'  => array(),
     1502                        'size'  => array(),
     1503                        'value' => array(),
     1504                    ),
     1505                );
     1506                echo wp_kses( mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id ), $allowed_html );
     1507
     1508                exit;
     1509            }
     1510            mo_openid_social_login_validate_otp( $username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id, $otp_token, $transaction_id );
     1511        }
     1512    } elseif ( isset( $_POST['mo_openid_connect_verify_nonce'] ) and isset( $_POST['option'] ) and sanitize_text_field( $_POST['option'] ) == 'mo_openid_connect_verify_customer' ) {    // register the admin to miniOrange
     1513        $nonce = sanitize_text_field( $_POST['mo_openid_connect_verify_nonce'] );
     1514        if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-verify-nonce' ) ) {
     1515            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1516        } else {
     1517            mo_register_old_user();
     1518        }
     1519    } elseif ( isset( $_REQUEST['option'] ) and strpos( sanitize_text_field( $_REQUEST['option'] ), 'moopenid' ) !== false ) {
     1520        mo_openid_process_social_login();
     1521    } elseif ( strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), 'openidcallback' ) !== false || ( ( strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), 'oauth_token' ) !== false ) && ( strpos( sanitize_text_field( $_SERVER['REQUEST_URI'] ), 'oauth_verifier' ) ) ) ) {
     1522        mo_openid_process_custom_app_callback();
     1523    }
    10891524}
    10901525
    1091 function get_expiry_options() {
    1092 
    1093     $expiry_options = array(
    1094         'hour'                 => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'One Hour', 'temporary-login-without-password' ), 'timestamp' => HOUR_IN_SECONDS, 'order' => 5 ),
    1095         'min'                 => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'One Hour', 'temporary-login-without-password' ), 'timestamp' => MINUTE_IN_SECONDS, 'order' => 6 ),
    1096         '3_hours'              => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'Three Hours', 'temporary-login-without-password' ), 'timestamp' => HOUR_IN_SECONDS * 3, 'order' => 10 ),
    1097         'day'                  => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'One Day', 'temporary-login-without-password' ), 'timestamp' => DAY_IN_SECONDS, 'order' => 15 ),
    1098         '3_days'               => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'Three Days', 'temporary-login-without-password' ), 'timestamp' => DAY_IN_SECONDS * 3, 'order' => 20 ),
    1099         'week'                 => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'One Week', 'temporary-login-without-password' ), 'timestamp' => WEEK_IN_SECONDS, 'order' => 25 ),
    1100         'month'                => array( 'group' => 'from_now', 'group_name' => __( 'From Now', 'temporary-login-without-password' ), 'label' => __( 'One Month', 'temporary-login-without-password' ), 'timestamp' => MONTH_IN_SECONDS, 'order' => 30 ),
    1101         'hour_after_access'    => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'One Hour', 'temporary-login-without-password' ), 'expiry_label' => __( '1 hour after access', 'temporary-login-without-password' ), 'timestamp' => HOUR_IN_SECONDS, 'order' => 6 ),
    1102         '3_hours_after_access' => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'Three Hours', 'temporary-login-without-password' ), 'expiry_label' => __( '3 hours after access', 'temporary-login-without-password' ), 'timestamp' => HOUR_IN_SECONDS * 3, 'order' => 11 ),
    1103         'day_after_access'     => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'One Day', 'temporary-login-without-password' ), 'expiry_label' => __( '1 day after access', 'temporary-login-without-password' ), 'timestamp' => DAY_IN_SECONDS, 'order' => 16 ),
    1104         '3_days_after_access'  => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'Three Days', 'temporary-login-without-password' ), 'expiry_label' => __( '3 days after access', 'temporary-login-without-password' ), 'timestamp' => DAY_IN_SECONDS * 3, 'order' => 21 ),
    1105         'week_after_access'    => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'One Week', 'temporary-login-without-password' ), 'expiry_label' => __( '1 week after access', 'temporary-login-without-password' ), 'timestamp' => WEEK_IN_SECONDS, 'order' => 26 ),
    1106         'month_after_access'   => array( 'group' => 'after_access', 'group_name' => __( 'After Access', 'temporary-login-without-password' ), 'label' => __( 'One Month', 'temporary-login-without-password' ), 'expiry_label' => __( '1 month after access', 'temporary-login-without-password' ), 'timestamp' => MONTH_IN_SECONDS, 'order' => 31 ),
    1107         'custom_date'          => array( 'group' => 'custom', 'group_name' => __( 'Custom', 'temporary-login-without-password' ), 'label' => __( 'Custom Date', 'temporary-login-without-password' ), 'timestamp' => 0, 'order' => 35 ),
    1108     );
    1109 
    1110     // Now, one can add their own options.
    1111     $expiry_options = apply_filters( 'tlwp_expiry_options', $expiry_options );
    1112 
    1113     // Get Order options to sort $expiry_options array by it's array
    1114     foreach ( $expiry_options as $key => $options ) {
    1115         $expiry_options[ $key ]['order']        = ! empty( $options['order'] ) ? $options['order'] : 100;
    1116         $expiry_options[ $key ]['group']        = ! empty( $options['group'] ) ? $options['group'] : __( 'from_now', '' );
    1117         $expiry_options[ $key ]['group_name']  = ! empty( $options['group_name'] ) ? $options['group_name'] : __( 'From Now', '' );
    1118         $expiry_options[ $key ]['expiry_label'] = ! empty( $options['expiry_label'] ) ? $options['expiry_label'] : '';
    1119 
    1120         $orders[ $key ] = ! empty( $options['order'] ) ? $options['order'] : 100;
    1121     }
    1122 
    1123     // Sort $expiry_options array by it's order value
    1124     array_multisort( $orders, SORT_ASC, $expiry_options );
    1125 
    1126     return $expiry_options;
     1526function get_current_customer($password) {
     1527    $customer    = new CustomerOpenID();
     1528    $content     = $customer->get_customer_key($password);
     1529    $customerKey = json_decode( $content, true );
     1530    if ( isset( $customerKey ) ) {
     1531        update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
     1532        update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
     1533        update_option( 'mo_openid_customer_token', $customerKey['token'] );
     1534        update_option( 'mo_openid_message', 'Your account has been retrieved successfully.' );
     1535        delete_option( 'mo_openid_verify_customer' );
     1536        delete_option( 'mo_openid_new_registration' );
     1537        if ( isset( $_POST['action'] ) ? sanitize_text_field($_POST['action']) == 'mo_register_new_user' : 0 ) { // phpcs:ignore
     1538            wp_send_json( array( 'success' => 'Your account has been retrieved successfully.' ) );
     1539        } else {
     1540            mo_openid_show_success_message();
     1541        }
     1542    } else {
     1543        update_option( 'mo_openid_message', 'You already have an account with miniOrange. Please enter a valid password.' );
     1544        update_option( 'mo_openid_verify_customer', 'true' );
     1545        delete_option( 'mo_openid_new_registration' );
     1546        if ( isset( $_POST['action'] ) ? $_POST['action'] == 'mo_register_new_user' : 0 ) { // phpcs:ignore
     1547            wp_send_json( array( 'error' => 'You already have an account with miniOrange. Please enter a valid password.' ) );
     1548        } else {
     1549            mo_openid_show_error_message();
     1550            if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1551                update_option( 'pop_login_msg', get_option( 'mo_openid_message' ) );
     1552                mo_pop_show_verify_password_page();
     1553            }
     1554        }
     1555    }
    11271556}
    11281557
    1129 function get_current_gmt_timestamp() {
    1130     return strtotime( gmdate( 'Y-m-d H:i:s', time() ) );
     1558function encrypt_data( $data, $key ) {
     1559    return base64_encode( openssl_encrypt( $data, 'aes-128-ecb', $key, OPENSSL_RAW_DATA ) );
    11311560
    11321561}
    11331562
    1134 function get_user_expire_time( $expiry_option = 'day', $date = '' ) {
    1135 
    1136     $expiry_options = get_expiry_options();
    1137 
    1138     $expiry_option = in_array( $expiry_option, array_keys( $expiry_options ) ) ? $expiry_option : 'day';
    1139 
    1140     if ( 'custom_date' === $expiry_option ) {
    1141 
    1142         // For the custom_date option we need to simply expire login at particular date
    1143         // So, we don't need to do addition in the current timestamp
    1144         $current_timestamp = 0;
    1145         $timestamp         = strtotime( $date );
    1146     } elseif ( strpos( $expiry_option, '_after_access' ) > 0 ) {
    1147         return $expiry_option;
    1148     } else {
    1149 
    1150         // We need current gmt timestamp and from now we need to expire temporary login
    1151         // after specified time. So, we need to add into current timestamp
    1152         $current_timestamp = get_current_gmt_timestamp();
    1153         $timestamp         = $expiry_options[ $expiry_option ]['timestamp'];
    1154     }
    1155 
    1156     return $current_timestamp + floatval( $timestamp );
    1157 
     1563function mo_openid_update_role( $user_id = '', $user_url = '' ) {
     1564    // save the profile url in user meta // this was added to save facebook url in user meta as it is more than 100 chars
     1565    update_user_meta( $user_id, 'moopenid_user_profile_url', $user_url );
     1566    if ( get_option( 'mo_openid_customised_field_enable' ) != 1 || get_option( 'mo_openid_update_role_addon' ) != 1 ) {
     1567        if ( get_option( 'mo_openid_login_role_mapping' ) ) {
     1568            $user = get_user_by( 'ID', $user_id );
     1569            $user->set_role( get_option( 'mo_openid_login_role_mapping' ) );
     1570        }
     1571    }
    11581572}
    11591573
    1160 function is_login_expired( $user_id = 0 ) {
    1161 
    1162     if ( empty( $user_id ) ) {
    1163         $user_id = get_current_user_id();
    1164     }
    1165 
    1166     if ( empty( $user_id ) ) {
    1167         return false;
    1168     }
    1169 
    1170     $expire = get_user_meta( $user_id, 'mo_expire', true );
    1171 
    1172     return ! empty( $expire ) && is_numeric( $expire ) && get_current_gmt_timestamp() >= floatval( $expire ) ? true : false;
    1173 
     1574
     1575
     1576function mo_openid_login_redirect( $username = '', $user = null ) {
     1577    mo_openid_start_session();
     1578    if ( is_string( $username ) && $username && is_object( $user ) && ! empty( $user->ID ) && ( $user_id = $user->ID ) && isset( $_SESSION['mo_login'] ) && $_SESSION['mo_login'] ) {
     1579        $_SESSION['mo_login'] = false;
     1580        wp_set_auth_cookie( $user_id, true );
     1581        $redirect_url = mo_openid_get_redirect_url();
     1582        wp_safe_redirect( $redirect_url );
     1583        exit;
     1584    }
    11741585}
    11751586
    1176 function is_valid_temporary_login( $user_id = 0, $check_expiry = true ) {
    1177 
    1178     if ( empty( $user_id ) ) {
    1179         return false;
    1180     }
    1181 
    1182     $check = get_user_meta( $user_id, 'mo_user', true );
    1183 
    1184     if ( ! empty( $check ) && $check_expiry ) {
    1185         $check = ! ( is_login_expired( $user_id ) );
    1186     }
    1187 
    1188     return ! empty( $check ) ? true : false;
    1189 
     1587function mo_openid_login_redirect_pop_up( $username = '', $user = null ) {
     1588
     1589    mo_openid_start_session();
     1590    if ( is_string( $username ) && $username && is_object( $user ) && ! empty( $user->ID ) && ( $user_id = $user->ID ) && isset( $_SESSION['mo_login'] ) && $_SESSION['mo_login'] ) {
     1591        $_SESSION['mo_login'] = false;
     1592        wp_set_auth_cookie( $user_id, true );
     1593    }
     1594    ?>
     1595    <script>
     1596        window.opener.HandlePopupResult("true");
     1597        window.close();
     1598
     1599    </script>
     1600    <?php
     1601
     1602    if ( get_option( 'account_linking_flow' ) ) {
     1603        update_option( 'account_linking_flow', 0 );
     1604        exit;
     1605    }
     1606    if ( empty( $_REQUEST['redirect_to'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
     1607        exit;
     1608    }
    11901609}
    11911610
    1192 function mf_remove_menu_pages() {
    1193     remove_submenu_page('users.php' , 'user-new.php' );
     1611
     1612function mo_openid_link_account( $username, $user ) {
     1613    if ( $user ) {
     1614        $userid = $user->ID;
     1615    }
     1616    mo_openid_start_session();
     1617
     1618    $user_email            = isset( $_SESSION['user_email'] ) ? sanitize_text_field( $_SESSION['user_email'] ) : '';
     1619    $social_app_identifier = isset( $_SESSION['social_user_id'] ) ? sanitize_text_field( $_SESSION['social_user_id'] ) : '';
     1620    $social_app_name       = isset( $_SESSION['social_app_name'] ) ? sanitize_text_field( $_SESSION['social_app_name'] ) : '';
     1621    if ( empty( $user_email ) ) {
     1622        $user_email = $user->user_email;
     1623    }
     1624    // if user is coming through default WordPress login, do not proceed further and return
     1625    if ( isset( $userid ) && empty( $social_app_identifier ) && empty( $social_app_name ) ) {
     1626        return;
     1627    } elseif ( ! isset( $userid ) ) {
     1628        return;
     1629    }
     1630
     1631    global $wpdb;
     1632    $linked_email_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_email = %s AND linked_social_app = %s', $user_email, $social_app_name ) );
     1633
     1634    // if a user with given email and social app name doesn't already exist in the mo_openid_linked_user table
     1635    if ( ! isset( $linked_email_id ) ) {
     1636        mo_openid_insert_query( $social_app_name, $user_email, $userid, $social_app_identifier );
     1637    }
    11941638}
    11951639
    1196 function init_wtlwp() {
    1197     $i = get_current_user_id();
    1198     $temp_user = get_user_meta($i, 'temporary_url', true);
    1199     if ($temp_user) {
    1200         add_action('admin_menu', 'mf_remove_menu_pages');
    1201     }
    1202     if ($GLOBALS['pagenow'] === 'users.php') {
    1203         if ($temp_user) {
    1204             echo "
    1205     <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js'></script>
    1206     <script type='text/javascript'>
    1207 
    1208         jQuery(window).on('load',function () {
    1209         document.getElementsByClassName('page-title-action')[0].remove();
    1210         });      </script>";
    1211         }
    1212     }
    1213 
    1214     if ( ! empty( $_GET['mo_token'] ) ) {
    1215 
    1216         $wtlwp_token = sanitize_key( $_GET['mo_token'] );  // Input var okay.
    1217         $users       = get_valid_user_based_on_mo_token( $wtlwp_token );
    1218 
    1219         $temporary_user = '';
    1220         if ( ! empty( $users ) ) {
    1221             $temporary_user = $users[0];
    1222         }
    1223 
    1224         if ( ! empty( $temporary_user ) ) {
    1225 
    1226             $temporary_user_id = $temporary_user->ID;
    1227             $do_login          = true;
    1228             if ( is_user_logged_in() ) {
    1229                 $current_user_id = get_current_user_id();
    1230                 if ( $temporary_user_id !== $current_user_id ) {
    1231                     wp_logout();
    1232                 } else {
    1233                     $do_login = false;
    1234                 }
    1235             }
    1236 
    1237             if ( $do_login ) {
    1238                 if ( ! empty( $temporary_user_id)) {
    1239                     if (is_login_expired($temporary_user_id)) {
    1240                         wp_logout();
    1241                         wp_delete_user( $temporary_user_id);
    1242                         wp_safe_redirect(home_url());
    1243                         exit();
    1244                     }
    1245                 }
    1246                 $temporary_user_login = $temporary_user->login;
    1247                 update_user_meta( $temporary_user_id, 'mo_last_login', get_current_gmt_timestamp() ); // phpcs:ignore
    1248                 wp_set_current_user( $temporary_user_id, $temporary_user_login );
    1249                 wp_set_auth_cookie( $temporary_user_id );
    1250 
    1251                 // Set login count
    1252                 $login_count_key = 'mo_login_count';
    1253                 $login_count     = get_user_meta( $temporary_user_id, $login_count_key, true );
    1254 
    1255                 // If we already have a count, increment by 1
    1256                 if ( ! empty( $login_count ) ) {
    1257                     $login_count ++;
    1258                 } else {
    1259                     $login_count = 1;
    1260                 }
    1261 
    1262                 update_user_meta( $temporary_user_id, $login_count_key, $login_count );
    1263                 do_action( 'wp_login', $temporary_user_login, $temporary_user );
    1264             }
    1265 
    1266             $request_uri = $_SERVER['REQUEST_URI'];
    1267             $request_uri = '';
    1268             //var_dump($request_uri);
    1269 
    1270             $redirect_to_url = apply_filters( 'tlwp_login_redirect', apply_filters( 'login_redirect', network_site_url( remove_query_arg( 'mo_token', $request_uri ) ), false, $temporary_user ), $temporary_user );
    1271             //var_dump($redirect_to_url);exit();
    1272         } else {
    1273             // Temporary user not found?? Redirect to home page.
    1274             $redirect_to_url = home_url();
    1275         }
    1276 
    1277         wp_safe_redirect( $redirect_to_url ); // Redirect to given url after successful login.
    1278         exit();
    1279     } else {
    1280         return 1;
    1281     }
    1282 
     1640
     1641function mo_openid_delete_profile_column( $value, $columnName, $userId ) {
     1642    if ( 'mo_openid_delete_profile_data' == $columnName ) {
     1643        global $wpdb;
     1644        $socialUser = $wpdb->get_var( $wpdb->prepare( 'SELECT id FROM ' . $wpdb->prefix . 'mo_openid_linked_user WHERE user_id = %d ', $userId ) );
     1645
     1646        if ( $socialUser > 0 && ! get_user_meta( $userId, 'mo_openid_data_deleted' ) ) {
     1647            return '<a href="javascript:void(0)" onclick="javascript:moOpenidDeleteSocialProfile(this, ' . $userId . ')">Delete</a>';
     1648        } else {
     1649            return '<p>NA</p>';
     1650        }
     1651    }
     1652    if ( 'mo_openid_linked_social_app' == $columnName ) {
     1653        global $wpdb;
     1654        $socialUser = $wpdb->get_var( $wpdb->prepare( 'SELECT id FROM ' . $wpdb->prefix . 'mo_openid_linked_user WHERE user_id = %d ', $userId ) );
     1655        $a          = $wpdb->get_col( $wpdb->prepare( 'SELECT all linked_social_app FROM ' . $wpdb->prefix . 'mo_openid_linked_user where user_id= %d', $userId ) );
     1656        $b          = '';
     1657        foreach ( $a as $x => $y ) {
     1658            if ( $y == 'facebook' ) {
     1659                $y = 'Facebook';
     1660            }if ( $y == 'google' ) {
     1661                $y = 'Google';
     1662            }if ( $y == 'linkedin' ) {
     1663                $y = 'LinkedIn';
     1664            }if ( $y == 'amazon' ) {
     1665                $y = 'Amazon';}
     1666            if ( $y == 'pinterest' ) {
     1667                $y = 'Pinterest';
     1668            }if ( $y == 'twitch' ) {
     1669                $y = 'Twitch';
     1670            } if ( $y == 'vkontakte' ) {
     1671                $y = 'vKontakte';
     1672            } if ( $y == 'twitter' ) {
     1673                $y = 'Twitter';
     1674            }if ( $y == 'salesforce' ) {
     1675                $y = 'Salesforce';
     1676            }if ( $y == 'yahoo' ) {
     1677                $y = 'Yahoo';
     1678            }if ( $y == 'yahoo' ) {
     1679                $y = 'Yahoo';
     1680            }if ( $y == 'WordPress' ) {
     1681                $y = 'WordPress';
     1682            }if ( $y == 'disqus' ) {
     1683                $y = 'Disqus';}
     1684
     1685            $b = $b . ' ' . $y . '<br>';
     1686        }
     1687        if ( $socialUser > 0 ) {
     1688            return $b;
     1689        }
     1690    }
    12831691}
    1284 
    1285 function mo_openid_login_validate(){
    1286 
    1287 
    1288     $present_time_rateus_pop = date('Y-m-d');
    1289     if(get_option('check_ten_rate_us') < 5 ){
    1290         if(get_option('mo_openid_user_activation_date') < $present_time_rateus_pop){
    1291             update_option('mo_openid_rateus_activation','1');
    1292             update_option('check_ten_rate_us','6');
    1293         }
    1294     }
    1295 
    1296     if ( isset( $_REQUEST['option'] ) and strpos( $_REQUEST['option'], 'getmosociallogin' ) !== false ) {
    1297         if (isset($_REQUEST['wp_nonce'])) {
    1298             $nonce = sanitize_text_field($_REQUEST['wp_nonce']);
    1299             if (!wp_verify_nonce($nonce, 'mo-openid-get-social-login-nonce')) {
    1300                 wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1301             } else {
    1302                 mo_openid_initialize_social_login();
    1303             }
    1304         }
    1305     }
    1306     else if( isset($_POST['mo_openid_go_back_registration_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_go_back_registration" ){
    1307         $nonce = sanitize_text_field($_POST['mo_openid_go_back_registration_nonce']);
    1308         if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-register-nonce' ) ) {
    1309             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1310         } else {
    1311             update_option('mo_openid_verify_customer','true');
    1312         }
    1313     }
    1314     else if ( isset($_POST['mo_openid_custom_form_submitted_nonce']) and isset($_POST['username']) and $_POST['option'] == 'mo_openid_custom_form_submitted' ){
    1315         $nonce = sanitize_text_field($_POST['mo_openid_custom_form_submitted_nonce']);
    1316         if ( ! wp_verify_nonce( $nonce, 'mo-openid-custom-form-submitted-nonce' ) ) {
    1317             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1318         } else {
    1319             global $wpdb;
    1320             $db_prefix = $wpdb->prefix;
    1321             $curr_user=get_current_user_id();
    1322             if($curr_user!=0) {
    1323                 update_custom_data($curr_user);
    1324                 header("Location:".get_option('profile_completion_page'));
    1325                 exit;
    1326             }
    1327             $user_picture = sanitize_text_field($_POST["user_picture"]);
    1328             $user_url = sanitize_text_field($_POST["user_url"]);
    1329             $last_name = sanitize_text_field($_POST["last_name"]);
    1330             $username=sanitize_text_field($_POST["username"]);
    1331             $user_email=sanitize_text_field($_POST["user_email"]);
    1332             $random_password=sanitize_text_field($_POST["random_password"]);
    1333             $user_full_name = sanitize_text_field($_POST["user_full_name"]);
    1334             $first_name = sanitize_text_field($_POST["first_name"]);
    1335             $decrypted_app_name = sanitize_text_field($_POST["decrypted_app_name"]);
    1336             $decrypted_user_id = sanitize_text_field($_POST["decrypted_user_id"]);
    1337             $call = sanitize_text_field($_POST["call"]);
    1338             $user_profile_url = sanitize_text_field($_POST["user_profile_url"]);
    1339             $social_app_name = sanitize_text_field($_POST["social_app_name"]);
    1340             $social_user_id = sanitize_text_field($_POST["social_user_id"]);
    1341 
    1342             $userdata = array(
    1343                 'user_login'  => $username,
    1344                 'user_email'    => $user_email,
    1345                 'user_pass'   =>  $random_password,
    1346                 'display_name' => $user_full_name,
    1347                 'first_name' => $first_name,
    1348                 'last_name' => $last_name,
    1349                 'user_url' => $user_url,
    1350             );
    1351 
    1352             // Checking if username already exist
    1353             $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $userdata['user_login']));
    1354 
    1355             if( isset($user_name_user_id) ){
    1356                 $email_array = explode('@', $user_email);
    1357                 $user_name = $email_array[0];
    1358                 $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $user_name));
    1359                 $i = 1;
    1360                 while(!empty($user_name_user_id) ){
    1361                     $uname=$user_name.'_' . $i;
    1362                     $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
    1363                     $i++;
    1364                     if(empty($user_name_user_id)){
    1365                         $userdata['user_login']= $uname;
    1366                         $username =$uname;
    1367                     }
    1368                 }
    1369 
    1370                 if($i==1)
    1371                     $userdata['user_login'] = $uname;
    1372 
    1373                 if( isset($user_name_user_id) ){
    1374                     echo '<br/>'."Error Code Existing Username: ".get_option('mo_existing_username_error_message');
    1375                     exit();
    1376                 }
    1377             }
    1378 
    1379             $user_id   = wp_insert_user( $userdata);
    1380             if(is_wp_error( $user_id )) {
    1381                 print_r($user_id);
    1382                 wp_die("Error Code ".$call.": ".get_option('mo_registration_error_message'));
    1383             }
    1384 
    1385             update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
    1386 
    1387             if($social_app_name!="")
    1388                 $appname=$social_app_name;
    1389             else
    1390                 $appname=$decrypted_app_name;
    1391 
    1392             $session_values= array(
    1393                 'username' => $username,
    1394                 'user_email' => $user_email,
    1395                 'user_full_name' => $user_full_name,
    1396                 'first_name' => $first_name,
    1397                 'last_name' => $last_name,
    1398                 'user_url' => $user_url,
    1399                 'user_picture' => $user_picture,
    1400                 'social_app_name' => $appname,
    1401                 'social_user_id' => $social_user_id,
    1402             );
    1403 
    1404             mo_openid_start_session_login($session_values);
    1405             $user   = get_user_by('id', $user_id );
    1406             update_custom_data($user_id);
    1407             //registration hook
    1408             do_action( 'mo_user_register', $user_id,$user_profile_url);
    1409             mo_openid_link_account($user->user_login, $user);
    1410             $linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
    1411             mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,0);
    1412         }
    1413     }
    1414 
    1415     else if(isset($_POST['mo_openid_profile_form_submitted_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_profile_form_submitted"){
    1416         $nonce = sanitize_text_field($_POST['mo_openid_profile_form_submitted_nonce']);
    1417         if ( ! wp_verify_nonce( $nonce, 'mo-openid-profile-form-submitted-nonce' ) ) {
    1418             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1419         } else {
    1420             $username = sanitize_text_field($_POST['username_field']);
    1421             $user_email = sanitize_email($_POST['email_field']);
    1422             $user_picture = sanitize_text_field($_POST["user_picture"]);
    1423             $user_url = sanitize_text_field($_POST["user_url"]);
    1424             $last_name = sanitize_text_field($_POST["last_name"]);
    1425             $user_full_name = sanitize_text_field($_POST["user_full_name"]);
    1426             $first_name = sanitize_text_field($_POST["first_name"]);
    1427             $decrypted_app_name = sanitize_text_field($_POST["decrypted_app_name"]);
    1428             $decrypted_user_id = sanitize_text_field($_POST["decrypted_user_id"]);
    1429             mo_openid_save_profile_completion_form($username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id);
    1430         }
    1431     }
    1432     else if( isset($_POST['mo_openid_go_back_login_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_go_back_login" ){
    1433         $nonce = sanitize_text_field($_POST['mo_openid_go_back_login_nonce']);
    1434         if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-login-nonce' ) ) {
    1435             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1436         } else {
    1437             update_option('mo_openid_registration_status','');
    1438             delete_option('mo_openid_admin_email');
    1439             delete_option('mo_openid_admin_phone');
    1440             delete_option('mo_openid_admin_password');
    1441             delete_option('mo_openid_admin_customer_key');
    1442             delete_option('mo_openid_verify_customer');
    1443         }
    1444     }
    1445     else if(isset($_POST['mo_openid_forgot_password_nonce']) and isset($_POST['option']) and $_POST['option'] == 'mo_openid_forgot_password'){
    1446         $nonce = sanitize_text_field($_POST['mo_openid_forgot_password_nonce']);
    1447         if ( ! wp_verify_nonce( $nonce, 'mo-openid-forgot-password-nonce' ) ) {
    1448             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1449         } else {
    1450             $email ='';
    1451             if( mo_openid_check_empty_or_null( $email ) ) {
    1452                 if( mo_openid_check_empty_or_null( $_POST['email'] ) ) {
    1453                     update_option( 'mo_openid_message', 'No email provided. Please enter your email below to reset password.');
    1454                     mo_openid_show_error_message();
    1455                     if(get_option('regi_pop_up') =="yes"){
    1456                         update_option("pop_login_msg",get_option("mo_openid_message"));
    1457                         mo_pop_show_verify_password_page();
    1458                     }
    1459                     return;
    1460                 } else {
    1461                     $email = sanitize_email($_POST['email']);
    1462                 }
    1463             }
    1464             $customer = new CustomerOpenID();
    1465             $content = json_decode($customer->forgot_password($email),true);
    1466             if(strcasecmp($content['status'], 'SUCCESS') == 0){
    1467                 update_option( 'mo_openid_message','You password has been reset successfully. Please enter the new password sent to your registered mail here.');
    1468                 mo_openid_show_success_message();
    1469                 if(get_option('regi_pop_up') =="yes"){
    1470                     update_option("pop_login_msg",get_option("mo_openid_message"));
    1471                     mo_pop_show_verify_password_page();
    1472                 }
    1473             }else{
    1474                 update_option( 'mo_openid_message','An error occurred while processing your request. Please make sure you are registered in miniOrange with the <b>'. $content['email'] .'</b> email address. ');
    1475                 mo_openid_show_error_message();
    1476                 if(get_option('regi_pop_up') =="yes"){
    1477                     update_option("pop_login_msg",get_option("mo_openid_message"));
    1478                     mo_pop_show_verify_password_page();
    1479                 }
    1480             }
    1481         }
    1482     }
    1483     else if( isset($_POST['mo_openid_connect_register_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_register_customer" ) {  //register the admin to miniOrange
    1484         $nonce = sanitize_text_field($_POST['mo_openid_connect_register_nonce']);
    1485         if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
    1486             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1487         } else {
    1488             mo_openid_register_user();
    1489         }
    1490     }
    1491     else if( isset( $_POST['show_login'] ) )
    1492     {
    1493         mo_pop_show_verify_password_page();
    1494     }
    1495     else if( isset($_POST['mo_openid_account_linking_nonce']) and isset($_POST['option'] ) and strpos( $_POST['option'], 'mo_openid_account_linking' ) !== false ){
    1496         $nonce = sanitize_text_field($_POST['mo_openid_account_linking_nonce']);
    1497         if ( ! wp_verify_nonce( $nonce, 'mo-openid-account-linking-nonce' ) ) {
    1498             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1499         } else {
    1500             mo_openid_start_session();
    1501             //link account
    1502             if (!isset($_POST['mo_openid_create_new_account'])) {
    1503                 $nonce = wp_create_nonce('mo-openid-disable-social-login-nonce');
    1504                 $url = site_url() . '/wp-login.php?option=disable-social-login&wp_nonce=' . $nonce;
    1505                 header('Location:' . $url);
    1506                 exit;
    1507             } //create new account
    1508             else {
    1509                 $user_details = array(
    1510                     'username' => sanitize_text_field($_POST['username']),
    1511                     'user_email' => sanitize_email($_POST['user_email']),
    1512                     'user_full_name' => sanitize_text_field($_POST['user_full_name']),
    1513                     'first_name' => sanitize_text_field($_POST['first_name']),
    1514                     'last_name' => sanitize_text_field($_POST['last_name']),
    1515                     'user_url' => sanitize_text_field($_POST['user_url']),
    1516                     'user_picture' => sanitize_text_field($_POST['user_picture']),
    1517                     'social_app_name' => sanitize_text_field($_POST['decrypted_app_name']),
    1518                     'social_user_id' => sanitize_text_field($_POST['decrypted_user_id']),
    1519                 );
    1520                 if (get_option('mo_openid_enable_profile_completion') && ($user_details['user_email'] == '' || $user_details['username'] == '')) { // if newa user and profile completion is enabled
    1521                     echo mo_openid_profile_completion_form($user_details);
    1522                     exit;
    1523                 }
    1524                 else
    1525                     mo_create_new_user($user_details);
    1526             }
    1527         }
    1528     }
    1529     else if( isset($_POST['mo_openid_show_profile_form_nonce']) and isset( $_POST['option'] ) and strpos( $_POST['option'], 'mo_openid_show_profile_form' ) !== false ){
    1530     $nonce = sanitize_text_field($_POST['mo_openid_show_profile_form_nonce']);
    1531     if ( ! wp_verify_nonce( $nonce, 'mo-openid-user-show-profile-form-nonce' ) ) {
    1532         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1533     } else {
    1534 
    1535        $user_details= array(
    1536             'username' => sanitize_text_field($_POST['username_field']),
    1537             'user_email' => sanitize_email($_POST['email_field']),
    1538             'user_full_name' => sanitize_text_field($_POST["user_full_name"]),
    1539             'first_name' => sanitize_text_field($_POST["first_name"]),
    1540             'last_name' => sanitize_text_field($_POST["last_name"]),
    1541             'user_url' => sanitize_text_field($_POST["user_url"]),
    1542             'user_picture' => sanitize_text_field($_POST["user_picture"]),
    1543             'social_app_name' => sanitize_text_field($_POST["decrypted_app_name"]),
    1544             'social_user_id' => sanitize_text_field($_POST["decrypted_user_id"]),
    1545         );
    1546         echo mo_openid_profile_completion_form($user_details,'1');
    1547         exit;
    1548     }
    1549 }
    1550 
    1551     else if((isset($_POST['action'])) && (strpos($_POST['action'], 'delete_social_profile_data') !== false) && isset($_POST['user_id'])){
    1552         // delete first name, last name, user_url and profile_url from usermeta
    1553         $id = sanitize_text_field($_POST['user_id']);
    1554         mo_openid_delete_social_profile($id);
    1555     }
    1556     else if ( isset( $_REQUEST['option'] ) and strpos( $_REQUEST['option'], 'oauthredirect' ) !== false ) {
    1557         if(isset($_REQUEST['wp_nonce'])){
    1558             $nonce = sanitize_text_field($_REQUEST['wp_nonce']);
    1559             if ( ! wp_verify_nonce( $nonce, 'mo-openid-oauth-app-nonce' ) ) {
    1560                 wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1561             }
    1562             else {
    1563                 $appname = sanitize_text_field($_REQUEST['app_name']);
    1564                 mo_openid_custom_app_oauth_redirect($appname);
    1565             }
    1566         }
    1567     }
    1568 
    1569     else if( isset($_POST['mo_openid_user_otp_validation_nonce']) and isset( $_POST['otp_field']) and $_POST['option'] == 'mo_openid_otp_validation' )
    1570     {
    1571         $nonce = sanitize_text_field($_POST['mo_openid_user_otp_validation_nonce']);
    1572         if ( ! wp_verify_nonce( $nonce, 'mo-openid-user-otp-validation-nonce' ) ) {
    1573             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1574         } else {
    1575             $username = sanitize_text_field($_POST["username_field"]);
    1576             $user_email = sanitize_email($_POST["email_field"]);
    1577             $transaction_id = sanitize_text_field($_POST["transaction_id"]);
    1578             $otp_token = sanitize_text_field($_POST['otp_field']);
    1579             $user_picture = sanitize_text_field($_POST["user_picture"]);
    1580             $user_url = sanitize_text_field($_POST["user_url"]);
    1581             $last_name = sanitize_text_field($_POST["last_name"]);
    1582             $user_full_name = sanitize_text_field($_POST["user_full_name"]);
    1583             $first_name = sanitize_text_field($_POST["first_name"]);
    1584             $decrypted_app_name = sanitize_text_field($_POST["decrypted_app_name"]);
    1585             $decrypted_user_id = sanitize_text_field($_POST["decrypted_user_id"]);
    1586             if (isset($_POST['resend_otp'])) {
    1587                 $send_content = send_otp_token($user_email);
    1588                 if ($send_content['status'] == 'FAILURE') {
    1589                     $message = "Error Code 3: " . get_option('mo_email_failure_message');
    1590                     wp_die($message);
    1591                 }
    1592                 $transaction_id = $send_content['tId'];
    1593                 echo mo_openid_validate_otp_form($username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id);
    1594 
    1595                 exit;
    1596             }
    1597 
    1598             mo_openid_social_login_validate_otp($username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id, $otp_token, $transaction_id);
    1599         }
    1600     }
    1601 
    1602     else if( isset($_POST['mo_openid_connect_verify_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_verify_customer" ) {    //register the admin to miniOrange
    1603         $nonce = sanitize_text_field($_POST['mo_openid_connect_verify_nonce']);
    1604         if (!wp_verify_nonce($nonce, 'mo-openid-connect-verify-nonce')) {
    1605             wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1606         }
    1607         else {
    1608             mo_register_old_user();
    1609         }
    1610     }
    1611 
    1612     else if ( isset( $_REQUEST['option'] ) and strpos( $_REQUEST['option'], 'moopenid' ) !== false ){
    1613         mo_openid_process_social_login();
    1614     }
    1615 
    1616     else if( strpos( $_SERVER['REQUEST_URI'], "openidcallback") !== false ||((strpos( $_SERVER['REQUEST_URI'], "oauth_token")!== false)&&(strpos( $_SERVER['REQUEST_URI'], "oauth_verifier") ))) {
    1617         mo_openid_process_custom_app_callback();
    1618     }
    1619 }
    1620 
    1621 function get_current_customer(){
    1622     $customer = new CustomerOpenID();
    1623     $content = $customer->get_customer_key();
    1624     $customerKey = json_decode( $content, true );
    1625     if( isset($customerKey) ) {
    1626         update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
    1627         update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
    1628         update_option( 'mo_openid_customer_token', $customerKey['token'] );
    1629         update_option('mo_openid_admin_password', '' );
    1630         update_option( 'mo_openid_message', 'Your account has been retrieved successfully.' );
    1631         delete_option('mo_openid_verify_customer');
    1632         delete_option('mo_openid_new_registration');
    1633         if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
    1634             wp_send_json(["success" => 'Your account has been retrieved successfully.']);
    1635         else
    1636             mo_openid_show_success_message();
    1637     } else {
    1638         update_option( 'mo_openid_message', 'You already have an account with miniOrange. Please enter a valid password.');
    1639         update_option('mo_openid_verify_customer', 'true');
    1640         delete_option('mo_openid_new_registration');
    1641         if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
    1642             wp_send_json(["error" => 'You already have an account with miniOrange. Please enter a valid password.']);
    1643         else {
    1644             mo_openid_show_error_message();
    1645             if (get_option('regi_pop_up') == "yes") {
    1646                 update_option("pop_login_msg", get_option("mo_openid_message"));
    1647                 mo_pop_show_verify_password_page();
    1648             }
    1649         }
    1650     }
    1651 }
    1652 
    1653 function encrypt_data($data, $key) {
    1654 
    1655     return base64_encode(openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_RAW_DATA));
    1656 
    1657 }
    1658 
    1659 function mo_openid_update_role($user_id='', $user_url=''){
    1660     // save the profile url in user meta // this was added to save facebook url in user meta as it is more than 100 chars
    1661     update_user_meta($user_id, 'moopenid_user_profile_url',$user_url);
    1662     if(get_option('mo_openid_customised_field_enable') != 1 || get_option('mo_openid_update_role_addon') != 1) {
    1663         if (get_option('mo_openid_login_role_mapping')) {
    1664             $user = get_user_by('ID', $user_id);
    1665             $user->set_role(get_option('mo_openid_login_role_mapping'));
    1666         }
    1667     }
    1668 }
    1669 
    1670 
    1671 
    1672 function mo_openid_login_redirect($username = '', $user = NULL){
    1673     mo_openid_start_session();
    1674     if(is_string($username) && $username && is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && isset($_SESSION['mo_login']) && $_SESSION['mo_login']){
    1675         $_SESSION['mo_login'] = false;
    1676         wp_set_auth_cookie( $user_id, true );
    1677         $redirect_url = mo_openid_get_redirect_url();
    1678         wp_redirect($redirect_url);
    1679         exit;
    1680     }
    1681 }
    1682 
    1683 function mo_openid_login_redirect_pop_up($username = '', $user = NULL){
    1684 
    1685     mo_openid_start_session();
    1686     if(is_string($username) && $username && is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && isset($_SESSION['mo_login']) && $_SESSION['mo_login']){
    1687         $_SESSION['mo_login'] = false;
    1688         wp_set_auth_cookie( $user_id, true );
    1689     }
    1690     ?>
    1691     <script>
    1692         window.opener.HandlePopupResult("true");
    1693         window.close();
    1694 
    1695     </script> <?php
    1696 
    1697     if(get_option("account_linking_flow")){
    1698         update_option( 'account_linking_flow', 0);
    1699         exit;
    1700     }
    1701     if ( empty( $_REQUEST['redirect_to'] ) ) {
    1702         exit;
    1703     }
    1704 }
    1705 
    1706 
    1707 function mo_openid_link_account( $username, $user ){
    1708     if($user){
    1709         $userid = $user->ID;
    1710     }
    1711     mo_openid_start_session();
    1712 
    1713     $user_email =  isset($_SESSION['user_email']) ? sanitize_text_field($_SESSION['user_email']):'';
    1714     $social_app_identifier = isset($_SESSION['social_user_id']) ? sanitize_text_field($_SESSION['social_user_id']):'';
    1715     $social_app_name = isset($_SESSION['social_app_name']) ? sanitize_text_field($_SESSION['social_app_name']):'';
    1716     if(empty($user_email)){
    1717         $user_email=$user->user_email;
    1718     }
    1719     //if user is coming through default wordpress login, do not proceed further and return
    1720     if(isset($userid) && empty($social_app_identifier) && empty($social_app_name) ) {
    1721         return;
    1722     }
    1723     elseif(!isset($userid)){
    1724         return;
    1725     }
    1726 
    1727     global $wpdb;
    1728     $db_prefix = $wpdb->prefix;
    1729     $linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM ".$db_prefix."mo_openid_linked_user where linked_email = \"%s\" AND linked_social_app = \"%s\"",$user_email,$social_app_name));
    1730 
    1731     // if a user with given email and social app name doesn't already exist in the mo_openid_linked_user table
    1732     if(!isset($linked_email_id)){
    1733         mo_openid_insert_query($social_app_name,$user_email,$userid,$social_app_identifier);
    1734     }
    1735 }
    1736 
    1737 
    1738 function mo_openid_delete_profile_column($value, $columnName, $userId){
    1739     if('mo_openid_delete_profile_data' == $columnName){
    1740         global $wpdb;
    1741         $socialUser = $wpdb->get_var($wpdb->prepare('SELECT id FROM '. $wpdb->prefix .'mo_openid_linked_user WHERE user_id = %d ', $userId));
    1742 
    1743         if($socialUser > 0 && !get_user_meta($userId,'mo_openid_data_deleted')){
    1744             return '<a href="javascript:void(0)" onclick="javascript:moOpenidDeleteSocialProfile(this, '. $userId .')">Delete</a>';
    1745         }
    1746         else
    1747             return '<p>NA</p>';
    1748     }
    1749     if('mo_openid_linked_social_app' == $columnName){
    1750         global $wpdb;
    1751         $socialUser = $wpdb->get_var($wpdb->prepare('SELECT id FROM '. $wpdb->prefix .'mo_openid_linked_user WHERE user_id = %d ', $userId));
    1752         $a=$wpdb->get_col('SELECT all linked_social_app FROM '. $wpdb->prefix .'mo_openid_linked_user where user_id='.$userId);
    1753         $b='';
    1754         foreach ($a as $x=>$y)
    1755         {
    1756             if($y=='facebook') {$y='Facebook';}if($y=='google') {$y='Google';}if($y=='instagram'){$y='Instagram';}if($y=='linkedin'){$y='LinkedIn';}if($y=='amazon') {$y='Amazon';}
    1757             if($y=='pinterest'){$y='Pinterest';}if($y=='twitch'){$y='Twitch';} if($y=='vkontakte'){$y='vKontakte';} if($y=='twitter'){$y='Twitter';}if($y=='salesforce'){$y='Salesforce';}if($y=='yahoo'){$y='Yahoo';}if($y=='yahoo'){$y='Yahoo';}if($y=='wordpress'){$y='Wordpress';}if($y=='disqus'){$y='Disqus';}
    1758 
    1759             $b=$b.' '.$y.'<br>';
    1760         }
    1761         if($socialUser > 0){
    1762             return $b;
    1763         }
    1764     }
    1765 }
  • miniorange-login-openid/trunk/class-mo-openid-social-comment.php

    r2643398 r2853010  
    1010                var commentForm = '<div><h3 id="mo_reply_label" class="comment-reply-title"><?php echo esc_attr(get_option("mo_openid_social_comment_heading_label")) ?></h3><br/><ul class="mo_openid_comment_tab">';
    1111                <?php if(get_option('mo_openid_social_comment_default')){ $commentsCount = wp_count_comments($post->ID); ?>
    12                 commentForm += '<li id="moopenid_social_comment_default" class="mo_openid_selected_tab"><?php echo esc_html(get_option("mo_openid_social_comment_default_label")) ?>(<?php echo ($commentsCount && isset($commentsCount -> approved) ? $commentsCount -> approved : '') ?>)</li>';
     12                commentForm += '<li id="moopenid_social_comment_default" class="mo_openid_selected_tab"><?php echo esc_html(get_option("mo_openid_social_comment_default_label")) ?>(<?php echo  esc_attr(($commentsCount && isset($commentsCount -> approved) ? $commentsCount -> approved : '')) ?>)</li>';
    1313                <?php } if(get_option('mo_openid_social_comment_fb')){ ?>
    1414                commentForm += '<li id="moopenid_social_comment_fb"><?php echo esc_html(get_option("mo_openid_social_comment_fb_label")) ?></li>';
     
    3030
    3131                    // IMPORTANT: Replace EXAMPLE with your forum shortname!
    32                     s.src = 'https://<?php echo get_option('mo_disqus_shortname'); ?>.disqus.com/embed.js';
     32                    s.src = 'https://<?php echo  esc_attr(get_option('mo_disqus_shortname')); ?>.disqus.com/embed.js';
    3333
    3434                    s.setAttribute('data-timestamp', +new Date());
  • miniorange-login-openid/trunk/class-mo-openid-social-share.php

    r2769271 r2853010  
    55    $http =  "http://";
    66}
    7 $url = $http . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'];
     7$url = $http . sanitize_text_field($_SERVER['HTTP_HOST']) . sanitize_text_field($_SERVER['REQUEST_URI']);
    88
    99    $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','digg'=>'#000000','yahoo'=>'#430297','yandex'=>'#2795e9','instagram'=>'#3f729b','linkedin'=>'#007bb6','pocket'=>'#ee4056','print'=>'#ee4056','whatsapp'=>'#25D366','mail'=>'#787878','amazon'=>'#ff9900','paypal'=>'#0d127a','stumble'=>'#f74425','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','kakao'=>'#ffe812','livejournal'=>'#3c1361','naver'=>'#3EAF0E','teamsnap'=>'#ff9a1a');
     
    5858
    5959<div class="mo-openid-app-icons circle ">
    60     <p style="color: #<?php echo $heading_color; ?>;"><?php
     60    <p style="color: #<?php echo  esc_attr($heading_color); ?>;"><?php
    6161
    6262        if( $orientation == 'hor' ) {
    6363
    64             echo $heading_text;
     64            echo  esc_attr($heading_text);
    6565        ?></p>
    6666            <div class="horizontal">
     
    7070                        $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    7171                        ?>
    72                         <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-facebook" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     72                        <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-facebook" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    7373                        <?php
    7474                    }
     
    7777                        $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    7878                        ?>
    79                         <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-twitter" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     79                        <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-twitter" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    8080                        <?php
    8181                    }
     
    8484                        $link = esc_url('https://plus.google.com/share?url='.$url);
    8585                        ?>
    86                         <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-google-plus" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important;"></i></a>
     86                        <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-google-plus" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important;"></i></a>
    8787                        <?php
    8888                    }
     
    9191                        $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    9292                        ?>
    93                         <a rel='nofollow' title="Vkontakte"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-vk" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     93                        <a rel='nofollow' title="Vkontakte"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-vk" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    9494                        <?php
    9595                    }
     
    9898                        $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    9999                        ?>
    100                         <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-tumblr" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     100                        <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-tumblr" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    101101                        <?php
    102102                    }
     
    105105                        $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    106106                        ?>
    107                         <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-stumbleupon" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     107                        <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-stumbleupon" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    108108                        <?php
    109109                    }
     
    112112                        $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    113113                        ?>
    114                         <a rel='nofollow' title="LinkekIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-linkedin" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     114                        <a rel='nofollow' title="LinkekIn" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-linkedin" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    115115                        <?php
    116116                    }
     
    119119                        $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    120120                        ?>
    121                         <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-reddit" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     121                        <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-reddit" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    122122                        <?php
    123123                    }
     
    125125                    if( get_option('mo_openid_pinterest_share_enable') ) {
    126126                        ?>
    127                         <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-pinterest" style="padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-10); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     127                        <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-pinterest" style="padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-10)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    128128                        <?php
    129129                    }
     
    132132                        $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    133133                        ?>
    134                         <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-get-pocket" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     134                        <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-get-pocket" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    135135                        <?php
    136136                    }
     
    139139                        $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    140140                        ?>
    141                         <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-digg" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     141                        <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-digg" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    142142                        <?php
    143143                    }
     
    145145                    if( get_option('mo_openid_mail_share_enable') ) {
    146146                        ?>
    147                         <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    148                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> far fa-envelope" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     147                        <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo  esc_attr($email_subject) ?>&amp;body=<?php echo  esc_attr($email_body )?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important">
     148                        <i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> far fa-envelope" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    149149                        <?php
    150150                    }
    151151                    if( get_option('mo_openid_print_share_enable') ) {
    152152                        ?>
    153                         <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    154                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fas fa-print" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     153                        <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important">
     154                        <i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fas fa-print" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    155155                        <?php
    156156                    }
     
    158158
    159159                        ?>
    160                         <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    161                             <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     160                        <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important">
     161                            <i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    162162                        <?php
    163163                    }
     
    165165
    166166                        ?>
    167                         <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    168                             <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     167                        <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons)?>px !important">
     168                            <i class="mo-custom-share-icon <?php echo  esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo  esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo  esc_attr($custom_color)?>;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    169169                        <?php
    170170                    }
     
    175175                        $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    176176                        ?>
    177                         <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-facebook" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     177                        <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-facebook" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    178178                        <?php
    179179                    }
     
    182182                        $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    183183                        ?>
    184                         <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-twitter" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     184                        <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-twitter" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize-4); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    185185                        <?php
    186186                    }
     
    189189                        $link = esc_url('https://plus.google.com/share?url='.$url);
    190190                        ?>
    191                         <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-google-plus" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     191                        <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-google-plus" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    192192                        <?php
    193193                    }
     
    196196                        $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    197197                        ?>
    198                         <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-vk" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     198                        <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-vk" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    199199                        <?php
    200200                    }
     
    203203                        $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title);
    204204                        ?>
    205                         <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-tumblr" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     205                        <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-tumblr" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize-4); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize-4); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    206206                        <?php
    207207                    }
     
    210210                        $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    211211                        ?>
    212                         <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-stumbleupon" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     212                        <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-stumbleupon" style="padding-top:4px;text-align:center;color:#<?php echo  esc_attr($fontColor) ?> !important;font-size:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize-4); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important;height:<?php echo  esc_attr($sharingSize-4); ?>px !important;width:<?php echo  esc_attr($sharingSize); ?>px !important"></i></a>
    213213                        <?php
    214214                    }
     
    217217                        $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    218218                        ?>
    219                         <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-linkedin" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     219                        <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-linkedin" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    220220                        <?php
    221221                    }
     
    224224                        $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    225225                        ?>
    226                         <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-reddit" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     226                        <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-reddit" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    227227                        <?php
    228228                    }
     
    230230                    if( get_option('mo_openid_pinterest_share_enable') ) {
    231231                        ?>
    232                         <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-pinterest" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     232                        <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo  esc_attr($selected_theme); ?> fab fa-pinterest" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    233233                        <?php
    234234                    }
     
    237237                        $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    238238                        ?>
    239                         <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-get-pocket" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     239                        <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo  esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-get-pocket" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    240240                        <?php
    241241                    }
     
    244244                        $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    245245                        ?>
    246                         <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons-6?>px !important"><i class=" <?php echo $selected_theme; ?> fab fa-digg" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     246                        <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo  esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons-6)?>px !important"><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-digg" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    247247                        <?php
    248248                    }
     
    250250                    if( get_option('mo_openid_mail_share_enable') ) {
    251251                        ?>
    252                         <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    253                         <i class=" <?php echo $selected_theme; ?> far fa-envelope" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     252                        <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo esc_attr($email_subject) ?>&amp;body=<?php echo esc_attr($email_body) ?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     253                        <i class=" <?php echo esc_attr($selected_theme); ?> far fa-envelope" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor )?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    254254                        <?php
    255255                    }
    256256                    if( get_option('mo_openid_print_share_enable') ) {
    257257                        ?>
    258                         <a rel='nofollow' title="Print this page" onclick="javascript:window.print()" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    259                         <i class=" <?php echo $selected_theme; ?> fas fa-print" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     258                        <a rel='nofollow' title="Print this page" onclick="javascript:window.print()" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     259                        <i class=" <?php echo esc_attr($selected_theme); ?> fas fa-print" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    260260                        <?php
    261261                    }
     
    263263
    264264                        ?>
    265                         <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    266                             <i class=" <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     265                        <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     266                            <i class=" <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    267267                        <?php
    268268                    }
     
    270270
    271271                        ?>
    272                         <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    273                             <i class=" <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-4; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     272                        <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     273                            <i class=" <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-4); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    274274                        <?php
    275275                    }
     
    280280                    $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    281281                    ?>
    282                     <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-facebook" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['facebook']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     282                    <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-facebook" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['facebook'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    283283                    <?php
    284284                }
     
    287287                    $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    288288                    ?>
    289                     <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-twitter" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['twitter']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     289                    <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-twitter" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['twitter'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    290290                    <?php
    291291                }
     
    294294                    $link = esc_url('https://plus.google.com/share?url='.$url);
    295295                    ?>
    296                     <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-google-plus" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color: <?php echo $default_color['google']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important;"></i></a>
     296                    <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-google-plus" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color: <?php echo esc_attr($default_color['google'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important;"></i></a>
    297297                    <?php
    298298                }
     
    301301                    $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    302302                    ?>
    303                     <a rel='nofollow' title="Vkontakte"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-vk" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['vkontakte']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     303                    <a rel='nofollow' title="Vkontakte"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-vk" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['vkontakte'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    304304                    <?php
    305305                }
     
    308308                    $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    309309                    ?>
    310                     <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-tumblr" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['tumblr']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     310                    <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-tumblr" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['tumblr'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    311311                    <?php
    312312                }
     
    315315                    $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    316316                    ?>
    317                     <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-stumbleupon" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['stumble']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     317                    <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-stumbleupon" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['stumble'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    318318                    <?php
    319319                }
     
    322322                    $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    323323                    ?>
    324                     <a rel='nofollow' title="LinkekIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-linkedin" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['linkedin']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     324                    <a rel='nofollow' title="LinkekIn" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-linkedin" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['linkedin'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    325325                    <?php
    326326                }
     
    329329                    $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    330330                    ?>
    331                     <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-reddit" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['reddit']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     331                    <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-reddit" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['reddit'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    332332                    <?php
    333333                }
     
    335335                if( get_option('mo_openid_pinterest_share_enable') ) {
    336336                    ?>
    337                     <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-pinterest" style="padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-10); ?>px !important;background-color:<?php echo $default_color['pinterest']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     337                    <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-pinterest" style="padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-10)); ?>px !important;background-color:<?php echo esc_attr($default_color['pinterest'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    338338                    <?php
    339339                }
     
    342342                    $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    343343                    ?>
    344                     <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-get-pocket" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['pocket']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     344                    <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-get-pocket" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['pocket'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    345345                    <?php
    346346                }
     
    349349                    $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    350350                    ?>
    351                     <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-digg" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['digg']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     351                    <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-digg" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['digg'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    352352                    <?php
    353353                }
     
    355355                if( get_option('mo_openid_mail_share_enable') ) {
    356356                    ?>
    357                     <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    358                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> far fa-envelope" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['mail']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     357                    <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo esc_attr($email_subject) ?>&amp;body=<?php echo esc_attr($email_body )
     358                    ?>',800,500);" class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     359                        <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> far fa-envelope" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr( $default_color['mail'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    359360                    <?php
    360361                }
    361362                if( get_option('mo_openid_print_share_enable') ) {
    362363                    ?>
    363                     <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    364                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fas fa-print" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['print']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     364                    <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     365                        <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fas fa-print" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['print'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    365366                    <?php
    366367                }
     
    368369
    369370                    ?>
    370                     <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    371                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['whatsapp']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     371                    <a rel='nofollow'  title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     372                        <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['whatsapp'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    372373                    <?php
    373374                }
     
    375376
    376377                ?>
    377                 <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link" style="margin-left : <?php echo $spaceBetweenIcons?>px !important">
    378                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['whatsapp']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     378                <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link" style="margin-left : <?php echo esc_attr($spaceBetweenIcons)?>px !important">
     379                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['whatsapp'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    379380                <?php
    380381                }
     
    391392                    $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    392393                    ?>
    393                     <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-facebook" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     394                    <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-facebook" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    394395                    <?php
    395396                }
     
    398399                    $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    399400                    ?>
    400                     <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-twitter" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     401                    <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-twitter" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    401402                    <?php
    402403                }
     
    405406                    $link = esc_url('https://plus.google.com/share?url='.$url);
    406407                    ?>
    407                     <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-google-plus" style="margin-bottom:<?php echo $space_icons-4?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     408                    <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-google-plus" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    408409                    <?php
    409410                }
     
    412413                    $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    413414                    ?>
    414                     <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-vk" style="margin-bottom:<?php echo $space_icons-4?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     415                    <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-vk" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    415416                    <?php
    416417                }
     
    419420                    $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title);
    420421                    ?>
    421                     <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-tumblr" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     422                    <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-tumblr" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    422423                    <?php
    423424                }
     
    426427                    $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    427428                    ?>
    428                     <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-stumbleupon" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     429                    <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-stumbleupon" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    429430                    <?php
    430431                }
     
    433434                    $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    434435                    ?>
    435                     <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-linkedin" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     436                    <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-linkedin" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    436437                    <?php
    437438                }
     
    440441                    $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    441442                    ?>
    442                     <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-reddit" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     443                    <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-reddit" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    443444                    <?php
    444445                }
     
    446447                if( get_option('mo_openid_pinterest_share_enable') ) {
    447448                    ?>
    448                     <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-pinterest" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-10); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     449                    <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-pinterest" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-10)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    449450                    <?php
    450451                }
     
    453454                    $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    454455                    ?>
    455                     <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-get-pocket" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     456                    <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-get-pocket" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    456457                    <?php
    457458                }
     
    460461                    $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    461462                    ?>
    462                     <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-digg" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     463                    <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-digg" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    463464                    <?php
    464465                }
    465466                if( get_option('mo_openid_mail_share_enable') ) {
    466467                    ?>
    467                     <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link">
    468                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> far fa-envelope" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     468                    <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo esc_attr($email_subject) ?>&amp;body=<?php echo esc_attr($email_body) ?>',800,500);" class="mo-openid-share-link">
     469                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> far fa-envelope" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    469470                    <?php
    470471                    }
     
    472473                    ?>
    473474                    <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link">
    474                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fas fa-print" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     475                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fas fa-print" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize)?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    475476                    <?php
    476477                    }
     
    478479
    479480                    ?>
    480                     <a rel='nofollow' title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link">
    481                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     481                    <a rel='nofollow' title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     482                        <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    482483                    <?php
    483484                }
     
    485486
    486487                    ?>
    487                     <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link">
    488                         <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:#<?php echo $custom_color?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     488                    <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     489                        <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:#<?php echo esc_attr($custom_color)?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    489490                    <?php
    490491                }
     
    494495                    $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    495496                    ?>
    496                     <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link"><i class=" <?php echo $selected_theme; ?> fab fa-facebook" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top : 4px !important;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     497                    <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link"><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-facebook" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top : 4px !important;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    497498                    <?php
    498499                }
     
    501502                    $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    502503                    ?>
    503                     <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-twitter" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     504                    <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-twitter" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    504505                    <?php
    505506                }
     
    508509                    $link = esc_url('https://plus.google.com/share?url='.$url);
    509510                    ?>
    510                     <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link"><i class=" <?php echo $selected_theme; ?> fab fa-google-plus" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     511                    <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link"><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-google-plus" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    511512                    <?php
    512513                }
     
    515516                    $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    516517                    ?>
    517                     <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link"><i class=" <?php echo $selected_theme; ?> fab fa-vk" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     518                    <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link"><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-vk" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    518519                    <?php
    519520                }
     
    522523                    $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title);
    523524                    ?>
    524                     <a rel='nofollow' title="Tumblr" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-tumblr" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     525                    <a rel='nofollow' title="Tumblr" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-tumblr" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    525526                    <?php
    526527                }
     
    529530                    $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    530531                    ?>
    531                     <a rel='nofollow' title="StumbleUpon" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-stumbleupon" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     532                    <a rel='nofollow' title="StumbleUpon" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-stumbleupon" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    532533                    <?php
    533534                }
     
    536537                    $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    537538                    ?>
    538                     <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-linkedin" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px !important;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     539                    <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-linkedin" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px !important;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    539540                    <?php
    540541                }
     
    543544                    $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    544545                    ?>
    545                     <a rel='nofollow' title="Reddit" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-reddit" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     546                    <a rel='nofollow' title="Reddit" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-reddit" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    546547                    <?php
    547548                }
     
    549550                if( get_option('mo_openid_pinterest_share_enable') ) {
    550551                    ?>
    551                     <a rel='nofollow' title="Pinterest" href='javascript:pinIt();' class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-pinterest" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize-5; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     552                    <a rel='nofollow' title="Pinterest" href='javascript:pinIt();' class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-pinterest" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize-5); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    552553                    <?php
    553554                }
     
    556557                    $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    557558                    ?>
    558                     <a rel='nofollow' title="Pocket" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-get-pocket" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     559                    <a rel='nofollow' title="Pocket" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-get-pocket" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    559560                    <?php
    560561                }
     
    563564                    $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    564565                    ?>
    565                     <a rel='nofollow' title="Digg" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo $selected_theme; ?> fab fa-digg" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     566                    <a rel='nofollow' title="Digg" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class=" <?php echo esc_attr($selected_theme); ?> fab fa-digg" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    566567                    <?php
    567568                }
     
    569570                if( get_option('mo_openid_mail_share_enable') ) {
    570571                    ?>
    571                     <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link">
    572                     <i class=" <?php echo $selected_theme; ?> far fa-envelope" style=" padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     572                    <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo esc_attr($email_subject) ?>&amp;body=<?php echo esc_attr($email_body) ?>',800,500);" class="mo-openid-share-link">
     573                    <i class=" <?php echo esc_attr($selected_theme); ?> far fa-envelope" style=" padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    573574                    <?php
    574575                    }
     
    576577                    ?>
    577578                    <a rel='nofollow' title="Print this page" onclick="javascript:window.print()" class="mo-openid-share-link">
    578                     <i class=" <?php echo $selected_theme; ?> fas fa-print" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     579                    <i class=" <?php echo esc_attr($selected_theme); ?> fas fa-print" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    579580                    <?php
    580581                    }
     
    582583
    583584                    ?>
    584                     <a rel='nofollow'title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link">
    585                         <i class=" <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     585                    <a rel='nofollow'title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     586                        <i class=" <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    586587                    <?php
    587588                }
     
    589590
    590591                    ?>
    591                     <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link">
    592                         <i class=" <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:4px;text-align:center;color:#<?php echo $fontColor ?> !important;font-size:<?php echo $sharingSize; ?>px !important;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     592                    <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     593                        <i class=" <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:4px;text-align:center;color:#<?php echo esc_attr($fontColor) ?> !important;font-size:<?php echo esc_attr($sharingSize); ?>px !important;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    593594                    <?php
    594595                }
     
    598599                $link = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$url.'&src=sdkpreparse');
    599600                ?>
    600                 <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo $link; ?>', 800, 400);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-facebook" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['facebook']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     601                <a rel='nofollow' title="Facebook" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 400);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-facebook" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['facebook'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    601602                <?php
    602603            }
     
    605606                $link = esc_url(empty($twitter_username) ? 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url : 'https://twitter.com/intent/tweet?text='.$title.'&amp;url='.$url. '&amp;via='.$twitter_username);
    606607                ?>
    607                 <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo $link; ?>', 600, 300);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-twitter" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['twitter']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     608                <a rel='nofollow' title="Twitter" onclick="popupCenter('<?php echo esc_attr($link); ?>', 600, 300);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-twitter" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['twitter'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    608609                <?php
    609610            }
     
    612613                $link = esc_url('https://plus.google.com/share?url='.$url);
    613614                ?>
    614                 <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-google-plus" style="margin-bottom:<?php echo $space_icons-4?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['google']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     615                <a rel='nofollow' title="Google" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-google-plus" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['google'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    615616                <?php
    616617            }
     
    619620                $link = esc_url('http://vk.com/share.php?url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt);
    620621                ?>
    621                 <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo $space_icons?>px !important;"><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-vk" style="margin-bottom:<?php echo $space_icons-4?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['vkontakte']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     622                <a rel='nofollow' title="Vkontakte" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" style="margin-bottom:<?php echo esc_attr($space_icons)?>px !important;"><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-vk" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important; padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['vkontakte'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    622623                <?php
    623624            }
     
    626627                $link = esc_url('http://www.tumblr.com/share/link?url='.$url.'&amp;title='.$title);
    627628                ?>
    628                 <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-tumblr" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['tumblr']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     629                <a rel='nofollow' title="Tumblr"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-tumblr" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['tumblr'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    629630                <?php
    630631            }
     
    633634                $link = esc_url('http://www.stumbleupon.com/submit?url='.$url.'&amp;title='.$title);
    634635                ?>
    635                 <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-stumbleupon" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['stumble']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     636                <a rel='nofollow' title="StumbleUpon"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-stumbleupon" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['stumble'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    636637                <?php
    637638            }
     
    640641                $link = esc_url('https://www.linkedin.com/shareArticle?mini=true&amp;title='.$title.'&amp;url='.$url.'&amp;summary='.$excerpt);
    641642                ?>
    642                 <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-linkedin" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['linkedin']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     643                <a rel='nofollow' title="LinkedIn" onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-linkedin" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['linkedin'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    643644                <?php
    644645            }
     
    647648                $link = esc_url('http://www.reddit.com/submit?url='.$url.'&amp;title='.$title);
    648649                ?>
    649                 <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-reddit" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['reddit']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     650                <a rel='nofollow' title="Reddit"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-reddit" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['reddit'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    650651                <?php
    651652            }
     
    653654            if( get_option('mo_openid_pinterest_share_enable') ) {
    654655                ?>
    655                 <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-pinterest" style="margin-bottom:<?php echo $space_icons-4?>px !important;padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-10); ?>px !important;background-color:<?php echo $default_color['pinterest']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     656                <a rel='nofollow' title="Pinterest"  href='javascript:pinIt();' class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-pinterest" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px !important;padding-top:3px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-10)); ?>px !important;background-color:<?php echo esc_attr($default_color['pinterest'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    656657                <?php
    657658            }
     
    660661                $link = esc_url('https://getpocket.com/save?url='.$url.'&amp;title='.$title);
    661662                ?>
    662                 <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-get-pocket" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['pocket']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     663                <a rel='nofollow' title="Pocket"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-get-pocket" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['pocket'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    663664                <?php
    664665            }
     
    667668                $link = esc_url('http://digg.com/submit?url='.$url.'&amp;title='.$title);
    668669                ?>
    669                 <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo $link; ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-digg" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['digg']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     670                <a rel='nofollow' title="Digg"  onclick="popupCenter('<?php echo esc_attr($link); ?>', 800, 500);" class="mo-openid-share-link" ><i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-digg" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['digg'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    670671                <?php
    671672            }
    672673            if( get_option('mo_openid_mail_share_enable') ) {
    673674                ?>
    674                 <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo $email_subject ?>&amp;body=<?php echo $email_body ?>',800,500);" class="mo-openid-share-link">
    675                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> far fa-envelope" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['mail']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     675                <a rel='nofollow' title="Email this page" onclick="popupCenter('mailto:?subject=<?php echo esc_attr($email_subject) ?>&amp;body=<?php echo esc_attr($email_body) ?>',800,500);" class="mo-openid-share-link">
     676                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> far fa-envelope" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['mail'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    676677                <?php
    677678            }
     
    679680                ?>
    680681                <a rel='nofollow' title="Print this page" onclick="javascript:window.print()"class="mo-openid-share-link">
    681                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fas fa-print" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['print']?>;height:<?php echo $sharingSize?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     682                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fas fa-print" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['print'])?>;height:<?php echo esc_attr($sharingSize)?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    682683                <?php
    683684            }
     
    685686
    686687                ?>
    687                 <a rel='nofollow' title="Whatsapp" href='whatsapp://send?text=<?php echo $url?>'  class="mo-openid-share-link">
    688                     <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['whatsapp']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     688                <a rel='nofollow' title="Whatsapp" href='whatsapp://send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     689                    <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['whatsapp'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    689690                <?php
    690691            }
     
    692693
    693694            ?>
    694             <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo $url?>'  class="mo-openid-share-link">
    695                 <i class="mo-custom-share-icon <?php echo $selected_theme; ?> fab fa-whatsapp" style="margin-bottom:<?php echo $space_icons-4?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo ($sharingSize-16); ?>px !important;background-color:<?php echo $default_color['whatsapp']?>;height:<?php echo $sharingSize; ?>px !important;width:<?php echo $sharingSize; ?>px !important"></i></a>
     695            <a rel='nofollow' title="Whatsapp" target ='_blank' href='https://web.whatsapp.com/send?text=<?php echo esc_url($url)?>'  class="mo-openid-share-link">
     696                <i class="mo-custom-share-icon <?php echo esc_attr($selected_theme); ?> fab fa-whatsapp" style="margin-bottom:<?php echo esc_attr($space_icons-4)?>px!important;padding-top:8px;text-align:center;color:#ffffff;font-size:<?php echo esc_attr(($sharingSize-16)); ?>px !important;background-color:<?php echo esc_attr($default_color['whatsapp'])?>;height:<?php echo esc_attr($sharingSize); ?>px !important;width:<?php echo esc_attr($sharingSize); ?>px !important"></i></a>
    696697            <?php
    697698            }
  • miniorange-login-openid/trunk/includes/css/bootstrap-social.css

    r2769271 r2853010  
    5151.mo_btn-github.disabled,.mo_btn-github[disabled],fieldset[disabled] .mo_btn-github,.mo_btn-github.disabled:hover,.mo_btn-github[disabled]:hover,fieldset[disabled] .mo_btn-github:hover,.mo_btn-github.disabled:focus,.mo_btn-github[disabled]:focus,fieldset[disabled] .mo_btn-github:focus,.mo_btn-github.disabled:active,.mo_btn-github[disabled]:active,fieldset[disabled] .mo_btn-github:active,.mo_btn-github.disabled.active,.mo_btn-github[disabled].active,fieldset[disabled] .mo_btn-github.active{background-color:#444;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#444,#444) !important;}
    5252.mo_btn-github .badge{color:#444;background-color:#fff}
    53 .mo_btn-google{color:#fff !important;background-color:#4285F4;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#4285F4,#4285F4) !important;}.mo_btn-google:focus,.mo_btn-google:active,.mo_btn-google.active,>.dropdown-toggle.mo_btn-google{color:#fff;background-color:#fff;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#fff,#fff) !important;}
     53.mo_btn-google{color:#fff !important;background:linear-gradient(90deg, #ffffff 40px, #4f71e8 5%) !important;border-color:rgba(0,0,0,0.2);}.mo_btn-google:focus,.mo_btn-google:active,.mo_btn-google.active,>.dropdown-toggle.mo_btn-google{color:#fff;background-color:#fff;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#fff,#fff) !important;}
    5454.mo_btn-google:active,.mo_btn-google.active,.open>.dropdown-toggle.mo_btn-google{background-image:none}
    5555.mo_btn-google.disabled,.mo_btn-google[disabled],fieldset[disabled] .mo_btn-google,.mo_btn-google.disabled:hover,.mo_btn-google[disabled]:hover,fieldset[disabled] .mo_btn-google:hover,.mo_btn-google.disabled:focus,.mo_btn-google[disabled]:focus,fieldset[disabled] .mo_btn-google:focus,.mo_btn-google.disabled:active,.mo_btn-google[disabled]:active,fieldset[disabled] .mo_btn-google:active,.mo_btn-google.disabled.active,.mo_btn-google[disabled].active,fieldset[disabled] .mo_btn-google.active{background-color:#ffffff;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#ffffff,#ffffff) !important;}
     
    5858.mo_btn-google-hov{color:#000000;background-color:#FFFFFF;border-color:rgba(0,0,0,0);}.mo_btn-google-hov:hover,.mo_btn-google-hov:hover i{color:#FFFFFF !important;background-color:#DB4437;border-color:#DB4437 !important;}.mo_openid_igoogle-hov{color:#DB4437;}.mo_openid_igoogle-hov:hover{color:#FFFFFF !important;background:#DB4437!important;border-color:#DB4437 !important }
    5959.mo_btn-mo-google{color: #DB4437;background-color: #FFFFFF}.mo_btn-mo-google:hover{color: #FFFFFF;background-color: #DB4437}
    60 .mo_btn-instagram{color:#fff!important;background-color:#3f729b;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#3f729b,#3f729b) !important;}.mo_btn-instagram:hover,.mo_btn-instagram:focus,.mo_btn-instagram:active,.mo_btn-instagram.active,.open>.dropdown-toggle.mo_btn-instagram{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#305777,#305777) !important;}
    61 .mo_btn-instagram:active,.mo_btn-instagram.active,.open>.dropdown-toggle.mo_btn-instagram{background-image:none}
    62 .mo_btn-instagram.disabled,.mo_btn-instagram[disabled],fieldset[disabled] .mo_btn-instagram,.mo_btn-instagram.disabled:hover,.mo_btn-instagram[disabled]:hover,fieldset[disabled] .mo_btn-instagram:hover,.mo_btn-instagram.disabled:focus,.mo_btn-instagram[disabled]:focus,fieldset[disabled] .mo_btn-instagram:focus,.mo_btn-instagram.disabled:active,.mo_btn-instagram[disabled]:active,fieldset[disabled] .mo_btn-instagram:active,.mo_btn-instagram.disabled.active,.mo_btn-instagram[disabled].active,fieldset[disabled] .mo_btn-instagram.active{background-color:#3f729b;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#3f729b,#3f729b) !important;}
    63 .mo_btn-instagram .badge{color:#3f729b;background-color:#fff}
    64 .mo_btn-instagram-white{color:#000000 !important;background-color:#3f729b;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#ffffff,#ffffff) !important;}.mo_btn-instagram-white:hover,.mo_btn-instagram-white:focus,.mo_btn-instagram-white:active,.mo_btn-instagram-white.active,.open>.dropdown-toggle.mo_btn-instagram-white{color:#000000;background-color:#4267B2;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#F8F8F8,#F8F8F8) !important;}
    65 .mo_btn-instagram-hov{color:#000000;background-color:#FFFFFF;border-color:rgba(0,0,0,0);}.mo_btn-instagram-hov:hover,.mo_btn-instagram-hov:hover i{color:#FFFFFF !important;background-color:#3f729b;border-color:#3f729b;}.mo_openid_iinstagram-hov{color:#3f729b;}.mo_openid_iinstagram-hov:hover{color:#FFFFFF !important;background:#3f729b!important;border-color:#3f729b !important}
    66 .mo_btn-mo-instagram{color: #3f729b;background-color: #FFFFFF}.mo_btn-mo-instagram:hover{color: #FFFFFF;background-color: #3f729b}
    6760.mo_btn-linkedin{color:#fff !important;background-color:#007bb6;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#007bb6,#007bb6) !important;}.mo_btn-linkedin:hover,.mo_btn-linkedin:focus,.mo_btn-linkedin:active,.mo_btn-linkedin.active,.open>.dropdown-toggle.mo_btn-linkedin{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#005983,#005983) !important;}
    6861.mo_btn-linkedin:active,.mo_btn-linkedin.active,.open>.dropdown-toggle.mo_btn-linkedin{background-image:none}
     
    182175.mo_btn-salesforce-hov{color:#000000;background-color:#FFFFFF;border-color:rgba(0,0,0,0);}.mo_btn-salesforce-hov:hover,.mo_btn-salesforce-hov:hover i{color:#FFFFFF !important;background-color:#1ab7ea;border-color:#1ab7ea!important;}.mo_openid_isalesforce-hov{color:#1ab7ea;}.mo_openid_isalesforce-hov:hover{color:#FFFFFF !important;background:#1ab7ea!important;border-color: #1ab7ea!important;}
    183176.mo_btn-mo-salesforce{color: #1ab7ea;background-color: #FFFFFF}.mo_btn-mo-salesforce:hover{color: #FFFFFF;background-color: #1ab7ea}
    184 
     177.mo_btn-windows{color:#fff !important;background-color:#2672ec;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#2672ec,#2672ec) !important;}.mo_btn-windows:hover,.mo_btn-windows:focus,.mo_btn-windows:active,.mo_btn-windows.active,.open>.dropdown-toggle.mo_btn-windows{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#125acd,#125acd) !important;}
     178.mo_btn-windows:active,.mo_btn-windows.active,.open>.dropdown-toggle.mo_btn-windows{background-image:none}
     179.mo_btn-windows.disabled,.mo_btn-windows[disabled],fieldset[disabled] .mo_btn-windows,.mo_btn-windows.disabled:hover,.mo_btn-windows[disabled]:hover,fieldset[disabled] .mo_btn-windows:hover,.mo_btn-windows.disabled:focus,.mo_btn-windows[disabled]:focus,fieldset[disabled] .mo_btn-windows:focus,.mo_btn-windows.disabled:active,.mo_btn-windows[disabled]:active,fieldset[disabled] .mo_btn-windows:active,.mo_btn-windows.disabled.active,.mo_btn-windows[disabled].active,fieldset[disabled] .mo_btn-windows.active{background-color:#2672ec;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#2672ec,#2672ec) !important;}
     180.mo_btn-windows .badge{color:#2672ec;background-color:#fff}
     181.mo_btn-windows-white{color:#2672ec !important;background-color:#FFFFFF;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#ffffff,#ffffff) !important;}.mo_btn-windows-white:hover,.mo_btn-windows-white:focus,.mo_btn-windows-white:active,.mo_btn-windows-white.active,.open>.dropdown-toggle.mo_btn-windows-white{color:#2672ec;background-color:#4267B2;border-color:rgba(0,0,0,0.2);background-image: linear-gradient(to bottom,#F8F8F8,#F8F8F8) !important;}
     182.mo_btn-windows-hov{color:#000000;background-color:#FFFFFF;border-color:rgba(0,0,0,0);}.mo_btn-windows-hov:hover,.mo_btn-windows-hov:hover i{color:#FFFFFF !important;background-color:#2672ec;border-color:#2672ec!important;}.mo_openid_iwindows-hov{color:#2672ec;}.mo_openid_iwindows-hov:hover{color:#FFFFFF !important;background:#2672ec!important; border-color: #2672ec!important; }
     183.mo_btn-mo-windows{color: #2672ec;background-color: #FFFFFF}.mo_btn-mo-windows:hover{color: #FFFFFF;background-color: #2672ec}
  • miniorange-login-openid/trunk/lang/miniorange-login-openid-hi_IN.po

    r2560192 r2853010  
    1717
    1818#: class-mo-openid-login-widget.php:40
    19 msgid "Login using Social Apps like Google, Facebook, LinkedIn, Microsoft, Instagram."
     19msgid "Login using Social Apps like Google, Facebook, LinkedIn."
    2020msgstr "गुगल फेसबुक, लिंक्डइन, मायक्रोसॉफ्ट, इंस्टाग्रामसारख्या सोशल अॅप्स वापरुन लॉगिन करा."
    2121
  • miniorange-login-openid/trunk/miniorange_openid_sso_settings.php

    r2809759 r2853010  
    55 * Plugin URI: https://www.miniorange.com
    66 * Description: Allow your users to login, comment and share with Facebook, Google, Apple, Twitter, LinkedIn etc using customizable buttons.
    7  * Version: 7.5.14
     7 * Version: 7.6.0
    88 * Author: <a href="https://www.miniorange.com/">miniOrange</a>
    99 * License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
    1010 */
    1111
    12 define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.5.14');
    13 define('plugin_url', plugin_dir_url(__FILE__) . "includes/images/icons/");
     12define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.6.0');
     13define('PLUGIN_URL', esc_url(plugin_dir_url(__FILE__)) . "includes/images/icons/");
    1414define('MOSL_PLUGIN_DIR',str_replace('/','\\',plugin_dir_path(__FILE__)));
    1515require('miniorange_openid_sso_settings_page.php');
     
    2323include dirname( __FILE__ ) . '/mo_openid_Language.php';
    2424
     25include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
     26
    2527
    2628include_once dirname(__FILE__) . '/class-mo-openid-login-widget.php';
     
    3739        add_action( 'admin_init',  array( $this, 'miniorange_openid_save_settings' ) );
    3840        add_action('init', 'mo_openid_login_validate' );
    39         add_action( 'init','init_wtlwp');
    4041        add_action( 'plugins_loaded', 'mo_openid_plugin_update' ,1 );
    4142        add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_script' ) );
     
    4849        add_action('wp_ajax_mo_openid_capp_delete', 'mo_openid_capp_delete');
    4950        add_action('wp_ajax_mo_openid_test_configuration_update', 'mo_openid_test_configuration_update_action');
     51        add_action('wp_ajax_mo_openid_social_linking', 'mo_openid_social_linking_action');
    5052        add_action('wp_ajax_mo_openid_profile_comp', 'mo_openid_profile_comp_action');
    5153        add_action('wp_ajax_custom_app_enable_change_update', 'custom_app_enable_change_update');
     
    5658        add_action('wp_ajax_mo_sharing_app_value', 'mo_sharing_app_value');
    5759        add_action('wp_ajax_mo_openid_rating_given', 'mo_openid_rating_given');
    58         add_action('wp_ajax_mo_check_restrict_user', 'mo_openid_restrict_user');
    5960        add_action('wp_ajax_mo_disable_app', 'mo_disable_app');
    60    
     61        add_action( 'admin_footer', array( $this,'mo_openid_feedback_request' ));
    6162        add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
    6263
     
    9192            add_option('app_pos','facebook#google#discord#twitter#vkontakte#linkedin#amazon#salesforce#yahoo#snapchat#dribbble');
    9293        }
    93         if(strlen(get_option('app_pos')) != 102) {
    94             delete_option('app_pos');
    95             add_option('app_pos','facebook#google#discord#twitter#vkontakte#linkedin#amazon#salesforce#yahoo#snapchat#dribbble');
    96         }
    97         update_option('app_pos_premium','apple#paypal#wordpress#github#hubspot#mailru#gitlab#steam#slack#trello#disqus#pinterest#yandex#spotify#reddit#tumblr#twitch#vimeo#kakao#flickr#line#meetup#dropbox#stackexchange#livejournal#foursquare#teamsnap#naver#odnoklassniki#wiebo#wechat#baidu#renren#qq#fitbit#stackoverflow#mailchimp#youtube#strava');
     94        update_option('app_pos_premium','apple#paypal#wordpress#github#hubspot#mailru#gitlab#steam#slack#trello#disqus#pinterest#yandex#spotify#reddit#tumblr#twitch#vimeo#kakao#flickr#line#meetup#dropbox#stackexchange#livejournal#foursquare#teamsnap#naver#odnoklassniki#wiebo#wechat#baidu#renren#qq#fitbit#stackoverflow#mailchimp#youtube#strava#zoom');
    9895        add_option('mo_openid_default_login_enable',1);
    9996        add_option('mo_openid_default_register_enable',1);
     
    314311        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-General Settings','Social Commenting', 'administrator','mo_openid_social_commenting_settings','mo_comment_openid');
    315312        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-Add_On','Custom Registration Add-On', 'administrator','mo_openid_settings_addOn','mo_openid_addon_desc_page');
     313        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-WooCommerce_Add_On','WooCommerce Add-On', 'administrator','mo_openid_woocommerce_add_on','mo_openid_addon_desc_page');
     314        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-BuddyPress_Add_On','BuddyPress Add-On', 'administrator','mo_openid_buddypress_add_on','mo_openid_addon_desc_page');
    316315        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-MailChimp_Add_On','MailChimp Add-On', 'administrator','mo_openid_mailchimp_add_on','mo_openid_addon_desc_page');
    317316        $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-HubSpot_Add_On','HubSpot Add-On', 'administrator','mo_openid_hubspot_add_on','mo_openid_addon_desc_page');
     
    324323      add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
    325324
    326         if(!is_user_logged_in() && strpos( $_SERVER['QUERY_STRING'], 'disable-social-login' ) == false){
     325        if(!is_user_logged_in() && strpos( sanitize_text_field($_SERVER['QUERY_STRING']), 'disable-social-login' ) == false){
    327326            $mo_login_widget = new mo_openid_login_wid();
    328327            $mo_login_widget->openidloginForm();
     
    337336            $http = "http://";
    338337        }
    339         $url = $http . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'];
     338        $url = $http . sanitize_text_field($_SERVER["HTTP_HOST"]) . sanitize_text_field($_SERVER['REQUEST_URI']);
    340339        if(is_single() && get_option('mo_openid_social_comment_blogpost') == 1 ) {
    341340            mo_openid_social_comment($post, $url);
     
    363362        {
    364363            case 'mo_openid_customise_social_icons':
    365                 $nonce = $_POST['mo_openid_customise_social_icons_nonce'];
     364                $nonce = sanitize_text_field($_POST['mo_openid_customise_social_icons_nonce']);
    366365                if (!wp_verify_nonce($nonce, 'mo-openid-customise-social-icons-nonce')) {
    367366                    wp_die('<strong>ERROR</strong>: Invalid Request.');
    368367                }
    369368                else{
     369                    if(current_user_can('administrator')){
    370370                    update_option('mo_openid_fonawesome_load', isset($_POST['mo_openid_fonawesome_load']) ? sanitize_text_field($_POST['mo_openid_fonawesome_load']) : 0);
    371371                    update_option('mo_openid_bootstrap_load', isset($_POST['mo_openid_bootstrap_load']) ? sanitize_text_field($_POST['mo_openid_bootstrap_load']) : 0);
     
    391391                    mo_openid_show_success_message();
    392392                }
     393            }
    393394                break;
    394395            case 'mo_openid_enable_gdpr':
     
    399400                            wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    400401                        } else {
     402                            if(current_user_can('administrator')){
    401403                            // GDPR options
    402404                            update_option('mo_openid_gdpr_consent_enable', isset($_POST['mo_openid_gdpr_consent_enable']) ? sanitize_text_field($_POST['mo_openid_gdpr_consent_enable']) : 0);
    403405                            update_option('mo_openid_privacy_policy_url', isset($_POST['mo_openid_privacy_policy_url']) ? sanitize_text_field($_POST['mo_openid_privacy_policy_url']) : get_option('mo_openid_privacy_policy_url'));
    404406                            update_option('mo_openid_privacy_policy_text', isset($_POST['mo_openid_privacy_policy_text']) ? sanitize_text_field($_POST['mo_openid_privacy_policy_text']) : get_option('mo_openid_privacy_policy_text'));
    405                             update_option('mo_openid_gdpr_consent_message', isset($_POST['mo_openid_gdpr_consent_message']) ? stripslashes($_POST['mo_openid_gdpr_consent_message']) : get_option('mo_openid_gdpr_consent_message'));
     407                            update_option('mo_openid_gdpr_consent_message', isset($_POST['mo_openid_gdpr_consent_message']) ? stripslashes(sanitize_text_field($_POST['mo_openid_gdpr_consent_message'])) : get_option('mo_openid_gdpr_consent_message'));
    406408                            update_option('mo_openid_message', 'Your settings are saved successfully.');
    407409                            mo_openid_show_success_message();
    408410                        }
    409411                    }
     412                    }
    410413                }
    411414                break;
     
    415418                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    416419                } else {
    417 
     420                    if(current_user_can('administrator')){
    418421                    // Contact Us query
    419422                    $email = sanitize_email($_POST['mo_openid_contact_us_email']);
     
    421424                    $query = sanitize_text_field($_POST['mo_openid_contact_us_query']);
    422425                    $feature_plan=sanitize_text_field($_POST['mo_openid_feature_plan']);
    423                     $enable_setup_call=isset($_POST['mo_openid_setup_call'])?$_POST['mo_openid_setup_call']:false;
     426                    $enable_setup_call=isset($_POST['mo_openid_setup_call'])?sanitize_text_field($_POST['mo_openid_setup_call']) :false;
    424427                    $timezone=sanitize_text_field($_POST['mo_openid_call_timezone']);
    425428                    $date=sanitize_text_field($_POST['mo_openid_setup_call_date']);
     
    442445                    }
    443446                }
     447                }
    444448                break;
    445449
     
    449453                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    450454                } else {
    451 
     455                    if(current_user_can('administrator')){
    452456                    // Rate Us query
    453457                    $email = sanitize_email($_POST['mo_openid_rateus_email']);
     
    468472                    }
    469473                }
     474                }
    470475                break;
    471476
     
    475480                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    476481                } else {
    477 
     482                    if(current_user_can('administrator')){
    478483                    // Rate Us query
    479484                    $email = sanitize_email($_POST['cronmo_openid_rateus_email']);
     
    495500                    }
    496501                }
     502                }
    497503                break;
    498504
     
    504510                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    505511                }else {
     512                    if(current_user_can('administrator')){
    506513                    //Redirect URL
    507514                    update_option('mo_openid_login_redirect', isset($_POST['mo_openid_login_redirect'])?sanitize_text_field($_POST['mo_openid_login_redirect']):"");
     
    516523                    mo_openid_show_success_message();
    517524                }
     525            }
    518526                break;
    519527
     
    523531                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    524532                }else {
     533                    if(current_user_can('administrator')){
    525534                    update_option('mo_openid_auto_register_enable', isset($_POST['mo_openid_auto_register_enable']) ? sanitize_text_field($_POST['mo_openid_auto_register_enable']) : 0);
    526535                    update_option('mo_openid_register_disabled_message',isset($_POST['mo_openid_register_disabled_message'])? sanitize_text_field($_POST['mo_openid_register_disabled_message']):"");
     
    531540                    mo_openid_show_success_message();
    532541                }
     542            }
    533543                break;
    534544
     
    538548                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    539549                }else {
     550                    if(current_user_can('administrator')){
    540551                    update_option('mo_openid_default_login_enable', isset($_POST['mo_openid_default_login_enable']) ? sanitize_text_field($_POST['mo_openid_default_login_enable']) : 0);
    541552                    update_option('mo_openid_default_register_enable', isset($_POST['mo_openid_default_register_enable']) ? sanitize_text_field($_POST['mo_openid_default_register_enable']) : 0);
     
    546557                    update_option('mo_openid_message', 'Your settings are saved successfully.');
    547558                    mo_openid_show_success_message();
     559                    }
    548560                }
    549561                break;
     
    555567                }
    556568                else {
    557                     $code = trim($_POST['openid_licence_key']);
     569                    if(current_user_can('administrator')){
     570                    $code = trim(sanitize_text_field($_POST['openid_licence_key']));
    558571                    $customer = new CustomerOpenID();
    559572                    $content = json_decode($customer->check_customer_ln(sanitize_text_field($_POST['licience_type'])), true);
     
    593606                        } else if (strcasecmp($content['status'], 'FAILED') == 0) {
    594607                            if (strcasecmp($content['message'], 'Code has Expired') == 0) {
    595                                 $url = add_query_arg(array('tab' => 'pricing'), $_SERVER['REQUEST_URI']);
     608                                $url = add_query_arg(array('tab' => 'pricing'), sanitize_text_field($_SERVER['REQUEST_URI']));
    596609                                update_option('mo_openid_message', 'License key you have entered has already been used. Please enter a key which has not been used before on any other instance or if you have exausted all your keys then <a href="' . $url . '">Click here</a> to buy more.');
    597610                            } else {
     
    603616                            mo_openid_show_error_message();
    604617                        }
     618                       
    605619                    }
    606620                    else {
    607621                        $key = get_option('mo_openid_customer_token');
    608622                        update_option('mo_openid_site_ck_l', MOAESEncryption::encrypt_data("false", $key));
    609                         $url = add_query_arg(array('tab' => 'pricing'), $_SERVER['REQUEST_URI']);
     623                        $url = add_query_arg(array('tab' => 'pricing'), sanitize_text_field($_SERVER['REQUEST_URI']));
    610624                        update_option('mo_openid_message', 'You have not upgraded yet. <a href="' . $url . '">Click here</a> to upgrade to premium version.');
    611625                        mo_openid_show_error_message();
     
    616630                    }
    617631                }
     632            }
    618633                break;
    619634
     
    625640                            wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    626641                        } else {
     642                            if(current_user_can('administrator')){
    627643                            update_option('mo_openid_account_linking_enable', isset($_POST['mo_openid_account_linking_enable']) ? sanitize_text_field($_POST['mo_openid_account_linking_enable']) : 0);
    628644                            update_option('mo_account_linking_title', isset($_POST['mo_account_linking_title']) ? sanitize_text_field($_POST['mo_account_linking_title']) : "");
     
    638654                    }
    639655                }
     656                }
    640657                break;
    641658
     
    645662                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    646663                } else {
    647                     if(strpos($_POST['custom_otp_msg'], '##otp##' ) !== false) {
    648                         //$_POST['custom_otp_msg'] = stripslashes($_POST['custom_otp_msg']);
     664                    if(current_user_can('administrator')){
     665                    if(strpos(sanitize_text_field($_POST['custom_otp_msg']), '##otp##' ) !== false) {
    649666                        update_option('custom_otp_msg', isset($_POST['custom_otp_msg']) ? sanitize_text_field($_POST['custom_otp_msg']) : "");
    650667                        update_option('mo_openid_enable_profile_completion', isset($_POST['mo_openid_enable_profile_completion']) ? sanitize_text_field($_POST['mo_openid_enable_profile_completion']) : "");
     
    672689                    }
    673690                }
     691            }
    674692                break;
    675693
     
    679697                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    680698                }else {
     699                    if(current_user_can('administrator')){
    681700                    update_option('mo_sharing_icon_custom_size',isset($_POST['mo_sharing_icon_custom_size'])?sanitize_text_field($_POST['mo_sharing_icon_custom_size']):0);
    682701                    update_option('mo_sharing_icon_space',isset($_POST['mo_sharing_icon_space'])? sanitize_text_field($_POST['mo_sharing_icon_space']):0);
     
    695714                    mo_openid_show_success_message();
    696715                }
     716            }
    697717                break;
    698718
     
    703723                }
    704724                else{
     725                    if(current_user_can('administrator')){
    705726                    update_option('mo_share_options_enable_home_page', isset($_POST['mo_share_options_home_page']) ? sanitize_text_field($_POST['mo_share_options_home_page']) : 0);
    706727                    update_option('mo_share_options_enable_post', isset($_POST['mo_share_options_post']) ? sanitize_text_field($_POST['mo_share_options_post']) : 0);
     
    720741                    update_option('mo_openid_message', 'Your settings are saved successfully.');
    721742                    mo_openid_show_success_message();
     743                    }
    722744                }
    723745                break;
     
    728750                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    729751                } else {
    730                
     752                if(current_user_can('administrator')){
    731753                    $message='';
    732754                    $email = '';
     
    750772                        $reply_required = '';
    751773                    if(isset($_POST['get_reply']))
    752                         $reply_required = htmlspecialchars($_POST['get_reply']);
     774                        $reply_required = htmlspecialchars(sanitize_text_field($_POST['get_reply']));
    753775                        if(empty($reply_required)){
    754776                        $reply_required = "Please Don't follow";
     
    806828                   
    807829                }
     830            }
    808831                break;
    809832
     
    813836                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    814837                }else {
     838                    if(current_user_can('administrator')){
    815839                    update_option( 'mo_openid_share_count', isset( $_POST['mo_openid_share_count']) ? sanitize_text_field($_POST['mo_openid_share_count']) : 0);
    816840                    update_option( 'mo_openid_Facebook_share_count_api', isset( $_POST['mo_openid_Facebook_share_count_api']) ? sanitize_text_field($_POST['mo_openid_Facebook_share_count_api']) : '');
    817841                    update_option('mo_openid_message', 'Your settings are saved successfully.');
    818842                    mo_openid_show_success_message();
     843                    }
    819844                }
    820845                break;
     
    825850                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    826851                } else {
     852                    if(current_user_can('administrator')){
    827853                    update_option('mo_openid_social_comment_fb', isset($_POST['mo_openid_social_comment_fb']) ? sanitize_text_field($_POST['mo_openid_social_comment_fb']) : 0);
    828854                    update_option('mo_openid_social_comment_disqus', isset($_POST['mo_openid_social_comment_disqus']) ? sanitize_text_field($_POST['mo_openid_social_comment_disqus']) : 0);
     
    831857                    update_option('mo_openid_message', 'Your settings are saved successfully.');
    832858                    mo_openid_show_success_message();
     859                    }
    833860                }
    834861                break;
     
    839866                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    840867                } else {
     868                    if(current_user_can('administrator')){
    841869                    update_option('mo_openid_social_comment_blogpost', isset($_POST['mo_openid_social_comment_blogpost']) ? sanitize_text_field($_POST['mo_openid_social_comment_blogpost']) : 0);
    842870                    update_option('mo_openid_social_comment_static', isset($_POST['mo_openid_social_comment_static']) ? sanitize_text_field($_POST['mo_openid_social_comment_static']) : 0);
     
    844872                    mo_openid_show_success_message();
    845873                }
     874            }
    846875                break;
    847876
     
    851880                    wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    852881                } else {
     882                    if(current_user_can('administrator')){
    853883                    update_option('mo_openid_social_comment_default_label',isset($_POST['mo_openid_social_comment_default_label'])? sanitize_text_field($_POST['mo_openid_social_comment_default_label']):0);
    854884                    update_option('mo_openid_social_comment_fb_label', isset($_POST['mo_openid_social_comment_fb_label'])?sanitize_text_field($_POST['mo_openid_social_comment_fb_label']):0);
     
    857887                    update_option('mo_openid_message', 'Your settings are saved successfully.');
    858888                    mo_openid_show_success_message();
     889                    }
    859890                }
    860891                break;
     
    871902        delete_option('mo_openid_host_name');
    872903        delete_option('mo_openid_transactionId');
    873         delete_option('mo_openid_admin_password');
    874904        delete_option('mo_openid_registration_status');
    875905        delete_option('mo_openid_admin_phone');
     
    884914
    885915
    886    
     916    function mo_openid_feedback_request(){
     917        if(get_option('mo_openid_deactivate_reason_form')=='0')
     918            mo_openid_display_feedback_form();
     919    }
    887920    function mo_openid_add_social_share_links($content) {
    888921        global $post;
     
    10421075        global $post;
    10431076        $title = str_replace('+', '%20', urlencode($post->post_title));
    1044         echo mo_openid_share_shortcode('', $title);
     1077        echo esc_attr(mo_openid_share_shortcode('', $title));
    10451078    }
    10461079
     
    10561089        $curr_user = get_current_user_id();
    10571090        if ($curr_user == 0) {
    1058             $last_name = isset($_POST['last_name']) ? sanitize_text_field($_POST['last_name']) : "";
    1059             $first_name = isset($_POST['first_name']) ? sanitize_text_field($_POST['first_name']) : "";
    1060             $user_full_name = isset($_POST['user_full_name']) ? sanitize_text_field($_POST['user_full_name']) : "";
    1061             $user_url = isset($_POST['user_url']) ? sanitize_text_field($_POST['user_url']) : "";
    1062             $call = sanitize_text_field($_POST['call']);
    1063             $user_profile_url = isset($_POST['user_profile_url']) ? sanitize_text_field($_POST['user_profile_url']) : "";
    1064             $user_picture = isset($_POST['user_picture']) ? sanitize_text_field($_POST['user_picture']) : "";
    1065             $username = isset($_POST['username']) ? sanitize_text_field($_POST['username']) : "";
    1066             $user_email = isset($_POST['user_email']) ? sanitize_text_field($_POST['user_email']) : "";
    1067             $random_password = isset($_POST['random_password']) ? sanitize_text_field($_POST['random_password']) : "";
    1068             $decrypted_app_name = isset($_POST['decrypted_app_name']) ? sanitize_text_field($_POST['decrypted_app_name']) : "";
    1069             $decrypted_user_id = isset($_POST['decrypted_user_id']) ? sanitize_text_field($_POST['decrypted_user_id']) : "";
    1070             $social_app_name = isset($_POST['social_app_name']) ? sanitize_text_field($_POST['social_app_name']) : "";
    1071             $social_user_id = isset($_POST['social_user_id']) ? sanitize_text_field($_POST['social_user_id']) : "";
     1091            $last_name = isset($_POST['last_name']) ? sanitize_text_field($_POST['last_name']) : "";  // phpcs:ignore
     1092            $first_name = isset($_POST['first_name']) ? sanitize_text_field($_POST['first_name']) : "";  // phpcs:ignore
     1093            $user_full_name = isset($_POST['user_full_name']) ? sanitize_text_field($_POST['user_full_name']) : "";  // phpcs:ignore
     1094            $user_url = isset($_POST['user_url']) ? sanitize_text_field($_POST['user_url']) : "";  // phpcs:ignore
     1095            $call = isset($_POST['call']) ? sanitize_text_field($_POST['call']) : "";  // phpcs:ignore
     1096            $user_profile_url = isset($_POST['user_profile_url']) ? sanitize_text_field($_POST['user_profile_url']) : "";  // phpcs:ignore
     1097            $user_picture = isset($_POST['user_picture']) ? sanitize_text_field($_POST['user_picture']) : "";  // phpcs:ignore
     1098            $username = isset($_POST['username']) ? sanitize_text_field($_POST['username']) : "";  // phpcs:ignore
     1099            $user_email = isset($_POST['user_email']) ? sanitize_text_field($_POST['user_email']) : "";  // phpcs:ignore
     1100            $random_password = isset($_POST['random_password']) ? sanitize_text_field($_POST['random_password']) : "";  // phpcs:ignore
     1101            $decrypted_app_name = isset($_POST['decrypted_app_name']) ? sanitize_text_field($_POST['decrypted_app_name']) : "";  // phpcs:ignore
     1102            $decrypted_user_id = isset($_POST['decrypted_user_id']) ? sanitize_text_field($_POST['decrypted_user_id']) : "";  // phpcs:ignore
     1103            $social_app_name = isset($_POST['social_app_name']) ? sanitize_text_field($_POST['social_app_name']) : "";  // phpcs:ignore
     1104            $social_user_id = isset($_POST['social_user_id']) ? sanitize_text_field($_POST['social_user_id']) : "";  // phpcs:ignore
    10721105        } else {
    10731106            $last_name = "";
     
    10931126        if (is_user_logged_in()) :
    10941127            ?>
    1095             <div><a role="button" href="<?php echo wp_logout_url(get_permalink()); ?>">Log Out</a></div>
     1128            <div><a role="button" href="<?php echo esc_url(wp_logout_url(get_permalink())); ?>">Log Out</a></div>
    10961129        <?php
    10971130        endif;
  • miniorange-login-openid/trunk/miniorange_openid_sso_settings_page.php

    r2788668 r2853010  
    11<?php
    22
    3 include_once dirname(__FILE__) . '/mo_openid_sso_encryption.php';
     3require_once dirname( __FILE__ ) . '/mo_openid_sso_encryption.php';
    44
    55ob_start();
    66
    7 require('view/config_apps/mo_openid_config_apps.php');
    8 require('view/customise_social_icons/mo_openid_cust_icons.php');
    9 require('view/disp_options/mo_openid_dispopt.php');
    10 require('view/doc_tab/mo_openid_doc_tab.php');
    11 require('view/email_settings/mo_openid_set_email.php');
    12 require('view/integration/mo_openid_integrate.php');
    13 require('view/licensing_plans/mo_openid_lic_plans.php');
    14 require('view/link_social_account/mo_openid_Acclink.php');
    15 require('view/premium_features/mo_openid_prem_feat.php');
    16 require('view/profile_completion/mo_openid_prof_comp.php');
    17 require('view/recaptcha/mo_openid_recap.php');
    18 require('view/redirect_options/mo_openid_redirect_op.php');
    19 require('view/registration/mo_openid_registration.php');
    20 require('view/reports/mo_openid_reports.php');
    21 require('view/shrtco/mo_openid_shrtco.php');
    22 require('CustomerOpenID.php');
    23 require('view/soc_sha/soc_apps/mo_openid_sharing.php');
    24 require('view/soc_sha/share_cnt/mo_openid_shrcnt.php');
    25 require('view/soc_sha/cust_text/mo_openid_cust_shricon.php');
    26 require('view/soc_sha/disp_shropt/mo_openid_disp_shropt.php');
    27 require('view/soc_sha/shrt_co/mo_openid_shrtco.php');
    28 require('view/soc_com/com_Cust/mo_openid_comm_cust.php');
    29 require('view/soc_com/com_display_options/mo_openid_comm_disp_opt.php');
    30 require('view/soc_com/com_select_app/mo_openid_comm_select_app.php');
    31 require('view/soc_com/com_Enable/mo_openid_comm_enable.php');
    32 require('view/soc_com/com_shrtco/comm_shrtco.php');
    33 include('view/add_on/custom_registration_form.php');
    34 require('view/add_on/mo_mailchimp_add_on.php');
    35 require('view/add_on/mo_hubspot_add_on.php');
    36 require('view/add_on/mo_discord_add_on.php');
    37 require('view/soc_sha/soc_med_cust/mo_openid_social_media_cust.php');
    38 require ('view/soc_sha/twitter_btn/mo_twitter_btn.php');
    39 require('view/soc_sha/soc_med_ser/mo_openid_social_media_services.php');
    40 require('view/tlwp/mo_openid_tlwp.php');
     7require 'view/config_apps/mo_openid_config_apps.php';
     8require 'view/customise_social_icons/mo_openid_cust_icons.php';
     9require 'view/disp_options/mo_openid_dispopt.php';
     10require 'view/doc_tab/mo_openid_doc_tab.php';
     11require 'view/email_settings/mo_openid_set_email.php';
     12require 'view/integration/mo_openid_integrate.php';
     13require 'view/licensing_plans/mo_openid_lic_plans.php';
     14require 'view/link_social_account/mo_openid_Acclink.php';
     15require 'view/premium_features/mo_openid_prem_feat.php';
     16require 'view/profile_completion/mo_openid_prof_comp.php';
     17require 'view/recaptcha/mo_openid_recap.php';
     18require 'view/redirect_options/mo_openid_redirect_op.php';
     19require 'view/registration/mo_openid_registration.php';
     20require 'view/reports/mo_openid_reports.php';
     21require 'view/shrtco/mo_openid_shrtco.php';
     22require 'CustomerOpenID.php';
     23require 'view/soc_sha/soc_apps/mo_openid_sharing.php';
     24require 'view/soc_sha/share_cnt/mo_openid_shrcnt.php';
     25require 'view/soc_sha/cust_text/mo_openid_cust_shricon.php';
     26require 'view/soc_sha/disp_shropt/mo_openid_disp_shropt.php';
     27require 'view/soc_sha/shrt_co/mo_openid_shrtco.php';
     28require 'view/soc_com/com_Cust/mo_openid_comm_cust.php';
     29require 'view/soc_com/com_display_options/mo_openid_comm_disp_opt.php';
     30require 'view/soc_com/com_select_app/mo_openid_comm_select_app.php';
     31require 'view/soc_com/com_Enable/mo_openid_comm_enable.php';
     32require 'view/soc_com/com_shrtco/comm_shrtco.php';
     33require 'view/add_on/custom_registration_form.php';
     34require 'view/add_on/mo_woocommerce_add_on.php';
     35require 'view/add_on/mo_mailchimp_add_on.php';
     36require 'view/add_on/mo_buddypress_add_on.php';
     37require 'view/add_on/mo_hubspot_add_on.php';
     38require 'view/add_on/mo_discord_add_on.php';
     39require 'view/soc_sha/soc_med_cust/mo_openid_social_media_cust.php';
     40require 'view/soc_sha/twitter_btn/mo_twitter_btn.php';
     41require 'view/soc_sha/soc_med_ser/mo_openid_social_media_services.php';
    4142
    4243function mo_register_openid() {
    43     if (isset($_GET['tab']) && $_GET['tab'] !== 'register') {
    44         $active_tab = $_GET['tab'];
    45     } else {
    46         $active_tab = 'config_apps';
    47     }
    48     if(mo_openid_restrict_user())
    49         $disable="disabled";
    50     else
    51         $disable="";
    52 
    53 
    54     if($active_tab == 'reports' )
    55     {
    56         ?>
    57         <br>
    58         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    59         <br>
    60         <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
    61 
    62         <?php
    63     }
    64     else if($active_tab == 'doc_tab'||$active_tab=='rest_api_page'){
    65         ?>
    66         <br>
    67         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    68         <br>
    69         <?php
    70     }
    71     else if($active_tab == 'licensing_plans')
    72     {
    73         ?>
    74         <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
    75         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    76         <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
    77                     <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
    78                         <div class="mo_openid-quote">
    79                             <p>
    80                                 <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
    81                                     <span class="mo_openid-info">
    82                                         <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
    83                                         <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
    84                                     </span>
    85                                 </span>
    86                             </p>
    87                         </div>
    88                         <br><br>
    89                     </li>
    90         </div>
    91 
    92         <?php
    93     }
    94     else
    95     {
    96         if($active_tab=='integration-woocommerce' || $active_tab=='integration-buddypress' || $active_tab=='integration-mailchimp' || $active_tab=='integration-customregistration' || $active_tab=='integration-hubspot' || $active_tab=='integration-discord' || $active_tab=='integration-memberpress' || $active_tab=='integration-paidmemb') {
    97             $active_tab='integration';
    98         }
    99     ?>
    100 
    101     <?php
    102     include('view/rate_us/rate_us.php');
    103 
    104     ?>
    105     <div style="width: 100%;margin-top: 13px;" id="mo-main-content-div">
    106         <div id="mo_openid_menu_height" style="width: 15%; float: left; background-color: #32373C; ">
    107             <div style="margin-top: 9px;border-bottom: 0px;text-align:center;">
    108                 <div><img style="float:left;margin-left:8px;padding-top: 5px; height: 52px;width: 54px;padding-bottom: 23px;" src="<?php echo plugins_url( 'includes/images/logo.png"', __FILE__ ); ?>"></div>
    109                 <br>
    110                 <span style="font-size:18px;color:white;float:left; font-weight: 900;"><?php echo mo_sl('miniOrange');?></span>
    111             </div>
    112             <div class="mo_openid_tab" style="width:100%;">
    113                 <a id="config_apps" class="tablinks<?php if($active_tab=="config_apps") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'config_apps'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Configure Apps');?></a>
    114                 <a id="customise_social_icons" class="tablinks<?php if($active_tab=="customise_social_icons") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'customise_social_icons'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Customise Social Login Icons')?></a>
    115                 <a id="disp_opt" class="tablinks<?php if($active_tab=="disp_opt") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'disp_opt'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Display Options');?></a>
    116                 <a id="redirect_opt" class="tablinks<?php if($active_tab=="redirect_opt") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'redirect_opt'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Redirect Options');?></a>
    117                 <a id="registration" class="tablinks<?php if($active_tab=="registration") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'registration'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Registration');?></a>
    118                 <?php $i=get_current_user_id();
    119                 $temp_user=get_user_meta($i, 'temporary_url', true);
    120                 if( !$temp_user) {
    121                 ?>
    122                 <a id="tlwp" class="tablinks<?php if($active_tab=="tlwp") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'tlwp'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Create Temporary Login');?></a>
    123                 <?php } ?>
    124                 <a id="integration" style="color: white;" class="tablinks<?php if($active_tab=="integration") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'integration'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Popular Integrations');?><span class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    125                 <a id="profile_completion" class="tablinks<?php if($active_tab=="profile_completion") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'profile_completion'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Profile Completion');?></a>
    126                 <a id="email_settings" class="tablinks<?php if($active_tab=="email_settings") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'email_settings'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Email Notification');?><span class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    127                 <a id="recaptcha" class="tablinks<?php if($active_tab=="recaptcha") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'recaptcha'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Recaptcha / GDPR');?><span class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    128                 <a id="premium_features" class="tablinks<?php if($active_tab=="premium_features") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'premium_features'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Premium Features');?><span class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    129                 <a id="link_social_acc" class="tablinks<?php if($active_tab=="link_social_acc") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'link_social_acc'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Link Social Account & Domain Restriction');?><?php if($disable){?><span class="mo-openid-premium"><?php echo mo_sl('PRO');?></span><?php } ?></a>
    130                 <a id="shortcodes" class="tablinks<?php if($active_tab=="shortcodes") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'shortcodes'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Shortcodes');?></a>
    131                 <a id="add_on" class="tablinks<?php if($active_tab=="add_on") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Add On');?></a>
    132                 <a id="profile" class="tablinks<?php if($active_tab=="profile") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'profile'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('User Profile');?></a>
    133             </div>
    134         </div>
    135         <style>
    136             body {font-family: Arial, Helvetica, sans-serif;}
    137         </style>
    138         <div id="mo_openid_settings" style="width: 85%; float: right;">
    139             <div style="background-color: #FFFFFF;width: 100%;">
    140                     <div id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding-bottom: 32px;padding-top: 12px;">&nbsp
    141                        <div align="center">
    142                             <table>
    143                                 <tr>
    144                                     <td><div>
    145                                         <a id="addon" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; " <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Add On');?></a>
    146                                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="pricing" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" onclick="mo_openid_extension_switch()"><?php echo mo_sl('Licensing Plan');?></a>
    147                                             &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="doc_tab" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'doc_tab'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Documentation");?></a>
    148                                             &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<b><a id="rest_api_page" class="mo_sl_header_text mo_sl_effect-shining mo_sl_expand" target="_blank" style="color: white; text-decoration: none; "<?php echo $active_tab == 'rest_api_page' ? 'nav-tab-active' : ''; ?>" href="https://plugins.miniorange.com/wordpress-rest-api-authentication"><?php echo mo_sl("Rest API");?></a></b>
    149                                             &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="reports" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'reports'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Reports");?></a>
    150                                             &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="mo_openid_rateus_modal" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" onclick="asdf(this)" style="color: white; text-decoration: none; " ><?php echo mo_sl('Rate us');?></a>
    151                                             &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="sale" class="mo_sl_header_text mo_button_black " style="color: black; text-decoration: none; " href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" ><?php echo mo_sl('Sale');?></a>
    152 <!--                                        &nbsp;&nbsp;&nbsp;<a id="mo_openid_restart_gtour" class="header_text" style="color: white; text-decoration: none; " onclick="window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';restart_tour()" value="Restart Tour">--><?php //echo mo_sl('Restart Tour');?><!--</a>-->
    153                                         </div>
    154                                     </td>
    155                                 </tr>
    156                             </table>
    157                         </div>
    158                     </div>
    159                     <div id="mo_openid_msgs"></div>
    160                 <table style="width:100%;">
    161                     <?php
    162                     }
    163                     ?>
    164                         <tr>
    165                             <td style="vertical-align:top;">
    166                                 <?php
    167                                 switch ($active_tab){
    168                                     case 'config_apps':
    169                                         mo_openid_show_apps();
    170                                         break;
    171                                     case 'customise_social_icons':
    172                                         mo_openid_customise_social_icons();
    173                                         break;
    174                                     case 'disp_opt':
    175                                         mo_openid_disp_opt();
    176                                         break;
    177                                     case 'redirect_opt':
    178                                         mo_openid_redirect_opt();
    179                                         break;
    180                                     case 'tlwp':
    181                                         mo_openid_tlwp();
    182                                         break;
    183                                     case 'registration':
    184                                         mo_openid_registration();
    185                                         break;
    186                                     case 'link_social_acc':
    187                                         mo_openid_linkSocialAcc();
    188                                         break;
    189                                     case 'profile_completion':
    190                                         mo_openid_profile_completion();
    191                                         break;
    192                                     case 'email_settings':
    193                                         mo_openid_email_notification();
    194                                         break;
    195                                     case 'recaptcha':
    196                                         mo_openid_configure_recaptcha();
    197                                         break;
    198                                     case 'premium_features':
    199                                         mo_openid_premium_features();
    200                                         break;
    201                                     case  'rest_api_page':
    202                                         mo_openid_rest_api_page();
    203                                         break;
    204                                     case 'integration':
    205                                     case 'integration-woocommerce':
    206                                     case 'integration-buddypress':
    207                                     case 'integration-mailchimp':
    208                                     case 'integration-customregistration':
    209                                     case 'integration-hubspot':
    210                                     case 'integration-discord':
    211                                     case 'integration-memberpress':
    212                                     case 'integration-paidmemb':
    213                                         mo_openid_integrations();
    214                                         break;
    215                                     case 'shortcodes':
    216                                         mo_openid_login_shortcodes();
    217                                         break;
    218                                     case 'add_on':
    219                                         header('Location: '.site_url().'/wp-admin/admin.php?page=mo_openid_settings_addOn');
    220                                         break;
    221                                     case  'profile':
    222                                         mo_openid_profile();
    223                                         break;
    224                                     case 'reports':
    225                                         mo_openid_reports();
    226                                         break;
    227                                     case 'doc_tab':
    228                                         mo_openid_doc_tab();
    229                                         break;
    230                                     case 'licensing_plans':
    231                                         mo_openid_licensing_plans();
    232                                         break;
    233                                 }
    234                                 ?>
    235                             </td>
    236                         </tr>
    237                     </table>
    238                 </div>
    239             </div>
    240         </div>
    241         <script type="text/javascript" src= "<?php echo plugins_url('/includes/js/mo_openid_phone.js',__FILE__); ?>"></script>
    242         <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo mo_sl('NEED HELP'); ?>">
    243     <div style="position: fixed; bottom: 97px; right: 166px;" >
    244 
    245         <ul id="mo-support-menu">
    246             <a class="mo-support-menu-button" href="#mo-support-menu" onclick="hide_txt()" title="Need Help ?"> <img style=" height: 72px; width: 72px;" src="<?php echo plugins_url( 'includes/images/support.png"', __FILE__ ); ?>"> </a>
    247             <a class="mo-support-menu-button" href="#0" onclick="un_hide_txt()" ><img style=" height: 72px; width: 72px;" src="<?php echo plugins_url( 'includes/images/support.png"', __FILE__ ); ?>"></a>
    248 
    249                 <li class="mo-support-menu-item ">
    250                     <div class="tttooltip" >
    251                     <a href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank">
    252                         <span > <i class="fab fa-wpforms" style="margin-left: 12px;margin-top: 12px;"></i></span>
    253                     </a>
    254                     <span class="tttooltiptext">Forum</span>
    255                     </div>
    256                 </li>
    257             <li class="mo-support-menu-item mo-setup-video">
    258                 <div class="tttooltip" >
    259                 <a href="https://youtu.be/ln17jan6t1Y" target="_blank">
    260                     <span ><i class="fa fa-cogs" style="margin-left: 10px; margin-top: 12px;"></i></span>
    261                 </a>
    262                     <span class="tttooltiptext">Setup Video</span></div>
    263             </li>
    264 
    265             <li class="mo-support-menu-item">
    266                 <div class="tttooltip" >
    267                 <a href="#mo-support-menu" onclick="window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';restart_tour()">
    268                     <span ><i class="fa fa-history" style="margin-left: 12px; margin-top: 12px;"></i></span>
    269                 </a>
    270                 <span class="tttooltiptext">Restart Tour</span></div>
    271             </li>
    272             <li class="mo-support-menu-item">
    273                 <div class="tttooltip" >
    274                 <a href="#mo-support-menu" onclick="mo_openid_support_form('')">
    275                     <span ><i class="fa fa-user" style="margin-left: 14px; margin-top: 12px;"></i></span>
    276                 </a>
    277                     <span class="tttooltiptext">Mail Us</span></div>
    278             </li>
    279         </ul>
    280     </div>
    281     <button type="button" id="need-help-txt" onclick="hide_txt()" class="mo-sl-help-button-text" style="">Hello there!<br>Need Help? Drop us an Email</button>
    282     <?php include('view/support_form/miniorange_openid_support_form.php');?>
    283     <script>
    284 
    285         jQuery("#contact_us_phone").intlTelInput();
    286             function hide_txt(){
    287 
    288                 var mod = document.getElementById("need-help-txt");
    289                 mod.style.display = "none";
    290             }
    291         function un_hide_txt(){
    292 
    293             var mod = document.getElementById("need-help-txt");
    294             mod.style.display = "block";
    295         }
    296             function mo_openid_support_form(abc) {
    297 
    298                 var def = "It seems that you have shown interest. Please elaborate more on your requirements.";
    299                 if (abc == '' || abc == "undefined")
    300                     def = "Write your query here";
    301 
    302                 jQuery("#contact_us_phone").intlTelInput();
    303                 var modal = document.getElementById("myModal");
    304                 modal.style.display = "block";
    305                 var mo_btn = document.getElementById("mymo_btn");
    306                 mo_btn.style.display = "none";
    307                 var span = document.getElementsByClassName("mo_support_close")[0];
    308                 var modales = document.getElementById("myModalsss");
    309 
    310                 document.getElementById('mo_openid_support_msg').placeholder = def;
    311                 document.getElementById("feature_plan").value= abc;
    312                 span.onclick = function () {
    313                     modal.style.display = "none";
    314                     mo_btn.style.display = "none";
    315                 }
    316                 window.onclick = function (event) {
    317                     if (event.target == modal) {
    318                         modal.style.display = "none";
    319                         modales.style.display = "none";
    320                         mo_btn.style.display = "none";
    321                     }
    322                 }
    323             }
    324 
    325         function wordpress_support() {
    326             window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
    327         }
    328 
    329         function mo_openid_valid_query(f) {
    330             !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
    331 
    332         }
    333     </script>
    334     <script>
    335         function five_star() {
    336             jQuery("#mo_openid_rateus_myModal").hide();
    337             jQuery("#mo_openid_rating-5").prop('checked',false);
    338 
    339         }
    340         function mo_openid_extension_switch(){
    341             var extension_url = window.location.href;
    342             var cookie_names = "extension_current_url";
    343             var d = new Date();
    344             d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
    345             var expired = "expires="+d.toUTCString();
    346             document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
    347             <?php update_option('mo_openid_extension_tab','0');?>
    348         }
    349         function form_popup(rating){
    350             var mo_openid_rating_given_nonce = '<?php echo wp_create_nonce('mo-openid-rating-given-nonce'); ?>';
    351             jQuery.ajax({
    352                 url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
    353                 method: "POST", //request type,
    354                 dataType: 'json',
    355                 data: {
    356                     action: 'mo_openid_rating_given',
    357                     rating: rating,
    358                     'mo_openid_rating_given_nonce' : mo_openid_rating_given_nonce,
    359                 },
    360                 success: function (result) {
    361                     jQuery("#mo_openid_support_form_feedback").show();
    362                     jQuery("#moOpenIdRateUs").hide();
    363                 }
    364             });
    365         }
    366         // Get the modal
    367         var modal = document.getElementById("mo_openid_rateus_myModal");
    368 
    369         // Get the button that opens the modal
    370         var mo_btn = document.getElementById("mo_openid_rateus_modal");
    371 
    372         // Get the <span> element that closes the modal
    373         var mo_openid_span = document.getElementsByClassName("mo_openid_rateus_close")[0];
    374         var mo_openid_span1 = document.getElementsByClassName("mo_openid_rateus_feedback_close")[0];
    375 
    376 
    377         // When the user clicks the button, open the modal
    378 
    379         mo_btn.onclick = function() {
    380             jQuery("#mo_openid_support_form_feedback").hide();
    381             jQuery("#mo_openid_rating-4").prop('checked',false);
    382             jQuery("#mo_openid_rating-3").prop('checked',false);
    383             jQuery("#mo_openid_rating-2").prop('checked',false);
    384             jQuery("#mo_openid_rating-1").prop('checked',false);
    385             jQuery("#mo_openid_rating-0").prop('checked',false);
    386             modal.style.display ="block";
    387             jQuery("#moOpenIdRateUs").show();
    388         }
    389 
    390         // When the user clicks on <span> (x), close the modal
    391         mo_openid_span.onclick = function() {
    392             modal.style.display = "none";
    393         }
     44    if ( isset( $_GET['tab'] ) && sanitize_text_field( $_GET['tab'] ) !== 'register' ) {  // phpcs:ignore WordPress.Security.NonceVerification
     45        $active_tab = sanitize_text_field( $_GET['tab'] ); // phpcs:ignore WordPress.Security.NonceVerification
     46    } else {
     47        $active_tab = 'config_apps';
     48    }
     49    if ( mo_openid_restrict_user() ) {
     50        $disable = 'disabled';
     51    } else {
     52        $disable = '';
     53    }
     54
     55    if ( $active_tab == 'reports' ) {
     56        ?>
     57        <br>
     58        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     59        <br>
     60        <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
     61
     62        <?php
     63    } elseif ( $active_tab == 'doc_tab' || $active_tab == 'rest_api_page' ) {
     64        ?>
     65        <br>
     66        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     67        <br>
     68        <?php
     69    } elseif ( $active_tab == 'licensing_plans' ) {
     70        ?>
     71        <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
     72        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     73        <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
     74                    <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
     75                        <div class="mo_openid-quote">
     76                            <p>
     77                                <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
     78                                    <span class="mo_openid-info">
     79                                        <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
     80                                        <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
     81                                    </span>
     82                                </span>
     83                            </p>
     84                        </div>
     85                        <br><br>
     86                    </li>
     87        </div>
     88
     89        <?php
     90    } else {
     91        if ( $active_tab == 'integration-woocommerce' || $active_tab == 'integration-buddypress' || $active_tab == 'integration-mailchimp' || $active_tab == 'integration-customregistration' || $active_tab == 'integration-hubspot' || $active_tab == 'integration-discord' || $active_tab == 'integration-memberpress' || $active_tab == 'integration-paidmemb' ) {
     92            $active_tab = 'integration';
     93        }
     94        ?>
     95
     96        <?php
     97        include 'view/rate_us/rate_us.php';
     98
     99        ?>
     100    <div style="width: 100%;margin-top: 13px;" id="mo-main-content-div">
     101        <div id="mo_openid_menu_height" style="width: 15%; float: left; background-color: #32373C; ">
     102            <div style="margin-top: 9px;border-bottom: 0px;text-align:center;">
     103                <div><img style="float:left;margin-left:8px;padding-top: 5px; height: 52px;width: 54px;padding-bottom: 23px;" src="<?php echo esc_url( plugins_url( 'includes/images/logo.png"', __FILE__ ) ); ?>"></div>
     104                <br>
     105                <span style="font-size:18px;color:white;float:left; font-weight: 900;"><?php echo esc_attr( mo_sl( 'miniOrange' ) ); ?></span>
     106            </div>
     107            <div class="mo_openid_tab" style="width:100%;">
     108                <a id="config_apps" class="tablinks
     109                <?php
     110                if ( $active_tab == 'config_apps' ) {
     111                    echo '_active';}
     112                ?>
     113                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'config_apps' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Configure Apps' ) ); ?></a>
     114                <a id="customise_social_icons" class="tablinks
     115                <?php
     116                if ( $active_tab == 'customise_social_icons' ) {
     117                    echo '_active';}
     118                ?>
     119                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'customise_social_icons' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Customise Social Login Icons' ) ); ?></a>
     120                <a id="disp_opt" class="tablinks
     121                <?php
     122                if ( $active_tab == 'disp_opt' ) {
     123                    echo '_active';}
     124                ?>
     125                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'disp_opt' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Display Options' ) ); ?></a>
     126                <a id="redirect_opt" class="tablinks
     127                <?php
     128                if ( $active_tab == 'redirect_opt' ) {
     129                    echo '_active';}
     130                ?>
     131                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'redirect_opt' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Redirect Options' ) ); ?></a>
     132                <a id="registration" class="tablinks
     133                <?php
     134                if ( $active_tab == 'registration' ) {
     135                    echo '_active';}
     136                ?>
     137                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'registration' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Registration' ) ); ?></a>
     138                <a id="integration" style="color: white;" class="tablinks
     139                <?php
     140                if ( $active_tab == 'integration' ) {
     141                    echo '_active';}
     142                ?>
     143                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Popular Integrations' ) ); ?><span class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     144                <a id="profile_completion" class="tablinks
     145                <?php
     146                if ( $active_tab == 'profile_completion' ) {
     147                    echo '_active';}
     148                ?>
     149                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'profile_completion' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Profile Completion' ) ); ?></a>
     150                <a id="email_settings" class="tablinks
     151                <?php
     152                if ( $active_tab == 'email_settings' ) {
     153                    echo '_active';}
     154                ?>
     155                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'email_settings' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Email Notification' ) ); ?><span class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     156                <a id="recaptcha" class="tablinks
     157                <?php
     158                if ( $active_tab == 'recaptcha' ) {
     159                    echo '_active';}
     160                ?>
     161                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'recaptcha' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Recaptcha / GDPR' ) ); ?><span class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     162                <a id="premium_features" class="tablinks
     163                <?php
     164                if ( $active_tab == 'premium_features' ) {
     165                    echo '_active';}
     166                ?>
     167                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'premium_features' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Premium Features' ) ); ?><span class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     168                <a id="link_social_acc" class="tablinks
     169                <?php
     170                if ( $active_tab == 'link_social_acc' ) {
     171                    echo '_active';}
     172                ?>
     173                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'link_social_acc' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Link Social Account & Domain Restriction' ) ); ?>
     174                     <?php
     175                        if ( $disable ) {
     176                            ?>
     177                    <span class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span><?php } ?></a>
     178                <a id="shortcodes" class="tablinks
     179                <?php
     180                if ( $active_tab == 'shortcodes' ) {
     181                    echo '_active';}
     182                ?>
     183                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'shortcodes' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Shortcodes' ) ); ?></a>
     184                <a id="add_on" class="tablinks
     185                <?php
     186                if ( $active_tab == 'add_on' ) {
     187                    echo '_active';}
     188                ?>
     189                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Add On' ) ); ?></a>
     190                <a id="profile" class="tablinks
     191                <?php
     192                if ( $active_tab == 'profile' ) {
     193                    echo '_active';}
     194                ?>
     195                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'profile' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'User Profile' ) ); ?></a>
     196            </div>
     197        </div>
     198        <style>
     199            body {font-family: Arial, Helvetica, sans-serif;}
     200        </style>
     201        <div id="mo_openid_settings" style="width: 85%; float: right;">
     202            <div style="background-color: #FFFFFF;width: 100%;">
     203                    <div id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding-bottom: 32px;padding-top: 12px;">&nbsp
     204                       <div align="center">
     205                            <table>
     206                                <tr>
     207                                    <td><div>
     208                                        <a id="addon" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; " <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Add On' ) ); ?></a>
     209                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="pricing" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" onclick="mo_openid_extension_switch()"><?php echo esc_attr( mo_sl( 'Licensing Plan' ) ); ?></a>
     210                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="doc_tab" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'doc_tab' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Documentation' ) ); ?></a>
     211                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<b><a id="rest_api_page" class="mo_sl_header_text mo_sl_effect-shining mo_sl_expand" target="_blank" style="color: white; text-decoration: none; "<?php echo $active_tab == 'rest_api_page' ? 'nav-tab-active' : ''; ?>" href="https://plugins.miniorange.com/wordpress-rest-api-authentication"><?php echo esc_attr( mo_sl( 'Rest API' ) ); ?></a></b>
     212                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="reports" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" style="color: white; text-decoration: none; "<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'reports' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Reports' ) ); ?></a>
     213                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="mo_openid_rateus_modal" class="mo_sl_header_text mo_sl_effect-shine mo_sl_expand" onclick="asdf(this)" style="color: white; text-decoration: none; " ><?php echo esc_attr( mo_sl( 'Rate us' ) ); ?></a>
     214                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<a id="sale" class="mo_sl_header_text mo_button_black " style="color: black; text-decoration: none; " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" ><?php echo esc_attr( mo_sl( 'Sale' ) ); ?></a>
     215<!--                                        &nbsp;&nbsp;&nbsp;<a id="mo_openid_restart_gtour" class="header_text" style="color: white; text-decoration: none; " onclick="window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';restart_tour()" value="Restart Tour">--><?php // echo mo_sl('Restart Tour'); ?><!--</a>-->
     216                                        </div>
     217                                    </td>
     218                                </tr>
     219                            </table>
     220                        </div>
     221                    </div>
     222                    <div id="mo_openid_msgs"></div>
     223                <table style="width:100%;">
     224                    <?php
     225    }
     226    ?>
     227                        <tr>
     228                            <td style="vertical-align:top;">
     229                                <?php
     230                                switch ( $active_tab ) {
     231                                    case 'config_apps':
     232                                        mo_openid_show_apps();
     233                                        break;
     234                                    case 'customise_social_icons':
     235                                        mo_openid_customise_social_icons();
     236                                        break;
     237                                    case 'disp_opt':
     238                                        mo_openid_disp_opt();
     239                                        break;
     240                                    case 'redirect_opt':
     241                                        mo_openid_redirect_opt();
     242                                        break;
     243                                    case 'registration':
     244                                        mo_openid_registration();
     245                                        break;
     246                                    case 'link_social_acc':
     247                                        mo_openid_linkSocialAcc();
     248                                        break;
     249                                    case 'profile_completion':
     250                                        mo_openid_profile_completion();
     251                                        break;
     252                                    case 'email_settings':
     253                                        mo_openid_email_notification();
     254                                        break;
     255                                    case 'recaptcha':
     256                                        mo_openid_configure_recaptcha();
     257                                        break;
     258                                    case 'premium_features':
     259                                        mo_openid_premium_features();
     260                                        break;
     261                                    case 'rest_api_page':
     262                                        mo_openid_rest_api_page();
     263                                        break;
     264                                    case 'integration':
     265                                    case 'integration-woocommerce':
     266                                    case 'integration-buddypress':
     267                                    case 'integration-mailchimp':
     268                                    case 'integration-customregistration':
     269                                    case 'integration-hubspot':
     270                                    case 'integration-discord':
     271                                    case 'integration-memberpress':
     272                                    case 'integration-paidmemb':
     273                                        mo_openid_integrations();
     274                                        break;
     275                                    case 'shortcodes':
     276                                        mo_openid_login_shortcodes();
     277                                        break;
     278                                    case 'add_on':
     279                                        header( 'Location: ' . site_url() . '/wp-admin/admin.php?page=mo_openid_settings_addOn' );
     280                                        break;
     281                                    case 'profile':
     282                                        mo_openid_profile();
     283                                        break;
     284                                    case 'reports':
     285                                        mo_openid_reports();
     286                                        break;
     287                                    case 'doc_tab':
     288                                        mo_openid_doc_tab();
     289                                        break;
     290                                    case 'licensing_plans':
     291                                        mo_openid_licensing_plans();
     292                                        break;
     293                                }
     294                                ?>
     295                            </td>
     296                        </tr>
     297                    </table>
     298                </div>
     299            </div>
     300        </div>
     301        <script type="text/javascript" src= "<?php echo esc_url( plugins_url( '/includes/js/mo_openid_phone.js', __FILE__ ) ); ?>"></script>
     302        <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo esc_attr( mo_sl( 'NEED HELP' ) ); ?>">
     303    <div style="position: fixed; bottom: 97px; right: 166px;" >
     304
     305        <ul id="mo-support-menu">
     306            <a class="mo-support-menu-button" href="#mo-support-menu" onclick="hide_txt()" title="Need Help ?"> <img style=" height: 72px; width: 72px;" src="<?php echo esc_url( plugins_url( 'includes/images/support.png"', __FILE__ ) ); ?>"> </a>
     307            <a class="mo-support-menu-button" href="#0" onclick="un_hide_txt()" ><img style=" height: 72px; width: 72px;" src="<?php echo esc_url( plugins_url( 'includes/images/support.png"', __FILE__ ) ); ?>"></a>
     308
     309                <li class="mo-support-menu-item ">
     310                    <div class="tttooltip" >
     311                    <a href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank">
     312                        <span > <i class="fab fa-wpforms" style="margin-left: 12px;margin-top: 12px;"></i></span>
     313                    </a>
     314                    <span class="tttooltiptext">Forum</span>
     315                    </div>
     316                </li>
     317            <li class="mo-support-menu-item mo-setup-video">
     318                <div class="tttooltip" >
     319                <a href="https://youtu.be/ln17jan6t1Y" target="_blank">
     320                    <span ><i class="fa fa-cogs" style="margin-left: 10px; margin-top: 12px;"></i></span>
     321                </a>
     322                    <span class="tttooltiptext">Setup Video</span></div>
     323            </li>
     324
     325            <li class="mo-support-menu-item">
     326                <div class="tttooltip" >
     327                <a href="#mo-support-menu" onclick="window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';restart_tour()">
     328                    <span ><i class="fa fa-history" style="margin-left: 12px; margin-top: 12px;"></i></span>
     329                </a>
     330                <span class="tttooltiptext">Restart Tour</span></div>
     331            </li>
     332            <li class="mo-support-menu-item">
     333                <div class="tttooltip" >
     334                <a href="#mo-support-menu" onclick="mo_openid_support_form('')">
     335                    <span ><i class="fa fa-user" style="margin-left: 14px; margin-top: 12px;"></i></span>
     336                </a>
     337                    <span class="tttooltiptext">Mail Us</span></div>
     338            </li>
     339        </ul>
     340    </div>
     341    <button type="button" id="need-help-txt" onclick="hide_txt()" class="mo-sl-help-button-text" style="">Hello there!<br>Need Help? Drop us an Email</button>
     342    <?php include 'view/support_form/miniorange_openid_support_form.php'; ?>
     343    <script>
     344
     345        jQuery("#contact_us_phone").intlTelInput();
     346            function hide_txt(){
     347
     348                var mod = document.getElementById("need-help-txt");
     349                mod.style.display = "none";
     350            }
     351        function un_hide_txt(){
     352
     353            var mod = document.getElementById("need-help-txt");
     354            mod.style.display = "block";
     355        }
     356            function mo_openid_support_form(abc) {
     357
     358                var def = "It seems that you have shown interest. Please elaborate more on your requirements.";
     359                if (abc == '' || abc == "undefined")
     360                    def = "Write your query here";
     361
     362                jQuery("#contact_us_phone").intlTelInput();
     363                var modal = document.getElementById("myModal");
     364                modal.style.display = "block";
     365                var mo_btn = document.getElementById("mymo_btn");
     366                mo_btn.style.display = "none";
     367                var span = document.getElementsByClassName("mo_support_close")[0];
     368                var modales = document.getElementById("myModalsss");
     369
     370                document.getElementById('mo_openid_support_msg').placeholder = def;
     371                document.getElementById("feature_plan").value= abc;
     372                span.onclick = function () {
     373                    modal.style.display = "none";
     374                    mo_btn.style.display = "none";
     375                }
     376                window.onclick = function (event) {
     377                    if (event.target == modal) {
     378                        modal.style.display = "none";
     379                        modales.style.display = "none";
     380                        mo_btn.style.display = "none";
     381                    }
     382                }
     383            }
     384
     385        function wordpress_support() {
     386            window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
     387        }
     388
     389        function mo_openid_valid_query(f) {
     390            !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
     391
     392        }
     393    </script>
     394    <script>
     395        function five_star() {
     396            jQuery("#mo_openid_rateus_myModal").hide();
     397            jQuery("#mo_openid_rating-5").prop('checked',false);
     398
     399        }
     400        function mo_openid_extension_switch(){
     401            var extension_url = window.location.href;
     402            var cookie_names = "extension_current_url";
     403            var d = new Date();
     404            d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
     405            var expired = "expires="+d.toUTCString();
     406            document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
     407            <?php update_option( 'mo_openid_extension_tab', '0' ); ?>
     408        }
     409        function form_popup(rating){
     410            var mo_openid_rating_given_nonce = '<?php echo esc_attr( wp_create_nonce( 'mo-openid-rating-given-nonce' ) ); ?>';
     411            jQuery.ajax({
     412                url: "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", //the page containing php script
     413                method: "POST", //request type,
     414                dataType: 'json',
     415                data: {
     416                    action: 'mo_openid_rating_given',
     417                    rating: rating,
     418                    'mo_openid_rating_given_nonce' : mo_openid_rating_given_nonce,
     419                },
     420                success: function (result) {
     421                    jQuery("#mo_openid_support_form_feedback").show();
     422                    jQuery("#moOpenIdRateUs").hide();
     423                }
     424            });
     425        }
     426        // Get the modal
     427        var modal = document.getElementById("mo_openid_rateus_myModal");
     428
     429        // Get the button that opens the modal
     430        var mo_btn = document.getElementById("mo_openid_rateus_modal");
     431
     432        // Get the <span> element that closes the modal
     433        var mo_openid_span = document.getElementsByClassName("mo_openid_rateus_close")[0];
     434        var mo_openid_span1 = document.getElementsByClassName("mo_openid_rateus_feedback_close")[0];
     435
     436
     437        // When the user clicks the button, open the modal
     438
     439        mo_btn.onclick = function() {
     440            jQuery("#mo_openid_support_form_feedback").hide();
     441            jQuery("#mo_openid_rating-4").prop('checked',false);
     442            jQuery("#mo_openid_rating-3").prop('checked',false);
     443            jQuery("#mo_openid_rating-2").prop('checked',false);
     444            jQuery("#mo_openid_rating-1").prop('checked',false);
     445            jQuery("#mo_openid_rating-0").prop('checked',false);
     446            modal.style.display ="block";
     447            jQuery("#moOpenIdRateUs").show();
     448        }
     449
     450        // When the user clicks on <span> (x), close the modal
     451        mo_openid_span.onclick = function() {
     452            modal.style.display = "none";
     453        }
    394454        mo_openid_span1.onclick = function() {
    395             modal.style.display = "none";
    396         }
    397 
    398         // When the user clicks anywhere outside of the modal, close it
    399         window.onclick = function(event){
    400             if (event.target == modal) {
    401                 modal.style.display = "none";
    402             }
    403         }
    404 
    405         var base_url = '<?php echo site_url();?>';
    406 
    407         var new_tour1 = new Tour({
    408             name: "new_tour1",
    409             steps: [
    410                 {
    411                     element: "#mo_openid_free_avail_apps",
    412                     title: "Available apps",
    413                     content: "Available social login apps.",
    414                     backdrop:'body',
    415                     backdropPadding:'6',
    416                 },
    417                 {
    418                     element: "#google",
    419                     title: "Enable social login apps",
    420                     content: "Configure your own custom apps for social login applications by clicking on any of the application box.",
    421                     backdrop:'body',
    422                     backdropPadding:'6',
    423                     onNext: function() {
    424                         getappsInLine('google');
    425                     }
    426                 },
    427                 {
    428                     element: "#mo_set_pre_config_app",
    429                     title: "Enable pre-configure app",
    430                     content: "If you don't want to set up your own app then enable pre configured app from here.",
    431                     backdrop:'body',
    432                     backdropPadding:'6',
    433                 },
    434                 {
    435                     element: "#mo_openid_cust_app_instructions",
    436                     title: "Configure your app",
    437                     content: "If you want to set up your own app then follow these instrutions.",
    438                     backdrop:'body',
    439                     backdropPadding:'6',
    440                 },
    441 
    442                 {
    443                     element: ".mo-openid-app-name",
    444                     title: "Set up custom app",
    445                     content: "Enter your App ID and Secret here.",
    446                     backdrop:'body',
    447                     backdropPadding:'6',
    448                     onNext: function() {
    449                         jQuery('#custom_app_div').hide();
    450                         jQuery(".mo-openid-sort-apps-move").css("background", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAiCAYAAACuoaIwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+tpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTAxLTE3VDE1OjE4OjM5KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjhCNkM3MkZGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjhCNkM3MzBGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCOEI2QzcyREZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOEI2QzcyRUZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po8u91EAAABlSURBVHjaYvz//z8DvQATAx3BqGWjlg0ey1iIUKMDxHFQ9iIgvkKkHFk+AxnGD8VxJMhRHIyMZMoRbRkoeD4B8QcgXkiCHKZrRsvG0aQ/mvRHk/5o0h9N+qNJf9SyUcuoCAACDABr5TA7L7qpSQAAAABJRU5ErkJggg==')");
    451                     }
    452                 },
    453                 {
    454                     element: "#mo_openid_move_google",
    455                     title: "Change positions of login icons",
    456                     content: "You can change positions of social login icons by holding and dragging these 4 dots.",
    457                     backdrop:'body',
    458                     backdropPadding:'6',
    459                     onNext: function(){
    460                         window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=disp_opt';
    461                     }
    462                 },
    463                 {
    464                     element: "#mo_openid_disp_opt_tour",
    465                     title: "Display options.",
    466                     content: "Select options where you want to display social login icons.",
    467                     backdrop:'body',
    468                     delay: 300,
    469                     backdropPadding:'6',
    470                     onNext: function() {
    471                         window.location = base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=licensing_plans'
    472                     }
    473                 },{
    474                     element: "#pricing",
    475                     title: "Licensing Plans",
    476                     content: "Check out more features to choose the best plan for you.",
    477                     backdrop:'body',
    478                     delay:300,
    479                     backdropPadding:'6',
    480                 }
    481             ],
    482             template: function () {
    483                 var return_value;
    484                 if(new_tour1.getCurrentStep()===7)
    485                     return_value="<div style='margin-top:2%;font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> <div class=\"mo_openid_arrow\" ></div> <h3 class=\"mo_openid_popover-header\" style='margin-top: 0px'></h3> <div class=\"mo_openid_popover-body\"></div> <div class=\"mo_openid_popover-navigation\"> <div class=\"mo_openid_tour_mo_btn-group\"><div style=\"width:47%;margin-top: -7%;\"><h4  style=\"float:left;margin-top:30%;margin-left:30%;\">"+ (new_tour1.getCurrentStep()+1)+"/8</h4></div></div>&nbsp;&nbsp; <button class=\"button button-primary button-large\" data-role=\"end\" onclick=\"end_new_tour1();\">Done</button> </div> </div>";
    486                 else {
    487                     if(new_tour1.getCurrentStep()===6){
    488                         return_value = "" +
    489                             "<div style='width:13% !important;font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> " +
    490                             "<div class=\"mo_openid_arrow\" ></div> " +
    491                             "<h3 class=\"mo_openid_popover-header\" style=\"font-size: 1rem;\"></h3> " +
    492                             "<div class=\"mo_openid_popover-body\"></div> " +
    493                             "<div class=\"mo_openid_popover-navigation\"> " +
    494                             "<div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"> " +
    495                             "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"next\">Next &raquo;</button>&nbsp;&nbsp;" +
    496                             "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"end\" onclick=\"end_new_tour1();\">Skip</button>" +
    497                             "<div style=\"width:47%;margin-top: -7%;\">" +
    498                             "<h4  style=\"float:right;margin-left: 53%;\">" + (new_tour1.getCurrentStep() + 1) + "/8</h4>" +
    499                             "</div>" +
    500                             "</div>" +
    501                             "</div>" +
    502                             "</div>";
    503                     }
    504                     else {
    505                         return_value = "" +
    506                             "<div style='font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> " +
    507                             "<div class=\"mo_openid_arrow\" ></div> " +
    508                             "<h3 class=\"mo_openid_popover-header\" style=\"margin-top:0px;\"></h3> " +
    509                             "<div class=\"mo_openid_popover-body\"></div> " +
    510                             "<div class=\"mo_openid_popover-navigation\"> " +
    511                             "<div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"> " +
    512                             "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"next\">Next &raquo;</button>&nbsp;&nbsp;" +
    513                             "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"end\" onclick=\"end_new_tour1();\">Skip</button>" +
    514                             "<div style=\"width:47%;margin-top: -7%;\">" +
    515                             "<h4  style=\"float:right;margin-left: 53%;\">" + (new_tour1.getCurrentStep() + 1) + "/8</h4>" +
    516                             "</div>" +
    517                             "</div>" +
    518                             "</div>" +
    519                             "</div>";
    520                     }
    521                 }
    522                 return (return_value);
    523             }
    524         });
    525 
    526         var temp = "<?php echo get_option('mo_openid_tour_new'); ?>";
    527         temp =0;
    528         if(temp=="0") { // Initialize the tour
    529             new_tour1.init();
    530             // Start the tour
    531             new_tour1.start();
    532         }
    533         function restart_tour() {
    534             window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
    535             new_tour1.restart();
    536         }
    537 
    538         function end_new_tour2(){
    539 
    540             var tour_variable = "plugin_tour";
    541             jQuery.ajax({
    542                 url:base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps', //the page containing php script
    543                 method: "POST", //request type,
    544                 data: {update_tour_status: tour_variable},
    545                 dataType: 'text',
    546                 success:function(result){
    547                     window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
    548                 }
    549             });
    550         }
    551         function end_new_tour1() {
    552             window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
    553         }
    554 
    555 
    556 
    557         var new_tour2 = new Tour({
    558             name: "new_tour2",
    559             steps: [
    560                 {
    561                     element: "#mo_support_form",
    562                     title: "miniOrange Support",
    563                     content: "Feel free to reach out to us in case of any assistance.",
    564                     backdrop:'body',
    565                     //delay:200,
    566                     backdropPadding:'6',
    567                     onshow: function() {
    568                         mo_openid_support_form('');
    569                     }
    570                 },
    571             ],
    572             template: function () {
    573                 return ("<div class=\"mo_openid_popover\" role=\"tooltip\"> <div class=\"mo_openid_arrow\" ></div> <h3 class=\"mo_openid_popover-header\" style=\"margin-top:0px;\"></h3> <div class=\"mo_openid_popover-body\"></div> <div class=\"mo_openid_popover-navigation\"> <div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"><button class=\"button button-primary button-large\" data-role=\"end\"onclick='end_new_tour2();'>OK Got It</button></div></div></div>");
    574             }
    575         });
    576         var temp = "<?php echo get_option('mo_openid_tour_new'); ?>";
    577         if(temp=="0"&&new_tour1.ended()) {
    578             new_tour2.init();
    579             if(!new_tour2.ended()) {
     455            modal.style.display = "none";
     456        }
     457
     458        // When the user clicks anywhere outside of the modal, close it
     459        window.onclick = function(event){
     460            if (event.target == modal) {
     461                modal.style.display = "none";
     462            }
     463        }
     464
     465        var base_url = '<?php echo esc_url( site_url() ); ?>';
     466
     467        var new_tour1 = new Tour({
     468            name: "new_tour1",
     469            steps: [
     470                {
     471                    element: "#mo_openid_free_avail_apps",
     472                    title: "Available apps",
     473                    content: "Available social login apps.",
     474                    backdrop:'body',
     475                    backdropPadding:'6',
     476                },
     477                {
     478                    element: "#google",
     479                    title: "Enable social login apps",
     480                    content: "Configure your own custom apps for social login applications by clicking on any of the application box.",
     481                    backdrop:'body',
     482                    backdropPadding:'6',
     483                    onNext: function() {
     484                        getappsInLine('google');
     485                    }
     486                },
     487                {
     488                    element: "#mo_set_pre_config_app",
     489                    title: "Enable pre-configure app",
     490                    content: "If you don't want to set up your own app then enable pre configured app from here.",
     491                    backdrop:'body',
     492                    backdropPadding:'6',
     493                },
     494                {
     495                    element: "#mo_openid_cust_app_instructions",
     496                    title: "Configure your app",
     497                    content: "If you want to set up your own app then follow these instrutions.",
     498                    backdrop:'body',
     499                    backdropPadding:'6',
     500                },
     501
     502                {
     503                    element: ".mo-openid-app-name",
     504                    title: "Set up custom app",
     505                    content: "Enter your App ID and Secret here.",
     506                    backdrop:'body',
     507                    backdropPadding:'6',
     508                    onNext: function() {
     509                        jQuery('#custom_app_div').hide();
     510                        jQuery(".mo-openid-sort-apps-move").css("background", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAiCAYAAACuoaIwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+tpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTAxLTE3VDE1OjE4OjM5KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOC0wMS0xN1QxNjoxMTo0MSswMTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjhCNkM3MkZGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjhCNkM3MzBGQjk4MTFFN0E4RDJBRUZBQTI4OUVBNzIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCOEI2QzcyREZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOEI2QzcyRUZCOTgxMUU3QThEMkFFRkFBMjg5RUE3MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po8u91EAAABlSURBVHjaYvz//z8DvQATAx3BqGWjlg0ey1iIUKMDxHFQ9iIgvkKkHFk+AxnGD8VxJMhRHIyMZMoRbRkoeD4B8QcgXkiCHKZrRsvG0aQ/mvRHk/5o0h9N+qNJf9SyUcuoCAACDABr5TA7L7qpSQAAAABJRU5ErkJggg==')");
     511                    }
     512                },
     513                {
     514                    element: "#mo_openid_move_google",
     515                    title: "Change positions of login icons",
     516                    content: "You can change positions of social login icons by holding and dragging these 4 dots.",
     517                    backdrop:'body',
     518                    backdropPadding:'6',
     519                    onNext: function(){
     520                        window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=disp_opt';
     521                    }
     522                },
     523                {
     524                    element: "#mo_openid_disp_opt_tour",
     525                    title: "Display options.",
     526                    content: "Select options where you want to display social login icons.",
     527                    backdrop:'body',
     528                    delay: 300,
     529                    backdropPadding:'6',
     530                    onNext: function() {
     531                        window.location = base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=licensing_plans'
     532                    }
     533                },{
     534                    element: "#pricing",
     535                    title: "Licensing Plans",
     536                    content: "Check out more features to choose the best plan for you.",
     537                    backdrop:'body',
     538                    delay:300,
     539                    backdropPadding:'6',
     540                }
     541            ],
     542            template: function () {
     543                var return_value;
     544                if(new_tour1.getCurrentStep()===7)
     545                    return_value="<div style='margin-top:2%;font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> <div class=\"mo_openid_arrow\" ></div> <h3 class=\"mo_openid_popover-header\" style='margin-top: 0px'></h3> <div class=\"mo_openid_popover-body\"></div> <div class=\"mo_openid_popover-navigation\"> <div class=\"mo_openid_tour_mo_btn-group\"><div style=\"width:47%;margin-top: -7%;\"><h4  style=\"float:left;margin-top:30%;margin-left:30%;\">"+ (new_tour1.getCurrentStep()+1)+"/8</h4></div></div>&nbsp;&nbsp; <button class=\"button button-primary button-large\" data-role=\"end\" onclick=\"end_new_tour1();\">Done</button> </div> </div>";
     546                else {
     547                    if(new_tour1.getCurrentStep()===6){
     548                        return_value = "" +
     549                            "<div style='width:13% !important;font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> " +
     550                            "<div class=\"mo_openid_arrow\" ></div> " +
     551                            "<h3 class=\"mo_openid_popover-header\" style=\"font-size: 1rem;\"></h3> " +
     552                            "<div class=\"mo_openid_popover-body\"></div> " +
     553                            "<div class=\"mo_openid_popover-navigation\"> " +
     554                            "<div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"> " +
     555                            "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"next\">Next &raquo;</button>&nbsp;&nbsp;" +
     556                            "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"end\" onclick=\"end_new_tour1();\">Skip</button>" +
     557                            "<div style=\"width:47%;margin-top: -7%;\">" +
     558                            "<h4  style=\"float:right;margin-left: 53%;\">" + (new_tour1.getCurrentStep() + 1) + "/8</h4>" +
     559                            "</div>" +
     560                            "</div>" +
     561                            "</div>" +
     562                            "</div>";
     563                    }
     564                    else {
     565                        return_value = "" +
     566                            "<div style='font-size: unset !important' class=\"mo_openid_popover\" role=\"tooltip\"> " +
     567                            "<div class=\"mo_openid_arrow\" ></div> " +
     568                            "<h3 class=\"mo_openid_popover-header\" style=\"margin-top:0px;\"></h3> " +
     569                            "<div class=\"mo_openid_popover-body\"></div> " +
     570                            "<div class=\"mo_openid_popover-navigation\"> " +
     571                            "<div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"> " +
     572                            "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"next\">Next &raquo;</button>&nbsp;&nbsp;" +
     573                            "<button class=\"mo_openid_tour_mo_btn mo_openid_tour_mo_btn-sm mo_openid_tour_mo_btn-secondary mo_openid_tour_mo_btn_next-success\" style=\"width: 54%;height: 0%;font-size: 1rem;\" data-role=\"end\" onclick=\"end_new_tour1();\">Skip</button>" +
     574                            "<div style=\"width:47%;margin-top: -7%;\">" +
     575                            "<h4  style=\"float:right;margin-left: 53%;\">" + (new_tour1.getCurrentStep() + 1) + "/8</h4>" +
     576                            "</div>" +
     577                            "</div>" +
     578                            "</div>" +
     579                            "</div>";
     580                    }
     581                }
     582                return (return_value);
     583            }
     584        });
     585
     586        var temp = "<?php echo esc_attr( get_option( 'mo_openid_tour_new' ) ); ?>";
     587        temp =0;
     588        if(temp=="0") { // Initialize the tour
     589            new_tour1.init();
     590            // Start the tour
     591            new_tour1.start();
     592        }
     593        function restart_tour() {
     594            window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
     595            new_tour1.restart();
     596        }
     597
     598        function end_new_tour2(){
     599
     600            var tour_variable = "plugin_tour";
     601            jQuery.ajax({
     602                url:base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps', //the page containing php script
     603                method: "POST", //request type,
     604                data: {update_tour_status: tour_variable},
     605                dataType: 'text',
     606                success:function(result){
     607                    window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
     608                }
     609            });
     610        }
     611        function end_new_tour1() {
     612            window.location= base_url+'/wp-admin/admin.php?page=mo_openid_general_settings&tab=config_apps';
     613        }
     614
     615
     616
     617        var new_tour2 = new Tour({
     618            name: "new_tour2",
     619            steps: [
     620                {
     621                    element: "#mo_support_form",
     622                    title: "miniOrange Support",
     623                    content: "Feel free to reach out to us in case of any assistance.",
     624                    backdrop:'body',
     625                    //delay:200,
     626                    backdropPadding:'6',
     627                    onshow: function() {
     628                        mo_openid_support_form('');
     629                    }
     630                },
     631            ],
     632            template: function () {
     633                return ("<div class=\"mo_openid_popover\" role=\"tooltip\"> <div class=\"mo_openid_arrow\" ></div> <h3 class=\"mo_openid_popover-header\" style=\"margin-top:0px;\"></h3> <div class=\"mo_openid_popover-body\"></div> <div class=\"mo_openid_popover-navigation\"> <div class=\"mo_openid_tour_mo_btn-group\" style=\"width: 100%;\"><button class=\"button button-primary button-large\" data-role=\"end\"onclick='end_new_tour2();'>OK Got It</button></div></div></div>");
     634            }
     635        });
     636        var temp = "<?php echo esc_attr( get_option( 'mo_openid_tour_new' ) ); ?>";
     637        if(temp=="0"&&new_tour1.ended()) {
     638            new_tour2.init();
     639            if(!new_tour2.ended()) {
    580640                mo_openid_support_form('');
    581641            }
    582             new_tour2.start();
    583         }
    584 
    585 
    586     </script>
    587     <?php
     642            new_tour2.start();
     643        }
     644
     645
     646    </script>
     647    <?php
    588648
    589649}
    590650
    591 function mo_register_sharing_openid()
    592 {
    593 
    594     if (isset($_GET['tab']) && $_GET['tab'] !== 'register') {
    595         $active_tab = $_GET['tab'];
    596     } else {
    597         $active_tab = 'soc_apps';
    598     }
    599 
    600     if($active_tab == 'reports' )
    601     {
    602         ?>
    603         <br>
    604         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    605         <br>
    606         <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
    607 
    608         <?php
    609     }
    610     else if($active_tab == 'doc_tab'){
    611         ?>
    612         <br>
    613         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    614         <br>
    615         <?php
    616     }
    617     else if($active_tab == 'licensing_plans')
    618     {
    619         ?>
    620         <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
    621         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    622         <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
    623                         <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
    624                             <div class="mo_openid-quote">
    625                                 <p>
    626                                     <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
    627                                         <span class="mo_openid-info">
    628                                             <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
    629                                             <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
    630                                         </span>
    631                                     </span>
    632                                 </p>
    633                             </div>
    634                             <br><br>
    635                         </li>
    636 
    637 
    638         </div>
    639 
    640 
    641         <?php
    642     }
    643     else
    644         {
    645 
    646     ?>
    647 
    648     <div>
    649         <table>
    650             <tr>
    651                 <td><img id="logo" style="margin-top: 25px"
    652                          src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/logo.png"></td>
    653                 <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/"
    654                              target="_blank"><h1 style="color: #c9302c"><?php echo mo_sl('miniOrange Social Login');?></h1></a></td>
    655                 <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank"><?php echo mo_sl('Forum');?></a></td>
    656                 <td> <a id="addon" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button" <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Add On');?></a></td>
    657                 <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'doc_tab'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Documentation");?></a></td>
    658                 <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'reports'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Reports");?></a></td>
    659                 <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" onclick="mo_openid_extension_switch()"><?php echo mo_sl('Upgrade Now');?></a></td>
    660                 <td>
    661             </tr>
    662         </table>
    663     </div>
    664     <div style="width: 100%">
    665 
    666         <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
    667             <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
    668                 <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;"
    669                           src="<?php echo plugins_url('includes/images/logo.png"', __FILE__); ?>"></div>
    670                 <br>
    671                 <span style="font-size:20px;color:white;float:left;"><?php echo mo_sl('miniOrange');?></span>
    672             </div>
    673 
    674             <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
    675                 <a id="social_apps" class="tablinks<?php if ($active_tab == "soc_apps") echo '_active'; ?>"
    676                    href="<?php echo add_query_arg(array('tab' => 'soc_apps'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Select
    677                     Social Apps');?></a>
    678                 <a id="customization"
    679                    class="tablinks<?php if ($active_tab == "customization") echo '_active'; ?>"
    680                    href="<?php echo add_query_arg(array('tab' => 'customization'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Customization');?>
    681                 </a>
    682                 <a id="share_cnt" class="tablinks<?php if ($active_tab == "share_cnt") echo '_active'; ?>"
    683                    href="<?php echo add_query_arg(array('tab' => 'share_cnt'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Social
    684                     Share Counts');?></a>
    685 
    686                 <a id="display_opt" class="tablinks<?php if ($active_tab == "display_opt") echo '_active'; ?>"
    687                    href="<?php echo add_query_arg(array('tab' => 'display_opt'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Display
    688                     Option');?></a>
    689                 <a id="short_code" class="tablinks<?php if ($active_tab == "short_code") echo '_active'; ?>"
    690                    href="<?php echo add_query_arg(array('tab' => 'short_code'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Shortcodes');?></a>
    691 
    692                 <a id="social_media_services" class="tablinks<?php if ($active_tab == "social_media_services") echo '_active'; ?>"
    693                    href="<?php echo add_query_arg(array('tab' => 'social_media_services'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Social Media Services');?><span style="margin-left: 1%" class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    694 
    695                 <a id="social_icons_customization" class="tablinks<?php if ($active_tab == "social_icons_customization") echo '_active'; ?>"
    696                    href="<?php echo add_query_arg(array('tab' => 'social_icons_customization'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Social Icons Customization');?><span style="margin-left: 2%" class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    697 
    698                 <a id="mo_twitter_mo_btn" class="tablinks<?php if ($active_tab == "mo_twitter_mo_btn") echo '_active'; ?>"
    699                    href="<?php echo add_query_arg(array('tab' => 'mo_twitter_mo_btn'), $_SERVER['REQUEST_URI']); ?>"><?php echo mo_sl('Twitter Follow Button');?><span style="margin-left: 1%" class="mo-openid-premium"><?php echo mo_sl('PRO');?></span></a>
    700 
    701 
    702             </div>
    703         </div>
    704 
    705         <div id="mo_openid_settings" style="width: 85%; float: right;">
    706             <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
    707                 <div class="mo_container">
    708                     <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
    709                     <div id="mo_openid_msgs"></div>
    710                     <table style="width:100%;">
    711                         <?php
    712                         }
    713                         ?>
    714                         <tr>
    715                             <td style="vertical-align:top;">
    716                                 <?php
    717                                 switch ($active_tab) {
    718                                     case 'soc_apps':
    719                                         mo_openid_share_apps();
    720                                         break;
    721                                     case 'share_cnt':
    722                                         mo_openid_share_cnt();
    723                                         break;
    724                                     case 'customization':
    725                                         mo_openid_customize_icons();
    726                                         break;
    727                                     case 'display_opt':
    728                                         mo_openid_display_share_opt();
    729                                         break;
    730                                     case 'short_code':
    731                                         mo_openid_short_code();
    732                                         break;
    733                                     case 'licensing_plans':
    734                                         mo_openid_licensing_plans();
    735                                         break;
    736                                     case 'add_on':
    737                                         header('Location: '.site_url().'/wp-admin/admin.php?page=mo_openid_settings_addOn');
    738                                         break;
    739                                     case 'social_media_services':
    740                                         mo_openid_social_media_services();
    741                                         break;
    742                                     case 'social_icons_customization':
    743                                         mo_openid_social_icons_customization();
    744                                         break;
    745                                     case 'mo_twitter_mo_btn':
    746                                         mo_twitter_mo_btn();
    747                                         break;
    748                                     case 'reports':
    749                                         mo_openid_reports();
    750                                         break;
    751                                     case 'doc_tab':
    752                                         mo_openid_doc_tab();
    753                                         break;
    754                                 }
    755                                 ?>
    756                             </td>
    757                         </tr>
    758                     </table>
    759                 </div>
    760             </div>
    761         </div>
    762         <script type="text/javascript" src="<?php echo plugins_url('/includes/js/mo_openid_phone.js', __FILE__); ?>"></script>
    763 
    764         <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo mo_sl('NEED HELP'); ?>">
    765 
    766     </div>
    767     <?php include('view/support_form/miniorange_openid_support_form.php');?>
    768     <script>
    769         function mo_openid_extension_switch(){
    770             var extension_url = window.location.href;
    771             var cookie_names = "extension_current_url";
    772             var d = new Date();
    773             d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
    774             var expired = "expires="+d.toUTCString();
    775             document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
    776             <?php update_option('mo_openid_extension_tab','0');?>
    777         }
    778         jQuery("#contact_us_phone").intlTelInput();
    779         function mo_openid_support_form(abc) {
    780             jQuery("#contact_us_phone").intlTelInput();
    781             var modal = document.getElementById("myModal");
    782             modal.style.display = "block";
    783             var mo_btn=document.getElementById("mymo_btn");
    784             mo_btn.style.display="none";
    785             var span = document.getElementsByClassName("mo_support_close")[0];
    786             span.onclick = function () {
    787                 modal.style.display = "none";
    788                 mo_btn.style.display="block";
    789             }
    790             window.onclick = function (event) {
    791                 if (event.target == modal) {
    792                     modal.style.display = "none";
    793                     mo_btn.style.display="block";
    794                 }
    795             }
    796         }
    797         function wordpress_support() {
    798             window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
    799 
    800         }
    801 
    802         function mo_openid_valid_query(f) {
    803             !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
    804 
    805         }
    806     </script>
    807     <?php
     651function mo_register_sharing_openid() {
     652    if ( isset( $_GET['tab'] ) && sanitize_text_field( $_GET['tab'] ) !== 'register' ) { // phpcs:ignore WordPress.Security.NonceVerification
     653        $active_tab = sanitize_text_field( $_GET['tab'] ); // phpcs:ignore WordPress.Security.NonceVerification
     654    } else {
     655        $active_tab = 'soc_apps';
     656    }
     657
     658    if ( $active_tab == 'reports' ) {
     659        ?>
     660        <br>
     661        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     662        <br>
     663        <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
     664
     665        <?php
     666    } elseif ( $active_tab == 'doc_tab' ) {
     667        ?>
     668        <br>
     669        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     670        <br>
     671        <?php
     672    } elseif ( $active_tab == 'licensing_plans' ) {
     673        ?>
     674        <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
     675        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     676        <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
     677                        <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
     678                            <div class="mo_openid-quote">
     679                                <p>
     680                                    <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
     681                                        <span class="mo_openid-info">
     682                                            <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
     683                                            <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
     684                                        </span>
     685                                    </span>
     686                                </p>
     687                            </div>
     688                            <br><br>
     689                        </li>
     690
     691
     692        </div>
     693
     694
     695        <?php
     696    } else {
     697
     698        ?>
     699
     700    <div>
     701        <table>
     702            <tr>
     703                <td><img id="logo" style="margin-top: 25px"
     704                         src="<?php echo esc_url( plugin_dir_url( __FILE__ ) ); ?>includes/images/logo.png"></td>
     705                <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/"
     706                             target="_blank"><h1 style="color: #c9302c"><?php echo esc_attr( mo_sl( 'miniOrange Social Login' ) ); ?></h1></a></td>
     707                <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank"><?php echo esc_attr( mo_sl( 'Forum' ) ); ?></a></td>
     708                <td> <a id="addon" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button" <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Add On' ) ); ?></a></td>
     709                <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'doc_tab' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Documentation' ) ); ?></a></td>
     710                <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'reports' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Reports' ) ); ?></a></td>
     711                <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" onclick="mo_openid_extension_switch()"><?php echo esc_attr( mo_sl( 'Upgrade Now' ) ); ?></a></td>
     712                <td>
     713            </tr>
     714        </table>
     715    </div>
     716    <div style="width: 100%">
     717
     718        <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
     719            <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
     720                <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;"
     721                          src="<?php echo esc_url( plugins_url( 'includes/images/logo.png"', __FILE__ ) ); ?>"></div>
     722                <br>
     723                <span style="font-size:20px;color:white;float:left;"><?php echo esc_attr( mo_sl( 'miniOrange' ) ); ?></span>
     724            </div>
     725
     726            <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
     727                <a id="social_apps" class="tablinks
     728                <?php
     729                if ( $active_tab == 'soc_apps' ) {
     730                    echo '_active';}
     731                ?>
     732                "
     733                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'soc_apps' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">
     734                                    <?php
     735                                    echo esc_attr(
     736                                        mo_sl(
     737                                            'Select
     738                    Social Apps'
     739                                        )
     740                                    );
     741                                    ?>
     742                            </a>
     743                <a id="customization"
     744                   class="tablinks
     745                   <?php
     746                    if ( $active_tab == 'customization' ) {
     747                        echo '_active';}
     748                    ?>
     749                    "
     750                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'customization' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Customization' ) ); ?>
     751                </a>
     752                <a id="share_cnt" class="tablinks
     753                <?php
     754                if ( $active_tab == 'share_cnt' ) {
     755                    echo '_active';}
     756                ?>
     757                "
     758                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'share_cnt' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">
     759                                    <?php
     760                                    echo esc_attr(
     761                                        mo_sl(
     762                                            'Social
     763                    Share Counts'
     764                                        )
     765                                    );
     766                                    ?>
     767                            </a>
     768
     769                <a id="display_opt" class="tablinks
     770                <?php
     771                if ( $active_tab == 'display_opt' ) {
     772                    echo '_active';}
     773                ?>
     774                "
     775                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'display_opt' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">
     776                                    <?php
     777                                    echo esc_attr(
     778                                        mo_sl(
     779                                            'Display
     780                    Option'
     781                                        )
     782                                    );
     783                                    ?>
     784                            </a>
     785                <a id="short_code" class="tablinks
     786                <?php
     787                if ( $active_tab == 'short_code' ) {
     788                    echo '_active';}
     789                ?>
     790                "
     791                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'short_code' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Shortcodes' ) ); ?></a>
     792
     793                <a id="social_media_services" class="tablinks
     794                <?php
     795                if ( $active_tab == 'social_media_services' ) {
     796                    echo '_active';}
     797                ?>
     798                "
     799                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'social_media_services' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Social Media Services' ) ); ?><span style="margin-left: 1%" class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     800
     801                <a id="social_icons_customization" class="tablinks
     802                <?php
     803                if ( $active_tab == 'social_icons_customization' ) {
     804                    echo '_active';}
     805                ?>
     806                "
     807                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'social_icons_customization' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Social Icons Customization' ) ); ?><span style="margin-left: 2%" class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     808
     809                <a id="mo_twitter_mo_btn" class="tablinks
     810                <?php
     811                if ( $active_tab == 'mo_twitter_mo_btn' ) {
     812                    echo '_active';}
     813                ?>
     814                "
     815                   href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_twitter_mo_btn' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Twitter Follow Button' ) ); ?><span style="margin-left: 1%" class="mo-openid-premium"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></span></a>
     816
     817
     818            </div>
     819        </div>
     820
     821        <div id="mo_openid_settings" style="width: 85%; float: right;">
     822            <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
     823                <div class="mo_container">
     824                    <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
     825                    <div id="mo_openid_msgs"></div>
     826                    <table style="width:100%;">
     827                        <?php
     828    }
     829    ?>
     830                        <tr>
     831                            <td style="vertical-align:top;">
     832                                <?php
     833                                switch ( $active_tab ) {
     834                                    case 'soc_apps':
     835                                        mo_openid_share_apps();
     836                                        break;
     837                                    case 'share_cnt':
     838                                        mo_openid_share_cnt();
     839                                        break;
     840                                    case 'customization':
     841                                        mo_openid_customize_icons();
     842                                        break;
     843                                    case 'display_opt':
     844                                        mo_openid_display_share_opt();
     845                                        break;
     846                                    case 'short_code':
     847                                        mo_openid_short_code();
     848                                        break;
     849                                    case 'licensing_plans':
     850                                        mo_openid_licensing_plans();
     851                                        break;
     852                                    case 'add_on':
     853                                        header( 'Location: ' . site_url() . '/wp-admin/admin.php?page=mo_openid_settings_addOn' );
     854                                        break;
     855                                    case 'social_media_services':
     856                                        mo_openid_social_media_services();
     857                                        break;
     858                                    case 'social_icons_customization':
     859                                        mo_openid_social_icons_customization();
     860                                        break;
     861                                    case 'mo_twitter_mo_btn':
     862                                        mo_twitter_mo_btn();
     863                                        break;
     864                                    case 'reports':
     865                                        mo_openid_reports();
     866                                        break;
     867                                    case 'doc_tab':
     868                                        mo_openid_doc_tab();
     869                                        break;
     870                                }
     871                                ?>
     872                            </td>
     873                        </tr>
     874                    </table>
     875                </div>
     876            </div>
     877        </div>
     878        <script type="text/javascript" src="<?php echo esc_url( plugins_url( '/includes/js/mo_openid_phone.js', __FILE__ ) ); ?>"></script>
     879
     880        <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo esc_attr( mo_sl( 'NEED HELP' ) ); ?>">
     881
     882    </div>
     883    <?php include 'view/support_form/miniorange_openid_support_form.php'; ?>
     884    <script>
     885        function mo_openid_extension_switch(){
     886            var extension_url = window.location.href;
     887            var cookie_names = "extension_current_url";
     888            var d = new Date();
     889            d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
     890            var expired = "expires="+d.toUTCString();
     891            document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
     892            <?php update_option( 'mo_openid_extension_tab', '0' ); ?>
     893        }
     894        jQuery("#contact_us_phone").intlTelInput();
     895        function mo_openid_support_form(abc) {
     896            jQuery("#contact_us_phone").intlTelInput();
     897            var modal = document.getElementById("myModal");
     898            modal.style.display = "block";
     899            var mo_btn=document.getElementById("mymo_btn");
     900            mo_btn.style.display="none";
     901            var span = document.getElementsByClassName("mo_support_close")[0];
     902            span.onclick = function () {
     903                modal.style.display = "none";
     904                mo_btn.style.display="block";
     905            }
     906            window.onclick = function (event) {
     907                if (event.target == modal) {
     908                    modal.style.display = "none";
     909                    mo_btn.style.display="block";
     910                }
     911            }
     912        }
     913        function wordpress_support() {
     914            window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
     915
     916        }
     917
     918        function mo_openid_valid_query(f) {
     919            !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
     920
     921        }
     922    </script>
     923    <?php
    808924}
    809925
    810926function mo_comment_openid() {
    811     if( isset( $_GET[ 'tab' ]) && $_GET[ 'tab' ] !== 'register' ) {
    812         $active_tab = $_GET[ 'tab' ];
    813     } else {
    814         $active_tab = 'select_applications';
    815     }
    816 
    817 
    818     if($active_tab == 'reports' )
    819     {
    820         ?>
    821         <br>
    822         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    823         <br>
    824         <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
    825 
    826         <?php
    827     }
    828     else if($active_tab == 'doc_tab'){
    829         ?>
    830         <br>
    831         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    832         <br>
    833         <?php
    834     }
    835     else if($active_tab == 'licensing_plans')
    836     {
    837         ?>
    838         <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
    839         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    840         <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
    841                         <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
    842                             <div class="mo_openid-quote">
    843                                 <p>
    844                                     <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
    845                                         <span class="mo_openid-info">
    846                                             <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
    847                                             <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
    848                                         </span>
    849                                     </span>
    850                                 </p>
    851                             </div>
    852                             <br><br>
    853                         </li>
    854         </div>
    855 
    856         <?php
    857     }
    858     else
    859     {
    860     ?>
    861     <div>
    862 
    863             <table>
    864                 <tr>
    865                     <td><img id="logo" style="margin-top: 25px"
    866                              src="<?php echo plugin_dir_url(__FILE__); ?>includes/images/logo.png"></td>
    867                     <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/"
    868                                  target="_blank"><h1 style="color: #c9302c"><?php echo mo_sl('miniOrange Social Login');?></h1></a></td>
    869                     <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank"><?php echo mo_sl('Forum');?></a></td>
    870                     <td> <a id="addon" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button" <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Add On');?></a></td>
    871                     <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'doc_tab'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Documentation");?></a></td>
    872                     <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'reports'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Reports");?></a></td>
    873                     <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" onclick="mo_openid_extension_switch()"><?php echo mo_sl('Upgrade Now');?></a></td>
    874                     <td>
    875                 </tr>
    876             </table>
    877 
    878     </div>
    879     <div style="width: 100%">
    880 
    881         <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
    882             <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
    883                 <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;" src="<?php echo plugins_url( 'includes/images/logo.png"', __FILE__ ); ?>"></div>
    884                 <br>
    885                 <span style="font-size:20px;color:white;float:left;"><?php echo mo_sl('miniOrange');?></span>
    886             </div>
    887             <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
    888                 <a id="select_applications" class="tablinks<?php if($active_tab=="select_applications") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'select_applications'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Select Applications');?></a>
    889                 <a id="display_options" class="tablinks<?php if($active_tab=="display_options") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'display_options'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Display options');?></a>
    890                 <a id="customize_text" class="tablinks<?php if($active_tab=="customize_text") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'customize_text'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Customization');?></a>
    891                 <a id="enable_comment" class="tablinks<?php if($active_tab=="enable_comment") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'enable_comment'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Enable and Add Social Comments');?></a>
    892                 <a id="comment_shortcode" class="tablinks<?php if($active_tab=="comment_shortcode") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'comment_shortcode'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Shortcodes');?></a>
    893 
    894 
    895 
    896             </div>
    897         </div>
    898 
    899         <div id="mo_openid_settings" style="width: 85%; float: right;">
    900             <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
    901                 <div class="mo_container">
    902                     <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
    903                     <div id="mo_openid_msgs"></div>
    904                     <table style="width:100%;">
    905                         <?php
    906                         }
    907                         ?>
    908                         <tr>
    909                             <td style="vertical-align:top;">
    910                                 <?php
    911                                 switch ($active_tab) {
    912                                     case 'select_applications':
    913                                         select_comment_app();
    914                                         break;
    915                                     case 'display_options':
    916                                         select_comment_disp();
    917                                         break;
    918                                     case 'customize_text':
    919                                         select_comment_customize();
    920                                         break;
    921                                     case 'enable_comment':
    922                                         select_comment_enable();
    923                                         break;
    924                                     case 'comment_shortcode':
    925                                         select_comment_shortcode();
    926                                         break;
    927                                     case 'licensing_plans':
    928                                         mo_openid_licensing_plans();
    929                                         break;
    930                                     case 'reports':
    931                                         mo_openid_reports();
    932                                         break;
    933                                     case 'add_on':
    934                                         header('Location: '.site_url().'/wp-admin/admin.php?page=mo_openid_settings_addOn');
    935                                         break;
    936                                     case 'doc_tab':
    937                                         mo_openid_doc_tab();
    938                                         break;
    939                                 }
    940                                 ?>
    941                             </td>
    942                         </tr>
    943                     </table>
    944                 </div>
    945             </div>
    946 
    947 
    948         </div></div>
    949     <script type="text/javascript" src= "<?php echo plugins_url('/includes/js/mo_openid_phone.js',__FILE__); ?>"></script>
    950 
    951     <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo mo_sl('NEED HELP'); ?>">
    952 
    953     <?php include('view/support_form/miniorange_openid_support_form.php');?>
    954     <script>
    955         function moSharingSizeValidate(e){
    956             var t=parseInt(e.value.trim());t>60?e.value=60:10>t&&(e.value=10)
    957         }
    958         function moSharingSpaceValidate(e){
    959             var t=parseInt(e.value.trim());t>50?e.value=50:0>t&&(e.value=0)
    960         }
    961         function moLoginSizeValidate(e){
    962             var t=parseInt(e.value.trim());t>60?e.value=60:20>t&&(e.value=20)
    963         }
    964         function moLoginSpaceValidate(e){
    965             var t=parseInt(e.value.trim());t>60?e.value=60:0>t&&(e.value=0)
    966         }
    967         function moLoginWidthValidate(e){
    968             var t=parseInt(e.value.trim());t>1000?e.value=1000:140>t&&(e.value=140)
    969         }
    970         function moLoginHeightValidate(e){
    971             var t=parseInt(e.value.trim());t>50?e.value=50:35>t&&(e.value=35)
    972         }
    973         jQuery(document).ready(function(){
    974             var sel = jQuery(".mo_support_input_container");
    975             sel.each(function(){
    976                 if(jQuery(this).find(".mo_support_input").val() !== "")
    977                     jQuery(this).addClass("mo_has_value");
    978             });
    979             sel.focusout( function(){
    980                 if(jQuery(this).find(".mo_support_input").val() !== "")
    981                     jQuery(this).addClass("mo_has_value");
    982                 else jQuery(this).removeClass("mo_has_value");
    983             });
    984         });
    985     </script>
    986     <script>
    987         function mo_openid_extension_switch(){
    988             var extension_url = window.location.href;
    989             var cookie_names = "extension_current_url";
    990             var d = new Date();
    991             d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
    992             var expired = "expires="+d.toUTCString();
    993             document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
    994             <?php update_option('mo_openid_extension_tab','0');?>
    995         }
    996         jQuery(document).ready(function ()
    997         {
    998             jQuery("#bkgOverlay").delay(4800).fadeIn(400);
    999             jQuery("#mo_openid_rateus_myModal").delay(5000).fadeIn(400);
    1000 
    1001             jQuery("#mo_btnClose").click(function (e)
    1002             {
    1003                 HideDialog();
    1004                 e.preventDefault();
    1005             });
    1006         });
    1007         //Controls how the modal popup is closed with the close button
    1008         function HideDialog()
    1009         {
    1010             $("#bkgOverlay").fadeOut(400);
    1011             $("#delayedPopup").fadeOut(300);
    1012         }
    1013 
    1014     </script>
    1015     <script>
    1016         jQuery("#contact_us_phone").intlTelInput();
    1017         function mo_openid_support_form(abc) {
    1018             jQuery("#contact_us_phone").intlTelInput();
    1019             var modal = document.getElementById("myModal");
    1020             modal.style.display = "block";
    1021             var mo_btn=document.getElementById("mymo_btn");
    1022             mo_btn.style.display="none";
    1023             var span = document.getElementsByClassName("mo_support_close")[0];
    1024             span.onclick = function () {
    1025                 modal.style.display = "none";
    1026                 mo_btn.style.display="block";
    1027             }
    1028             window.onclick = function (event) {
    1029                 if (event.target == modal) {
    1030                     modal.style.display = "none";
    1031                     mo_btn.style.display="block";
    1032                 }
    1033             }
    1034         }
    1035         function wordpress_support() {
    1036             window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
    1037 
    1038         }
    1039 
    1040         function mo_openid_valid_query(f) {
    1041             !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
    1042 
    1043         }
    1044     </script>
    1045 
    1046     <?php
     927    if ( isset( $_GET['tab'] ) && sanitize_text_field( $_GET['tab'] ) !== 'register' ) { // phpcs:ignore WordPress.Security.NonceVerification
     928        $active_tab = sanitize_text_field( $_GET['tab'] ); // phpcs:ignore WordPress.Security.NonceVerification
     929    } else {
     930        $active_tab = 'select_applications';
     931    }
     932
     933    if ( $active_tab == 'reports' ) {
     934        ?>
     935        <br>
     936        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     937        <br>
     938        <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
     939
     940        <?php
     941    } elseif ( $active_tab == 'doc_tab' ) {
     942        ?>
     943        <br>
     944        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     945        <br>
     946        <?php
     947    } elseif ( $active_tab == 'licensing_plans' ) {
     948        ?>
     949        <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
     950        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     951        <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
     952                        <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
     953                            <div class="mo_openid-quote">
     954                                <p>
     955                                    <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
     956                                        <span class="mo_openid-info">
     957                                            <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
     958                                            <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
     959                                        </span>
     960                                    </span>
     961                                </p>
     962                            </div>
     963                            <br><br>
     964                        </li>
     965        </div>
     966
     967        <?php
     968    } else {
     969        ?>
     970    <div>
     971
     972            <table>
     973                <tr>
     974                    <td><img id="logo" style="margin-top: 25px"
     975                             src="<?php echo esc_url( plugin_dir_url( __FILE__ ) ); ?>includes/images/logo.png"></td>
     976                    <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/"
     977                                 target="_blank"><h1 style="color: #c9302c"><?php echo esc_attr( mo_sl( 'miniOrange Social Login' ) ); ?></h1></a></td>
     978                    <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank"><?php echo esc_attr( mo_sl( 'Forum' ) ); ?></a></td>
     979                    <td> <a id="addon" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button" <?php echo $active_tab == 'add_on' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Add On' ) ); ?></a></td>
     980                    <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'doc_tab' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Documentation' ) ); ?></a></td>
     981                    <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'reports' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Reports' ) ); ?></a></td>
     982                    <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" onclick="mo_openid_extension_switch()"><?php echo esc_attr( mo_sl( 'Upgrade Now' ) ); ?></a></td>
     983                    <td>
     984                </tr>
     985            </table>
     986
     987    </div>
     988    <div style="width: 100%">
     989
     990        <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
     991            <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
     992                <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;" src="<?php echo esc_url( plugins_url( 'includes/images/logo.png"', __FILE__ ) ); ?>"></div>
     993                <br>
     994                <span style="font-size:20px;color:white;float:left;"><?php echo esc_attr( mo_sl( 'miniOrange' ) ); ?></span>
     995            </div>
     996            <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
     997                <a id="select_applications" class="tablinks
     998                <?php
     999                if ( $active_tab == 'select_applications' ) {
     1000                    echo '_active';}
     1001                ?>
     1002                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'select_applications' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Select Applications' ) ); ?></a>
     1003                <a id="display_options" class="tablinks
     1004                <?php
     1005                if ( $active_tab == 'display_options' ) {
     1006                    echo '_active';}
     1007                ?>
     1008                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'display_options' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Display options' ) ); ?></a>
     1009                <a id="customize_text" class="tablinks
     1010                <?php
     1011                if ( $active_tab == 'customize_text' ) {
     1012                    echo '_active';}
     1013                ?>
     1014                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'customize_text' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Customization' ) ); ?></a>
     1015                <a id="enable_comment" class="tablinks
     1016                <?php
     1017                if ( $active_tab == 'enable_comment' ) {
     1018                    echo '_active';}
     1019                ?>
     1020                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'enable_comment' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Enable and Add Social Comments' ) ); ?></a>
     1021                <a id="comment_shortcode" class="tablinks
     1022                <?php
     1023                if ( $active_tab == 'comment_shortcode' ) {
     1024                    echo '_active';}
     1025                ?>
     1026                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'comment_shortcode' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Shortcodes' ) ); ?></a>
     1027
     1028
     1029
     1030            </div>
     1031        </div>
     1032
     1033        <div id="mo_openid_settings" style="width: 85%; float: right;">
     1034            <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
     1035                <div class="mo_container">
     1036                    <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
     1037                    <div id="mo_openid_msgs"></div>
     1038                    <table style="width:100%;">
     1039                        <?php
     1040    }
     1041    ?>
     1042                        <tr>
     1043                            <td style="vertical-align:top;">
     1044                                <?php
     1045                                switch ( $active_tab ) {
     1046                                    case 'select_applications':
     1047                                        select_comment_app();
     1048                                        break;
     1049                                    case 'display_options':
     1050                                        select_comment_disp();
     1051                                        break;
     1052                                    case 'customize_text':
     1053                                        select_comment_customize();
     1054                                        break;
     1055                                    case 'enable_comment':
     1056                                        select_comment_enable();
     1057                                        break;
     1058                                    case 'comment_shortcode':
     1059                                        select_comment_shortcode();
     1060                                        break;
     1061                                    case 'licensing_plans':
     1062                                        mo_openid_licensing_plans();
     1063                                        break;
     1064                                    case 'reports':
     1065                                        mo_openid_reports();
     1066                                        break;
     1067                                    case 'add_on':
     1068                                        header( 'Location: ' . site_url() . '/wp-admin/admin.php?page=mo_openid_settings_addOn' );
     1069                                        break;
     1070                                    case 'doc_tab':
     1071                                        mo_openid_doc_tab();
     1072                                        break;
     1073                                }
     1074                                ?>
     1075                            </td>
     1076                        </tr>
     1077                    </table>
     1078                </div>
     1079            </div>
     1080
     1081
     1082        </div></div>
     1083    <script type="text/javascript" src= "<?php echo esc_url( plugins_url( '/includes/js/mo_openid_phone.js', __FILE__ ) ); ?>"></script>
     1084
     1085    <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo esc_attr( mo_sl( 'NEED HELP' ) ); ?>">
     1086
     1087    <?php include 'view/support_form/miniorange_openid_support_form.php'; ?>
     1088    <script>
     1089        function moSharingSizeValidate(e){
     1090            var t=parseInt(e.value.trim());t>60?e.value=60:10>t&&(e.value=10)
     1091        }
     1092        function moSharingSpaceValidate(e){
     1093            var t=parseInt(e.value.trim());t>50?e.value=50:0>t&&(e.value=0)
     1094        }
     1095        function moLoginSizeValidate(e){
     1096            var t=parseInt(e.value.trim());t>60?e.value=60:20>t&&(e.value=20)
     1097        }
     1098        function moLoginSpaceValidate(e){
     1099            var t=parseInt(e.value.trim());t>60?e.value=60:0>t&&(e.value=0)
     1100        }
     1101        function moLoginWidthValidate(e){
     1102            var t=parseInt(e.value.trim());t>1000?e.value=1000:140>t&&(e.value=140)
     1103        }
     1104        function moLoginHeightValidate(e){
     1105            var t=parseInt(e.value.trim());t>50?e.value=50:35>t&&(e.value=35)
     1106        }
     1107        jQuery(document).ready(function(){
     1108            var sel = jQuery(".mo_support_input_container");
     1109            sel.each(function(){
     1110                if(jQuery(this).find(".mo_support_input").val() !== "")
     1111                    jQuery(this).addClass("mo_has_value");
     1112            });
     1113            sel.focusout( function(){
     1114                if(jQuery(this).find(".mo_support_input").val() !== "")
     1115                    jQuery(this).addClass("mo_has_value");
     1116                else jQuery(this).removeClass("mo_has_value");
     1117            });
     1118        });
     1119    </script>
     1120    <script>
     1121        function mo_openid_extension_switch(){
     1122            var extension_url = window.location.href;
     1123            var cookie_names = "extension_current_url";
     1124            var d = new Date();
     1125            d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
     1126            var expired = "expires="+d.toUTCString();
     1127            document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
     1128            <?php update_option( 'mo_openid_extension_tab', '0' ); ?>
     1129        }
     1130        jQuery(document).ready(function ()
     1131        {
     1132            jQuery("#bkgOverlay").delay(4800).fadeIn(400);
     1133            jQuery("#mo_openid_rateus_myModal").delay(5000).fadeIn(400);
     1134
     1135            jQuery("#mo_btnClose").click(function (e)
     1136            {
     1137                HideDialog();
     1138                e.preventDefault();
     1139            });
     1140        });
     1141        //Controls how the modal popup is closed with the close button
     1142        function HideDialog()
     1143        {
     1144            $("#bkgOverlay").fadeOut(400);
     1145            $("#delayedPopup").fadeOut(300);
     1146        }
     1147
     1148    </script>
     1149    <script>
     1150        jQuery("#contact_us_phone").intlTelInput();
     1151        function mo_openid_support_form(abc) {
     1152            jQuery("#contact_us_phone").intlTelInput();
     1153            var modal = document.getElementById("myModal");
     1154            modal.style.display = "block";
     1155            var mo_btn=document.getElementById("mymo_btn");
     1156            mo_btn.style.display="none";
     1157            var span = document.getElementsByClassName("mo_support_close")[0];
     1158            span.onclick = function () {
     1159                modal.style.display = "none";
     1160                mo_btn.style.display="block";
     1161            }
     1162            window.onclick = function (event) {
     1163                if (event.target == modal) {
     1164                    modal.style.display = "none";
     1165                    mo_btn.style.display="block";
     1166                }
     1167            }
     1168        }
     1169        function wordpress_support() {
     1170            window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
     1171
     1172        }
     1173
     1174        function mo_openid_valid_query(f) {
     1175            !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
     1176
     1177        }
     1178    </script>
     1179
     1180    <?php
    10471181
    10481182}
     
    10501184function mo_openid_addon_desc_page() {
    10511185
    1052     if( isset( $_GET[ 'tab' ]) && $_GET[ 'tab' ] !== 'register' ) {
    1053         $active_tab = $_GET[ 'tab' ];
    1054     }
    1055     elseif (isset($_REQUEST) && $_REQUEST['page'] == 'mo_openid_settings_addOn')
    1056         $active_tab = 'custom_registration_form';
    1057     elseif (isset($_REQUEST) && $_REQUEST['page'] == 'mo_openid_mailchimp_add_on')
    1058         $active_tab = 'mo_mailchimp_add_on';
    1059     elseif (isset($_REQUEST) && $_REQUEST['page'] == 'mo_openid_hubspot_add_on')
    1060         $active_tab = 'mo_hubspot_add_on';
    1061     elseif (isset($_REQUEST) && $_REQUEST['page'] == 'mo_openid_discord_add_on')
    1062         $active_tab = 'mo_discord_add_on';
    1063     else {
    1064         $active_tab = 'custom_registration_form';
    1065     }
    1066 
    1067     if($active_tab == 'reports' )
    1068     {
    1069         ?>
    1070         <br>
    1071         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    1072         <br>
    1073         <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
    1074 
    1075         <?php
    1076     }
    1077     else if($active_tab == 'doc_tab'){
    1078         ?>
    1079         <br>
    1080         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    1081         <br>
    1082         <?php
    1083     }
    1084     else if($active_tab == 'licensing_plans')
    1085     {
    1086         ?>
    1087         <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
    1088         <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo site_url();?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
    1089         <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
    1090                             <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
    1091                                 <div class="mo_openid-quote">
    1092                                     <p>
    1093                                         <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
    1094                                             <span class="mo_openid-info">
    1095                                                 <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
    1096                                                 <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
    1097                                             </span>
    1098                                         </span>
    1099                                     </p>
    1100                                 </div>
    1101                                 <br><br>
    1102                             </li>
    1103         </div>
    1104 
    1105         <?php
    1106         mo_openid_licensing_plans();
    1107     }
    1108 else
    1109 {
    1110 
    1111     ?>
    1112      <div>
    1113         <table>
    1114             <tr>
    1115                 <td><img id="logo" style="margin-top: 25px" src="<?php echo plugin_dir_url(__FILE__);?>includes/images/logo.png"></td>
    1116                 <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/" target="_blank"><h1 style="color: #c9302c">miniOrange Social Login &nbsp;</h1></a></td>
    1117                 <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank">Forum</a></td>
    1118                 <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'doc_tab'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Documentation");?></a></td>
    1119                 <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'reports'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl("Reports");?></a></td>
    1120                 <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" onclick="mo_openid_extension_switch()">Licensing Plans</a></td>
    1121                 <td> <a id="mo_openid_go_back" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'mo_openid_go_back' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'mo_openid_go_back'), $_SERVER['REQUEST_URI'] ); ?>">Social Login</a></td>
    1122             </tr>
    1123         </table>
    1124     </div>
    1125     <div style="width: 100%">
    1126 
    1127         <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
    1128             <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
    1129                 <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;" src="<?php echo plugin_dir_url(__FILE__);?>includes/images/logo.png"></div>
    1130                 <br>
    1131                 <span style="font-size:20px;color:white;float:left;">miniOrange</span>
    1132             </div>
    1133             <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
    1134                 <a id="custom_registration_form" class="tablinks<?php if($active_tab=="custom_registration_form") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'custom_registration_form'), $_SERVER['REQUEST_URI'] ); ?>">Custom Registration Form</a>
    1135                 <a id="mo_mailchimp_add_on" class="tablinks<?php if($active_tab=="mo_mailchimp_add_on") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'mo_mailchimp_add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('MailChimp Add on');?></a>
    1136                 <a id="mo_hubspot_add_on" class="tablinks<?php if($active_tab=="mo_hubspot_add_on") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'mo_hubspot_add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('HubSpot Add on');?></a>
    1137                 <a id="mo_discord_add_on" class="tablinks<?php if($active_tab=="mo_discord_add_on") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'mo_discord_add_on'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Discord Add on');?></a>
    1138                 <a id="mo_openid_go_back" class="tablinks<?php if($active_tab=="mo_openid_go_back") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'mo_openid_go_back'), $_SERVER['REQUEST_URI'] ); ?>">Go to Social Login</a>
    1139                 <a id="mo_openid_licensing" class="tablinks<?php if($active_tab=="mo_openid_licensing_plans") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>" onclick="mo_openid_extension_switch()">Licensing Plans</a>
    1140                 <a id="profile_com" style="display: none;"> class="tablinks<?php if($active_tab=="profile_com") echo '_active';?>" href="<?php echo add_query_arg( array('tab' => 'profile_com'), $_SERVER['REQUEST_URI'] ); ?>">Profile</a>
    1141             </div>
    1142         </div>
    1143 
    1144         <div id="mo_openid_settings" style="width: 85%; float: right;">
    1145             <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
    1146                 <div class="mo_container">
    1147                     <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
    1148                     <div id="mo_openid_msgs"></div>
    1149                     <?php
    1150 
    1151                     }
    1152                     ?>
    1153 
    1154                     <table style="width:100%;">
    1155                         <tr>
    1156                             <td style="vertical-align:top;">
    1157                                 <?php
    1158                                 switch ($active_tab){
    1159                                     case 'reports':
    1160                                         mo_openid_reports();
    1161                                         break;
    1162                                     case 'doc_tab':
    1163                                         mo_openid_doc_tab();
    1164                                         break;
    1165                                     case 'profile_com':
    1166                                         mo_openid_profile();
    1167                                         break;
    1168                                     case 'custom_registration_form':
    1169                                         if(mo_openid_is_customer_registered() && mo_openid_is_customer_addon_license_key_verified()) {
    1170                                             if(is_plugin_active('miniorange-login-openid-extra-attributes-addon/miniorange_openid_sso_customization_addon.php'))
    1171                                                 do_action('customization_addon');
    1172                                             else {
    1173                                                 $addon_message_type = 'Custom Registration Addon';
    1174                                                 mo_openid_show_addon_message_page($addon_message_type);
    1175                                             }
    1176                                         }
    1177                                         else
    1178                                             mo_openid_custom_registration_form();
    1179                                         break;
    1180                                     case 'mo_mailchimp_add_on':
    1181                                         if(mo_openid_is_customer_registered() && mo_openid_is_mailc_license_key_verified()) {
    1182                                             if (is_plugin_active('miniorange-login-openid-mailchimp-addon/miniorange_openid_mailchimp_addon.php')) {
    1183                                                 do_action('mo_mailchimp_addon');
    1184                                             }
    1185                                             else {
    1186                                                 $addon_message_type = 'MailChimp Addon';
    1187                                                 mo_openid_show_addon_message_page($addon_message_type);
    1188                                             }
    1189                                         }
    1190                                         else
    1191                                             mo_openid_mailchimp_add_on();
    1192                                         break;
    1193                                     case 'mo_hubspot_add_on':
    1194                                         if(mo_openid_is_customer_registered() && mo_openid_is_hub_license_key_verified()) {
    1195                                             if (is_plugin_active('miniorange-login-openid-hubspot-addon/mo_openid_hubspot_integration.php')) {
    1196                                                 do_action('hubspot_integration_addon');
    1197                                             }
    1198                                             else {
    1199                                                 $addon_message_type = 'HubSpot Addon';
    1200                                                 mo_openid_show_addon_message_page($addon_message_type);
    1201                                             }
    1202                                         }
    1203                                         else
    1204                                             mo_openid_hubspot_add_on_display();
    1205                                         break;
    1206                                     case 'mo_discord_add_on':
    1207                                         if(mo_openid_is_customer_registered() && mo_openid_is_dis_license_key_verified()) {
    1208                                             if (is_plugin_active('miniorange-login-openid-discord-addon/mo_openid_discord_integration.php')) {
    1209                                                 do_action('discord_integration_addon');
    1210                                             }
    1211                                             else {
    1212                                                 $addon_message_type = 'Discord Addon';
    1213                                                 mo_openid_show_addon_message_page($addon_message_type);
    1214                                             }
    1215                                         }
    1216                                         else
    1217                                             mo_openid_discord_add_on_display();
    1218                                         break;
    1219                                     case 'setup_video':
    1220                                         break;
    1221                                     case 'mo_openid_go_back':
    1222                                         header('Location: '.site_url().'/wp-admin/admin.php?page=mo_openid_general_settings');
    1223                                         break;
    1224 
    1225                                 }
    1226                                 ?>
    1227                             </td>
    1228                         </tr>
    1229                     </table>
    1230                 </div>
    1231             </div>
    1232         </div>
    1233  <script type="text/javascript" src= "<?php echo plugins_url('/includes/js/mo_openid_phone.js',__FILE__); ?>"></script>
    1234         <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo mo_sl('NEED HELP'); ?>">
    1235     </div>
    1236     <?php include('view/support_form/miniorange_openid_support_form.php');?>
    1237     <script>
    1238         jQuery("#contact_us_phone").intlTelInput();
    1239         function mo_openid_support_form(abc) {
    1240             jQuery("#contact_us_phone").intlTelInput();
    1241             var modal = document.getElementById("myModal");
    1242             modal.style.display = "block";
    1243             var mo_btn=document.getElementById("mymo_btn");
    1244             mo_btn.style.display="none";
    1245             var span = document.getElementsByClassName("mo_support_close")[0];
    1246             span.onclick = function () {
    1247                 modal.style.display = "none";
    1248                 mo_btn.style.display="block";
    1249             }
    1250             window.onclick = function (event) {
    1251                 if (event.target == modal) {
    1252                     modal.style.display = "none";
    1253                     mo_btn.style.display="block";
    1254                 }
    1255             }
    1256         }
    1257         function mo_openid_extension_switch(){
    1258             var extension_url = window.location.href;
    1259                 var cookie_names = "extension_current_url";
    1260                 var d = new Date();
    1261                 d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
    1262                 var expired = "expires="+d.toUTCString();
    1263                 document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
    1264 
    1265             <?php update_option('mo_openid_extension_tab','1');?>
    1266         }
    1267         function wordpress_support() {
    1268             window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
    1269 
    1270         }
    1271 
    1272         function mo_openid_valid_query(f) {
    1273             !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
    1274 
    1275         }
    1276     </script>
    1277     <?php
     1186    if ( isset( $_GET['tab'] ) && sanitize_text_field( $_GET['tab'] ) !== 'register' ) { // phpcs:ignore WordPress.Security.NonceVerification
     1187        $active_tab = sanitize_text_field($_GET[ 'tab' ]); // phpcs:ignore
     1188    }     elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_settings_addOn') // phpcs:ignore
     1189        $active_tab = 'custom_registration_form';
     1190    elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_woocommerce_add_on') // phpcs:ignore
     1191        $active_tab = 'mo_woocommerce_add_on';
     1192    elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_mailchimp_add_on') // phpcs:ignore
     1193        $active_tab = 'mo_mailchimp_add_on';
     1194    elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_buddypress_add_on') // phpcs:ignore
     1195        $active_tab = 'mo_buddypress_add_on';
     1196    elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_hubspot_add_on') // phpcs:ignore
     1197        $active_tab = 'mo_hubspot_add_on';
     1198    elseif (isset($_REQUEST) && sanitize_text_field($_REQUEST['page']) == 'mo_openid_discord_add_on') // phpcs:ignore
     1199        $active_tab = 'mo_discord_add_on';
     1200    else {
     1201        $active_tab = 'custom_registration_form';
     1202    }
     1203
     1204    if ( $active_tab == 'reports' ) {
     1205        ?>
     1206        <br>
     1207        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     1208        <br>
     1209        <div style="text-align:center; margin-top: 3%;"><h1>Login Reports</h1><h4>This feature is only available in the All-Inclusive Plan</h4></div>
     1210
     1211        <?php
     1212    } elseif ( $active_tab == 'doc_tab' ) {
     1213        ?>
     1214        <br>
     1215        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left;margin-left: 40px;" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     1216        <br>
     1217        <?php
     1218    } elseif ( $active_tab == 'licensing_plans' ) {
     1219        ?>
     1220        <div style="text-align:center;"><h1>Social Login Plugin</h1></div>
     1221        <div><a style="margin-top: 0px;background: #d0d0d0;border-color: #1162b5;color: #151515; float: left" class="button" onclick="window.location='<?php echo esc_url( site_url() ); ?>'+'/wp-admin/admin.php?page=mo_openid_general_settings'"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span><b style="font-size: 15px;"> &nbsp;&nbsp;Back To Plugin Configuration</b></a></div>
     1222        <div style="text-align:center; color: rgb(233, 125, 104); margin-top: 55px; font-size: 23px"> You are currently on the Free version of the plugin <br> <br><span style="font-size: 20px; ">
     1223                            <li style="color: dimgray; margin-top: 0px;list-style-type: none;">
     1224                                <div class="mo_openid-quote">
     1225                                    <p>
     1226                                        <span onclick="void(0);" class="mo_openid-check-tooltip" style="font-size: 15px">Why should I upgrade?
     1227                                            <span class="mo_openid-info">
     1228                                                <span class="mo_openid-pronounce">Why should I upgrade to premium plugin?</span>
     1229                                                <span class="mo_openid-text">Upgrading lets you access all of our features such as Integration, User account moderation etc.</span>
     1230                                            </span>
     1231                                        </span>
     1232                                    </p>
     1233                                </div>
     1234                                <br><br>
     1235                            </li>
     1236        </div>
     1237
     1238        <?php
     1239        mo_openid_licensing_plans();
     1240    } else {
     1241
     1242        ?>
     1243     <div>
     1244        <table>
     1245            <tr>
     1246                <td><img id="logo" style="margin-top: 25px" src="<?php echo esc_url( plugin_dir_url( __FILE__ ) ); ?>includes/images/logo.png"></td>
     1247                <td>&nbsp;<a style="text-decoration:none" href="https://plugins.miniorange.com/" target="_blank"><h1 style="color: #c9302c">miniOrange Social Login &nbsp;</h1></a></td>
     1248                <td> <a id="forum" style="margin-top: 23px" class="button" <?php echo $active_tab == 'forum' ? 'nav-tab-active' : ''; ?>" href="https://wordpress.org/support/plugin/miniorange-login-openid/" target="_blank">Forum</a></td>
     1249                <td> <a id="doc_tab" style="margin-top: 23px;background: #0867B2;border-color: #0867B2;color: white;" class="button"<?php echo $active_tab == 'doc_tab' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'doc_tab' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Documentation' ) ); ?></a></td>
     1250                <td> <a id="reports" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'reports' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'reports' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Reports' ) ); ?></a></td>
     1251                <td> <a id="pricing" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'licensing_plans' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" onclick="mo_openid_extension_switch()">Licensing Plans</a></td>
     1252                <td> <a id="mo_openid_go_back" style="margin-top: 23px;background: #FFA335;border-color: #FFA335;color: white;" class="button"<?php echo $active_tab == 'mo_openid_go_back' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_openid_go_back' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">Social Login</a></td>
     1253            </tr>
     1254        </table>
     1255    </div>
     1256    <div style="width: 100%">
     1257
     1258        <div style="width: 15%; float: left; background-color: #32373C; border-radius: 15px 0px 0px 15px;">
     1259            <div style="height:54px;margin-top: 9px;border-bottom: 0px;text-align:center;">
     1260                <div><img style="float:left;margin-left:8px;width: 43px;height: 45px;padding-top: 5px;" src="<?php echo esc_url( plugin_dir_url( __FILE__ ) ); ?>includes/images/logo.png"></div>
     1261                <br>
     1262                <span style="font-size:20px;color:white;float:left;">miniOrange</span>
     1263            </div>
     1264            <div class="mo_openid_tab" style="min-height:395px;width:100%; height: 445px;border-radius: 0px 0px 0px 15px;">
     1265                <a id="custom_registration_form" class="tablinks
     1266                <?php
     1267                if ( $active_tab == 'custom_registration_form' ) {
     1268                    echo '_active';}
     1269                ?>
     1270                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'custom_registration_form' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">Custom Registration Form</a>
     1271                <a id="mo_woocommerce_add_on" class="tablinks
     1272                <?php
     1273                if ( $active_tab == 'mo_woocommerce_add_on' ) {
     1274                    echo '_active';}
     1275                ?>
     1276                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_woocommerce_add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'WooCommerce Add on' ) ); ?></a>
     1277                <a id="mo_buddypress_add_on" class="tablinks
     1278                <?php
     1279                if ( $active_tab == 'mo_buddypress_add_on' ) {
     1280                    echo '_active';}
     1281                ?>
     1282                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_buddypress_add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'BuddyPress Add on' ) ); ?></a>
     1283                <a id="mo_mailchimp_add_on" class="tablinks
     1284                <?php
     1285                if ( $active_tab == 'mo_mailchimp_add_on' ) {
     1286                    echo '_active';}
     1287                ?>
     1288                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_mailchimp_add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'MailChimp Add on' ) ); ?></a>
     1289                <a id="mo_hubspot_add_on" class="tablinks
     1290                <?php
     1291                if ( $active_tab == 'mo_hubspot_add_on' ) {
     1292                    echo '_active';}
     1293                ?>
     1294                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_hubspot_add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'HubSpot Add on' ) ); ?></a>
     1295                <a id="mo_discord_add_on" class="tablinks
     1296                <?php
     1297                if ( $active_tab == 'mo_discord_add_on' ) {
     1298                    echo '_active';}
     1299                ?>
     1300                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_discord_add_on' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>"><?php echo esc_attr( mo_sl( 'Discord Add on' ) ); ?></a>
     1301                <a id="mo_openid_go_back" class="tablinks
     1302                <?php
     1303                if ( $active_tab == 'mo_openid_go_back' ) {
     1304                    echo '_active';}
     1305                ?>
     1306                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'mo_openid_go_back' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">Go to Social Login</a>
     1307                <a id="mo_openid_licensing" class="tablinks
     1308                <?php
     1309                if ( $active_tab == 'mo_openid_licensing_plans' ) {
     1310                    echo '_active';}
     1311                ?>
     1312                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>" onclick="mo_openid_extension_switch()">Licensing Plans</a>
     1313                <a id="profile_com" style="display: none;"> class="tablinks
     1314                <?php
     1315                if ( $active_tab == 'profile_com' ) {
     1316                    echo '_active';}
     1317                ?>
     1318                " href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'profile_com' ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ) ); ?>">Profile</a>
     1319            </div>
     1320        </div>
     1321
     1322        <div id="mo_openid_settings" style="width: 85%; float: right;">
     1323            <div style="background-color: #FFFFFF;width: 90%;border-radius: 0px 15px 15px 0px;">
     1324                <div class="mo_container">
     1325                    <h3 id="mo_openid_page_heading" class="mo_openid_highlight" style="color: white;margin: 0;padding: 23px;border-radius: 0px 15px 0px 0px;">&nbsp</h3>
     1326                    <div id="mo_openid_msgs"></div>
     1327                    <?php
     1328
     1329    }
     1330    ?>
     1331
     1332                    <table style="width:100%;">
     1333                        <tr>
     1334                            <td style="vertical-align:top;">
     1335                                <?php
     1336                                switch ( $active_tab ) {
     1337                                    case 'reports':
     1338                                        mo_openid_reports();
     1339                                        break;
     1340                                    case 'doc_tab':
     1341                                        mo_openid_doc_tab();
     1342                                        break;
     1343                                    case 'profile_com':
     1344                                        mo_openid_profile();
     1345                                        break;
     1346                                    case 'custom_registration_form':
     1347                                        if ( mo_openid_is_customer_registered() && mo_openid_is_customer_addon_license_key_verified() ) {
     1348                                            if ( is_plugin_active( 'miniorange-login-openid-extra-attributes-addon/miniorange_openid_sso_customization_addon.php' ) ) {
     1349                                                do_action( 'customization_addon' );
     1350                                            } else {
     1351                                                $addon_message_type = 'Custom Registration Addon';
     1352                                                mo_openid_show_addon_message_page( $addon_message_type );
     1353                                            }
     1354                                        } else {
     1355                                            mo_openid_custom_registration_form();
     1356                                        }
     1357                                        break;
     1358                                    case 'mo_woocommerce_add_on':
     1359                                        if ( mo_openid_is_customer_registered() && mo_openid_is_wca_license_key_verified() ) {
     1360                                            if ( is_plugin_active( 'miniorange-login-openid-woocommerce-addon/miniorange_openid_woocommerce_integration_addon.php' ) ) {
     1361                                                do_action( 'mo_wc_addon' );
     1362                                            } else {
     1363                                                $addon_message_type = 'WooCommerce Addon';
     1364                                                mo_openid_show_addon_message_page( $addon_message_type );
     1365                                            }
     1366                                        } else {
     1367                                            mo_openid_woocommerce_add_on();
     1368                                        }
     1369                                        break;
     1370                                    case 'mo_mailchimp_add_on':
     1371                                        if ( mo_openid_is_customer_registered() && mo_openid_is_mailc_license_key_verified() ) {
     1372                                            if ( is_plugin_active( 'miniorange-login-openid-mailchimp-addon/miniorange_openid_mailchimp_addon.php' ) ) {
     1373                                                do_action( 'mo_mailchimp_addon' );
     1374                                            } else {
     1375                                                $addon_message_type = 'MailChimp Addon';
     1376                                                mo_openid_show_addon_message_page( $addon_message_type );
     1377                                            }
     1378                                        } else {
     1379                                            mo_openid_mailchimp_add_on();
     1380                                        }
     1381                                        break;
     1382                                    case 'mo_buddypress_add_on':
     1383                                        if ( mo_openid_is_customer_registered() && mo_openid_is_bpp_license_key_verified() ) {
     1384                                            if ( is_plugin_active( 'miniorange-login-openid-buddypress-addon/mo_openid_buddypress_display_addon.php' ) ) {
     1385                                                do_action( 'buddypress_integration_addon' );
     1386                                            } else {
     1387                                                $addon_message_type = 'BuddyPress Addon';
     1388                                                mo_openid_show_addon_message_page( $addon_message_type );
     1389                                            }
     1390                                        } else {
     1391                                            mo_openid_buddypress_addon_display();
     1392                                        }
     1393                                        break;
     1394                                    case 'mo_hubspot_add_on':
     1395                                        if ( mo_openid_is_customer_registered() && mo_openid_is_hub_license_key_verified() ) {
     1396                                            if ( is_plugin_active( 'miniorange-login-openid-hubspot-addon/mo_openid_hubspot_integration.php' ) ) {
     1397                                                do_action( 'hubspot_integration_addon' );
     1398                                            } else {
     1399                                                $addon_message_type = 'HubSpot Addon';
     1400                                                mo_openid_show_addon_message_page( $addon_message_type );
     1401                                            }
     1402                                        } else {
     1403                                            mo_openid_hubspot_add_on_display();
     1404                                        }
     1405                                        break;
     1406                                    case 'mo_discord_add_on':
     1407                                        if ( mo_openid_is_customer_registered() && mo_openid_is_dis_license_key_verified() ) {
     1408                                            if ( is_plugin_active( 'miniorange-login-openid-discord-addon/mo_openid_discord_integration.php' ) ) {
     1409                                                do_action( 'discord_integration_addon' );
     1410                                            } else {
     1411                                                $addon_message_type = 'Discord Addon';
     1412                                                mo_openid_show_addon_message_page( $addon_message_type );
     1413                                            }
     1414                                        } else {
     1415                                            mo_openid_discord_add_on_display();
     1416                                        }
     1417                                        break;
     1418                                    case 'setup_video':
     1419                                        break;
     1420                                    case 'mo_openid_go_back':
     1421                                        header( 'Location: ' . site_url() . '/wp-admin/admin.php?page=mo_openid_general_settings' );
     1422                                        break;
     1423
     1424                                }
     1425                                ?>
     1426                            </td>
     1427                        </tr>
     1428                    </table>
     1429                </div>
     1430            </div>
     1431        </div>
     1432 <script type="text/javascript" src= "<?php echo esc_url( plugins_url( '/includes/js/mo_openid_phone.js', __FILE__ ) ); ?>"></script>
     1433        <input type="button" id="mymo_btn" style="display: none" class="mo_support-help-button" data-show="false" onclick="mo_openid_support_form('')" value="<?php echo esc_attr( mo_sl( 'NEED HELP' ) ); ?>">
     1434    </div>
     1435    <?php include 'view/support_form/miniorange_openid_support_form.php'; ?>
     1436    <script>
     1437        jQuery("#contact_us_phone").intlTelInput();
     1438        function mo_openid_support_form(abc) {
     1439            jQuery("#contact_us_phone").intlTelInput();
     1440            var modal = document.getElementById("myModal");
     1441            modal.style.display = "block";
     1442            var mo_btn=document.getElementById("mymo_btn");
     1443            mo_btn.style.display="none";
     1444            var span = document.getElementsByClassName("mo_support_close")[0];
     1445            span.onclick = function () {
     1446                modal.style.display = "none";
     1447                mo_btn.style.display="block";
     1448            }
     1449            window.onclick = function (event) {
     1450                if (event.target == modal) {
     1451                    modal.style.display = "none";
     1452                    mo_btn.style.display="block";
     1453                }
     1454            }
     1455        }
     1456        function mo_openid_extension_switch(){
     1457            var extension_url = window.location.href;
     1458                var cookie_names = "extension_current_url";
     1459                var d = new Date();
     1460                d.setTime(d.getTime() + (2 * 24 * 60 * 60 * 1000));
     1461                var expired = "expires="+d.toUTCString();
     1462                document.cookie = cookie_names + "=" + extension_url + ";" + expired + ";path=/";
     1463
     1464            <?php update_option( 'mo_openid_extension_tab', '1' ); ?>
     1465        }
     1466        function wordpress_support() {
     1467            window.open("https://wordpress.org/support/plugin/miniorange-login-openid","_blank");
     1468
     1469        }
     1470
     1471        function mo_openid_valid_query(f) {
     1472            !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
     1473
     1474        }
     1475    </script>
     1476    <?php
    12781477}
  • miniorange-login-openid/trunk/mo-openid-social-login-functions.php

    r2788668 r2853010  
    33
    44function mo_openid_start_session() {
    5     if( !session_id() ) {
    6         session_start();
    7     }
     5    if ( ! session_id() ) {
     6        session_start();
     7    }
    88}
    99
    1010function mo_openid_end_session() {
    11     session_start();
    12     session_unset(); //unsets all session variables
    13 }
    14 
    15 function mo_openid_initialize_social_login(){
    16     $client_name = "wordpress";
    17     $appname = sanitize_text_field($_REQUEST['app_name']);
    18     if($appname=='yaahoo')
    19         $appname='yahoo';
    20     $timestamp = round(microtime(true) * 1000);
    21     $api_key = get_option('mo_openid_admin_api_key');
    22     $token = $client_name . ':' . number_format($timestamp, 0, '', '') . ':' . $api_key;
    23     $customer_token = get_option('mo_openid_customer_token');
    24     $encrypted_token = encrypt_data($token, $customer_token);
    25     $encoded_token = urlencode($encrypted_token);
    26     $userdata = get_option('moopenid_user_attributes') ? 'true' : 'false';
    27     $http = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? "https://" : "http://";
    28     $parts = parse_url($http . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    29     parse_str($parts['query'], $query);
    30     $post = isset($query['p']) ? '?p=' . $query['p'] : '';
    31     $base_return_url = $http . $_SERVER["HTTP_HOST"] . strtok($_SERVER["REQUEST_URI"], '?') . $post;
    32     $return_url = strpos($base_return_url, '?') !== false ? urlencode($base_return_url . '&option=moopenid') : urlencode($base_return_url . '?option=moopenid');
    33     $url = 'https://login.xecurify.com/moas/openid-connect/client-app/authenticate?token=' . $encoded_token . '&userdata=' . $userdata . '&id=' . get_option('mo_openid_admin_customer_key') . '&encrypted=true&app=' . $appname . '_oauth_xecurify&returnurl=' . $return_url . '&encrypt_response=true';
    34     wp_redirect($url);
    35     exit;
    36 }
    37 
    38 function mo_openid_custom_app_oauth_redirect($appname){
    39     if(isset($_REQUEST['test']))
    40         setcookie("mo_oauth_test", true);
    41     else
    42         setcookie("mo_oauth_test", false);
    43     if($appname=='yaahoo'){
    44         $appname='yahoo';
    45     }
    46     require('social_apps/' . $appname . '.php');
    47     $mo_appname='mo_'.$appname;
    48     $social_app = new $mo_appname();
    49     $social_app->mo_openid_get_app_code();
    50 }
    51 
    52 function mo_openid_process_custom_app_callback()
    53 {
    54     $appname = "";
    55 
    56     if (is_user_logged_in() && get_option('mo_openid_test_configuration') != 1) {
    57         return;
    58     }
    59     $code = $profile_url = $client_id = $current_url = $client_secret = $access_token_uri = $postData = $oauth_token = $user_url = $user_name = $email = '';
    60     $oauth_access_token = $redirect_url = $option = $oauth_token_secret = $screen_name = $profile_json_output = $oauth_verifier = $twitter_oauth_token = $access_token_json_output = [];
    61     mo_openid_start_session();
    62     if (strpos($_SERVER['REQUEST_URI'], "oauth_verifier") !== false) {
    63         $_SESSION['appname'] = "twitter";
    64     }
    65 
    66     if (isset($_SESSION['appname'])) {
    67         $appname = $_SESSION['appname'];
    68     } else if (strpos($_SERVER['REQUEST_URI'], "openidcallback") !== false) {
    69         if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/google") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=google") !== false)) {
    70             $appname = "google";
    71         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/facebook") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=facebook") !== false)) {
    72             $appname = "facebook";
    73        
    74         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/vkontakte") !== false)) {
    75             $appname = "vkontakte";
    76         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/linkedin") !== false)) {
    77             $appname = "linkedin";
    78         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/instagram") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=instagram") !== false)) {
    79             $appname = "instagram";
    80         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/amazon") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=amazon") !== false)) {
    81             $appname = "amazon";
    82         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/yahoo") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=yaahoo") !== false)) {
    83             $appname = "yahoo";
    84         } else if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/wordpress") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=wordpress") !== false)) {
    85             $appname = "wordpress";
    86         }
    87     } else {
    88         return;
    89     }
    90      if($appname=='yaahoo'){
    91          $appname='yahoo';
    92      }
    93     require('social_apps/' . $appname . '.php');
    94     $mo_appname='mo_'.$appname;
    95     $social_app = new $mo_appname();
    96     $appuserdetails = $social_app->mo_openid_get_access_token();
    97     mo_openid_process_user_details($appuserdetails,$appname);
    98 }
    99 
    100 function mo_openid_process_social_login(){
    101     if( is_user_logged_in()){
    102         return;
    103     }
    104     //Decrypt all entries
    105     $decrypted_user_name = isset($_POST['username']) ? mo_openid_decrypt_sanitize($_POST['username']): '';
    106     $decrypted_user_name = str_replace(' ', '-', $decrypted_user_name);
    107     $decrypted_user_name = sanitize_user($decrypted_user_name, true);
    108     $decrypted_email=isset($_POST['email']) ? mo_openid_decrypt_sanitize($_POST['email']): '';
    109     if($decrypted_user_name == null){
    110     $name_em = explode('@', $decrypted_email);
    111     $decrypted_user_name = isset( $name_em[0]) ?  $name_em[0] : '';
    112      }
    113      $decrypted_first_name=isset($_POST['firstName']) ? mo_openid_decrypt_sanitize($_POST['firstName']): '';
    114      if($decrypted_first_name == null){
    115     $name_em = explode('@', $decrypted_email);
    116     $decrypted_first_name = isset( $name_em[0]) ?  $name_em[0] : '';
    117     }
    118     $decrypted_app_name = isset($_POST['appName']) ? mo_openid_decrypt_sanitize($_POST['appName']): '';
    119     $decrypted_app_name = strtolower($decrypted_app_name);
    120     $split_app_name = explode('_', $decrypted_app_name);
    121     //check to ensure login starts at the click of social login button
    122     if(empty($split_app_name[0])){
    123         wp_die(get_option('mo_manual_login_error_message'));
    124     }
    125     else {
    126         $decrypted_app_name = strtolower($split_app_name[0]);
    127     }
    128 
    129     $appuserdetails = array(
    130         'first_name' => $decrypted_first_name,
    131         'last_name' => isset($_POST['lastName']) ? mo_openid_decrypt_sanitize($_POST['lastName']): '',
    132         'email' => $decrypted_email,
    133         'user_name' => $decrypted_user_name,
    134         'user_url' => isset($_POST['profileUrl']) ? mo_openid_decrypt_sanitize($_POST['profileUrl']): '',
    135         'user_picture' => isset($_POST['profilePic']) ? mo_openid_decrypt_sanitize($_POST['profilePic']): '',
    136         'social_user_id' => isset($_POST['userid']) ? mo_openid_decrypt_sanitize($_POST['userid']): '',
    137     );
    138 
    139     mo_openid_process_user_details($appuserdetails,$decrypted_app_name);
    140 }
    141 
    142 function mo_openid_process_user_details($appuserdetails,$appname)
    143 {
    144     $first_name = $last_name = $email = $user_name = $user_url = $user_picture = $social_user_id = $full_name = '';
    145     $location_city = $location_country = $about_me = $company_name = $age = $gender = $birth_date = $friend_nos = $website = $field_of_study = $university_name = $places_lived = $position = $relationship = $contact_no = $industry = $head_line = $NA = '';
    146 
    147     $first_name = isset($appuserdetails['first_name'])?$appuserdetails['first_name']:'';
    148     $last_name = isset($appuserdetails['last_name'])?$appuserdetails['last_name']:'';
    149     $email = isset($appuserdetails['email'])?$appuserdetails['email']:'';
    150     $user_name = isset($appuserdetails['user_name'])?$appuserdetails['user_name']:'';
    151     $user_url = isset($appuserdetails['user_url'])?$appuserdetails['user_url']:'';
    152     $user_picture = isset($appuserdetails['user_picture'])?$appuserdetails['user_picture']:'';
    153     $social_user_id = isset($appuserdetails['social_user_id'])?$appuserdetails['social_user_id']:'';
    154     $full_name = isset($appuserdetails['full_name'])?$appuserdetails['full_name']:'';
    155     $location_city = isset($appuserdetails['location_city'])?$appuserdetails['location_city']:'';
    156     $location_country = isset($appuserdetails['location_country'])?$appuserdetails['location_country']:'';
    157     $about_me = isset($appuserdetails['about_me'])?$appuserdetails['about_me']:'';
    158     $company_name = isset($appuserdetails['company_name'])?$appuserdetails['company_name']:'';
    159     $age = isset($appuserdetails['age'])?$appuserdetails['age']:'';
    160     $gender = isset($appuserdetails['gender'])?$appuserdetails['gender']:'';
    161     $birth_date = isset($appuserdetails['birth_date'])?$appuserdetails['birth_date']:'';
    162     $friend_nos = isset($appuserdetails['friend_nos'])?$appuserdetails['friend_nos']:'';
    163     $website = isset($appuserdetails['website'])?$appuserdetails['website']:'';
    164     $field_of_study = isset($appuserdetails['field_of_study'])?$appuserdetails['field_of_study']:'';
    165     $university_name = isset($appuserdetails['university_name'])?$appuserdetails['university_name']:'';
    166     $places_lived = isset($appuserdetails['places_lived'])?$appuserdetails['places_lived']:'';
    167     $position = isset($appuserdetails['position'])?$appuserdetails['position']:'';
    168     $relationship = isset($appuserdetails['relationship'])?$appuserdetails['relationship']:'';
    169     $contact_no = isset($appuserdetails['contact_no'])?$appuserdetails['contact_no']:'';
    170     $industry = isset($appuserdetails['industry'])?$appuserdetails['industry']:'';
    171     $head_line = isset($appuserdetails['head_line'])?$appuserdetails['head_line']:'';
    172 
    173     $user_name = str_replace(' ', '-', $user_name);
    174     $user_name = sanitize_user($user_name, true);
    175 
    176     if ($user_name == '-' || $user_name == '') {
    177         $splitemail = explode('@', $email);
    178         $user_name = $splitemail[0];
    179     }
    180 
    181 
    182     //Set User Full Name
    183     if (isset($first_name) && isset($last_name)) {
    184         if (strcmp($first_name, $last_name) != 0)
    185             $user_full_name = $first_name . ' ' . $last_name;
    186         else
    187             $user_full_name = $first_name;
    188     }
    189     else if(isset($first_name))
    190         $user_full_name = $first_name;
    191     else {
    192         $user_full_name = $user_name;
    193         $first_name = '';
    194         $last_name = '';
    195     }
    196 
    197     //check_existing_user
    198     global $wpdb;
    199     $db_prefix = $wpdb->prefix;
    200     $linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
    201 
    202     $user_email = sanitize_email($email);
    203 
    204     $email_user_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_email = \"%s\"", $user_email));
    205 
    206     if (empty($user_email)) {
    207         $existing_email_user_id = NULL;
    208     } else {
    209         $existing_email_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_email = \"%s\"", $user_email));
    210     }
    211 
    212     $session_values= array(
    213         'username' => $user_name,
    214         'user_email' => $user_email,
    215         'user_full_name' => $user_full_name,
    216         'first_name' => $first_name,
    217         'last_name' => $last_name,
    218         'user_url' => $user_url,
    219         'user_picture' => $user_picture,
    220         'social_app_name' => $appname,
    221         'social_user_id' => $social_user_id,
    222     );
    223     mo_openid_start_session_login($session_values);
    224     // user is a member
    225     if ((isset($linked_email_id)) || (isset($email_user_id)) || (isset($existing_email_user_id))) {
    226         if ((!isset($linked_email_id)) && (isset($email_user_id))) {
    227             $linked_email_id = $email_user_id;
    228             mo_openid_insert_query($appname, $user_email, $linked_email_id, $social_user_id);
    229         }
    230         if (isset($linked_email_id)) {
    231             $user = get_user_by('id', $linked_email_id);
    232             $user_id = $user->ID;
    233         } else if (isset($email_user_id)) {
    234             $user = get_user_by('id', $email_user_id);
    235             $user_id = $user->ID;
    236         } else {
    237             $user = get_user_by('id', $existing_email_user_id);
    238             $user_id = $user->ID;
    239         }
    240 
    241         //$linked_email_id,$user_id,$user,$user_picture
    242         mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,1);
    243     }
    244     //new user creation
    245     if(get_option('mo_openid_auto_register_enable')) {
    246         if (get_option('mo_openid_account_linking_enable')) {
    247             echo mo_openid_account_linking_form($user_name, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $appname, $social_user_id);
    248             exit;
    249         }
    250         else if (get_option('mo_openid_enable_profile_completion') && ($session_values['user_email'] == '' || $session_values['username'] == '')) { // if newa user and profile completion is enabled
    251             echo mo_openid_profile_completion_form($session_values);
    252             exit;
    253         }
    254         else {
    255             mo_create_new_user($session_values);
    256         }
    257     }else{
    258         mo_openid_disabled_register_message();
    259     }
    260 }
    261 
    262 function mo_create_new_user($user_val){
    263     $user_name = $user_val['username'];
    264     $email = $user_val['user_email'];
    265     $user_full_name = $user_val['user_full_name'];
    266     $first_name = $user_val['first_name'];
    267     $last_name = $user_val['last_name'];
    268     $user_url = $user_val['user_url'];
    269     $user_picture = $user_val['user_picture'];
    270     $appname = $user_val['social_app_name'];
    271     $social_user_id = $user_val['social_user_id'];
    272     global $wpdb;
    273     $db_prefix = $wpdb->prefix;
    274     $linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
    275     $user_email = sanitize_email($email);
    276     if(empty($user_name) && !empty($email))
    277     {
    278         $split_email  = explode('@',$email);
    279         $user_name = $split_email[0];
    280         $user_email = $email;
    281     }
    282     else if(empty($email) && !empty($user_name))
    283     {
    284         $split_app_name = explode('_',$appname);
    285         $user_email = $user_name.'@'.$split_app_name[0].'.com';
    286     }
    287     else if(empty($email) && empty($user_name))
    288     {
    289         wp_die('No profile data is returned from application. Please contact your administrator.');
    290     }
    291 
    292     $user_email = str_replace(' ', '', $user_email);
    293 
    294     $random_password    = wp_generate_password( 10, false );
    295     $user_profile_url  = $user_url;
    296 
    297     if(isset($appname) && !empty($appname) && $appname=='facebook'){
    298         $user_url = '';
    299     }
    300 
    301     // Checking if username already exist
    302     $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $user_name));
    303 
    304     if( isset($user_name_user_id) ){
    305         $email_array = explode('@', $user_email);
    306         $user_name = $email_array[0];
    307         $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $user_name));
    308         $i = 1;
    309         while(!empty($user_name_user_id) ){
    310             $uname=$user_name.'_' . $i;
    311             $user_name_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
    312             $i++;
    313             if(empty($user_name_user_id)){
    314                 $user_name= $uname;
    315             }
    316         }
    317 
    318         if( isset($user_name_user_id) ){
    319             echo '<br/>'."Error Code Existing Username: ".get_option('mo_existing_username_error_message');
    320             exit();
    321         }
    322     }
    323 
    324     //to check for customisation fields
    325     if(get_option('mo_openid_customised_field_enable') == 1 ) {
    326         sso_field_mapping_add_on($user_val);
    327     }
    328 
    329     $userdata = array(
    330         'user_login'  =>  $user_name,
    331         'user_email'    =>  $user_email,
    332         'user_pass'   =>  $random_password,
    333         'display_name' => $user_full_name,
    334         'first_name' => $first_name,
    335         'last_name' => $last_name,
    336         'user_url' => $user_url,
    337     );
    338     $user_id    = wp_insert_user( $userdata);
    339 
    340 
    341 
    342     if(is_wp_error( $user_id )) {
    343         print_r($user_id);
    344         wp_die("Error Code 5: ".get_option('mo_registration_error_message'));
    345     }
    346 
    347     update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
    348 
    349     $session_values= array(
    350         'username' => $user_name,
    351         'user_email' => $user_email,
    352         'user_full_name' => $user_full_name,
    353         'first_name' => $first_name,
    354         'last_name' => $last_name,
    355         'user_url' => $user_url,
    356         'user_picture' => $user_picture,
    357         'social_app_name' => $appname,
    358         'social_user_id' => $social_user_id,
    359     );
    360 
    361     mo_openid_start_session_login($session_values);
    362     $user   = get_user_by('id', $user_id );
    363     //registration hook
    364     do_action( 'mo_user_register', $user_id,$user_profile_url);
    365     mo_openid_link_account($user->user_login, $user);
    366     $linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
    367     mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,0);
    368 }
    369 
    370 function mo_openid_customize_logo(){
    371     $logo =" <div style='float:left;' class='mo_image_id'>
     11    session_start();
     12    session_unset(); // unsets all session variables
     13}
     14
     15function mo_openid_initialize_social_login() {
     16    $client_name = 'wordpress';
     17    $appname     = sanitize_text_field( $_REQUEST['app_name'] ); // phpcs:ignore
     18    if ( $appname == 'yaahoo' ) {
     19        $appname = 'yahoo';
     20    }
     21    $timestamp       = round( microtime( true ) * 1000 );
     22    $api_key         = get_option( 'mo_openid_admin_api_key' );
     23    $token           = $client_name . ':' . number_format( $timestamp, 0, '', '' ) . ':' . $api_key;
     24    $customer_token  = get_option( 'mo_openid_customer_token' );
     25    $encrypted_token = encrypt_data( $token, $customer_token );
     26    $encoded_token   = urlencode( $encrypted_token );
     27    $userdata        = get_option( 'moopenid_user_attributes' ) ? 'true' : 'false';
     28    $http            = isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ? 'https://' : 'http://';
     29    $parts           = parse_url( $http . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . sanitize_text_field($_SERVER['REQUEST_URI']) );
     30    parse_str( $parts['query'], $query );
     31    $post            = isset( $query['p'] ) ? '?p=' . $query['p'] : '';
     32    $base_return_url = $http . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . strtok( sanitize_text_field($_SERVER['REQUEST_URI']), '?' ) . $post;
     33    $return_url      = strpos( $base_return_url, '?' ) !== false ? urlencode( $base_return_url . '&option=moopenid' ) : urlencode( $base_return_url . '?option=moopenid' );
     34    $url             = 'https://login.xecurify.com/moas/openid-connect/client-app/authenticate?token=' . $encoded_token . '&userdata=' . $userdata . '&id=' . get_option( 'mo_openid_admin_customer_key' ) . '&encrypted=true&app=' . $appname . '_oauth_xecurify&returnurl=' . $return_url . '&encrypt_response=true';
     35    wp_redirect( $url );
     36    exit;
     37}
     38
     39function mo_openid_custom_app_oauth_redirect( $appname ) {
     40    if ( isset( $_REQUEST['test'] ) ) {     // phpcs:ignore
     41        setcookie( 'mo_oauth_test', true );
     42    } else {
     43        setcookie( 'mo_oauth_test', false );
     44    }
     45    if ( $appname == 'yaahoo' ) {
     46        $appname = 'yahoo';
     47    }
     48    require 'social_apps/' . $appname . '.php';
     49    $mo_appname = 'mo_' . $appname;
     50    $social_app = new $mo_appname();
     51    $social_app->mo_openid_get_app_code();
     52}
     53
     54function mo_openid_process_custom_app_callback() {
     55    $appname = '';
     56
     57    if ( is_user_logged_in() && get_option( 'mo_openid_test_configuration' ) != 1 ) {
     58        return;
     59    }
     60    $code               = $profile_url = $client_id = $current_url = $client_secret = $access_token_uri = $postData = $oauth_token = $user_url = $user_name = $email = '';
     61    $oauth_access_token = $redirect_url = $option = $oauth_token_secret = $screen_name = $profile_json_output = $oauth_verifier = $twitter_oauth_token = $access_token_json_output = array();
     62    mo_openid_start_session();
     63    if ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'oauth_verifier' ) !== false ) {
     64        $_SESSION['appname'] = 'twitter';
     65    }
     66
     67    if ( isset( $_SESSION['appname'] ) ) {
     68        $appname = sanitize_text_field($_SESSION['appname']);
     69    } elseif ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback' ) !== false ) {
     70        if ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/google' ) !== false ) || ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback=google' ) !== false ) ) {
     71            $appname = 'google';
     72        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/facebook' ) !== false ) || ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback=facebook' ) !== false ) ) {
     73            $appname = 'facebook';
     74        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/vkontakte' ) !== false ) ) {
     75            $appname = 'vkontakte';
     76        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/linkedin' ) !== false ) ) {
     77            $appname = 'linkedin';
     78        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/amazon' ) !== false ) || ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback=amazon' ) !== false ) ) {
     79            $appname = 'amazon';
     80        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/yahoo' ) !== false ) || ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback=yaahoo' ) !== false ) ) {
     81            $appname = 'yahoo';
     82        } elseif ( ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback/wordpress' ) !== false ) || ( strpos( sanitize_text_field($_SERVER['REQUEST_URI']), 'openidcallback=WordPress' ) !== false ) ) {
     83            $appname = 'WordPress';
     84        }
     85    } else {
     86        return;
     87    }
     88    if ( $appname == 'yaahoo' ) {
     89        $appname = 'yahoo';
     90    }
     91    require 'social_apps/' . $appname . '.php';
     92    $mo_appname     = 'mo_' . $appname;
     93    $social_app     = new $mo_appname();
     94    $appuserdetails = $social_app->mo_openid_get_access_token();
     95    mo_openid_process_user_details( $appuserdetails, $appname );
     96}
     97
     98function mo_openid_process_social_login() {
     99
     100    if ( is_user_logged_in() ) {
     101        return;
     102    }
     103    // Decrypt all entries
     104    $decrypted_user_name = isset( $_POST['username'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['username'] ) ) : '';         // phpcs:ignore
     105    $decrypted_user_name = str_replace( ' ', '-', $decrypted_user_name );
     106    $decrypted_user_name = sanitize_text_field( $decrypted_user_name, true );
     107    $decrypted_email     = isset( $_POST['email'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['email'] ) ) : '';   // phpcs:ignore
     108    if ( $decrypted_user_name == null ) {
     109        $name_em             = explode( '@', $decrypted_email );
     110        $decrypted_user_name = isset( $name_em[0] ) ? $name_em[0] : '';
     111    }
     112     $decrypted_first_name = isset( $_POST['firstName'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['firstName'] ) ) : '';     //phpcs:ignore
     113    if ( $decrypted_first_name == null ) {
     114        $name_em              = explode( '@', $decrypted_email );
     115        $decrypted_first_name = isset( $name_em[0] ) ? $name_em[0] : '';
     116    }
     117    $decrypted_app_name = isset( $_POST['appName'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['appName'] ) ) : '';    //phpcs:ignore
     118    $decrypted_app_name = strtolower( $decrypted_app_name );
     119    $split_app_name     = explode( '_', $decrypted_app_name );
     120    // check to ensure login starts at the click of social login button
     121    if ( empty( $split_app_name[0] ) ) {
     122        wp_die( esc_attr( get_option( 'mo_manual_login_error_message' ) ) );
     123    } else {
     124        $decrypted_app_name = strtolower( $split_app_name[0] );
     125    }
     126
     127    $appuserdetails = array(
     128        'first_name'     => $decrypted_first_name,
     129        'last_name'      => isset( $_POST['lastName'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['lastName'] ) ) : '',        //phpcs:ignore
     130        'email'          => $decrypted_email,
     131        'user_name'      => $decrypted_user_name,
     132        'user_url'       => isset( $_POST['profileUrl'] ) ?  sanitize_text_field( mo_openid_decrypt_sanitize( $_POST['profileUrl'] ) ) : '',        //phpcs:ignore
     133        'user_picture'   => isset( $_POST['profilePic'] ) ?  sanitize_text_field( mo_openid_decrypt_sanitize($_POST['profilePic'] ) ) : '', //phpcs:ignore
     134        'social_user_id' => isset( $_POST['userid'] ) ? sanitize_text_field(  mo_openid_decrypt_sanitize( $_POST['userid'] ) ) : '',    //phpcs:ignore
     135    );
     136
     137    mo_openid_process_user_details( $appuserdetails, $decrypted_app_name );
     138}
     139
     140function mo_openid_process_user_details( $appuserdetails, $appname ) {
     141    $first_name    = $last_name = $email = $user_name = $user_url = $user_picture = $social_user_id = $full_name = '';
     142    $location_city = $location_country = $about_me = $company_name = $age = $gender = $birth_date = $friend_nos = $website = $field_of_study = $university_name = $places_lived = $position = $relationship = $contact_no = $industry = $head_line = $NA = '';
     143
     144    $first_name       = isset( $appuserdetails['first_name'] ) ? $appuserdetails['first_name'] : '';
     145    $last_name        = isset( $appuserdetails['last_name'] ) ? $appuserdetails['last_name'] : '';
     146    $email            = isset( $appuserdetails['email'] ) ? $appuserdetails['email'] : '';
     147    $user_name        = isset( $appuserdetails['user_name'] ) ? $appuserdetails['user_name'] : '';
     148    $user_url         = isset( $appuserdetails['user_url'] ) ? $appuserdetails['user_url'] : '';
     149    $user_picture     = isset( $appuserdetails['user_picture'] ) ? $appuserdetails['user_picture'] : '';
     150    $social_user_id   = isset( $appuserdetails['social_user_id'] ) ? $appuserdetails['social_user_id'] : '';
     151    $full_name        = isset( $appuserdetails['full_name'] ) ? $appuserdetails['full_name'] : '';
     152    $location_city    = isset( $appuserdetails['location_city'] ) ? $appuserdetails['location_city'] : '';
     153    $location_country = isset( $appuserdetails['location_country'] ) ? $appuserdetails['location_country'] : '';
     154    $about_me         = isset( $appuserdetails['about_me'] ) ? $appuserdetails['about_me'] : '';
     155    $company_name     = isset( $appuserdetails['company_name'] ) ? $appuserdetails['company_name'] : '';
     156    $age              = isset( $appuserdetails['age'] ) ? $appuserdetails['age'] : '';
     157    $gender           = isset( $appuserdetails['gender'] ) ? $appuserdetails['gender'] : '';
     158    $birth_date       = isset( $appuserdetails['birth_date'] ) ? $appuserdetails['birth_date'] : '';
     159    $friend_nos       = isset( $appuserdetails['friend_nos'] ) ? $appuserdetails['friend_nos'] : '';
     160    $website          = isset( $appuserdetails['website'] ) ? $appuserdetails['website'] : '';
     161    $field_of_study   = isset( $appuserdetails['field_of_study'] ) ? $appuserdetails['field_of_study'] : '';
     162    $university_name  = isset( $appuserdetails['university_name'] ) ? $appuserdetails['university_name'] : '';
     163    $places_lived     = isset( $appuserdetails['places_lived'] ) ? $appuserdetails['places_lived'] : '';
     164    $position         = isset( $appuserdetails['position'] ) ? $appuserdetails['position'] : '';
     165    $relationship     = isset( $appuserdetails['relationship'] ) ? $appuserdetails['relationship'] : '';
     166    $contact_no       = isset( $appuserdetails['contact_no'] ) ? $appuserdetails['contact_no'] : '';
     167    $industry         = isset( $appuserdetails['industry'] ) ? $appuserdetails['industry'] : '';
     168    $head_line        = isset( $appuserdetails['head_line'] ) ? $appuserdetails['head_line'] : '';
     169
     170    $user_name = str_replace( ' ', '-', $user_name );
     171    $user_name = sanitize_user( $user_name, true );
     172
     173    if ( $user_name == '-' || $user_name == '' ) {
     174        $splitemail = explode( '@', $email );
     175        $user_name  = $splitemail[0];
     176    }
     177
     178    // Set User Full Name
     179    if ( isset( $first_name ) && isset( $last_name ) ) {
     180        if ( strcmp( $first_name, $last_name ) != 0 ) {
     181            $user_full_name = $first_name . ' ' . $last_name;
     182        } else {
     183            $user_full_name = $first_name;
     184        }
     185    } elseif ( isset( $first_name ) ) {
     186        $user_full_name = $first_name;
     187    } else {
     188        $user_full_name = $user_name;
     189        $first_name     = '';
     190        $last_name      = '';
     191    }
     192
     193    // check_existing_user
     194    global $wpdb;
     195    $linked_email_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_social_app = %s AND identifier = %s', array( $appname, $social_user_id ) ) );
     196    $user_email      = sanitize_email( $email );
     197
     198    $email_user_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_email = %s', $user_email ) );
     199
     200    if ( empty( $user_email ) ) {
     201        $existing_email_user_id = null;
     202    } else {
     203        $existing_email_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_email = %s", $user_email ) );
     204    }
     205
     206    $session_values = array(
     207        'username'        => $user_name,
     208        'user_email'      => $user_email,
     209        'user_full_name'  => $user_full_name,
     210        'first_name'      => $first_name,
     211        'last_name'       => $last_name,
     212        'user_url'        => $user_url,
     213        'user_picture'    => $user_picture,
     214        'social_app_name' => $appname,
     215        'social_user_id'  => $social_user_id,
     216    );
     217    mo_openid_start_session_login( $session_values );
     218    // user is a member
     219    if ( ( isset( $linked_email_id ) ) || ( isset( $email_user_id ) ) || ( isset( $existing_email_user_id ) ) ) {
     220        if ( ( ! isset( $linked_email_id ) ) && ( isset( $email_user_id ) ) ) {
     221            $linked_email_id = $email_user_id;
     222            mo_openid_insert_query( $appname, $user_email, $linked_email_id, $social_user_id );
     223        }
     224        if ( isset( $linked_email_id ) ) {
     225            $user    = get_user_by( 'id', $linked_email_id );
     226            $user_id = $user->ID;
     227        } elseif ( isset( $email_user_id ) ) {
     228            $user    = get_user_by( 'id', $email_user_id );
     229            $user_id = $user->ID;
     230        } else {
     231            $user    = get_user_by( 'id', $existing_email_user_id );
     232            $user_id = $user->ID;
     233        }
     234
     235        // $linked_email_id,$user_id,$user,$user_picture
     236        mo_openid_login_user( $linked_email_id, $user_id, $user, $user_picture, 1 );
     237    }
     238
     239    // new user creation
     240    if ( get_option( 'mo_openid_auto_register_enable' ) ) {
     241        $allowed_html = array('style'=> array(), 'head'=> array(), 'meta'=> array('name'=>array(), 'content'=>array(), ), 'link'=>array('rel'=>array(), 'href'=> array(), 'type'=> array(), 'media' => array()), 'body'=> array('class'=> array()), 'div'=> array('style'=> array(), 'class'=>array(), 'id'=> array()), 'form'=> array('name'=> array(), 'method'=> array(), 'action'=> array()), 'span'=> array('style'=> array(), 'class'=> array(), 'align'=> array()), 'p'=> array(), 'br' => array(), 'label' => array('for' => array()), 'input' => array('type'=> array(), 'class'=>array(), 'name'=> array(),'size'=> array(), 'value'=> array()) );
     242        if ( get_option( 'mo_openid_account_linking_enable' ) ) {
     243            echo wp_kses( mo_openid_account_linking_form( $user_name, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $appname, $social_user_id ), $allowed_html );
     244            exit;
     245        } elseif ( get_option( 'mo_openid_enable_profile_completion' ) && ( $session_values['user_email'] == '' || $session_values['username'] == '' ) ) { // if newa user and profile completion is enabled
     246            echo wp_kses( mo_openid_profile_completion_form( $session_values ), $allowed_html );
     247            exit;
     248        } else {
     249
     250            mo_create_new_user( $session_values );
     251        }
     252    } else {
     253        mo_openid_disabled_register_message();
     254    }
     255}
     256
     257function mo_create_new_user( $user_val ) {
     258   
     259    $user_name      = $user_val['username'];
     260    $email          = $user_val['user_email'];
     261    $user_full_name = $user_val['user_full_name'];
     262    $first_name     = $user_val['first_name'];
     263    $last_name      = $user_val['last_name'];
     264    $user_url       = $user_val['user_url'];
     265    $user_picture   = $user_val['user_picture'];
     266    $appname        = $user_val['social_app_name'];
     267    $social_user_id = $user_val['social_user_id'];
     268    global $wpdb;
     269    $linked_email_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_social_app = %s AND identifier = %s', array( $appname, $social_user_id ) ) );
     270    $user_email      = sanitize_email( $email );
     271    if ( empty( $user_name ) && ! empty( $email ) ) {
     272        $split_email = explode( '@', $email );
     273        $user_name   = $split_email[0];
     274        $user_email  = $email;
     275    } elseif ( empty( $email ) && ! empty( $user_name ) ) {
     276        $split_app_name = explode( '_', $appname );
     277        $user_email     = $user_name . '@' . $split_app_name[0] . '.com';
     278    } elseif ( empty( $email ) && empty( $user_name ) ) {
     279        wp_die( 'No profile data is returned from application. Please contact your administrator.' );
     280    }
     281
     282    $user_email = str_replace( ' ', '', $user_email );
     283
     284    $random_password  = wp_generate_password( 10, false );
     285    $user_profile_url = $user_url;
     286
     287    if ( isset( $appname ) && ! empty( $appname ) && $appname == 'facebook' ) {
     288        $user_url = '';
     289    }
     290
     291    // Checking if username already exist
     292    $user_name_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_login = %s", $user_name ) );
     293
     294    if ( isset( $user_name_user_id ) ) {
     295        $email_array       = explode( '@', $user_email );
     296        $user_name         = $email_array[0];
     297        $user_name_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_login = %s", $user_name ) );
     298        $i                 = 1;
     299        while ( ! empty( $user_name_user_id ) ) {
     300            $uname             = $user_name . '_' . $i;
     301            $user_name_user_id = $wpdb->get_var( $wpdb->prepare( 'SELECT ID FROM ' . $wpdb->prefix . 'users where user_login = %s', $uname ) );
     302            $i++;
     303            if ( empty( $user_name_user_id ) ) {
     304                $user_name = $uname;
     305            }
     306        }
     307
     308        if ( isset( $user_name_user_id ) ) {
     309            echo '<br/>' . 'Error Code Existing Username: ' . esc_attr( get_option( 'mo_existing_username_error_message' ) );
     310            exit();
     311        }
     312    }
     313
     314    // to check for customisation fields
     315    if ( get_option( 'mo_openid_customised_field_enable' ) == 1 ) {
     316        sso_field_mapping_add_on( $user_val );
     317    }
     318
     319    $userdata = array(
     320        'user_login'   => $user_name,
     321        'user_email'   => $user_email,
     322        'user_pass'    => $random_password,
     323        'display_name' => $user_full_name,
     324        'first_name'   => $first_name,
     325        'last_name'    => $last_name,
     326        'user_url'     => $user_url,
     327    );
     328    $user_id  = wp_insert_user( $userdata );
     329
     330    if ( is_wp_error( $user_id ) ) {
     331        print_r( $user_id );
     332        wp_die( 'Error Code 5: ' . esc_attr( get_option( 'mo_registration_error_message' ) ) );
     333    }
     334
     335    update_option( 'mo_openid_user_count', get_option( 'mo_openid_user_count' ) + 1 );
     336
     337    $session_values = array(
     338        'username'        => $user_name,
     339        'user_email'      => $user_email,
     340        'user_full_name'  => $user_full_name,
     341        'first_name'      => $first_name,
     342        'last_name'       => $last_name,
     343        'user_url'        => $user_url,
     344        'user_picture'    => $user_picture,
     345        'social_app_name' => $appname,
     346        'social_user_id'  => $social_user_id,
     347    );
     348
     349    mo_openid_start_session_login( $session_values );
     350    $user = get_user_by( 'id', $user_id );
     351    // registration hook
     352    do_action( 'mo_user_register', $user_id, $user_profile_url );
     353    mo_openid_link_account( $user->user_login, $user );
     354    $linked_email_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_social_app = %s AND identifier = %s', array( $appname, $social_user_id ) ) );
     355    mo_openid_login_user( $linked_email_id, $user_id, $user, $user_picture, 0 );
     356}
     357
     358function mo_openid_customize_logo() {
     359    $logo = " <div style='float:left;' class='mo_image_id'>
    372360                <a target='_blank' href='https://www.miniorange.com/'>
    373                 <img alt='logo' src='". plugins_url('/includes/images/miniOrange.png',__FILE__) ."' class='mo_openid_image'>
     361                <img alt='logo' src='" . plugins_url( '/includes/images/miniOrange.png', __FILE__ ) . "' class='mo_openid_image'>
    374362                </a>
    375363                </div>
    376364                <br/>";
    377     return $logo;
    378 }
    379 
    380 
    381 function sso_field_mapping_add_on($user_val)
    382 {
    383     $user_name = $user_val['username'];
    384     $email = $user_val['user_email'];
    385     $user_full_name = $user_val['user_full_name'];
    386     $first_name = $user_val['first_name'];
    387     $last_name = $user_val['last_name'];
    388     $user_url = $user_val['user_url'];
    389     $user_picture = $user_val['user_picture'];
    390     $appname = $user_val['social_app_name'];
    391     $social_user_id = $user_val['social_user_id'];
    392     $set_cust_field = get_option('mo_openid_custom_field_mapping');
    393     $random_password    = wp_generate_password( 10, false );
    394     $user_profile_url  = $user_url;
    395     if ($set_cust_field) {
    396         foreach ($set_cust_field as $x) {
    397             foreach ($x as $xx => $x_value) {
    398                 if (isset($xx)) {
    399                     ?>
    400                     <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
    401                         <?php
    402                         echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
    403                         echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
    404                         echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
    405                         echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
    406                         echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
    407                         echo '<input type="hidden" name="call" value="5">';
    408                         echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
    409                         echo '<input type="hidden" name="username" value="' . $user_name . '">';
    410                         echo '<input type="hidden" name="user_email" value="' . $email . '">';
    411                         echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
    412                         echo '<input type="hidden" name="social_app_name" value="' . $appname . '">';
    413                         echo '<input type="hidden" name="social_user_id" value="' . $social_user_id . '">';
    414                         echo '<input type="hidden" name="decrypted_app_name" value="">';
    415                         echo '<input type="hidden" name="decrypted_user_id" value="">';
    416                         ?>
    417                     </form>
    418                     <script type="text/javascript">
    419                         document.getElementById('myForm').submit();
    420                     </script>
    421                     <?php
    422                     exit;
    423                 }
    424             }
    425         }
    426     }
    427 }
    428 
    429 function mo_openid_plugin_update(){
    430     global $wpdb;
    431     $table_name = $wpdb->prefix . 'mo_openid_linked_user';
    432     $charset_collate = $wpdb->get_charset_collate();
    433 
    434     $time = $wpdb->get_var("SELECT COLUMN_NAME
     365    return $logo;
     366}
     367
     368
     369function sso_field_mapping_add_on( $user_val ) {
     370    $user_name        = $user_val['username'];
     371    $email            = $user_val['user_email'];
     372    $user_full_name   = $user_val['user_full_name'];
     373    $first_name       = $user_val['first_name'];
     374    $last_name        = $user_val['last_name'];
     375    $user_url         = $user_val['user_url'];
     376    $user_picture     = $user_val['user_picture'];
     377    $appname          = $user_val['social_app_name'];
     378    $social_user_id   = $user_val['social_user_id'];
     379    $set_cust_field   = get_option( 'mo_openid_custom_field_mapping' );
     380    $random_password  = wp_generate_password( 10, false );
     381    $user_profile_url = $user_url;
     382    if ( $set_cust_field ) {
     383        foreach ( $set_cust_field as $x ) {
     384            foreach ( $x as $xx => $x_value ) {
     385                if ( isset( $xx ) ) {
     386                    ?>
     387                    <form id="myForm" action="<?php echo esc_attr( get_option( 'profile_completion_page' ) ); ?>" method="post">
     388                        <?php
     389                        echo '<input type="hidden" name="last_name" value="' . esc_attr( $last_name ) . '">';
     390                        echo '<input type="hidden" name="first_name" value="' . esc_attr( $first_name ) . '">';
     391                        echo '<input type="hidden" name="user_full_name" value="' . esc_attr( $user_full_name ) . '">';
     392                        echo '<input type="hidden" name="user_url" value="' . esc_url( $user_url ) . '">';
     393                        echo '<input type="hidden" name="user_profile_url" value="' . esc_url( $user_profile_url ) . '">';
     394                        echo '<input type="hidden" name="call" value="5">';
     395                        echo '<input type="hidden" name="user_picture" value="' . esc_attr( $user_picture ) . '">';
     396                        echo '<input type="hidden" name="username" value="' . esc_attr( $user_name ) . '">';
     397                        echo '<input type="hidden" name="user_email" value="' . esc_attr( $email ) . '">';
     398                        echo '<input type="hidden" name="random_password" value="' . esc_attr( $random_password ) . '">';
     399                        echo '<input type="hidden" name="social_app_name" value="' . esc_attr( $appname ) . '">';
     400                        echo '<input type="hidden" name="social_user_id" value="' . esc_attr( $social_user_id ) . '">';
     401                        echo '<input type="hidden" name="decrypted_app_name" value="">';
     402                        echo '<input type="hidden" name="decrypted_user_id" value="">';
     403                        ?>
     404                    </form>
     405                    <script type="text/javascript">
     406                        document.getElementById('myForm').submit();
     407                    </script>
     408                    <?php
     409                    exit;
     410                }
     411            }
     412        }
     413    }
     414}
     415
     416function mo_openid_plugin_update() {
     417    global $wpdb;
     418    $table_name      = $wpdb->prefix . 'mo_openid_linked_user';
     419    $charset_collate = $wpdb->get_charset_collate();
     420
     421    $time = $wpdb->get_var(
     422        $wpdb->prepare(
     423            "SELECT COLUMN_NAME
    435424                                    FROM information_schema.COLUMNS
    436425                                    WHERE
    437                                      TABLE_SCHEMA='$wpdb->dbname'
    438                                      AND COLUMN_NAME = 'timestamp'");
    439 
    440     $data_type=$wpdb->get_var("SELECT DATA_TYPE
    441                     FROM information_schema.COLUMNS
    442                     WHERE
    443                     TABLE_SCHEMA='$wpdb->dbname'
    444                     AND TABLE_NAME = '$table_name'
    445                     AND COLUMN_NAME = 'user_id'");
    446 
    447     if($data_type=="mediumint")
    448     {
    449         $wpdb->get_var("ALTER TABLE $table_name CHANGE `user_id` `user_id` BIGINT(20) NOT NULL");
    450 
    451     }
    452 
    453     // if table mo_openid_linked_user doesn't exist or the 'timestamp' column doesn't exist
    454     if($wpdb->get_var("show tables like '$table_name'") != $table_name || empty($time) ) {
    455         $sql = "CREATE TABLE $table_name (
     426                                     TABLE_SCHEMA= %s
     427                                     AND COLUMN_NAME = 'timestamp'",
     428            $wpdb->dbname
     429        )
     430    );
     431
     432    $data_type = $wpdb->get_var(
     433        $wpdb->prepare(
     434            "SELECT DATA_TYPE
     435    FROM information_schema.COLUMNS
     436    WHERE
     437    TABLE_SCHEMA= %s
     438    AND TABLE_NAME = %s
     439    AND COLUMN_NAME = 'user_id'",
     440            array( $wpdb->dbname, $table_name )
     441        )
     442    );
     443
     444    if ( $data_type == 'mediumint' ) {
     445        $wpdb->get_var( $wpdb->prepare( 'ALTER TABLE %s CHANGE `user_id` `user_id` BIGINT(20) NOT NULL', $table_name ) );
     446
     447    }
     448
     449    // if table mo_openid_linked_user doesn't exist or the 'timestamp' column doesn't exist
     450    if ( $wpdb->get_var( $wpdb->prepare( 'show tables like %s', $table_name ) ) != $table_name || empty( $time ) ) {
     451        $sql = "CREATE TABLE $table_name (
    456452                    id mediumint(9) NOT NULL AUTO_INCREMENT,
    457453                    linked_social_app varchar(55) NOT NULL,
     
    462458                    PRIMARY KEY  (id)
    463459                ) $charset_collate;";
    464 
    465         require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    466         dbDelta($sql);
    467 
    468         $identifier = $wpdb->get_var("SELECT COLUMN_NAME
     460        require_once ABSPATH . 'wp-admin/includes/upgrade.php';
     461        dbDelta( $sql );
     462
     463        $identifier = $wpdb->get_var(
     464            $wpdb->prepare(
     465                "SELECT COLUMN_NAME
    469466                                    FROM information_schema.COLUMNS
    470467                                    WHERE
    471                                     TABLE_NAME = '$wpdb->users'
    472                                     AND TABLE_SCHEMA='$wpdb->dbname'
    473                                     AND COLUMN_NAME = 'identifier'");
    474 
    475         if(strcasecmp( $identifier, "identifier") == 0 ){
    476 
    477             $count= $wpdb->get_var("SELECT count(ID) FROM $wpdb->users WHERE identifier not LIKE ''");
    478             $result= $wpdb->get_results("SELECT * FROM $wpdb->users WHERE identifier not LIKE ''");
    479 
    480             for($icnt = 0; $icnt < $count; $icnt = $icnt + 1){
    481 
    482                 $provider = $result[$icnt]->provider;
    483                 $split_app_name = explode('_', $provider);
    484                 $provider = strtolower($split_app_name[0]);
    485                 $user_email = $result[$icnt]->user_email;
    486                 $ID = $result[$icnt]->ID;
    487                 $identifier = $result[$icnt]->identifier;
    488 
    489                 $output = $wpdb->insert(
    490                     $table_name,
    491                     array(
    492                         'linked_social_app' => $provider,
    493                         'linked_email' => $user_email,
    494                         'user_id' =>  $ID,
    495                         'identifier' => $identifier
    496                     ),
    497                     array(
    498                         '%s',
    499                         '%s',
    500                         '%d',
    501                         '%s'
    502                     )
    503                 );
    504                 if($output === false){
    505                     $wpdb->show_errors();
    506                     $wpdb->print_error();
    507                     wp_die('Error in insert Query');
    508                     exit;
    509 
    510                 }
    511 
    512             }
    513             $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN provider");
    514             $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN identifier");
    515         }
    516     }
    517 
    518     $current_version = get_option('mo_openid_social_login_version');
    519 
    520     if(!$current_version && version_compare(MO_OPENID_SOCIAL_LOGIN_VERSION,"200.1.1",">=")){
    521         //delete entries from mo_openid_linked_user table which have empty column values
    522         $result = $wpdb->query(
    523             $wpdb->prepare(
    524                 "
    525                         DELETE FROM {$table_name}
     468                                    TABLE_NAME = %s
     469                                    AND TABLE_SCHEMA= %s
     470                                    AND COLUMN_NAME = 'identifier'",
     471                array( $wpdb->users, $wpdb->dbname )
     472            )
     473        );
     474
     475        if ( strcasecmp( $identifier, 'identifier' ) == 0 ) {
     476
     477            $count  = $wpdb->get_var( "SELECT count(ID) FROM $wpdb->users WHERE identifier not LIKE ''" );
     478            $result = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE identifier not LIKE ''" );
     479
     480            for ( $icnt = 0; $icnt < $count; $icnt = $icnt + 1 ) {
     481
     482                $provider       = $result[ $icnt ]->provider;
     483                $split_app_name = explode( '_', $provider );
     484                $provider       = strtolower( $split_app_name[0] );
     485                $user_email     = $result[ $icnt ]->user_email;
     486                $ID             = $result[ $icnt ]->ID;
     487                $identifier     = $result[ $icnt ]->identifier;
     488
     489                $output = $wpdb->insert(
     490                    $table_name,
     491                    array(
     492                        'linked_social_app' => $provider,
     493                        'linked_email'      => $user_email,
     494                        'user_id'           => $ID,
     495                        'identifier'        => $identifier,
     496                    ),
     497                    array(
     498                        '%s',
     499                        '%s',
     500                        '%d',
     501                        '%s',
     502                    )
     503                );
     504                if ( $output === false ) {
     505                    $wpdb->show_errors();
     506                    $wpdb->print_error();
     507                    wp_die( 'Error in insert Query' );
     508                    exit;
     509
     510                }
     511            }
     512            $wpdb->get_var( "ALTER TABLE $wpdb->users DROP COLUMN provider" );
     513            $wpdb->get_var( "ALTER TABLE $wpdb->users DROP COLUMN identifier" );
     514        }
     515    }
     516
     517    $current_version = get_option( 'mo_openid_social_login_version' );
     518
     519    if ( ! $current_version && version_compare( MO_OPENID_SOCIAL_LOGIN_VERSION, '200.1.1', '>=' ) ) {
     520        // delete entries from mo_openid_linked_user table which have empty column values
     521        $result = $wpdb->query(
     522            $wpdb->prepare(
     523                '
     524                        DELETE FROM %s
    526525                        WHERE linked_social_app = %s
    527526                        OR linked_email = %s
    528527                        OR user_id = %d
    529528                        OR identifier = %s
    530                         ",
    531                 '','',0, ''
    532             )
    533         );
    534         if($result === false){
    535             /*$wpdb->show_errors();
    536             $wpdb->print_error();
    537             exit;*/
    538             wp_die('Error in deletion query');
    539         }
    540     }
    541     update_option('mo_openid_social_login_version',MO_OPENID_SOCIAL_LOGIN_VERSION);
    542 }
    543 
    544 function mo_openid_delete_social_profile($id){
    545     // delete first name, last name, user_url and profile_url from usermeta
    546     global $wpdb;
    547     $metakey1 = 'first_name';
    548     $metakey2 = 'last_name';
    549     $metakey3 = 'moopenid_user_avatar';
    550     $metakey4 = 'moopenid_user_profile_url';
    551     $wpdb->query($wpdb->prepare('DELETE from '.$wpdb->prefix.'usermeta where user_id = %d and (meta_key = %s or meta_key = %s  or meta_key = %s  or meta_key = %s)',$id,$metakey1,$metakey2,$metakey3,$metakey4));
    552     update_user_meta($id,'mo_openid_data_deleted','1');
    553     exit;
    554 }
    555 
    556 function checkTimeStamp($sentTime,$validatedTime){
    557     $diff       = round(abs($validatedTime - $sentTime) / 60,2);
    558     if($diff>5)
    559         return false;
    560     else
    561         return true;
    562 }
    563 
    564 function checkTransactionId($customerKey,$otpToken,$transactionId,$pass){
    565     if(!$pass){
    566         return false;
    567     }
    568     $stringToHash   = $customerKey . $otpToken;
    569     $txtID      = hash("sha512", $stringToHash);
    570     if($txtID == $transactionId)
    571         return true;
     529                        ',
     530                $table_name,
     531                '',
     532                '',
     533                0,
     534                ''
     535            )
     536        );
     537        if ( $result === false ) {
     538            /*
     539            $wpdb->show_errors();
     540            $wpdb->print_error();
     541            exit;*/
     542            wp_die( 'Error in deletion query' );
     543        }
     544    }
     545    update_option( 'mo_openid_social_login_version', MO_OPENID_SOCIAL_LOGIN_VERSION );
     546}
     547
     548function mo_openid_delete_social_profile( $id ) {
     549    // delete first name, last name, user_url and profile_url from usermeta
     550    global $wpdb;
     551    $metakey1 = 'first_name';
     552    $metakey2 = 'last_name';
     553    $metakey3 = 'moopenid_user_avatar';
     554    $metakey4 = 'moopenid_user_profile_url';
     555    $wpdb->query( $wpdb->prepare( 'DELETE from ' . $wpdb->prefix . 'usermeta where user_id = %d and (meta_key = %s or meta_key = %s  or meta_key = %s  or meta_key = %s)', $id, $metakey1, $metakey2, $metakey3, $metakey4 ) );
     556    update_user_meta( $id, 'mo_openid_data_deleted', '1' );
     557    exit;
     558}
     559
     560function checkTimeStamp( $sentTime, $validatedTime ) {
     561    $diff = round( abs( $validatedTime - $sentTime ) / 60, 2 );
     562    if ( $diff > 5 ) {
     563        return false;
     564    } else {
     565        return true;
     566    }
     567}
     568
     569function checkTransactionId( $customerKey, $otpToken, $transactionId, $pass ) {
     570    if ( ! $pass ) {
     571        return false;
     572    }
     573    $stringToHash = $customerKey . $otpToken;
     574    $txtID        = hash( 'sha512', $stringToHash );
     575    if ( $txtID == $transactionId ) {
     576        return true;
     577    }
    572578}
    573579
    574580
    575581function mo_openid_is_customer_addon_license_key_verified() {
    576     $licenseKey = get_option('mo_openid_opn_lk_extra_attr_addon');
    577     $email      = get_option('mo_openid_admin_email');
    578     $customerKey = get_option('mo_openid_admin_customer_key');
    579     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    580         return 0;
    581     }else {
    582         return 1;
    583     }
     582    $licenseKey  = get_option( 'mo_openid_opn_lk_extra_attr_addon' );
     583    $email       = get_option( 'mo_openid_admin_email' );
     584    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     585    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     586        return 0;
     587    } else {
     588        return 1;
     589    }
    584590}
    585591
    586592function mo_openid_is_wca_license_key_verified() {
    587     $licenseKey = get_option('mo_openid_opn_lk_wca_addon');
    588     $email      = get_option('mo_openid_admin_email');
    589     $customerKey = get_option('mo_openid_admin_customer_key');
    590     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    591         return 0;
    592     }else {
    593         return 1;
    594     }
     593    $licenseKey  = get_option( 'mo_openid_opn_lk_wca_addon' );
     594    $email       = get_option( 'mo_openid_admin_email' );
     595    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     596    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     597        return 0;
     598    } else {
     599        return 1;
     600    }
    595601}
    596602
    597603function mo_openid_is_bpp_license_key_verified() {
    598     $licenseKey = get_option('mo_openid_opn_lk_bpp_addon');
    599     $email      = get_option('mo_openid_admin_email');
    600     $customerKey = get_option('mo_openid_admin_customer_key');
    601     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    602         return 0;
    603     }else {
    604         return 1;
    605     }
     604    $licenseKey  = get_option( 'mo_openid_opn_lk_bpp_addon' );
     605    $email       = get_option( 'mo_openid_admin_email' );
     606    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     607    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     608        return 0;
     609    } else {
     610        return 1;
     611    }
    606612}
    607613
    608614function mo_openid_is_dis_license_key_verified() {
    609     $licenseKey = get_option('mo_openid_opn_lk_dis_addon');
    610     $email      = get_option('mo_openid_admin_email');
    611     $customerKey = get_option('mo_openid_admin_customer_key');
    612     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    613         return 0;
    614     }else {
    615         return 1;
    616     }
     615    $licenseKey  = get_option( 'mo_openid_opn_lk_dis_addon' );
     616    $email       = get_option( 'mo_openid_admin_email' );
     617    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     618    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     619        return 0;
     620    } else {
     621        return 1;
     622    }
    617623}
    618624
    619625function mo_openid_is_hub_license_key_verified() {
    620     $licenseKey = get_option('mo_openid_opn_lk_hub_addon');
    621     $email      = get_option('mo_openid_admin_email');
    622     $customerKey = get_option('mo_openid_admin_customer_key');
    623     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    624         return 0;
    625     }else {
    626         return 1;
    627     }
     626    $licenseKey  = get_option( 'mo_openid_opn_lk_hub_addon' );
     627    $email       = get_option( 'mo_openid_admin_email' );
     628    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     629    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     630        return 0;
     631    } else {
     632        return 1;
     633    }
    628634}
    629635
    630636function mo_openid_is_mailc_license_key_verified() {
    631     $licenseKey = get_option('mo_openid_opn_lk_mailc_addon');
    632     $email      = get_option('mo_openid_admin_email');
    633     $customerKey = get_option('mo_openid_admin_customer_key');
    634     if(  !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
    635         return 0;
    636     }else {
    637         return 1;
    638     }
    639 }
    640 function mo_openid_show_addon_message_page($add)
    641 {
    642     ?>
    643     <div class="mo_openid_table_layout">
    644         <?php
    645         echo "<div style='text-align: center'><p>It seems <b>".$add."</b> is not installed or activated. Please download or activate the addon.</p></div>";
    646         ?>
    647         <h2 align="center">How do I download or activate the Social Integration Registration Form Addon ?</h2>
    648         <p><b>Download:</b> Download addon and license key from xecurify Console
    649         <ol>
    650             <li>Login to <a target=”_blank” href="https://login.xecurify.com">xecurify Console</a>.</li>
    651             <li>Click on <b>License</b> on the left menu.</li>
    652             <li>You will see the payment made by you. Against the payment, you will see a <b>Download Plugin</b> option. Click on the link to download the plugin.</li>
    653             <li>A plugin of .zip extension will get downloaded.</li>
    654             <li>Click on <b>View License Key</b>.</li>
    655             <li>Copy the license key given for use during installation.</li>
    656         </ol>
    657         </p>
    658         <p><b>Installation:</b>
    659         <ol>
    660             <li>Go to <b>Plugins > Add New</b> and click on <b>Upload addon</b>.</li>
    661             <li>Upload the downloaded zip and Activate.</li>
    662         </ol>
    663         </p>
    664     </div>
    665     <script>
    666         //to set heading name
    667         jQuery('#mo_openid_page_heading').text('Extra Attributes Add On');
    668     </script>
    669     <?php
    670 }
    671 
    672 function  mo_openid_show_verify_addon_license_page(){
    673     $nonce = sanitize_text_field($_POST['mo_openid_addon_verify_license_nonce']);
    674     if (!wp_verify_nonce($nonce, 'mo-openid-addon-verify-license')) {
    675         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    676     } else {
    677         if(current_user_can('administrator')){
    678     if(sanitize_text_field($_POST['plan_name'])=='extra_attributes_addon')
    679         wp_send_json(["html"=> mo_openid_show_verify_license_page('extra_attributes_addon')]);
    680     else if(sanitize_text_field($_POST['plan_name'])=='WP_SOCIAL_LOGIN_WOOCOMMERCE_ADDON')
    681     wp_send_json(["html"=> mo_openid_show_verify_license_page('WP_SOCIAL_LOGIN_WOOCOMMERCE_ADDON')]);
    682     else if(sanitize_text_field($_POST['plan_name'])=='WP_SOCIAL_LOGIN_MAILCHIMP_ADDON')
    683         wp_send_json(["html"=> mo_openid_show_verify_license_page('WP_SOCIAL_LOGIN_MAILCHIMP_ADDON')]);
    684     else if(sanitize_text_field($_POST['plan_name'])=='WP_SOCIAL_LOGIN_BUDDYPRESS_ADDON')
    685         wp_send_json(["html"=> mo_openid_show_verify_license_page('WP_SOCIAL_LOGIN_BUDDYPRESS_ADDON')]);
    686     else if(sanitize_text_field($_POST['plan_name'])=='WP_SOCIAL_LOGIN_HUBSPOT_ADDON')
    687         wp_send_json(["html"=> mo_openid_show_verify_license_page('WP_SOCIAL_LOGIN_HUBSPOT_ADDON')]);
    688     else if(sanitize_text_field($_POST['plan_name'])=='WP_SOCIAL_LOGIN_DISCORD_ADDON')
    689         wp_send_json(["html"=> mo_openid_show_verify_license_page('WP_SOCIAL_LOGIN_DISCORD_ADDON')]);
    690         }
    691     }
    692 }
    693 
    694 function mo_openid_show_verify_license_page($licience_type){
    695     ?>
    696     <div class="mo_openid_table_layout" style="padding-bottom:50px;!important">
    697         <h3>Verify License </h3>
    698         <form name="f" method="post" action="">
    699             <input type="hidden" name="option" value="mo_openid_verify_license" />
    700             <input type="hidden" name="mo_openid_verify_license_nonce"
    701                    value="<?php echo wp_create_nonce( 'mo-openid-verify-license-nonce' ); ?>"/>
    702 
    703             <p><b><font color="#FF0000">*</font>Enter your license key to activate the plugin:</b>
    704                 <input class="mo_openid_table_textbox" required type="text" style="margin-left:40px;width:300px;"
    705                        name="openid_licence_key" placeholder="Enter your license key to activate the plugin"/>
    706             </p>
    707             <p>
    708                 <label class="mo_openid_checkbox_container">
    709                     <b><font color="#FF0000">*</font>Please check this to confirm that you have read it</b>
    710                     <input style="position: absolute; left:0;top: 88%" required type="checkbox" name="license_conditions"/>
    711                     <span class="mo_openid_checkbox_checkmark"></span>
    712                 </label>
    713             </p>
    714 
    715             <ol>
    716                 <li>License key you have entered here is associated with this site instance. In future, if you are re-installing the plugin or your site for any reason. You should deactivate and then delete the plugin from wordpress console and should not manually delete the plugin folder. So that you can resuse the same license key.</li><br>
    717                 <li><b>This is not a developer's license.</b> Making any kind of change to the plugin's code will delete all your configuration and make the plugin unusable.</li>
    718             </ol>
    719             <br>
    720             <input type="hidden" name="licience_type" value="<?php echo $licience_type?>" />
    721             <input type="submit" name="submit" value="Activate License" class="button button-primary button-large"/>
    722         </form>
    723     </div>
    724     <?php
     637    $licenseKey  = get_option( 'mo_openid_opn_lk_mailc_addon' );
     638    $email       = get_option( 'mo_openid_admin_email' );
     639    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     640    if ( ! $licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     641        return 0;
     642    } else {
     643        return 1;
     644    }
     645}
     646function mo_openid_show_addon_message_page( $add ) {
     647    ?>
     648    <div class="mo_openid_table_layout">
     649        <?php
     650        echo "<div style='text-align: center'><p>It seems <b>" . esc_attr( $add ) . '</b> is not installed or activated. Please download or activate the addon.</p></div>';
     651        ?>
     652        <h2 align="center">How do I download or activate the Social Integration Registration Form Addon ?</h2>
     653        <p><b>Download:</b> Download addon and license key from xecurify Console
     654        <ol>
     655            <li>Login to <a target=”_blank” href="https://login.xecurify.com">xecurify Console</a>.</li>
     656            <li>Click on <b>License</b> on the left menu.</li>
     657            <li>You will see the payment made by you. Against the payment, you will see a <b>Download Plugin</b> option. Click on the link to download the plugin.</li>
     658            <li>A plugin of .zip extension will get downloaded.</li>
     659            <li>Click on <b>View License Key</b>.</li>
     660            <li>Copy the license key given for use during installation.</li>
     661        </ol>
     662        </p>
     663        <p><b>Installation:</b>
     664        <ol>
     665            <li>Go to <b>Plugins > Add New</b> and click on <b>Upload addon</b>.</li>
     666            <li>Upload the downloaded zip and Activate.</li>
     667        </ol>
     668        </p>
     669    </div>
     670    <script>
     671        //to set heading name
     672        jQuery('#mo_openid_page_heading').text('Extra Attributes Add On');
     673    </script>
     674    <?php
     675}
     676
     677function mo_openid_show_verify_addon_license_page() {
     678    $nonce = sanitize_text_field( $_POST['mo_openid_verify_addon_license_nonce'] );
     679    if ( ! wp_verify_nonce( $nonce, 'mo-openid-verify-addon-license-nonce' ) ) {
     680        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     681    } else {
     682        if(current_user_can('administrator')){
     683        if ( sanitize_text_field( $_POST['plan_name'] ) == 'extra_attributes_addon' ) {
     684            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'extra_attributes_addon' ) ) );
     685        } elseif ( sanitize_text_field( $_POST['plan_name'] ) == 'WP_SOCIAL_LOGIN_WOOCOMMERCE_ADDON' ) {
     686            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'WP_SOCIAL_LOGIN_WOOCOMMERCE_ADDON' ) ) );
     687        } elseif ( sanitize_text_field( $_POST['plan_name'] ) == 'WP_SOCIAL_LOGIN_MAILCHIMP_ADDON' ) {
     688            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'WP_SOCIAL_LOGIN_MAILCHIMP_ADDON' ) ) );
     689        } elseif ( sanitize_text_field( $_POST['plan_name'] ) == 'WP_SOCIAL_LOGIN_BUDDYPRESS_ADDON' ) {
     690            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'WP_SOCIAL_LOGIN_BUDDYPRESS_ADDON' ) ) );
     691        } elseif ( sanitize_text_field( $_POST['plan_name'] ) == 'WP_SOCIAL_LOGIN_HUBSPOT_ADDON' ) {
     692            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'WP_SOCIAL_LOGIN_HUBSPOT_ADDON' ) ) );
     693        } elseif ( sanitize_text_field( $_POST['plan_name'] ) == 'WP_SOCIAL_LOGIN_DISCORD_ADDON' ) {
     694            wp_send_json( array( 'html' => mo_openid_show_verify_license_page( 'WP_SOCIAL_LOGIN_DISCORD_ADDON' ) ) );
     695        }
     696    }
     697    }
     698}
     699
     700function mo_openid_show_verify_license_page( $licience_type ) {
     701    ?>
     702    <div class="mo_openid_table_layout" style="padding-bottom:50px;!important">
     703        <h3>Verify License </h3>
     704        <form name="f" method="post" action="">
     705            <input type="hidden" name="option" value="mo_openid_verify_license" />
     706            <input type="hidden" name="mo_openid_verify_license_nonce"
     707                   value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-verify-license-nonce' ) ); ?>"/>
     708
     709            <p><b><font color="#FF0000">*</font>Enter your license key to activate the plugin:</b>
     710                <input class="mo_openid_table_textbox" required type="text" style="margin-left:40px;width:300px;"
     711                       name="openid_licence_key" placeholder="Enter your license key to activate the plugin"/>
     712            </p>
     713            <p>
     714                <label class="mo_openid_checkbox_container">
     715                    <b><font color="#FF0000">*</font>Please check this to confirm that you have read it</b>
     716                    <input style="position: absolute; left:0;top: 88%" required type="checkbox" name="license_conditions"/>
     717                    <span class="mo_openid_checkbox_checkmark"></span>
     718                </label>
     719            </p>
     720
     721            <ol>
     722                <li>License key you have entered here is associated with this site instance. In future, if you are re-installing the plugin or your site for any reason. You should deactivate and then delete the plugin from WordPress console and should not manually delete the plugin folder. So that you can resuse the same license key.</li><br>
     723                <li><b>This is not a developer's license.</b> Making any kind of change to the plugin's code will delete all your configuration and make the plugin unusable.</li>
     724            </ol>
     725            <br>
     726            <input type="hidden" name="licience_type" value="<?php echo esc_attr( $licience_type ); ?>" />
     727            <input type="submit" name="submit" value="Activate License" class="button button-primary button-large"/>
     728        </form>
     729    </div>
     730    <?php
    725731}
    726732
    727733function mo_openid_show_verify_password_page() {
    728     update_option('regi_pop_up','no');
    729     ?>
    730     <!--Verify password with miniOrange-->
    731     <form name="f" method="post" action="">
    732         <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
    733         <input type="hidden" name="mo_openid_connect_verify_nonce"
    734                value="<?php echo wp_create_nonce( 'mo-openid-connect-verify-nonce' ); ?>"/>
    735         <div class="mo_openid_table_layout">
    736             <h3>Login with miniOrange</h3>
    737             <p><b>It seems you already have an account with miniOrange. Please enter your miniOrange email and password. <a href="#forgot_password">Click here if you forgot your password?</a></b></p>
    738             <table class="mo_openid_settings_table">
    739                 <tr>
    740                     <td><b><font color="#FF0000">*</font>Email:</b></td>
    741                     <td><input class="mo_openid_table_textbox" id="email" type="email" name="email"
    742                                required placeholder="person@example.com"
    743                                value="<?php echo esc_attr(get_option('mo_openid_admin_email'));?>" /></td>
    744                 </tr>
    745                 <td><b><font color="#FF0000">*</font>Password:</b></td>
    746                 <td><input class="mo_openid_table_textbox" required type="password"
    747                            name="password" placeholder="Choose your password" /></td>
    748                 </tr>
    749                 <tr>
    750                     <td>&nbsp;</td>
    751                     <td><input type="submit" name="submit" value="Login"
    752                                class="button button-primary button-large" />
    753                         <input type="button" value="Registration Page" id="mo_openid_go_back" style="margin-left: 2%"
    754                                class="button button-primary button-large" />
    755                     </td>
    756                 </tr>
    757             </table>
    758         </div>
    759     </form>
    760     <form name="f" method="post" action="" id="openidgobackform">
    761         <input type="hidden" name="option" value="mo_openid_go_back_login"/>
    762         <input type="hidden" name="mo_openid_go_back_login_nonce"
    763                value="<?php echo wp_create_nonce( 'mo-openid-go-back-login-nonce' ); ?>"/>
    764     </form>
    765     <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
    766         <input type="hidden" name="option" value="mo_openid_forgot_password"/>
    767         <input type="hidden" name="mo_openid_forgot_password_nonce"
    768                value="<?php echo wp_create_nonce( 'mo-openid-forgot-password-nonce' ); ?>"/>
    769         <input type="hidden" id="forgot_pass_email" name="email" value=""/>
    770     </form>
    771     <script>
    772         jQuery('#mo_openid_go_back').click(function() {
    773             jQuery('#openidgobackform').submit();
    774         });
    775         jQuery('a[href="#forgot_password"]').click(function(){
    776             jQuery('#forgot_pass_email').val(jQuery('#email').val());
    777             jQuery('#openidforgotpasswordform').submit();
    778         });
    779     </script>
    780     <?php
     734    update_option( 'regi_pop_up', 'no' );
     735    ?>
     736    <!--Verify password with miniOrange-->
     737    <form name="f" method="post" action="">
     738        <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
     739        <input type="hidden" name="mo_openid_connect_verify_nonce"
     740               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-connect-verify-nonce' ) ); ?>"/>
     741        <div class="mo_openid_table_layout">
     742            <h3>Login with miniOrange</h3>
     743            <p><b>It seems you already have an account with miniOrange. Please enter your miniOrange email and password. <a href="#forgot_password">Click here if you forgot your password?</a></b></p>
     744            <table class="mo_openid_settings_table">
     745                <tr>
     746                    <td><b><font color="#FF0000">*</font>Email:</b></td>
     747                    <td><input class="mo_openid_table_textbox" id="email" type="email" name="email"
     748                               required placeholder="person@example.com"
     749                               value="<?php echo esc_attr( get_option( 'mo_openid_admin_email' ) ); ?>" /></td>
     750                </tr>
     751                <td><b><font color="#FF0000">*</font>Password:</b></td>
     752                <td><input class="mo_openid_table_textbox" required type="password"
     753                           name="password" placeholder="Choose your password" /></td>
     754                </tr>
     755                <tr>
     756                    <td>&nbsp;</td>
     757                    <td><input type="submit" name="submit" value="Login"
     758                               class="button button-primary button-large" />
     759                        <input type="button" value="Registration Page" id="mo_openid_go_back" style="margin-left: 2%"
     760                               class="button button-primary button-large" />
     761                    </td>
     762                </tr>
     763            </table>
     764        </div>
     765    </form>
     766    <form name="f" method="post" action="" id="openidgobackform">
     767        <input type="hidden" name="option" value="mo_openid_go_back_login"/>
     768        <input type="hidden" name="mo_openid_go_back_login_nonce"
     769               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-go-back-login-nonce' ) ); ?>"/>
     770    </form>
     771    <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
     772        <input type="hidden" name="option" value="mo_openid_forgot_password"/>
     773        <input type="hidden" name="mo_openid_forgot_password_nonce"
     774               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-forgot-password-nonce' ) ); ?>"/>
     775        <input type="hidden" id="forgot_pass_email" name="email" value=""/>
     776    </form>
     777    <script>
     778        jQuery('#mo_openid_go_back').click(function() {
     779            jQuery('#openidgobackform').submit();
     780        });
     781        jQuery('a[href="#forgot_password"]').click(function(){
     782            jQuery('#forgot_pass_email').val(jQuery('#email').val());
     783            jQuery('#openidforgotpasswordform').submit();
     784        });
     785    </script>
     786    <?php
    781787}
    782788
    783789function mo_openid_is_customer_registered() {
    784     $email          = get_option('mo_openid_admin_email');
    785     $customerKey    = get_option('mo_openid_admin_customer_key');
    786     if($customerKey == 253560)
    787         $customerKey='';
    788     if( ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
    789         return 0;
    790     } else {
    791         return 1;
    792     }
     790    $email       = get_option( 'mo_openid_admin_email' );
     791    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     792    if ( $customerKey == 253560 ) {
     793        $customerKey = '';
     794    }
     795    if ( ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ) {
     796        return 0;
     797    } else {
     798        return 1;
     799    }
    793800}
    794801
    795802function mo_openid_check_empty_or_null( $value ) {
    796     if( ! isset( $value ) || empty( $value ) ) {
    797         return true;
    798     }
    799     return false;
    800 }
    801 
    802 function mo_openid_decrypt_sanitize($param) {
    803     if(strcmp($param,'null')!=0 && strcmp($param,'')!=0){
    804         $customer_token = get_option('mo_openid_customer_token');
    805         $decrypted_token = decrypt_data($param,$customer_token);
    806         // removes control characters and some blank characters
    807         $decrypted_token_sanitise = preg_replace('/[\x00-\x1F][\x7F][\x81][\x8D][\x8F][\x90][\x9D][\xA0][\xAD]/', '', $decrypted_token);
    808         //strips space,tab,newline,carriage return,NUL-byte,vertical tab.
    809         return trim($decrypted_token_sanitise);
    810     }else{
    811         return '';
    812     }
    813 
    814 }
    815 
    816 function decrypt_data($data, $key) {
    817 
    818     return openssl_decrypt( base64_decode($data), 'aes-128-ecb', $key, OPENSSL_RAW_DATA);
     803    if ( ! isset( $value ) || empty( $value ) ) {
     804        return true;
     805    }
     806    return false;
     807}
     808
     809function mo_openid_decrypt_sanitize( $param ) {
     810    if ( strcmp( $param, 'null' ) != 0 && strcmp( $param, '' ) != 0 ) {
     811        $customer_token  = get_option( 'mo_openid_customer_token' );
     812        $decrypted_token = decrypt_data( $param, $customer_token );
     813        // removes control characters and some blank characters
     814        $decrypted_token_sanitise = preg_replace( '/[\x00-\x1F][\x7F][\x81][\x8D][\x8F][\x90][\x9D][\xA0][\xAD]/', '', $decrypted_token );
     815        // strips space,tab,newline,carriage return,NUL-byte,vertical tab.
     816        return trim( $decrypted_token_sanitise );
     817    } else {
     818        return '';
     819    }
     820
     821}
     822
     823function decrypt_data( $data, $key ) {
     824
     825    return openssl_decrypt( base64_decode( $data ), 'aes-128-ecb', $key, OPENSSL_RAW_DATA );
    819826
    820827}
    821828
    822829function mo_openid_show_success_message() {
    823     remove_action( 'admin_notices', 'mo_openid_success_message' );
    824     add_action( 'admin_notices', 'mo_openid_error_message' );
     830    remove_action( 'admin_notices', 'mo_openid_success_message' );
     831    add_action( 'admin_notices', 'mo_openid_error_message' );
    825832}
    826833
    827834function mo_openid_show_error_message() {
    828     remove_action( 'admin_notices', 'mo_openid_error_message' );
    829     add_action( 'admin_notices', 'mo_openid_success_message');
     835    remove_action( 'admin_notices', 'mo_openid_error_message' );
     836    add_action( 'admin_notices', 'mo_openid_success_message' );
    830837}
    831838
    832839function mo_openid_success_message() {
    833     $message = get_option('mo_openid_message'); ?>
    834     <div id="snackbar"><?php echo($message);?></div>
    835     <style>
    836         #snackbar {
    837             visibility: hidden;
    838             min-width: 250px;
    839             margin-left: -125px;
    840             background-color: #c02f2f;
    841             color: #fff;
    842             text-align: center;
    843             border-radius: 2px;
    844             padding: 16px;
    845             position: fixed;
    846             z-index: 1;
    847             top: 8%;
    848             right: 30px;
    849             font-size: 17px;
    850         }
    851 
    852         #snackbar.show {
    853             visibility: visible;
    854             -webkit-animation: fadein 0.5s, fadeout 0.5s 3.5s;
    855             animation: fadein 0.5s, fadeout 0.5s 3.5s;
    856         }
    857 
    858         @-webkit-keyframes fadein {
    859             from {right: 0; opacity: 0;}
    860             to {right: 30px; opacity: 1;}
    861         }
    862 
    863         @keyframes fadein {
    864             from {right: 0; opacity: 0;}
    865             to {right: 30px; opacity: 1;}
    866         }
    867 
    868         @-webkit-keyframes fadeout {
    869             from {right: 30px; opacity: 1;}
    870             to {right: 0; opacity: 0;}
    871         }
    872 
    873         @keyframes fadeout {
    874             from {right: 30px; opacity: 1;}
    875             to {right: 0; opacity: 0;}
    876         }
    877     </style>
    878     <script>
    879         var x = document.getElementById("snackbar");
    880         x.className = "show";
    881         setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
    882     </script>
    883 <?php }
     840    $message = get_option( 'mo_openid_message' );
     841    ?>
     842    <div id="snackbar"><?php echo esc_attr( ( $message ) ); ?></div>
     843    <style>
     844        #snackbar {
     845            visibility: hidden;
     846            min-width: 250px;
     847            margin-left: -125px;
     848            background-color: #c02f2f;
     849            color: #fff;
     850            text-align: center;
     851            border-radius: 2px;
     852            padding: 16px;
     853            position: fixed;
     854            z-index: 1;
     855            top: 8%;
     856            right: 30px;
     857            font-size: 17px;
     858        }
     859
     860        #snackbar.show {
     861            visibility: visible;
     862            -webkit-animation: fadein 0.5s, fadeout 0.5s 3.5s;
     863            animation: fadein 0.5s, fadeout 0.5s 3.5s;
     864        }
     865
     866        @-webkit-keyframes fadein {
     867            from {right: 0; opacity: 0;}
     868            to {right: 30px; opacity: 1;}
     869        }
     870
     871        @keyframes fadein {
     872            from {right: 0; opacity: 0;}
     873            to {right: 30px; opacity: 1;}
     874        }
     875
     876        @-webkit-keyframes fadeout {
     877            from {right: 30px; opacity: 1;}
     878            to {right: 0; opacity: 0;}
     879        }
     880
     881        @keyframes fadeout {
     882            from {right: 30px; opacity: 1;}
     883            to {right: 0; opacity: 0;}
     884        }
     885    </style>
     886    <script>
     887        var x = document.getElementById("snackbar");
     888        x.className = "show";
     889        setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
     890    </script>
     891    <?php
     892}
    884893
    885894function mo_openid_error_message() {
    886     $message = get_option('mo_openid_message'); ?>
    887     <div id="snackbar"><?php echo($message);?></div>
    888     <style>
    889         #snackbar {
    890             visibility: hidden;
    891             min-width: 250px;
    892             margin-left: -125px;
    893             background-color: #4CAF50;
    894             color: #fff;
    895             text-align: center;
    896             border-radius: 2px;
    897             padding: 16px;
    898             position: fixed;
    899             z-index: 1;
    900             top: 8%;
    901             right: 30px;
    902             font-size: 17px;
    903         }
    904 
    905         #snackbar.show {
    906             visibility: visible;
    907             -webkit-animation: fadein 0.5s, fadeout 0.5s 3.5s;
    908             animation: fadein 0.5s, fadeout 0.5s 3.5s;
    909         }
    910 
    911         @-webkit-keyframes fadein {
    912             from {right: 0; opacity: 0;}
    913             to {right: 30px; opacity: 1;}
    914         }
    915 
    916         @keyframes fadein {
    917             from {right: 0; opacity: 0;}
    918             to {right: 30px; opacity: 1;}
    919         }
    920 
    921         @-webkit-keyframes fadeout {
    922             from {right: 30px; opacity: 1;}
    923             to {right: 0; opacity: 0;}
    924         }
    925 
    926         @keyframes fadeout {
    927             from {right: 30px; opacity: 1;}
    928             to {right: 0; opacity: 0;}
    929         }
    930     </style>
    931     <script>
    932 
    933         var x = document.getElementById("snackbar");
    934         x.className = "show";
    935         setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
    936 
    937     </script>
    938 <?php }
    939 
    940 function mo_openid_registeration_modal(){
    941     update_option('regi_pop_up','yes');
    942     update_option ( 'mo_openid_new_registration', 'true' );
    943     global $current_user;
    944 
    945     $current_user = wp_get_current_user();
    946     ?><div id="request_registeration" class="mo_openid_modal" style="height:100%">
    947     <!-- Modal content -->
    948     <div class="mo_openid_modal-content" style="text-align:center;margin-left: 32%;margin-top: 4%;width: 37%;">
    949         <div class="modal-head">
    950             <!--                <span class="mo_close">&times;</span>-->
    951             <a href="" class="mo_close" id="mo_close" style="text-decoration:none;margin-top: 3%;">&times;</a>
    952             <h1>Save As</h1>
    953         </div>
    954         <br>
    955         <span id="msg1" style="text-align: center;color: #56b11e"><?php echo (get_option("pop_regi_msg")); update_option('pop_regi_msg','Your settings are saved successfully. Please enter your valid email address and enter a password to get touch with our support team.');?></span>
    956         <br>
    957         <br>
    958         <br>
    959         <div id="mo_saml_show_registeration_modal" >
    960 
    961             <!--Register with miniOrange-->
    962 
    963             <form name="f" method="post" action="" id="pop-register-form">
    964                 <input name="option" value="mo_openid_connect_register_customer" type="hidden"/>
    965                 <input type="hidden" name="mo_openid_connect_register_nonce" value="<?php echo wp_create_nonce( 'mo-openid-connect-register-nonce' ); ?>"/>
    966                 <div>
    967                     <table style="text-align: left;width: 100%">
    968                         <tbody><tr>
    969                             <td><b><font color="#FF0000">*</font>Email:</b></td>
    970                             <td><input class="mo_openid_table_textbox" name="email" style="width: 100%"
    971                                        required placeholder="person@example.com"
    972                                        value="<?php echo $current_user->user_email;?>" type="email" />
    973                             </td>
    974                         </tr>
    975 
    976                         <tr>
    977                             <td><b><font color="#FF0000">*</font>Password:</b></td>
    978                             <td><input class="mo_openid_table_textbox" required name="password"
    979                                        style="width: 100%" placeholder="Choose your password (Min. length 6)"
    980                                        type="password" /></td>
    981                         </tr>
    982                         <tr id="pop_register" >
    983                             <td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
    984                             <td><input class="mo_openid_table_textbox" required name="confirmPassword"
    985                                        style="width: 100%" placeholder="Confirm your password"
    986                                        type="password" /></td>
    987                         </tr>
    988 
    989                         </tbody></table>
    990                     <br><br>
    991                     <input value="Submit" id="register_submit" style="margin-right: 28%;" class="button button-primary button-large" type="submit">
    992 
    993                 </div>
    994             </form>
    995             <form method="post">
    996                 <input id="pop_next" name="show_login" value="Existing Account" class="button button-primary button-large" style="margin-left: 35%;margin-top: -7.7%;" type="submit">
    997             </form>
    998         </div>
    999     </div>
    1000     </div>
    1001     <?php
    1002 }
    1003 
    1004 function create_customer(){
    1005     $customer = new CustomerOpenID();
    1006     $customerKey = json_decode( $customer->create_customer(), true );
    1007     if( strcasecmp( $customerKey['status'], 'CUSTOMER_USERNAME_ALREADY_EXISTS') == 0 ) {
    1008         get_current_customer();
    1009     }
    1010     else if((strcasecmp( $customerKey['status'], 'INVALID_EMAIL_QUICK_EMAIL' ) == 0) && (strcasecmp( $customerKey['message'], 'This is not a valid email. please enter a valid email.' ) == 0) ){
    1011         if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
    1012             wp_send_json(["error" => 'There was an error creating an account for you. You may have entered an invalid Email-Id. (We discourage the use of disposable emails) Please try again with a valid email.']);
    1013         else {
    1014             update_option('mo_openid_message', 'There was an error creating an account for you. You may have entered an invalid Email-Id. <b> (We discourage the use of disposable emails) </b> Please try again with a valid email.');
    1015             update_option('mo_openid_registration_status', 'EMAIL_IS_NOT_VALID');
    1016             mo_openid_show_error_message();
    1017             if (get_option('regi_pop_up') == "yes") {
    1018                 update_option('pop_regi_msg', get_option('mo_openid_message'));
    1019                 mo_openid_registeration_modal();
    1020             }
    1021         }
    1022     }
    1023     else if((strcasecmp( $customerKey['status'], 'FAILED' ) == 0) && (strcasecmp( $customerKey['message'], 'Email is not enterprise email.' ) == 0) ){
    1024         if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
    1025             wp_send_json(["error" => 'There was an error creating an account for you. You may have entered an invalid Email-Id. (We discourage the use of disposable emails) Please try again with a valid email.']);
    1026         else {
    1027             update_option('mo_openid_message', 'There was an error creating an account for you. You may have entered an invalid Email-Id. <b> (We discourage the use of disposable emails) </b> Please try again with a valid email.');
    1028             update_option('mo_openid_registration_status', 'EMAIL_IS_NOT_ENTERPRISE');
    1029             mo_openid_show_error_message();
    1030             if (get_option('regi_pop_up') == "yes") {
    1031                 update_option('pop_regi_msg', get_option('mo_openid_message'));
    1032                 mo_openid_registeration_modal();
    1033             }
    1034         }
    1035     }
    1036     else if( strcasecmp( $customerKey['status'], 'SUCCESS' ) == 0 ) {
    1037         update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
    1038         update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
    1039         update_option( 'mo_openid_customer_token', $customerKey['token'] );
    1040         delete_option('mo_openid_admin_password', '');
    1041         update_option('mo_openid_cust', '0');
    1042         update_option( 'mo_openid_message', 'Registration complete!');
    1043         update_option('mo_openid_registration_status','MO_OPENID_REGISTRATION_COMPLETE');
    1044         delete_option('mo_openid_verify_customer');
    1045         delete_option('mo_openid_new_registration');
    1046         if(isset($_POST['action'])?$_POST['action']=='mo_register_new_user':0)
    1047             wp_send_json(["success" => 'Registration complete!']);
    1048         else {
    1049             mo_openid_show_success_message();
    1050             header('Location: admin.php?page=mo_openid_general_settings&tab=licensing_plans');
    1051         }
    1052     }
    1053     delete_option('mo_openid_admin_password', '');
    1054 }
    1055 
    1056 function mo_openid_register_user()
    1057 {
    1058     //validation and sanitization
    1059     $email = '';
    1060     $password = '';
    1061     $confirmPassword = '';
    1062     $illegal = "#$%^*()+=[]';,/{}|:<>?~";
    1063     $illegal = $illegal . '"';
    1064     if(current_user_can('administrator')){
    1065     if (mo_openid_check_empty_or_null($_POST['email']) || mo_openid_check_empty_or_null($_POST['password']) || mo_openid_check_empty_or_null($_POST['confirmPassword'])) {
    1066         update_option('mo_openid_message', 'All the fields are required. Please enter valid entries.');
    1067         mo_openid_show_error_message();
    1068         if (get_option('regi_pop_up') == "yes") {
    1069             update_option('pop_regi_msg', get_option('mo_openid_message'));
    1070             mo_openid_registeration_modal();
    1071         }
    1072         return;
    1073     } else if (strlen($_POST['password']) < 6 || strlen($_POST['confirmPassword']) < 6) {    //check password is of minimum length 6
    1074         update_option('mo_openid_message', 'Choose a password with minimum length 6.');
    1075         mo_openid_show_error_message();
    1076         if (get_option('regi_pop_up') == "yes") {
    1077             update_option('pop_regi_msg', get_option('mo_openid_message'));
    1078             mo_openid_registeration_modal();
    1079         }
    1080         return;
    1081     } else if (strpbrk($_POST['email'], $illegal)) {
    1082         update_option('mo_openid_message', 'Please match the format of Email. No special characters are allowed.');
    1083         mo_openid_show_error_message();
    1084         if (get_option('regi_pop_up') == "yes") {
    1085             update_option('pop_regi_msg', get_option('mo_openid_message'));
    1086             mo_openid_registeration_modal();
    1087         }
    1088         return;
    1089     } else if (strcmp(stripslashes($_POST['password']), stripslashes($_POST['confirmPassword'])) != 0) {
    1090         update_option('mo_openid_message', 'Passwords do not match.');
    1091         if (get_option('regi_pop_up') == "yes") {
    1092             update_option('pop_regi_msg', get_option('mo_openid_message'));
    1093             mo_openid_registeration_modal();
    1094         }
    1095         delete_option('mo_openid_verify_customer');
    1096         mo_openid_show_error_message();
    1097     } else {
    1098         $email = sanitize_email($_POST['email']);
    1099         $password = stripslashes($_POST['password']);
    1100         update_option('mo_openid_admin_email', $email);
    1101         update_option('mo_openid_admin_password', $password);
    1102         $customer = new CustomerOpenID();
    1103         $content = json_decode($customer->check_customer(), true);
    1104         if (strcasecmp($content['status'], 'CUSTOMER_NOT_FOUND') == 0) {
    1105             if ($content['status'] == 'ERROR') {
    1106                 if ($_POST['action'] == 'mo_register_new_user') {
    1107                     wp_send_json(["error" => $content['message']]);
    1108                 } else {
    1109                     update_option('mo_openid_message', $content['message']);
    1110                     mo_openid_show_error_message();
    1111                 }
    1112             } else {
    1113                 create_customer();
    1114                 update_option('mo_openid_oauth', '1');
    1115                 update_option('mo_openid_new_user', '1');
    1116                 update_option('mo_openid_malform_error', '1');
    1117             }
    1118 
    1119         } else if ($content == null) {
    1120             if ($_POST['action'] == 'mo_register_new_user') {
    1121                 wp_send_json(["error" => 'Please check your internet connetion and try again.']);
    1122             } else {
    1123                 update_option('mo_openid_message', "Please check your internet connetion and try again.");
    1124                 mo_openid_show_error_message();
    1125                 if (get_option('regi_pop_up') == "yes") {
    1126                     update_option('pop_regi_msg', get_option('mo_openid_message'));
    1127                     mo_openid_registeration_modal();
    1128                 }
    1129             }
    1130         } else {
    1131             get_current_customer();
    1132         }
    1133         delete_option('mo_openid_admin_password');
    1134 
    1135     }
    1136     }
    1137 }
    1138 
    1139 function mo_register_old_user(){
    1140     //validation and sanitization
    1141     $email = '';
    1142     $password = '';
    1143     $illegal = "#$%^*()+=[]';,/{}|:<>?~";
    1144     $illegal = $illegal . '"';
    1145     $message =new miniorange_openid_sso_settings();
    1146     if(current_user_can('administrator')){
    1147     if (mo_openid_check_empty_or_null($_POST['email']) || mo_openid_check_empty_or_null($_POST['password'])) {
    1148         update_option('mo_openid_message', 'All the fields are required. Please enter valid entries.');
    1149         $message->mo_openid_show_error_message();
    1150         return;
    1151     } else if (strpbrk($_POST['email'], $illegal)) {
    1152         update_option('mo_openid_message', 'Please match the format of Email. No special characters are allowed.');
    1153         $message->mo_openid_show_error_message();
    1154         return;
    1155     } else {
    1156         $email = sanitize_email($_POST['email']);
    1157         $password = stripslashes($_POST['password']);
    1158     }
    1159     update_option('mo_openid_admin_email', $email);
    1160     update_option('mo_openid_admin_password', $password);
    1161     $customer = new CustomerOpenID();
    1162     $content = $customer->get_customer_key();
    1163     $customerKey = json_decode($content, true);
    1164     if (isset($customerKey)) {
    1165         update_option('mo_openid_admin_customer_key', $customerKey['id']);
    1166         update_option('mo_openid_admin_api_key', $customerKey['apiKey']);
    1167         update_option('mo_openid_customer_token', $customerKey['token']);
    1168         update_option('mo_openid_admin_phone', isset($customerKey['phone'])?$customerKey['phone']:'');
    1169         update_option('mo_openid_admin_password', '');
    1170         update_option('mo_openid_message', 'Your account has been retrieved successfully.');
    1171         delete_option('mo_openid_verify_customer');
    1172         if(isset($_POST['action'])?$_POST['action']=='mo_register_old_user':false)
    1173             wp_send_json(["success" => 'Your account has been retrieved successfully.']);
    1174         else
    1175             mo_openid_show_success_message();
    1176     } else {
    1177         if (isset($_POST['action'])?$_POST['action'] == 'mo_register_old_user':false)
    1178             wp_send_json(["error" => 'Invalid username or password. Please try again.']);
    1179         else {
    1180             update_option('mo_openid_message', 'Invalid username or password. Please try again.');
    1181             mo_openid_show_error_message();
    1182         }
    1183     }
    1184     update_option('mo_openid_admin_password', '');
    1185 }
     895    $message = get_option( 'mo_openid_message' );
     896    ?>
     897    <div id="snackbar"><?php echo esc_attr( ( $message ) ); ?></div>
     898    <style>
     899        #snackbar {
     900            visibility: hidden;
     901            min-width: 250px;
     902            margin-left: -125px;
     903            background-color: #4CAF50;
     904            color: #fff;
     905            text-align: center;
     906            border-radius: 2px;
     907            padding: 16px;
     908            position: fixed;
     909            z-index: 1;
     910            top: 8%;
     911            right: 30px;
     912            font-size: 17px;
     913        }
     914
     915        #snackbar.show {
     916            visibility: visible;
     917            -webkit-animation: fadein 0.5s, fadeout 0.5s 3.5s;
     918            animation: fadein 0.5s, fadeout 0.5s 3.5s;
     919        }
     920
     921        @-webkit-keyframes fadein {
     922            from {right: 0; opacity: 0;}
     923            to {right: 30px; opacity: 1;}
     924        }
     925
     926        @keyframes fadein {
     927            from {right: 0; opacity: 0;}
     928            to {right: 30px; opacity: 1;}
     929        }
     930
     931        @-webkit-keyframes fadeout {
     932            from {right: 30px; opacity: 1;}
     933            to {right: 0; opacity: 0;}
     934        }
     935
     936        @keyframes fadeout {
     937            from {right: 30px; opacity: 1;}
     938            to {right: 0; opacity: 0;}
     939        }
     940    </style>
     941    <script>
     942
     943        var x = document.getElementById("snackbar");
     944        x.className = "show";
     945        setTimeout(function(){ x.className = x.className.replace("show", ""); }, 4000);
     946
     947    </script>
     948    <?php
     949}
     950
     951function mo_openid_registeration_modal() {
     952    update_option( 'regi_pop_up', 'yes' );
     953    update_option( 'mo_openid_new_registration', 'true' );
     954    global $current_user;
     955
     956    $current_user = wp_get_current_user();
     957    ?>
     958    <div id="request_registeration" class="mo_openid_modal" style="height:100%">
     959    <!-- Modal content -->
     960    <div class="mo_openid_modal-content" style="text-align:center;margin-left: 32%;margin-top: 4%;width: 37%;">
     961        <div class="modal-head">
     962            <!--                <span class="mo_close">&times;</span>-->
     963            <a href="" class="mo_close" id="mo_close" style="text-decoration:none;margin-top: 3%;">&times;</a>
     964            <h1>Save As</h1>
     965        </div>
     966        <br>
     967        <span id="msg1" style="text-align: center;color: #56b11e">
     968        <?php
     969        echo esc_attr( ( get_option( 'pop_regi_msg' ) ) );
     970        update_option( 'pop_regi_msg', 'Your settings are saved successfully. Please enter your valid email address and enter a password to get touch with our support team.' );
     971        ?>
     972        </span>
     973        <br>
     974        <br>
     975        <br>
     976        <div id="mo_saml_show_registeration_modal" >
     977
     978            <!--Register with miniOrange-->
     979
     980            <form name="f" method="post" action="" id="pop-register-form">
     981                <input name="option" value="mo_openid_connect_register_customer" type="hidden"/>
     982                <input type="hidden" name="mo_openid_connect_register_nonce" value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-connect-register-nonce' ) ); ?>"/>
     983                <div>
     984                    <table style="text-align: left;width: 100%">
     985                        <tbody><tr>
     986                            <td><b><font color="#FF0000">*</font>Email:</b></td>
     987                            <td><input class="mo_openid_table_textbox" name="email" style="width: 100%"
     988                                       required placeholder="person@example.com"
     989                                       value="<?php echo esc_attr( $current_user->user_email ); ?>" type="email" />
     990                            </td>
     991                        </tr>
     992
     993                        <tr>
     994                            <td><b><font color="#FF0000">*</font>Password:</b></td>
     995                            <td><input class="mo_openid_table_textbox" required name="password"
     996                                       style="width: 100%" placeholder="Choose your password (Min. length 6)"
     997                                       type="password" /></td>
     998                        </tr>
     999                        <tr id="pop_register" >
     1000                            <td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
     1001                            <td><input class="mo_openid_table_textbox" required name="confirmPassword"
     1002                                       style="width: 100%" placeholder="Confirm your password"
     1003                                       type="password" /></td>
     1004                        </tr>
     1005
     1006                        </tbody></table>
     1007                    <br><br>
     1008                    <input value="Submit" id="register_submit" style="margin-right: 28%;" class="button button-primary button-large" type="submit">
     1009
     1010                </div>
     1011            </form>
     1012            <form method="post">
     1013                <input id="pop_next" name="show_login" value="Existing Account" class="button button-primary button-large" style="margin-left: 35%;margin-top: -7.7%;" type="submit">
     1014            </form>
     1015        </div>
     1016    </div>
     1017    </div>
     1018    <?php
     1019}
     1020
     1021function create_customer($password) {
     1022    if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
     1023        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1024    } else {
     1025        $customer    = new CustomerOpenID();
     1026        $customerKey = json_decode( $customer->create_customer($password), true );
     1027        if ( strcasecmp( $customerKey['status'], 'CUSTOMER_USERNAME_ALREADY_EXISTS' ) == 0 ) {
     1028            get_current_customer($password);
     1029        } elseif ( ( strcasecmp( $customerKey['status'], 'INVALID_EMAIL_QUICK_EMAIL' ) == 0 ) && ( strcasecmp( $customerKey['message'], 'This is not a valid email. please enter a valid email.' ) == 0 ) ) {
     1030            if ( isset( $_POST['action'] ) ? sanitize_text_field( $_POST['action'] ) == 'mo_register_new_user' : 0 ) {
     1031                wp_send_json( array( 'error' => 'There was an error creating an account for you. You may have entered an invalid Email-Id. (We discourage the use of disposable emails) Please try again with a valid email.' ) );
     1032            } else {
     1033                update_option( 'mo_openid_message', 'There was an error creating an account for you. You may have entered an invalid Email-Id. <b> (We discourage the use of disposable emails) </b> Please try again with a valid email.' );
     1034                update_option( 'mo_openid_registration_status', 'EMAIL_IS_NOT_VALID' );
     1035                mo_openid_show_error_message();
     1036                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1037                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1038                    mo_openid_registeration_modal();
     1039                }
     1040            }
     1041        } elseif ( ( strcasecmp( $customerKey['status'], 'FAILED' ) == 0 ) && ( strcasecmp( $customerKey['message'], 'Email is not enterprise email.' ) == 0 ) ) {
     1042            if ( isset( $_POST['action'] ) ? sanitize_text_field( $_POST['action'] ) == 'mo_register_new_user' : 0 ) {
     1043                wp_send_json( array( 'error' => 'There was an error creating an account for you. You may have entered an invalid Email-Id. (We discourage the use of disposable emails) Please try again with a valid email.' ) );
     1044            } else {
     1045                update_option( 'mo_openid_message', 'There was an error creating an account for you. You may have entered an invalid Email-Id. <b> (We discourage the use of disposable emails) </b> Please try again with a valid email.' );
     1046                update_option( 'mo_openid_registration_status', 'EMAIL_IS_NOT_ENTERPRISE' );
     1047                mo_openid_show_error_message();
     1048                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1049                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1050                    mo_openid_registeration_modal();
     1051                }
     1052            }
     1053        } elseif ( strcasecmp( $customerKey['status'], 'SUCCESS' ) == 0 ) {
     1054            update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
     1055            update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
     1056            update_option( 'mo_openid_customer_token', $customerKey['token'] );
     1057            update_option( 'mo_openid_cust', '0' );
     1058            update_option( 'mo_openid_message', 'Registration complete!' );
     1059            update_option( 'mo_openid_registration_status', 'MO_OPENID_REGISTRATION_COMPLETE' );
     1060            delete_option( 'mo_openid_verify_customer' );
     1061            delete_option( 'mo_openid_new_registration' );
     1062            if ( isset( $_POST['action'] ) ? sanitize_text_field( $_POST['action'] ) == 'mo_register_new_user' : 0 ) {
     1063                wp_send_json( array( 'success' => 'Registration complete!' ) );
     1064            } else {
     1065                mo_openid_show_success_message();
     1066                header( 'Location: admin.php?page=mo_openid_general_settings&tab=licensing_plans' );
     1067            }
     1068        }
     1069    }
     1070}
     1071
     1072function mo_openid_register_user() {
     1073    // validation and sanitization
     1074    $email           = '';
     1075    $password        = '';
     1076    $confirmPassword = '';
     1077    $illegal         = "#$%^*()+=[]';,/{}|:<>?~";
     1078    $illegal         = $illegal . '"';
     1079    $nonce           = sanitize_text_field( $_POST['mo_openid_connect_register_nonce'] );
     1080    if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
     1081        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1082    } else {
     1083        if ( current_user_can( 'administrator' ) ) {
     1084
     1085            if ( mo_openid_check_empty_or_null( sanitize_email( $_POST['email'] ) ) || mo_openid_check_empty_or_null( $_POST['password'] ) || mo_openid_check_empty_or_null( $_POST['confirmPassword'] ) )  // phpcs:ignore
     1086            {
     1087                update_option( 'mo_openid_message', 'All the fields are required. Please enter valid entries.' );
     1088                mo_openid_show_error_message();
     1089                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1090                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1091                    mo_openid_registeration_modal();
     1092                }
     1093                return;
     1094            } elseif ( strlen( $_POST['password'] ) < 6 || strlen( $_POST['confirmPassword'] ) < 6 )  // phpcs:ignore
     1095            {    // check password is of minimum length 6
     1096                update_option( 'mo_openid_message', 'Choose a password with minimum length 6.' );
     1097                mo_openid_show_error_message();
     1098                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1099                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1100                    mo_openid_registeration_modal();
     1101                }
     1102                return;
     1103            } elseif ( strpbrk( sanitize_email( $_POST['email'] ), $illegal ) ) {
     1104                update_option( 'mo_openid_message', 'Please match the format of Email. No special characters are allowed.' );
     1105                mo_openid_show_error_message();
     1106                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1107                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1108                    mo_openid_registeration_modal();
     1109                }
     1110                return;
     1111            } elseif ( strcmp( stripslashes( $_POST['password'] ), stripslashes( $_POST['confirmPassword'] ) ) != 0 ) // phpcs:ignore
     1112            {
     1113                update_option( 'mo_openid_message', 'Passwords do not match.' );
     1114                if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1115                    update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1116                    mo_openid_registeration_modal();
     1117                }
     1118                delete_option( 'mo_openid_verify_customer' );
     1119                mo_openid_show_error_message();
     1120            } else {
     1121                $email    = sanitize_email( $_POST['email'] );
     1122                $password = stripslashes( $_POST['password'] ); //phpcs:ignore
     1123                update_option( 'mo_openid_admin_email', $email );
     1124                $customer = new CustomerOpenID();
     1125                $content  = json_decode( $customer->check_customer(), true );
     1126                if ( strcasecmp( $content['status'], 'CUSTOMER_NOT_FOUND' ) == 0 ) {
     1127                    if ( $content['status'] == 'ERROR' ) {
     1128                        if ( sanitize_text_field( $_POST['action'] ) == 'mo_register_new_user' ) {
     1129                            wp_send_json( array( 'error' => $content['message'] ) );
     1130                        } else {
     1131                            update_option( 'mo_openid_message', $content['message'] );
     1132                            mo_openid_show_error_message();
     1133                        }
     1134                    } else {
     1135                        create_customer($password);
     1136                        update_option( 'mo_openid_oauth', '1' );
     1137                        update_option( 'mo_openid_new_user', '1' );
     1138                        update_option( 'mo_openid_malform_error', '1' );
     1139                    }
     1140                } elseif ( $content == null ) {
     1141                    if ( sanitize_text_field( $_POST['action'] ) == 'mo_register_new_user' ) {
     1142                        wp_send_json( array( 'error' => 'Please check your internet connetion and try again.' ) );
     1143                    } else {
     1144                        update_option( 'mo_openid_message', 'Please check your internet connetion and try again.' );
     1145                        mo_openid_show_error_message();
     1146                        if ( get_option( 'regi_pop_up' ) == 'yes' ) {
     1147                            update_option( 'pop_regi_msg', get_option( 'mo_openid_message' ) );
     1148                            mo_openid_registeration_modal();
     1149                        }
     1150                    }
     1151                } else {
     1152                    get_current_customer($password);
     1153                }
     1154
     1155            }
     1156        }
     1157    }
     1158}
     1159
     1160function mo_register_old_user() {
     1161    // validation and sanitization
     1162    $email    = '';
     1163    $password = '';
     1164    $illegal  = "#$%^*()+=[]';,/{}|:<>?~";
     1165    $illegal  = $illegal . '"';
     1166    $message  = new miniorange_openid_sso_settings();
     1167    $nonce    = sanitize_text_field( $_POST['mo_openid_connect_verify_nonce'] );
     1168    if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-verify-nonce' ) ) {
     1169        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1170    } else {
     1171        if(current_user_can('administrator')){
     1172
     1173        if ( mo_openid_check_empty_or_null( sanitize_email( $_POST['email'] ) ) || mo_openid_check_empty_or_null( $_POST['password'] ) ) {  // phpcs:ignore
     1174            update_option( 'mo_openid_message', 'All the fields are required. Please enter valid entries.' );
     1175            $message->mo_openid_show_error_message();
     1176            return;
     1177        } elseif ( strpbrk( sanitize_email( $_POST['email'] ), $illegal ) ) {
     1178            update_option( 'mo_openid_message', 'Please match the format of Email. No special characters are allowed.' );
     1179            $message->mo_openid_show_error_message();
     1180            return;
     1181        } else {
     1182            $email    = sanitize_email( $_POST['email'] );
     1183            $password = stripslashes( $_POST['password'] );  // phpcs:ignore
     1184        }
     1185        update_option( 'mo_openid_admin_email', $email );
     1186        $customer    = new CustomerOpenID();
     1187        $content     = $customer->get_customer_key($password);
     1188        $customerKey = json_decode( $content, true );
     1189        if ( isset( $customerKey ) ) {
     1190            update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
     1191            update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
     1192            update_option( 'mo_openid_customer_token', $customerKey['token'] );
     1193            update_option( 'mo_openid_admin_phone', isset( $customerKey['phone'] ) ? $customerKey['phone'] : '' );
     1194            update_option( 'mo_openid_message', 'Your account has been retrieved successfully.' );
     1195            delete_option( 'mo_openid_verify_customer' );
     1196            if ( isset( $_POST['action'] ) ? sanitize_text_field( $_POST['action'] ) == 'mo_register_old_user' : false ) {
     1197                wp_send_json( array( 'success' => 'Your account has been retrieved successfully.' ) );
     1198            } else {
     1199                mo_openid_show_success_message();
     1200            }
     1201        } else {
     1202            if ( isset( $_POST['action'] ) ? sanitize_text_field( $_POST['action'] ) == 'mo_register_old_user' : false ) {
     1203                wp_send_json( array( 'error' => 'Invalid username or password. Please try again.' ) );
     1204            } else {
     1205                update_option( 'mo_openid_message', 'Invalid username or password. Please try again.' );
     1206                mo_openid_show_error_message();
     1207            }
     1208        }
     1209    }
     1210    }
    11861211}
    11871212
    11881213function mo_pop_show_verify_password_page() {
    1189     update_option('regi_pop_up','yes');
    1190     ?>
    1191     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    1192     <div id="request_registeration" class="mo_openid_modal" style="height:100%">
    1193 
    1194         <!-- Modal content -->
    1195         <div class="mo_openid_modal-content" style="text-align:center;margin-left: 32%;margin-top: 2%;width: 37%;">
    1196             <div class="modal-head">
    1197                 <a href="" class="mo_close" id="mo_close" style="text-decoration:none;margin-top: 3%;">&times;</a>
    1198                 <h1>Login</h1>
    1199             </div>
    1200             <br>
    1201             <span style="text-align: center;color: #56b11e"><?php echo (get_option("pop_login_msg")); update_option('pop_login_msg','Enter Your Login Credentials.');?></span>
    1202             <br><br>
    1203             <div id="mo_saml_show_registeration_modal" >
    1204 
    1205                 <!--Register with miniOrange-->
    1206                 <form name="f" method="post" action="" id="pop-register-form">
    1207                     <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
    1208                     <input type="hidden" name="mo_openid_connect_verify_nonce"
    1209                            value="<?php echo wp_create_nonce( 'mo-openid-connect-verify-nonce' ); ?>"/>
    1210                     <div>
    1211                         <table style="text-align: left;width: 100%">
    1212 
    1213                             <tr>
    1214                                 <td><b><font color="#FF0000">*</font>Email:</b></td>
    1215                                 <td><input class="mo_openid_table_textbox" id="email" type="email" name="email"
    1216                                            required placeholder="person@example.com"
    1217                                            value="<?php echo esc_attr(get_option('mo_openid_admin_email'));?>" />
    1218                                 </td>
    1219                             </tr>
    1220 
    1221                             <tr>
    1222                                 <td><b><font color="#FF0000">*</font>Password:</b></td>
    1223                                 <td><input class="mo_openid_table_textbox" required type="password"
    1224                                            name="password" placeholder="Choose your password" /></td>
    1225                             </tr>
    1226                             <tr style="text-align: center">
    1227                                 <td>
    1228                                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    1229                                 </td>
    1230 
    1231                             </tr>
    1232                         </table>
    1233                         <input type="submit"  value="Login" id="login_submit" style="margin-left: -21%;margin-top: -1%;" class="button button-primary button-large" "/>
    1234                     </div>
    1235                 </form>
    1236                 &nbsp &nbsp &nbsp <br><form method="post" style="margin-top: -15.1%;margin-left: 46%;">
    1237                     <input type="submit" id="go_to_register" name="go_to_register" value="Register" class="button button-primary button-large" style="margin-left: -67%;margin-top: 7.8%;">
    1238                 </form>
    1239                 <p><b><a href="#forgot_password">Click here if you forgot your password?</a></b></p>
    1240                 <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
    1241                     <input type="hidden" name="option" value="mo_openid_forgot_password"/>
    1242                     <input type="hidden" name="mo_openid_forgot_password_nonce"
    1243                            value="<?php echo wp_create_nonce( 'mo-openid-forgot-password-nonce' ); ?>"/>
    1244                     <input type="hidden" id="forgot_pass_email" name="email" value=""/>
    1245                 </form>
    1246             </div>
    1247 
    1248         </div>
    1249 
    1250     </div>
    1251 
    1252     <script>
    1253         jQuery('a[href="#forgot_password"]').click(function(){
    1254             jQuery('#forgot_pass_email').val(jQuery('#email').val());
    1255             jQuery('#openidforgotpasswordform').submit();
    1256         });
    1257     </script>
    1258     <?php
    1259 }
    1260 
    1261 function mo_openid_share_action(){
    1262     $nonce = sanitize_text_field($_POST['mo_openid_share_nonce']);
    1263     if (!wp_verify_nonce($nonce, 'mo-openid-share')) {
    1264         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1265     } else {
    1266         if(current_user_can('administrator')){
    1267         $enable_id = sanitize_text_field($_POST['enabled']);
    1268 
    1269         if ($enable_id == "true") {
    1270 
    1271             update_option(sanitize_text_field($_POST['id_name']), 1);
    1272         } else if ($enable_id == "false") {
    1273 
    1274             update_option(sanitize_text_field($_POST['id_name']), 0);
    1275         }
    1276     }
    1277     }
     1214    update_option( 'regi_pop_up', 'yes' );
     1215    ?>
     1216    <div id="request_registeration" class="mo_openid_modal" style="height:100%">
     1217
     1218        <!-- Modal content -->
     1219        <div class="mo_openid_modal-content" style="text-align:center;margin-left: 32%;margin-top: 2%;width: 37%;">
     1220            <div class="modal-head">
     1221                <a href="" class="mo_close" id="mo_close" style="text-decoration:none;margin-top: 3%;">&times;</a>
     1222                <h1>Login</h1>
     1223            </div>
     1224            <br>
     1225            <span style="text-align: center;color: #56b11e">
     1226            <?php
     1227            echo esc_attr( ( get_option( 'pop_login_msg' ) ) );
     1228            update_option( 'pop_login_msg', 'Enter Your Login Credentials.' );
     1229            ?>
     1230            </span>
     1231            <br><br>
     1232            <div id="mo_saml_show_registeration_modal" >
     1233
     1234                <!--Register with miniOrange-->
     1235                <form name="f" method="post" action="" id="pop-register-form">
     1236                    <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
     1237                    <input type="hidden" name="mo_openid_connect_verify_nonce"
     1238                           value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-connect-verify-nonce' ) ); ?>"/>
     1239                    <div>
     1240                        <table style="text-align: left;width: 100%">
     1241
     1242                            <tr>
     1243                                <td><b><font color="#FF0000">*</font>Email:</b></td>
     1244                                <td><input class="mo_openid_table_textbox" id="email" type="email" name="email"
     1245                                           required placeholder="person@example.com"
     1246                                           value="<?php echo esc_attr( get_option( 'mo_openid_admin_email' ) ); ?>" />
     1247                                </td>
     1248                            </tr>
     1249
     1250                            <tr>
     1251                                <td><b><font color="#FF0000">*</font>Password:</b></td>
     1252                                <td><input class="mo_openid_table_textbox" required type="password"
     1253                                           name="password" placeholder="Choose your password" /></td>
     1254                            </tr>
     1255                            <tr style="text-align: center">
     1256                                <td>
     1257                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     1258                                </td>
     1259
     1260                            </tr>
     1261                        </table>
     1262                        <input type="submit"  value="Login" id="login_submit" style="margin-left: -21%;margin-top: -1%;" class="button button-primary button-large" "/>
     1263                    </div>
     1264                </form>
     1265                &nbsp &nbsp &nbsp <br><form method="post" style="margin-top: -15.1%;margin-left: 46%;">
     1266                    <input type="submit" id="go_to_register" name="go_to_register" value="Register" class="button button-primary button-large" style="margin-left: -67%;margin-top: 7.8%;">
     1267                </form>
     1268                <p><b><a href="#forgot_password">Click here if you forgot your password?</a></b></p>
     1269                <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
     1270                    <input type="hidden" name="option" value="mo_openid_forgot_password"/>
     1271                    <input type="hidden" name="mo_openid_forgot_password_nonce"
     1272                           value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-forgot-password-nonce' ) ); ?>"/>
     1273                    <input type="hidden" id="forgot_pass_email" name="email" value=""/>
     1274                </form>
     1275            </div>
     1276
     1277        </div>
     1278
     1279    </div>
     1280
     1281    <script>
     1282        jQuery('a[href="#forgot_password"]').click(function(){
     1283            jQuery('#forgot_pass_email').val(jQuery('#email').val());
     1284            jQuery('#openidforgotpasswordform').submit();
     1285        });
     1286    </script>
     1287    <?php
     1288}
     1289
     1290function mo_openid_share_action() {
     1291    $nonce = sanitize_text_field( $_POST['mo_openid_share_nonce'] );
     1292    if ( ! wp_verify_nonce( $nonce, 'mo-openid-share' ) ) {
     1293        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1294    } else {
     1295        if ( current_user_can( 'administrator' ) ) {
     1296            $enable_id = sanitize_text_field( $_POST['enabled'] );
     1297
     1298            if ( $enable_id == 'true' ) {
     1299
     1300                update_option( sanitize_text_field( $_POST['id_name'] ), 1 );
     1301            } elseif ( $enable_id == 'false' ) {
     1302
     1303                update_option( sanitize_text_field( $_POST['id_name'] ), 0 );
     1304            }
     1305        }
     1306    }
    12781307}
    12791308
    12801309function mo_openid_restrict_user() {
    1281     if((get_option('mo_openid_admin_customer_key')>151617) || (get_option('mo_openid_new_user')==1)|| !mo_openid_is_customer_registered()) {
    1282         if(isset($_POST['action']))
    1283             wp_send_json(["status" => 'true']);
    1284         else
    1285             return true;
    1286     } else {
    1287         if(isset($_POST['action']))
    1288             wp_send_json(["status" => 'false']);
    1289         else
    1290             return false;
    1291     }
    1292 }
    1293 
    1294 function mo_sharing_app_value()
    1295 {
    1296     $nonce = sanitize_text_field($_POST['mo_sharing_app_value_nonce']);
    1297     if (!wp_verify_nonce($nonce, 'mo-sharing-app-value-nonce')) {
    1298         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1299     } else {
    1300         if(current_user_can('administrator')){
    1301     $return_apps='';
    1302     $count=1;
    1303     foreach ($_POST['app_name'] as $app) {
    1304         $app_value = get_option('mo_openid_' . $app . '_share_enable');
    1305         if($app_value) {
    1306             if($count==1) {
    1307                 $return_apps = $app;
    1308                 $count++;
    1309             }
    1310             else
    1311                 $return_apps.="#".$app;
    1312         }
    1313     }
    1314     wp_send_json($return_apps);
    1315 }
    1316 }
    1317 }
    1318 
    1319 function update_custom_data($user_id)
    1320 {
    1321     $set_cust_field = get_option('mo_openid_custom_field_mapping');
    1322     $cust_reg_val = array();
    1323     foreach ($set_cust_field as $x) {
    1324         $count = 0;
    1325         $a = 1;
    1326         $res = "";
    1327         foreach ($x as $xx => $x_value) {
    1328             if ($count == 0)
    1329                 $predefine = $x_value;
    1330             elseif ($count == 1)
    1331                 $opt_val = $x_value;
    1332             elseif ($count == 2)
    1333                 $field = $x_value;
    1334             elseif ($count == 3)
    1335                 $type = $x_value;
    1336             elseif ($count == 4)
    1337                 $add_field = $x_value;
    1338             $count++;
    1339         }
    1340 
    1341         if ($opt_val === "other") {
    1342             if ($predefine != "")
    1343                 $field_update = $predefine;
    1344             else
    1345                 $field_update = $field;
    1346         } else {
    1347             if ($predefine != "") {
    1348                 $field_update = $predefine;
    1349                 $field = $predefine;
    1350             } else {
    1351                 $field_update = $opt_val;
    1352                 $field = $opt_val . "_update";
    1353             }
    1354         }
    1355         if ($type != "checkbox") {
    1356 //            if(get_option('mo_customer_validation_mo_social_login_enable')=="1" && get_option('mo_openid_customised_field_enable') == "1" )
    1357 //                array_push($cust_reg_val,[$field_update=>$_POST[$field]]);
    1358 //            else
    1359             if($type == "dropdown" && $_POST['user_role'])
    1360             {
    1361                 $user = get_user_by('ID',$user_id);
    1362                 $user->set_role( strtolower(sanitize_text_field($_POST['user_role'])) );
    1363                 update_user_meta($user_id, $field_update, sanitize_text_field($_POST['user_role']));
    1364             }
    1365             else
    1366                 update_user_meta($user_id, $field_update, sanitize_text_field($_POST[$field]));
    1367         } else {
    1368             $flag = 0;
    1369             $str_res = explode(";", $add_field);
    1370             foreach ($str_res as $value_genetared) {
    1371                 if (isset($_POST[$field . $a])) {
    1372                     if ($flag != 0)
    1373                         $res = $res . ";";
    1374                     $res = $res . sanitize_text_field($_POST[$field . $a]);
    1375                     $flag++;
    1376                 }
    1377                 $a++;
    1378             }
    1379 //            if(get_option('mo_customer_validation_mo_social_login_enable')=="1" && get_option('mo_openid_customised_field_enable') == "1" )
    1380 //                array_push($cust_reg_val,[$field_update=>$res]);
    1381 //            else
    1382                 update_user_meta($user_id, $field_update, $res);
    1383         }
    1384     }
    1385     return $cust_reg_val;
     1310    if ( ( get_option( 'mo_openid_admin_customer_key' ) > 151617 ) || ( get_option( 'mo_openid_new_user' ) == 1 ) || ! mo_openid_is_customer_registered() ) {
     1311
     1312            return true;
     1313    } else {
     1314            return false;
     1315    }
     1316}
     1317
     1318function mo_sharing_app_value() {
     1319    $nonce = sanitize_text_field( $_POST['mo_openid_sharing_app_value_nonce'] );
     1320    if ( ! wp_verify_nonce( $nonce, 'mo-openid-sharing-app-value-nonce' ) ) {
     1321        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1322    } else {
     1323        if(current_user_can('administrator')){
     1324        $return_apps = '';
     1325        $count       = 1;
     1326        $appname_arr = isset( $_POST['app_name'] ) ? array_map( 'sanitize_text_field', $_POST['app_name'] ) : '';
     1327        foreach ( $appname_arr as $app ) {
     1328            $app_value = get_option( 'mo_openid_' . $app . '_share_enable' );
     1329            if ( $app_value ) {
     1330                if ( $count == 1 ) {
     1331                    $return_apps = $app;
     1332                    $count++;
     1333                } else {
     1334                    $return_apps .= '#' . $app;
     1335                }
     1336            }
     1337        }
     1338        wp_send_json( $return_apps );
     1339    }
     1340}
     1341}
     1342
     1343function update_custom_data( $user_id ) {  // phpcs:ignore
     1344    $set_cust_field = get_option( 'mo_openid_custom_field_mapping' );
     1345    $cust_reg_val   = array();
     1346    foreach ( $set_cust_field as $x ) {
     1347        $count = 0;
     1348        $a     = 1;
     1349        $res   = '';
     1350        foreach ( $x as $xx => $x_value ) {
     1351            if ( $count == 0 ) {
     1352                $predefine = $x_value;
     1353            } elseif ( $count == 1 ) {
     1354                $opt_val = $x_value;
     1355            } elseif ( $count == 2 ) {
     1356                $field = $x_value;
     1357            } elseif ( $count == 3 ) {
     1358                $type = $x_value;
     1359            } elseif ( $count == 4 ) {
     1360                $add_field = $x_value;
     1361            }
     1362            $count++;
     1363        }
     1364
     1365        if ( $opt_val === 'other' ) {
     1366            if ( $predefine != '' ) {
     1367                $field_update = $predefine;
     1368            } else {
     1369                $field_update = $field;
     1370            }
     1371        } else {
     1372            if ( $predefine != '' ) {
     1373                $field_update = $predefine;
     1374                $field        = $predefine;
     1375            } else {
     1376                $field_update = $opt_val;
     1377                $field        = $opt_val . '_update';
     1378            }
     1379        }
     1380        if ( $type != 'checkbox' ) {
     1381            // if(get_option('mo_customer_validation_mo_social_login_enable')=="1" && get_option('mo_openid_customised_field_enable') == "1" )
     1382            // array_push($cust_reg_val,[$field_update=>$_POST[$field]]);
     1383            // else
     1384            if ( $type == 'dropdown' && sanitize_text_field( $_POST['user_role'] ) ) { // phpcs:ignore
     1385                $user = get_user_by( 'ID', $user_id );
     1386                $user->set_role( strtolower( sanitize_text_field( $_POST['user_role'] ) ) );  // phpcs:ignore
     1387                update_user_meta( $user_id, $field_update, sanitize_text_field( $_POST['user_role'] ) );    // phpcs:ignore
     1388            } else {
     1389                update_user_meta( $user_id, $field_update, sanitize_text_field( $_POST[ $field ] ) );   // phpcs:ignore
     1390            }
     1391        } else {
     1392            $flag    = 0;
     1393            $str_res = explode( ';', $add_field );
     1394            foreach ( $str_res as $value_genetared ) {
     1395                if ( isset( $_POST[ $field . $a ] ) ) {     // phpcs:ignore
     1396                    if ( $flag != 0 ) {
     1397                        $res = $res . ';';
     1398                    }
     1399                    $res = $res . sanitize_text_field( $_POST[ $field . $a ] );     // phpcs:ignore
     1400                    $flag++;
     1401                }
     1402                $a++;
     1403            }
     1404            // if(get_option('mo_customer_validation_mo_social_login_enable')=="1" && get_option('mo_openid_customised_field_enable') == "1" )
     1405            // array_push($cust_reg_val,[$field_update=>$res]);
     1406            // else
     1407                update_user_meta( $user_id, $field_update, $res );
     1408        }
     1409    }
     1410    return $cust_reg_val;
    13861411}
    13871412
    13881413function mo_openid_activation_message() {
    1389     $class = "updated";
    1390     $message = get_option('mo_openid_message');
    1391     echo "<div class='" . $class . "'> <p>" . $message . "</p></div>";
    1392 }
    1393 
    1394 function mo_openid_rating_given(){
    1395     $nonce = sanitize_text_field($_POST['mo_openid_rating_given_nonce']);
    1396     if (!wp_verify_nonce($nonce, 'mo-openid-rating-given-nonce')) {
    1397         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    1398     } else {
    1399         if(current_user_can('administrator')){
    1400     update_option("mo_openid_rating_given",sanitize_text_field($_POST['rating']));
    1401         }
    1402     }
    1403 }
    1404 
    1405 function mo_openid_add_custom_column1($columns){
    1406     $columns['mo_openid_delete_profile_data'] = 'Delete Social Profile Data';
    1407     return $columns;
    1408 }
    1409 
    1410 function mo_openid_delete_social_profile_script(){
    1411     ?>
    1412     <script type="text/javascript">
    1413         function moOpenidDeleteSocialProfile(elem, userId){
    1414             jQuery.ajax({
    1415                 url:"<?php echo admin_url();?>", //the page containing php script
    1416                 method: "POST", //request type,
    1417                 data: {action : 'delete_social_profile_data', user_id : userId},
    1418                 dataType: 'text',
    1419                 success:function(result){
    1420                     alert('Social Profile Data Deleted successfully. Press OK to continue.');
    1421                     window.location.reload(true);
    1422                 }
    1423             });
    1424         }
    1425         function copyToClipboard(copyButton, element, copyelement) {
    1426             var temp = jQuery("<input>");
    1427             jQuery("body").append(temp);
    1428             temp.val(jQuery(element).text()).select();
    1429             document.execCommand("copy");
    1430             temp.remove();
    1431             jQuery(copyelement).text("Copied");
    1432             jQuery(copyButton).mouseout(function(){
    1433                 jQuery(copyelement).text("Copy to Clipboard");
    1434             });
    1435         }
    1436     </script>
    1437     <?php
    1438 }
     1414    $class   = 'updated';
     1415    $message = get_option( 'mo_openid_message' );
     1416    echo "<div class='" . esc_attr( $class ) . "'> <p>" . esc_attr( $message ) . '</p></div>';
     1417}
     1418
     1419function mo_openid_rating_given() {
     1420    $nonce = sanitize_text_field( $_POST['mo_openid_rating_given_nonce'] );
     1421    if ( ! wp_verify_nonce( $nonce, 'mo-openid-rating-given-nonce' ) ) {
     1422        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     1423    } else {
     1424        if(current_user_can('administrator')){
     1425        update_option( 'mo_openid_rating_given', sanitize_text_field( $_POST['rating'] ) );
     1426        }
     1427    }
     1428}
     1429
     1430function mo_openid_add_custom_column1( $columns ) {
     1431    $columns['mo_openid_delete_profile_data'] = 'Delete Social Profile Data';
     1432    return $columns;
     1433}
     1434
     1435function mo_openid_delete_social_profile_script() {
     1436    ?>
     1437    <script type="text/javascript">
     1438        function moOpenidDeleteSocialProfile(elem, userId){
     1439            jQuery.ajax({
     1440                url:"<?php echo esc_url( admin_url() ); ?>", //the page containing php script
     1441                method: "POST", //request type,
     1442                data: {action : 'delete_social_profile_data', user_id : userId},
     1443                dataType: 'text',
     1444                success:function(result){
     1445                    alert('Social Profile Data Deleted successfully. Press OK to continue.');
     1446                    window.location.reload(true);
     1447                }
     1448            });
     1449        }
     1450        function copyToClipboard(copyButton, element, copyelement) {
     1451            var temp = jQuery("<input>");
     1452            jQuery("body").append(temp);
     1453            temp.val(jQuery(element).text()).select();
     1454            document.execCommand("copy");
     1455            temp.remove();
     1456            jQuery(copyelement).text("Copied");
     1457            jQuery(copyButton).mouseout(function(){
     1458                jQuery(copyelement).text("Copy to Clipboard");
     1459            });
     1460        }
     1461    </script>
     1462    <?php
     1463}
  • miniorange-login-openid/trunk/mo_openid_Language.php

    r2236209 r2853010  
    11<?php
    22function mo_sl($string){
    3      return __($string,'miniorange-login-openid');
     3     return esc_attr(__($string,'miniorange-login-openid'));
    44 }
  • miniorange-login-openid/trunk/mo_openid_feedback_form.php

    r2655636 r2853010  
    33function mo_openid_display_feedback_form(){
    44
    5     if ( 'plugins.php' != basename($_SERVER['PHP_SELF']) ) {
     5    if ( 'plugins.php' != basename(sanitize_text_field($_SERVER['PHP_SELF'])) ) {
    66        return;
    77    }
     
    2525            <form name="f" method="post" action="" id="mo_openid_feedback">
    2626                <input type="hidden"  name="option" value="mo_openid_feedback"/>
    27                 <input type="hidden" name="mo_openid_feedback_nonce" value="<?php echo wp_create_nonce( 'mo-openid-feedback-nonce' ); ?>"/>
     27                <input type="hidden" name="mo_openid_feedback_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-feedback-nonce' )); ?>"/>
    2828                <div>
    2929                    <p style="margin-left:2%">
     
    5050                        </label>
    5151                    </div>
    52                     <span id="link_id_<?php echo $p;$p++;?>"></span>
    53                     <div id="text_<?php echo $i;$i++;?>"></div>
     52                    <span id="link_id_<?php echo esc_attr($p);esc_attr($p++);?>"></span>
     53                    <div id="text_<?php echo esc_attr($i);esc_attr($i++);?>"></div>
    5454                    <?php }
    5555                    if(get_option('mo_openid_admin_email'))
     
    5959                    ?>
    6060                    <br>
    61                     Email: <input type="text" id="mo_feedback_email" name="mo_feedback_email" value="<?php echo $email?>"/>
     61                    Email: <input type="text" id="mo_feedback_email" name="mo_feedback_email" value="<?php echo esc_attr($email)?>"/>
    6262                    <br><br>
    6363                    <div style="margin-left: 2%; width: 100%; margin-bottom: 5%; font-size: 15px;">
     
    7777                <input type="hidden" name="mo_openid_option" value="mo_openid_skip_feedback"/>
    7878                <input type="hidden" name="mo_openid_feedback_close_nonce"
    79                        value="<?php echo wp_create_nonce( 'mo-openid-feedback-close-nonce' ); ?>"/>
     79                       value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-feedback-close-nonce' )); ?>"/>
    8080            </form>
    8181
  • miniorange-login-openid/trunk/readme.txt

    r2809759 r2853010  
    11=== WordPress Social Login and Register (Discord, Google, Twitter, LinkedIn) ===
    2 Contributors: cyberlord92
     2Contributors: sociallogin, vkontakte, cyberlord92
    33Donate link: https://www.miniorange.com
    4 Tags: social login, discord login, facebook login, google login, twitter login, social sharing, linkedIn login, user login, vkontakte login, social comments, woocommerce login, social connect, social network login, social plugin, windows, microsoft, openID, OAuth Login, social media login, user registration, social sign in.
     4Tags: social login, facebook login, google login, social sharing, twitter login, linkedIn, user login, vkontakte login, social comments, social commenting, woocommerce login, facebook, twitter, google, social connect, social network login, social plugin, windows, microsoft, discord login, openID, OAuth Login, User Login, social media login, user registration, social sign in. 
    55Requires at least: 2.0.2
    66Tested up to: 6.1
    7 Stable tag: 7.5.14
     7Stable tag: 7.6.0
    88License: GPLv2 or later
    99License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
    1010
    11 Social Login with Discord, Facebook, Google, Twitter, Apple, Twitch, LinkedIn and 40+ apps. Social login with social sharing and comments. Free, fast & easy! WooCommerce Integration.
     11Social Login with Discord, Facebook, Google, Twitter, LinkedIn and 40+ apps. Social login with social share and comments. Free, fast & easy! WooCommerce Integration.
    1212
    1313== Description ==
    1414
    15 Social Login Plugin on WordPress allows social login, social share & commenting using widely used apps like Facebook, Google, LinkedIn, Twitter, Apple, Discord, Twitch, Line, Wechat, 40 other apps available. Instead of requiring your visitors to waste time filling out the typical registration form, it allows them to register/login to your website using their social media profiles.
     15WordPress Social Login Plugin allows social login, social share & commenting using widely used apps like Facebook, Google, LinkedIn, Twitter, Apple, Discord, Twitch, Line, Wechat, 40 other apps available. Instead of requiring your visitors to waste time filling out the typical registration form, it allows them to register/login to your website using their social media profiles.
    1616
    1717Integrations with popular plugins like WooCommerce, BuddyPress, MailChimp, Paid Memberships Pro, Ultimate Member, and applications like Discord & Hubspot.
     
    2626= Free Social Login Features =
    2727
    28 *   Social Login with <a href="https://plugins.miniorange.com/configure-facebook-social-login-in-wordpress" target="_blank">Facebook</a>, <a href="https://plugins.miniorange.com/login-with-google-using-wordpress-social-login" target="_blank">Google</a>, <a href="https://plugins.miniorange.com/configure-discord-with-social-login-in-wordpress" target="_blank">Discord</a>, <a href="https://plugins.miniorange.com/configure-twitter-with-social-login-in-wordpress" target="_blank">Twitter</a>, <a href="http://plugins.miniorange.com/configure-vkontakte-with-social-login-in-wordpress" target="_blank">Vkontakte</a>, <a href="https://plugins.miniorange.com/configure-linkedin-with-social-login-in-wordpress" target="_blank">LinkedIn</a>, <a href="http://plugins.miniorange.com/configure-amazon-with-social-login-in-wordpress" target="_blank">Amazon</a>, <a href="https://plugins.miniorange.com/configure-windowslive-with-social-login-in-wordpress" target="_blank">Windows Live</a>, Salesforce & <a href="https://plugins.miniorange.com/guide-to-configure-yahoo-social-login-in-wordpress" target="_blank">Yahoo</a>,etc.
    29 *   **One-click** activation for Login with Google, Amazon, Vkontakte, Discord, Apple, Twitch, LinkedIn, Windows Live (Microsoft login), Yahoo, Salesforce, Snapchat and Dribbble.
     28*   Social Login with <a href="https://plugins.miniorange.com/configure-facebook-social-login-in-wordpress" target="_blank">Facebook</a>, <a href="https://plugins.miniorange.com/login-with-google-using-wordpress-social-login" target="_blank">Google</a>, <a href="https://plugins.miniorange.com/configure-discord-with-social-login-in-wordpress" target="_blank">Discord</a>, <a href="https://plugins.miniorange.com/configure-twitter-with-social-login-in-wordpress" target="_blank">Twitter</a>, <a href="http://plugins.miniorange.com/configure-vkontakte-with-social-login-in-wordpress" target="_blank">Vkontakte</a>, <a href="https://plugins.miniorange.com/configure-linkedin-with-social-login-in-wordpress" target="_blank">LinkedIn</a>, <a href="http://plugins.miniorange.com/configure-amazon-with-social-login-in-wordpress" target="_blank">Amazon</a>, Salesforce & <a href="https://plugins.miniorange.com/guide-to-configure-yahoo-social-login-in-wordpress" target="_blank">Yahoo</a>,etc.
     29*   **One-click** activation for Login with Google, Amazon, Vkontakte, LinkedIn, Windows Live (Microsoft login), Yahoo, Salesforce, Snapchat and Dribbble.
    3030*   **Flexible display** - Display Social login icons anywhere on your websites.
    31 *   **Sync user data** - Sync user data from multiple social network providers like Facebook, Google, Discord, Apple, Microsoft into one social login account.
     31*   **Sync user data** - Sync user data from multiple social network providers like Facebook, Google, Microsoft into one social login account.
    3232*   **Secure Login** - User Login with safe and secure authorization and authentication protocols like OAuth and OpenID.
    3333*   **Customizable social login icons** - Choose from multiple themes, shapes and effects. Pick any size and color. Enable transform effect for social login icons.
     
    3535*   **Assign user roles** - Assign WordPress roles to users on registration through social login.
    3636*   **Shortcodes** - Use Shortcode anywhere on your website to display social login icons.
    37 *   **Take full control** - Setup your social login applications with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Windows Live & Yahoo.
     37*   **Take full control** - Setup your social login applications with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Amazon, Windows Live & Yahoo.
    3838*   **Preview** - Preview custom social login icons before you publish them on your website.
    3939*   **Profile completion** (username, email) - Prompt users for email-id & username if social login app doesn't return it. Verify Emails using verification code.
    40 *   **Email Notifications** - Emails are sent to the admin when a user registers with any social login application.
     40*   **Email Notifications** - Emails are sent to admin when a user registers with any social login application.
    4141*   **Enable/disable user registration** - Allow or restrict user registration using social login.
    42 *   **Social Share** - Social sharing with Facebook, Twitter, LinkedIn, Discord, Apple, Twitch, Reddit, etc.
     42*   **Social Share** - Social share with Facebook, Twitter, LinkedIn, Reddit, etc.
    4343*   **Social Comments**
    4444*   **User friendly UI**
     
    5757*   <a href="https://plugins.miniorange.com/configure-apple-with-social-login-in-wordpress" target="_blank">Apple login</a>
    5858*   <a href="https://plugins.miniorange.com/configure-discord-with-social-login-in-wordpress" target="_blank">Discord login</a>
    59 *   <a href="https://plugins.miniorange.com/configure-windowslive-with-social-login-in-wordpress" target="_blank">Windows Live login (Microsoft Login)</a>
    6059*   <a href="https://plugins.miniorange.com/configure-hubspot-sign-in-for-wordpress-website" target="_blank">HubSpot login</a>
    6160*   <a href="https://plugins.miniorange.com/guide-to-configure-yahoo-social-login-in-wordpress" target="_blank">Yahoo login</a>
     
    6665*   <a href="https://plugins.miniorange.com/configure-to-foursquare-with-social-login-in-wordpress" target="_blank">Foursquare login</a>
    6766*   <a href=" https://plugins.miniorange.com/integrate-github-login-in-your-website-wordpress-oauth" target="_blank">Github login</a> 
    68 *   Instagram login
    6967*   <a href="https://plugins.miniorange.com/login-with-kakao-using-wordpress-social-login" target="_blank">Kakao login (카카오 로그인)</a>
    7068*   <a href="https://plugins.miniorange.com/configure-line-with-social-login-in-wordpress" target="_blank">Line login (ラインログイン)(線路登錄)(线路登录)(เข้าสู่ระบบไลน์)</a>
     
    9189
    9290= Free Social Share & Social Comments Features =
    93 *   **Share with social applications** - Facebook, Twitter, Google+, Pinterest, Reddit, Vkontakte, Tumblr, StumbleUpon, LinkedIn, Discord, Apple, Twitch, Pocket, Digg, Email, Print, and Whatsapp
     91*   **Share with social applications** - Facebook, Twitter, Google+, Pinterest, Reddit, Vkontakte, Tumblr, StumbleUpon, LinkedIn, Pocket, Digg, Email, Print, and Whatsapp
    9492*   **Facebook Comments** - Allow social login users to comment using Facebook.
    9593*   **Disqus Comments** - Allow social login users to comment using Disqus.
     
    102100
    103101= Why miniOrange Social Login =
    104 * **13 Free Social Login apps** - Login with popular social network providers namely Facebook, Google, Discord, Apple, Twitch Twitter, LinkedIn, Instagram, Vkontakte, Windows Live, Amazon, Salesforce, Yahoo, Snapchat and Dribbble all available in the free plan.
     102* **13 Free Social Login apps** - Login with popular social network providers namely Facebook, Google, Discord, Twitter, LinkedIn, Vkontakte, Windows Live, Amazon, Salesforce, Yahoo, Snapchat and Dribbble all available in the free plan.
    105103* **No Setup required** - Simply register with us and use our pre-configured application. We will handle everything for you.
    106 * **24 / 7 Support** - If you face any issues or if you simply require assistance with the Social Login plugin then please contact us. Whatever it may be, we will solve the issue for you and get everything working as soon as possible.
     104* **24 / 7 Support** - If you face any issues or if you simply require assistance with the Social Login plugin then please contact us. Whatever it may be we will solve the issue for you and get everything working as soon as possible.
    107105* **Tons of Free Features** - We have a huge roster of free features. With other plugins, you will have to pay for these features.
    108106* **Icon Customizations** - Flexible icon customizations for Social Login and Social Share icons. No CSS knowledge is needed! Choose from different themes, shapes, and sizes. Pick any color you want to display the social icons.
     
    119117*   Pinterest Social Share
    120118*   Google Social Share
    121 *   Discord Social Share
    122 *   Twitch Social Share
    123 *   Apple Social Share
    124119*   Vkontakte Social Share
    125120*   Whatsapp Social Share
     
    146141= Paid Social Login Features =
    147142
    148 *   **40+ Social Login Providers** - Choose from 40+ applications (Facebook Login, Google Login, Discord Login, Twitch Login, Apple Login etc.) for social login and user registration. Many social network providers added continuously.
    149 *   **One-click activation** - For Login with Discord, Apple, Twitch, Facebook, Google, Amazon, Vkontakte, LinkedIn, Windows Live (Microsoft login), WordPress, Yahoo, Salesforce, Stackoverflow, Mailchimp, Strava etc.
     143*   **40+ Social Login Providers** - Choose from 40+ applications (Facebook Login, Google Login, Discord Login etc.) for social login and user registration. Many social network providers added continuously.
     144*   **One-click activation** - For Login with Discord, Apple, Facebook, Google, Amazon, Vkontakte, LinkedIn, Windows Live (Microsoft login), WordPress, Yahoo, Salesforce, Stackoverflow, Mailchimp, Strava etc.
    150145*   **Social login Integrations** - Social integrations with popular WordPress plugins like <a href="https://plugins.miniorange.com/guide-to-configure-woocommerce-with-wordpress-social-login" target="_blank">WooCommerce</a>, <a href="https://plugins.miniorange.com/guide-to-configure-paid-membership-pro-with-wordpress-social-login" target="_blank">Paid Memberships Pro</a>, <a href="https://plugins.miniorange.com/guide-to-configure-buddypress-with-wordpress-social-login" target="_blank">BuddyPress</a>, <a href="https://plugins.miniorange.com/guide-to-configure-mailchimp-integration-with-wordpress-social-login" target="_blank">MailChimp</a> and HubSpot.
    151146*   **Social Login Integrations** - Social login icons on WooCommerce pages, BuddyPress pages, Paid Memberships Pro pages, MemberPress pages, Ultimate Member pages.
     
    155150*   **Recaptcha** - Enable Recaptcha and ensure the safety of your website.
    156151*   **User Moderation** - Approve users registering through social login.
    157 *   **Sync user data** - Sync user data from multiple social network providers like Facebook, Google, Microsoft,Twitch, Discord, Apple, into one social login account.
     152*   **Sync user data** - Sync user data from multiple social network providers like Facebook, Google, Microsoft into one social login account.
    158153*   **User Redirection** - Redirect users on registration, login, and logout to pages you desire. Custom registration redirect URL, Custom login redirect URL, and custom logout redirect URL.
    159154*   **Assign user roles** - Assign WordPress roles to users on registration through social login.
    160155*   Use Shortcode anywhere on your website to display social login icons.
    161 *   Take full control - Setup your social login application with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Discord, Apple, Twitch, Windows Live & Yahoo.
     156*   Take full control - Setup your social login application with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Amazon, Windows Live & Yahoo.
    162157*   Preview custom social login icons.
    163158*   Profile completion (username, email) - Prompt users for email-id & username if social login app doesn't return it. Verify Emails using verification code.
     
    2202153. Add miniOrange Social Login and Social plugin through Display Options.
    2212164. For adding widgets, go to `Appearance -> Widgets`. From available widgets, you will find `miniOrange - Social Login`, `miniOrange Sharing - Horizontal`, and `miniOrange Sharing - Vertical` widgets. Drag it to the chosen widget area where you want it to appear.
    222 5. For adding icons to the page, use Shortcodes [miniorange_social_login], [miniorange_social_sharing], [miniorange_social_sharing_vertical]. Further go to the Shortcode tab to customize them.
     2175. For adding icons to page, use Shortcodes [miniorange_social_login], [miniorange_social_sharing], [miniorange_social_sharing_vertical]. Further go to Shortcode tab to customize them.
    2232186. Now visit your site and you will see login and sharing icons.
    224219
     
    2312262. Click on the License option on the left-hand menu.
    2322273. You will see the download the social login premium plugin link Click on Download Plugin and extract the zip.
    233 4. Do not delete the older files, just replace the old plugin files with the new plugin.
     2284. Do not delete the older files just replace the old plugin files with the new plugin.
    2342295. To activate the newly installed plugin you need a license key. Click on the View License Key button in the License option on the left-hand menu of the miniOrange dashboard.
    235 6. Copy the License key.
    236 7. Go to miniOrange Social Login Plugin on the WordPress dashboard and after login into the plugin, it will ask for the license key and paste the license key which you copied from the miniOrange dashboard.
    237 
    238 = I need to login with other Social Login apps like Pinterest, Yahoo, Paypal, etc. ? =
     2306. Copy the Licence key.
     2317. Go to miniOrange Social Login Plugin on the WordPress dashboard and after login into the plugin, it will ask for the license key paste the license key which you copied from the miniOrange dashboard.
     232
     233= I need login with other Social Login apps like Pinterest, Yahoo, Paypal, etc. ? =
    239234Please email us at info@miniorange.com. You can also submit your app request from the plugin's configuration page.
    240235
     
    2662611. Social Login apps setup preview.
    2672622. Social Login icon customization and preview.
    268 3. Social Login Display Options.
     2633. Social Login display Options.
    2692644. Social Login redirection options.
    2702655. Advanced options for Social Login.
     
    2742699. Social Login with square images.
    27527010. Social Login with icon with default theme and long buttons.
    276 11. Social Login with an icon with white background and long buttons.
     27111. Social Login with icon with white background and long buttons.
    27727212. Social Login with icon with Hover theme, Transform effect and long buttons.
    278 13. Social Login with an icon with a smart theme, Transform effect and long buttons.
     27313. Social Login with icon with smart theme, Transform effect and long buttons.
    27927414. Social Login with icon with Custom Hover theme, Transform effect and circle buttons.
    28027515. Square Social share buttons - horizontal and vertical.
     
    282277
    283278==Changelog==
     279= 7.6.0 =
     280* Discontinue the Temporary admin login feature.
     281* Security Fixes.
     282
    284283= 7.5.14 =
    285284* Updated License Plan.
     
    298297= 7.5.11 =
    299298* Updated the licensing plan.
    300 * UI improvements.
     299* UI improvments.
    301300
    302301= 7.5.10 =
     
    309308* Introduced a new Enterprise plan.
    310309* Added Skip button during plugin deactivation.
    311 * Added MailChimp and Strava in Premium and all-inclusive versions.
     310* Added MailChimp and Strava in Premium and all-inclusive version.
    312311
    313312= 7.5.8 =
     
    372371* Added and introduced Rest API / Mobile SSO solution for Android and iOS applications.
    373372* Introduced multisite plans for Standard, Premium, and All-inclusive plans.
    374 * Added and introduced a new Discord Add-on.
     373* Added and introduced new Discord Add-on.
    375374
    376375= 7.4.8 =
     
    412411= 7.4.3 =
    413412* Tested all features of Social login, sharing, and commenting with the latest WordPress version. Compatible with WordPress version 5.5
    414 * New Christmas offer released. All social support plans are 50% off. Discounts on various social plans.
     413* New Christmas offer released. All social support plans 50% off. Discounts on various social plans.
    415414* Minor UI changes.
    416415
     
    484483
    485484= 7.3.5 =
    486 * Compatible with WordPress version 5.4
     485* Compatable with WordPress version 5.4
    487486* Minor UI changes.
    488487
     
    499498* Minor UI changes.
    500499* Added a new social login plugin for woocommerce integration.
    501 * Added auto as a parameter for width in the shortcode of social login icons.
     500* Added auto as a parameter for width in shortcode of social login icons.
    502501* Added Reddit, Foursquare, Snapchat, Teamsnap, Live Journal, Odnoklassniki, Naver.
    503502
     
    524523* Added Custom app for Social login applications like google, vkontakte, instagram, linkedin, amazon, salesforce, windowslive, and yahoo.
    525524* Added copy to clipboard option.
    526 * Added Copy to clipboard for instructions to set up custom apps and shortcodes.
     525* Added Copy to clipboard for instructions to setup custom apps and shortcodes.
    527526* Added Social Share count Feature.
    528527* Added Horizontal long buttons option in shortcode.
     
    542541
    543542= 7.2.4 =
    544 * Made contact with us changes.
    545 * Storing firstname and lastname issues solved.
     543* Made contact us changes.
     544* Storing firstname and lastname issue solved.
    546545* Changed datatype of column user_id in the mo_openid_linked_user table.
    547546* Added end tour button.
     
    574573* Fixed the role mapping error message while login.
    575574* Fixed Whatsapp Sharing image issue.
    576 * Fixed some UI issues in Social login display options.
     575* Fixed some UI issues in Social login dsiplay options.
    577576
    578577= 7.1.5 =
     
    582581
    583582= 7.1.4 =
    584 * Add Yahoo as a social login option in default apps.
     583* Add Yahoo as social login option in default apps.
    585584* Fixed Permalink issue.
    586585* Added  Customizable text for OTP email notification.
     
    666665
    667666= 6.6.0 =
    668 *   Added resend otp in Profile Completion when user registers through Social login.
     667*   Added resend otp in Profile Completion when user resisters through Social login.
    669668*   Added column timestamp in account linking table
    670669*   Added option to disable particular Social login custom app
     
    10131012
    10141013== Upgrade Notice ==
     1014= 7.6.0 =
     1015* Discontinue the Temporary admin login feature.
     1016* Security Fixes.
     1017
    10151018= 7.5.14 =
    10161019* Updated License Plan.
     
    10221025* Improvement on licensing page.
    10231026
     1027
    10241028= 7.5.12 =
    10251029* Update the list of social login application.
     
    10281032= 7.5.11 =
    10291033* Updated the licensing plan.
    1030 * UI improvements.
     1034* UI improvments.
    10311035
    10321036= 7.5.10 =
     
    10391043* Introduced a new Enterprise plan.
    10401044* Added Skip button during plugin deactivation.
    1041 * Added MailChimp and Strava in Premium and all-inclusive versions.
     1045* Added MailChimp and Strava in Premium and all-inclusive version.
    10421046
    10431047= 7.5.8 =
     
    11021106* Added and introduced Rest API / Mobile SSO solution for Android and iOS applications.
    11031107* Introduced multisite plans for Standard, Premium, and All-inclusive plans.
    1104 * Added and introduced a new Discord Add-on.
     1108* Added and introduced new Discord Add-on.
    11051109
    11061110= 7.4.8 =
     
    12101214
    12111215= 7.3.5 =
    1212 * Compatible with WordPress version 5.4
     1216* Compatable with WordPress version 5.4
    12131217* Minor UI changes.
    12141218
     
    12251229* Minor UI changes.
    12261230* Added a new social login plugin for WooCommerce integration.
    1227 * Added auto as a parameter for width in the shortcode of social login icons.
     1231* Added auto as a parameter for width in shortcode of social login icons.
    12281232* Added Reddit, Foursquare, Snapchat, Teamsnap, Live Journal, Odnoklassniki, Naver.
    12291233
     
    13041308
    13051309= 7.1.4 =
    1306 * Add Yahoo as a social login option in default apps.
     1310* Add Yahoo as social login option in default apps.
    13071311* Fixed Permalink issue.
    13081312* Added  Customizable text for OTP email notification.
     
    13881392
    13891393= 6.6.0 =
    1390 *   Added resend OTP in Profile Completion when user registers through Social login.
     1394*   Added resend OTP in Profile Completion when user resisters through Social login.
    13911395*   Added column timestamp in account linking table
    13921396*   Added option to disable particular Social login custom app
     
    17411745* First version of Social Login, Social Sharing plugin.
    17421746
    1743 
  • miniorange-login-openid/trunk/social_apps/facebook.php

    r2643398 r2853010  
    1616                                ##Click on <b>Web</b>. Enter <b><code id='12'>".get_option("siteurl")."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#12', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> into <b>Site URL</b> than click on <b>Save</b>.
    1717                                ##Click on <b>Settings</b> on left side menu and select <b>Basics</b> option.
    18                                 ##Enter <b><code id='11'>".$_SERVER['HTTP_HOST']."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#11', '#shortcode_url_copy1')\"><span id=\"shortcode_url_copy1\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> in <b>App Domain</b>. Enter your <b>Privacy Policy URL</b>
     18                                ##Enter <b><code id='11'>".sanitize_text_field($_SERVER['HTTP_HOST'])."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#11', '#shortcode_url_copy1')\"><span id=\"shortcode_url_copy1\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> in <b>App Domain</b>. Enter your <b>Privacy Policy URL</b>
    1919                                ##Under <b>User Data Deletion</b> click on the drop down, Select <b>Data Deletion Instruction URl</b> (Enter the URL of your page with the instructions on how users can delete their accounts on your site).
    2020                                ##Select <b>Category</b> of your website. Then click on <b>Save Changes</b>.
  • miniorange-login-openid/trunk/social_apps/google.php

    r2560192 r2853010  
    1515                                ##Click on <b>Select a Project</b> and select the newly created Project by clicking on the project name that you entered in the previous step.
    1616                                ##Select <b>External</b> as user type and click on <b>Create</b>.
    17                                 ##You are prompted to Edit App Registration, Enter all the Required details (AppName & User support Email) Add Authorized domain as <b><code id='11'>".$_SERVER['HTTP_HOST']."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#11', '#shortcode_url_copy1')\"><span id=\"shortcode_url_copy1\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b>.
     17                                ##You are prompted to Edit App Registration, Enter all the Required details (AppName & User support Email) Add Authorized domain as <b><code id='11'>".sanitize_text_field($_SERVER['HTTP_HOST'])."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#11', '#shortcode_url_copy1')\"><span id=\"shortcode_url_copy1\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b>.
    1818                                ##On the Scopes screen click on <b>Add or Remove Scopes</b>. Check  and <b>.../auth/userinfo.email</b> and <b>.../auth/userinfo.profile</b>. Click on <b>Update</b>. Scroll down, Click on <b>Save and Continue</b>.
    1919                                ##From the Left side Menu, Click on <b>Credentials</b> then click on <b>Create Credential</b> from dropdown select <b>Oauth client ID</b>.
  • miniorange-login-openid/trunk/social_apps/linkedin.php

    r2560192 r2853010  
    5656        if(is_wp_error($result)){
    5757            update_option( 'mo_openid_test_configuration', 0);
    58             echo $result['body'];
     58            echo esc_attr($result['body']);
    5959            exit();
    6060        }
  • miniorange-login-openid/trunk/social_apps/mo_openid_configured_apps_funct.php

    r2769271 r2853010  
    22function mo_openid_validate_code()
    33{
    4     if (isset($_REQUEST['code'])) {
    5         $code = sanitize_text_field($_REQUEST['code']);
     4    if (isset($_REQUEST['code'])) {     // phpcs:ignore
     5        $code = sanitize_text_field($_REQUEST['code']);     // phpcs:ignore
    66        return $code;
    77    } // this handles incorrect scope(only for linkedin).
    8     else if (array_key_exists('error', $_REQUEST)) {
     8    else if (array_key_exists('error', $_REQUEST)) {    //phpcs:ignore
    99        if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
    1010            update_option('mo_openid_test_configuration', 0);
    1111            echo '<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;">TEST FAILED</div>
    1212                        <div style="color: #a94442;font-size:14pt; margin-bottom:20px;">WARNING: Please enter correct scope value and try again. <br/>';
    13             print_r(esc_attr($_REQUEST));
     13            print_r(esc_attr($_REQUEST));   //phpcs:ignore
    1414            echo '</div>
    15                         <div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="' . plugin_dir_url(__FILE__) . '/includes/images/wrong.png"></div>';
     15                        <div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="' .esc_url(plugin_dir_url(__FILE__)) . '/includes/images/wrong.png"></div>';
    1616            exit;
    1717        } else {
    18             echo esc_attr($_REQUEST['error_description']) . "<br>";
    19             wp_die("Allow access to your profile to get logged in. Click <a href=" . get_site_url() . ">here</a> to go back to the website.");
     18            echo esc_attr(sanitize_text_field($_REQUEST['error_description'])) . "<br>";        // phpcs:ignore
     19            wp_die("Allow access to your profile to get logged in. Click <a href=" . esc_url(get_site_url()) . ">here</a> to go back to the website.");
    2020            exit;
    2121        }
     
    120120    if (is_wp_error($result)) {
    121121        update_option('mo_openid_test_configuration', 0);
    122         echo $result['body'];
     122        echo esc_attr($result['body']);
    123123        exit();
    124124    }
     
    134134            print_r($access_token_json_output);
    135135            echo '</div>
    136                     <div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="' . plugin_dir_url(__FILE__) . '/includes/images/wrong.png"></div>';
     136                    <div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="' . esc_url(plugin_dir_url(__FILE__) . '/includes/images/wrong.png').'"></div>';
    137137            exit;
    138138        }
     
    143143function mo_openid_get_social_app_data($access_token,$profile_url,$app_name){
    144144    $headers='';
    145     if( $app_name!= 'spotify' && $app_name!='meetup')
     145    if($app_name!= 'spotify' && $app_name!='meetup')
    146146        $headers = ('Authorization:Bearer '.$access_token);
    147147    $args = array(
     
    156156    if(is_wp_error($result)){
    157157        update_option( 'mo_openid_test_configuration', 0);
    158         echo $result['body'];
     158        echo esc_attr($result['body']);
    159159        exit();
    160160    }
     
    167167    $print = '<div style="color: #3c763d;
    168168        background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>
    169         <div style="display:block;text-align:center;margin-bottom:1%;"><img style="width:15%;"src="'. plugin_dir_url(dirname(__FILE__)) . '/includes/images/green_check.png"></div>';
     169        <div style="display:block;text-align:center;margin-bottom:1%;"><img style="width:15%;" src="'. esc_url(plugin_dir_url(dirname(__FILE__)) . '/includes/images/green_check.png').'"></div>';
    170170    $print .= mo_openid_json_to_htmltable($profile_json_output);
    171     echo $print;
     171    $allowed_html =  array('div'=> array('style'=>array()), 'img' => array('style'=>array(),'src'=> array()), 'table'=> array('border'=>array()),'tbody'=> array(), 'tr'=> array(), 'td'=> array(), 'strong'=> array());
     172    echo wp_kses($print, $allowed_html);
    172173    exit;
    173174}
     
    273274function mo_openid_delete_account_linking_rows($user_id){
    274275    global $wpdb;
    275     $db_prefix = $wpdb->prefix;
    276     $result = $wpdb->get_var($wpdb->prepare("DELETE from ".$db_prefix."mo_openid_linked_user where user_id = %s ",$user_id));
     276    $result = $wpdb->get_var($wpdb->prepare("DELETE from ". $wpdb->prefix ."mo_openid_linked_user where user_id = %s ",$user_id));
    277277    if($result === false){
    278278        /*$wpdb->show_errors();
    279279        $wpdb->print_error();
    280280        exit;*/
    281         wp_die(get_option('mo_delete_user_error_message'));
     281        wp_die(esc_attr(get_option('mo_delete_user_error_message')));
    282282    }
    283283}
  • miniorange-login-openid/trunk/social_apps/twitter.php

    r2560192 r2853010  
    1010    public function __construct() {
    1111        $this->site_url = get_option( 'siteurl' );
    12         $this->instructions=" Go to <a href=\"https://developer.twitter.com/en/apps\" target=\"_blank\">https://developer.twitter.com/en/apps</a> and sign in with your twitter account.
    13         ##Scroll down and Click on <b>Create App</b>.
    14         ##Enter App Name and click on <b> Complete </b>.
    15         ## Scroll down on keys and token page and click on <b>App Settings</b>.
    16         ##Click on <b>Edit</b> Authentication setting.
    17         ##Enable 3-legged OAuth then add callback URLs as <b><code id='7'>".get_option("siteurl")."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#7', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> and Website URL as <b><code id='7'>".get_option("siteurl")."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#7', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> and Save it.<br><u><b>Note:</b></u><br> <b>Twitter may not accept Website URL as local IP.</b>.
    18         ##Now click on <b>Keys and tokens</b> tab and click on <b>View Keys</b>.
    19         ##Copy <b>API key</b> and <b>API key secret</b> and paste it on App ID and App Secret respectively, Click on <b>Save & Test Configuration</b>.
    20         ##Go to Social Login tab to configure the display as well as other login settings.
    21         ";
    22     }
     12        $this->instructions="Go to <a href=\"https://developer.twitter.com/en/apps\" target=\"_blank\">https://developer.twitter.com/en/apps</a> and sign in with your twitter account.##Twitter might ask you to add your phone number to your profile while creating the app.##Click on <b>Create New App</b>. Enter Name.##Click on <b>Skip to dashboard</b> and <b>settings icon</b> under App.Click on <b>Set up</b> button in <b>User authentication settings</b>##<b>Callback URL</b> <br><u>Example of public website, </u><br>if your website URL is =><code id='7'>".get_option("siteurl")."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"mofa mofa-fw mofa-lg mofa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#7', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i><br> then your callback URL should be => <code id='8'>".get_option("siteurl")."</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"mofa mofa-fw mofa-lg mofa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#8', '#shortcode_url1_copy')\"><span id=\"shortcode_url1_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i><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 ##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.##Leave the scope field blank.##<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.##Click on the Save settings button.##Go to Social Login tab to configure the display as well as other login settings.";
     13}
    2314
    2415    function mo_openid_get_app_code()
     
    2920        $_SESSION["appname"] = 'twitter';
    3021        $client_id = $appslist['twitter']['clientid'];
    31         $client_secret = $appslist['twitter']['clientsecret'];
    32         $twiter_getrequest_object = new Mo_Openid_Twitter_OAuth($client_id,$client_secret); //creating the object of Mo_Openid_Twitter_OAuth class
    33         $oauth_token = $twiter_getrequest_object->mo_twitter_get_request_token();           //function call
    34         $login_dialog_url = "https://api.twitter.com/oauth/authenticate?oauth_token=" . $oauth_token;
     22        $scope = $appslist['twitter']['scope'];
     23        $login_dialog_url = 'https://twitter.com/i/oauth2/authorize?response_type=code&client_id=' . $client_id . '&redirect_uri='.$social_app_redirect_uri.'&scope='.$scope.'&state=state&code_challenge=challenge&code_challenge_method=plain' ;
    3524        header('Location:'. $login_dialog_url);
    3625        exit;
     26
     27
     28
    3729    }
    3830
    3931    function mo_openid_get_access_token()
    4032    {
    41         $dirs = explode('&', $_SERVER['REQUEST_URI']);
    42         $oauth_verifier = explode('=', $dirs[1]);
    43         $twitter_oauth_token = explode('=', $dirs[0]);
    44 
     33        $code = mo_openid_validate_code();
    4534        $social_app_redirect_uri = get_social_app_redirect_uri('twitter');
    46 
    4735        $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    4836        $client_id = $appslist['twitter']['clientid'];
    4937        $client_secret = $appslist['twitter']['clientsecret'];
    50         $twitter_getaccesstoken_object = new Mo_Openid_Twitter_OAuth($client_id,$client_secret);
    51         $oauth_token = $twitter_getaccesstoken_object->mo_twitter_get_access_token($oauth_verifier[1],$twitter_oauth_token[1]);
     38        $access_token_uri = 'https://api.twitter.com/2/oauth2/token';
     39        $postData = 'grant_type=authorization_code&client_id='. $client_id . '&code=' . $code . '&redirect_uri=' . $social_app_redirect_uri.'&code_verifier=challenge&code_challenge_method=plain';
    5240
    53         $oauth_token_array = explode('&', $oauth_token);
    54         $oauth_access_token = isset($oauth_token_array[0]) ? $oauth_token_array[0] : null;
    55         $oauth_access_token = explode('=', $oauth_access_token);
    56         $oauth_token_secret = isset($oauth_token_array[1]) ? $oauth_token_array[1] : null;
    57         $oauth_token_secret = explode('=', $oauth_token_secret);
    58         $screen_name = isset($oauth_token_array[3]) ? $oauth_token_array[3] : null;
    59         $screen_name = explode('=', $screen_name);
     41        $token = base64_encode($client_id.":".$client_secret);
     42        $ch = curl_init();
    6043
    61         $twitter_get_profile_signature_object = new Mo_Openid_Twitter_OAuth($client_id,$client_secret);
    62         $oauth_access_token1 =     isset($oauth_access_token[1]) ? $oauth_access_token[1] : '';
    63         $oauth_token_secret1 =    isset($oauth_token_secret[1]) ? $oauth_token_secret[1] : '';
    64         $screen_name1    =   isset($screen_name[1]) ? $screen_name[1] : '';
    65         $profile_json_output = $twitter_get_profile_signature_object->mo_twitter_get_profile_signature($oauth_access_token1,$oauth_token_secret1,$screen_name1);
     44        $postRequest = array(
     45            'client_id' => $client_id,
     46            'client_secret' => $client_secret,
     47            'grant_type' => 'authorization_code',
     48            'redirect_uri' => $social_app_redirect_uri,
     49            'code' => $code,
     50            'code_verifier' => 'challenge',
     51            'code_challenge_method' => 'plain'
     52        );
     53
     54        curl_setopt($ch, CURLOPT_URL, 'https://api.twitter.com/2/oauth2/token');
     55        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postRequest));
     56        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     57        curl_setopt($ch, CURLOPT_POST, 1);
     58
     59        $headers = array();
     60        $headers[] = 'Content-Type: application/x-www-form-urlencoded';
     61        $headers[] = "Authorization: Basic " . $token;
     62        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
     63
     64        $access_token_json_output = json_decode(curl_exec($ch),true);
     65        if (curl_errno($ch)) {
     66            echo 'Error:' . esc_attr(curl_error($ch));
     67        }
     68        curl_close($ch);
     69
     70        $access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
     71
     72
    6673
    6774        mo_openid_start_session();
     75
     76        $profile_url = 'https://api.twitter.com/2/users/me';
     77
     78        $profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'twitter');
     79
    6880        //Test Configuration
    6981        if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
     
    7587        $location_city = $location_country = $about_me = $company_name = $age = $gender = $friend_nos = '';
    7688
    77         if (isset($profile_json_output['name'])) {
    78             $full_name = explode(" ", $profile_json_output['name']);
     89        if(isset($profile_json_output["data"]['name'])){
     90            $user_name = isset( $profile_json_output["data"]['name']) ?  $profile_json_output["data"]['name'] : '';
     91            $full_name = explode(" ", $user_name);
    7992            $first_name = isset( $full_name[0]) ?  $full_name[0] : '';
    8093            $last_name = isset( $full_name[1]) ?  $full_name[1] : '';
    8194        }
    82         $user_name = isset( $profile_json_output['screen_name']) ?  $profile_json_output['screen_name'] : '';
    83         $email = isset( $profile_json_output['email']) ?  $profile_json_output['email'] : '';
    84         $user_url = isset( $profile_json_output['url']) ?  $profile_json_output['url'] : '';
    85         $user_picture = isset( $profile_json_output['profile_image_url']) ?  $profile_json_output['profile_image_url'] : '';
    86         $social_user_id = isset( $profile_json_output['id_str']) ?  $profile_json_output['id_str'] : '';
    87         $location_city =  isset( $profile_json_output['location']) ?  $profile_json_output['location'] : '';
    88         $location_country =  isset( $profile_json_output['location']['country']) ?  $profile_json_output['location'] : '';
    89         $about_me = isset( $profile_json_output['description']) ?  $profile_json_output['description'] : '';
    90         $friend_nos= isset( $profile_json_output['friends_count']) ?  $profile_json_output['friends_count'] : '';
    91         $website= isset( $profile_json_output['entities']['url']['urls']['0']['expanded_url']) ?  $profile_json_output['entities']['url']['urls']['0']['expanded_url'] : '';
     95        $email = isset( $profile_json_output["data"]['email']) ?  $profile_json_output["data"]['email'] : '';
     96        $social_user_id = isset( $profile_json_output["data"]['id']) ?  $profile_json_output["data"]['id'] : '';
    9297
    9398        $appuserdetails = array(
     
    107112            'age' => $age,
    108113        );
     114
    109115        return $appuserdetails;
    110116    }
    111 
    112117}
    113 
    114 class Mo_Openid_Twitter_OAuth
    115 {
    116     var $key = '';
    117     var $secret = '';
    118 
    119     var $request_token = "https://twitter.com/oauth/request_token";
    120     var $access_token  = "https://twitter.com/oauth/access_token";
    121     var $profile       = "https://api.twitter.com/1.1/account/verify_credentials.json";
    122 
    123     function __construct($client_key,$client_secret)
    124     {
    125         $this->key = $client_key; // consumer key from twitter
    126         $this->secret = $client_secret; // secret from twitter
    127     }
    128 
    129     function mo_twitter_get_request_token()
    130     {
    131         // Default params
    132         $params = array(
    133             "oauth_version" => "1.0",
    134             "oauth_nonce" => time(),
    135             "oauth_timestamp" => time(),
    136             "oauth_consumer_key" => $this->key,
    137             "oauth_signature_method" => "HMAC-SHA1"
    138         );
    139 
    140         // BUILD SIGNATURE
    141         // encode params keys, values, join and then sort.
    142         $keys = $this->mo_twitter_url_encode_rfc3986(array_keys($params));
    143         $values = $this->mo_twitter_url_encode_rfc3986(array_values($params));
    144         $params = array_combine($keys, $values);
    145         uksort($params, 'strcmp');
    146 
    147         // convert params to string
    148         foreach ($params as $k => $v) {
    149             $pairs[] = $this->mo_twitter_url_encode_rfc3986($k).'='.$this->mo_twitter_url_encode_rfc3986($v);
    150         }
    151         $concatenatedParams = implode('&', $pairs);
    152 
    153         // form base string (first key)
    154         $baseString= "GET&".$this->mo_twitter_url_encode_rfc3986($this->request_token)."&".$this->mo_twitter_url_encode_rfc3986($concatenatedParams);
    155         // form secret (second key)
    156         $secret = $this->mo_twitter_url_encode_rfc3986($this->secret)."&";
    157         // make signature and append to params
    158         $params['oauth_signature'] = $this->mo_twitter_url_encode_rfc3986(base64_encode(hash_hmac('sha1', $baseString, $secret, TRUE)));
    159 
    160         // BUILD URL
    161         // Resort
    162         uksort($params, 'strcmp');
    163         // convert params to string
    164         foreach ($params as $k => $v) {$urlPairs[] = $k."=".$v;}
    165         $concatenatedUrlParams = implode('&', $urlPairs);
    166         // form url
    167         $url = $this->request_token."?".$concatenatedUrlParams;
    168 
    169         // Send to cURL
    170         return $this->mo_twitter_http($url);
    171     }
    172 
    173     function mo_twitter_get_access_token($oauth_verifier,$twitter_oauth_token)
    174     {
    175         $params = array(
    176             "oauth_version" => "1.0",
    177             "oauth_nonce" => time(),
    178             "oauth_timestamp" => time(),
    179             "oauth_consumer_key" => $this->key,
    180             "oauth_token" => $twitter_oauth_token,
    181             "oauth_signature_method" => "HMAC-SHA1"
    182         );
    183 
    184         $keys = $this->mo_twitter_url_encode_rfc3986(array_keys($params));
    185         $values = $this->mo_twitter_url_encode_rfc3986(array_values($params));
    186         $params = array_combine($keys, $values);
    187         uksort($params, 'strcmp');
    188 
    189         foreach ($params as $k => $v) {
    190             $pairs[] = $this->mo_twitter_url_encode_rfc3986($k).'='.$this->mo_twitter_url_encode_rfc3986($v);
    191         }
    192         $concatenatedParams = implode('&', $pairs);
    193 
    194         $baseString= "GET&".$this->mo_twitter_url_encode_rfc3986($this->access_token)."&".$this->mo_twitter_url_encode_rfc3986($concatenatedParams);
    195         $secret = $this->mo_twitter_url_encode_rfc3986($this->secret)."&";
    196         $params['oauth_signature'] = $this->mo_twitter_url_encode_rfc3986(base64_encode(hash_hmac('sha1', $baseString, $secret, TRUE)));
    197 
    198         uksort($params, 'strcmp');
    199         foreach ($params as $k => $v) {$urlPairs[] = $k."=".$v;}
    200         $concatenatedUrlParams = implode('&', $urlPairs);
    201         $url = $this->access_token."?".$concatenatedUrlParams;
    202         $postData = 'oauth_verifier=' .$oauth_verifier;
    203 
    204         return $this->mo_twitter_http($url,$postData);
    205     }
    206 
    207     function mo_twitter_get_profile_signature($oauth_token,$oauth_token_secret,$screen_name)
    208     {
    209         $params = array(
    210             "oauth_version" => "1.0",
    211             "oauth_nonce" => time(),
    212             "oauth_timestamp" => time(),
    213             "oauth_consumer_key" => $this->key,
    214             "oauth_token" => $oauth_token,
    215             "oauth_signature_method" => "HMAC-SHA1",
    216             "screen_name" => $screen_name,
    217             "include_email" => "true"
    218         );
    219 
    220         $keys = $this->mo_twitter_url_encode_rfc3986(array_keys($params));
    221         $values = $this->mo_twitter_url_encode_rfc3986(array_values($params));
    222         $params = array_combine($keys, $values);
    223         uksort($params, 'strcmp');
    224 
    225         foreach ($params as $k => $v) {
    226             $pairs[] = $this->mo_twitter_url_encode_rfc3986($k).'='.$this->mo_twitter_url_encode_rfc3986($v);
    227         }
    228         $concatenatedParams = implode('&', $pairs);
    229 
    230         $baseString= "GET&".$this->mo_twitter_url_encode_rfc3986($this->profile)."&".$this->mo_twitter_url_encode_rfc3986($concatenatedParams);
    231 
    232         $secret = $this->mo_twitter_url_encode_rfc3986($this->secret)."&". $this->mo_twitter_url_encode_rfc3986($oauth_token_secret);
    233         $params['oauth_signature'] = $this->mo_twitter_url_encode_rfc3986(base64_encode(hash_hmac('sha1', $baseString, $secret, TRUE)));
    234 
    235         uksort($params, 'strcmp');
    236         foreach ($params as $k => $v) {$urlPairs[] = $k."=".$v;}
    237         $concatenatedUrlParams = implode('&', $urlPairs);
    238         $url = $this->profile."?".$concatenatedUrlParams;
    239 
    240         $args = array();
    241 
    242         $get_response = wp_remote_get($url,$args);
    243 
    244         $profile_json_output = json_decode($get_response['body'], true);
    245 
    246         return  $profile_json_output;
    247     }
    248 
    249     function mo_twitter_http($url, $post_data = null)
    250     {
    251 
    252         if(isset($post_data))
    253         {
    254 
    255             $args = array(
    256                 'method' => 'POST',
    257                 'body' => $post_data,
    258                 'timeout' => '5',
    259                 'redirection' => '5',
    260                 'httpversion' => '1.0',
    261                 'blocking' => true
    262             );
    263 
    264             $post_response = wp_remote_post($url,$args);
    265 
    266             return $post_response['body'];
    267 
    268         }
    269         $args = array();
    270 
    271         $get_response = wp_remote_get($url,$args);
    272         $response =  $get_response['body'];
    273         mo_openid_start_session();
    274 
    275         $dirs = explode('&', $response);
    276         $dirs1 = explode('=', $dirs[0]);
    277         return $dirs1[1];
    278 
    279     }
    280 
    281     function mo_twitter_url_encode_rfc3986($input)
    282     {
    283         if (is_array($input)) {
    284             return array_map(array('Mo_Openid_Twitter_OAuth', 'mo_twitter_url_encode_rfc3986'), $input);
    285         }
    286         else if (is_scalar($input)) {
    287             return str_replace('+',' ',str_replace('%7E', '~', rawurlencode($input)));
    288         }
    289         else{
    290             return '';
    291         }
    292     }
    293 }
  • miniorange-login-openid/trunk/social_apps/windowslive.php

    r2560192 r2853010  
    1313        if (get_option('permalink_structure') !== "") {
    1414            $this->site_url = get_option('siteurl');
    15             $this->instructions = "Go to <a href=\"https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/\" target=\"_blank\">https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade</a> and sign in with your Microsoft azure account.##Click on <b>New Registration tab</b>.##Name your new app and select Accounts in any organizational directory as supported accounts types . click on <b>Register</b>.##Click on <strong>Authentication</strong> from left side menu.  ##Enter <b><code id='12'>" . mo_get_permalink('windowslive') . "</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#12', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> as Redirect URL.<strong>Copy the Client ID from the Overview tab.</strong>. This is your <b>Client ID </b>.##Go to Certificates and Security tab.##Click on <b>New Client Sceret</b>. Copy your password. This is your <b>Client Secret</b>.##Scroll down to <strong>Advanced Options</strong> and make sure <strong>Live SDK support</strong> is checked.##Click on the Save button.##Copy the client ID and client secret to your clipboard, as you will need them to configure above. ##Click on the Save settings button.##Go to Social Login tab to configure the display as well as other login settings.";
     15            $this->instructions = "Go to <a href=\"https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/\" target=\"_blank\">https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade</a> and sign in with your Microsoft azure account.##Click on <b>New Registration tab</b>.##Name your new app and select <b>Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
     16</b> as supported accounts types . ##Enter <b><code id='12'>" . mo_get_permalink('windowslive') . "</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#12', '#shortcode_url_copy')\"><span id=\"shortcode_url_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i></b> as Redirect URL.<strong> Click on <b>Register</b>.##Copy the Client ID from the Overview tab.</strong>. This is your <b>Client ID </b>.##Go to Certificates and Security tab.##Click on <b>New Client Sceret</b>. Copy your password. This is your <b>Client Secret</b>.##Click on the Save button.##Copy the client ID and client secret to your clipboard, as you will need them to configure above. ##Click on the Save settings button.##Go to Social Login tab to configure the display as well as other login settings.";
    1617        }else{
    1718        $this->instructions= "<strong style='color: red;font-weight: bold'><br>You have selected plain permalink and Windows Live doesnot support it.</strong><br><br> Please change the permalink to continue further.Follow the steps given below:<br>1. Go to settings from the left panel and select the permalinks option.<br>2. Plain permalink is selected ,so please select any other permalink and click on save button.<br> <strong class='mo_openid_note_style' style='color: red;font-weight: bold'> When you will change the permalink ,then you have to re-configure the already set up custom apps because that will change the redirect URL.</strong>";
  • miniorange-login-openid/trunk/view/add_on/custom_registration_form.php

    r2788668 r2853010  
    77            <tr>
    88                <td >
    9                     <h3><?php echo mo_sl('Custom Registration Form');?>
    10                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     9                    <h3><?php echo esc_attr(mo_sl('Custom Registration Form'));?>
     10                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1111                               onclick="mosocial_addonform('wp_social_login_extra_attributes_addon')"
    1212                               id="mosocial_purchase_cust_addon"
    1313                               class="button button-primary button-large"
    1414                               style="float: right; margin-left: 10px;">
    15                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     15                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1616                               id="mosocial_purchase_cust_addon_verify"
    1717                               class="button button-primary button-large"
     
    1919
    2020                    </h3>
    21                     <b><?php echo mo_sl('The miniOrange Custom Registration Form Add-On allows you to obtain additional information from your customers. You can build your own custom form with as many fields as you want, even those returned by social sites, and the user will be redirected to it after a successful registration form social login. The meta table will save all of the details entered by the user.');?>.</b>
     21                    <b><?php echo esc_attr(mo_sl('The miniOrange Custom Registration Form Add-On allows you to obtain additional information from your customers. You can build your own custom form with as many fields as you want, even those returned by social sites, and the user will be redirected to it after a successful registration form social login. The meta table will save all of the details entered by the user.'));?>.</b>
    2222                </td>
    2323            </tr>
     
    4242                    <div class="mo_openid_table_layout"><br/>
    4343                        <form method="post">
    44                             <h3><?php echo mo_sl('Customization Fields');?></h3>
     44                            <h3><?php echo esc_attr(mo_sl('Customization Fields'));?></h3>
    4545                            <input type="checkbox" disabled="disabled" id="customised_field_enable"
    4646                                   value="1" checked
    47                             <b><?php echo mo_sl('Enable Auto Field Registration Form');?></b>
     47                            <b><?php echo esc_attr(mo_sl('Enable Auto Field Registration Form'));?></b>
    4848
    4949                            <style>
     
    6767                            <table id="custom_field" style="width:100%; text-align: center;" class="table mo_openid_mywatermark">
    6868                                <div id="myCheck">
    69                                     <h4><?php echo mo_sl('Registration page link');?> <input type="text" name="profile_completion_page"
     69                                    <h4><?php echo esc_attr(mo_sl('Registration page link'));?> <input type="text" name="profile_completion_page"
    7070                                                                      style="width: 350px" disabled="disabled"
    71                                                                       value="<?php echo get_option('profile_completion_page'); ?>"
     71                                                                      value="<?php echo esc_attr(get_option('profile_completion_page')); ?>"
    7272                                                                      required/></h4>
    7373                                    <thead>
    7474                                    <tr>
    75                                         <th><?php echo mo_sl('Existing Field');?></th>
    76                                         <th><?php echo mo_sl('Field');?></th>
    77                                         <th><?php echo mo_sl('Custom name');?></th>
    78                                         <th><?php echo mo_sl('Field Type');?></th>
    79                                         <th><?php echo mo_sl('Field Options');?></th>
    80                                         <th><?php echo mo_sl('Required Field');?></th>
     75                                        <th><?php echo esc_attr(mo_sl('Existing Field'));?></th>
     76                                        <th><?php echo esc_attr(mo_sl('Field'));?></th>
     77                                        <th><?php echo esc_attr(mo_sl('Custom name'));?></th>
     78                                        <th><?php echo esc_attr(mo_sl('Field Type'));?></th>
     79                                        <th><?php echo esc_attr(mo_sl('Field Options'));?></th>
     80                                        <th><?php echo esc_attr(mo_sl('Required Field'));?></th>
    8181                                        <th></th>
    8282                                    </tr>
     
    9090                                                                           onchange="myFunction('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
    9191                                                                           style="width:80%">
    92                                                 <option value=""><?php echo mo_sl('Select Field');?></option>
     92                                                <option value=""><?php echo esc_attr(mo_sl('Select Field'));?></option>
    9393                                            </select></td>
    9494                                        <td style="width: 15%"><br><input type="text" id="opt_field_1_name" disabled="disabled"
     
    9898                                                                           onchange="myFunction2('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
    9999                                                                           style="width:80%">
    100                                                 <option value="default"><?php echo mo_sl('Select Type');?></option>
     100                                                <option value="default"><?php echo esc_attr(mo_sl('Select Type'));?></option>
    101101                                            </select></td>
    102102                                        <td style="width: 20%"><br><input type="text" id="additional_field_1_value" disabled="disabled"
     
    105105                                        <td style="width: 10%"><br><select name="mo_openid_custom_field_1_Required" disabled="disabled"
    106106                                                                           style="width:57%">
    107                                                 <option value="no"><?php echo mo_sl('No');?></option>
     107                                                <option value="no"><?php echo esc_attr(mo_sl('No'));?></option>
    108108                                            </select></td>
    109109                                        <td style="width: 10%"><br><input type="button" disabled="disabled"
     
    120120                                               value="Save"
    121121                                               class="button button-primary button-large"/>
    122                                         &nbsp &nbsp <a class="button button-primary button-large" disabled="disabled"><?php echo mo_sl('Cancel');?></a>
     122                                        &nbsp &nbsp <a class="button button-primary button-large" disabled="disabled"><?php echo esc_attr(mo_sl('Cancel'));?></a>
    123123                                    </td>
    124124                                </tr>
    125125                                <tr>
    126126                                    <td align="left" colspan="7">
    127                                         <h3><?php echo mo_sl('Instructions to setup');?>:</h3>
     127                                        <h3><?php echo esc_attr(mo_sl('Instructions to setup'));?>:</h3>
    128128                                        <p>
    129129                                        <ol>
    130                                             <li> <?php echo mo_sl('Create a page and use shortcode');?> <b>[miniorange_social_custom_fields]</b>
    131                                                 <?php echo mo_sl('where you want your form to be displayed');?>.
    132                                             </li>
    133                                             <li><?php echo mo_sl( 'Copy the page link and paste it in the above field <b>Registration page
    134                                                     link');?></b>.
    135                                             </li>
    136                                             <li><?php echo mo_sl( "If you have any existing wp_usermeta field then enter that field's name in");?>
    137                                                 <b><?php echo mo_sl('Existing
    138                                                     Field');?></b> <?php echo mo_sl('column. For example, if you are saving');?> <b><?php echo mo_sl('First Name');?></b> <?php echo mo_sl('as');?>
    139                                                 <b><?php echo mo_sl('fname');?></b>
    140                                                 <?php echo mo_sl('in wp_usermeta field then enter <b>fname</b> in <b>Existing Field</b>
    141                                                 column.');?>
    142                                             </li>
    143                                             <li> <?php echo mo_sl('Select field name under the ');?><b><?php echo mo_sl('Field');?></b> <?php echo mo_sl('dropdown');?>.</li>
    144                                             <li> <?php echo mo_sl('If selected field is other than custom, then');?> <b><?php echo mo_sl('Field Type');?></b> <?php echo mo_sl('will
    145                                                 automatically be');?> <b><?php echo mo_sl('Textbox');?></b> <?php echo mo_sl('and there is no need to enter');?> <b><?php echo mo_sl('Custom
    146                                                     name');?></b> <?php echo mo_sl('and');?> <b><?php echo mo_sl('Field options');?></b>.
    147                                             </li>
    148                                             <li> <?php echo mo_sl('If selected field is custom, then enter');?> <b><?php echo mo_sl('Custom name');?></b>.</li>
    149                                             <li> <?php echo mo_sl('Select');?> <b><?php echo mo_sl('Field Type');?></b>, <?php echo mo_sl('if selected');?> <b><?php echo mo_sl('Field Type');?></b> <?php echo mo_sl('is');?>
    150                                                 <b><?php echo mo_sl('Checkbox');?></b><?php echo mo_sl( 'or');?> <b><?php echo mo_sl('Dropdown');?></b> <?php ('then enter the desire options in');?> <b><?php echo mo_sl('Field
    151                                                     Options');?></b> <?php echo mo_sl('seprated by semicolon ');?><b>;</b>'<?php echo mo_sl( 'otherwise leave');?> <b><?php echo mo_sl('Field
    152                                                     Options');?></b> <?php echo mo_sl('blank.');?>
    153                                             </li>
    154                                             <li> <?php echo mo_sl('Select');?> <b><?php echo mo_sl('Required Field');?></b> <?php echo mo_sl('as');?> <b><?php echo mo_sl('Yes');?></b> <?php echo mo_sl('if you want to make that field
    155                                                 compulsory for user');?>.
    156                                             </li>
    157                                             <li> <?php echo mo_sl('If you want to add more than 1 fields at a time click on');?> <b>"+"</b>.</li>
    158                                             <li> <?php echo mo_sl('Last click on');?> <b><?php echo mo_sl('Save');?></b> <?php echo mo_sl('button');?>.</li>
     130                                            <li> <?php echo esc_attr(mo_sl('Create a page and use shortcode'));?> <b>[miniorange_social_custom_fields]</b>
     131                                                <?php echo esc_attr(mo_sl('where you want your form to be displayed'));?>.
     132                                            </li>
     133                                            <li><?php echo esc_attr(mo_sl( 'Copy the page link and paste it in the above field <b>Registration page
     134                                                    link'));?></b>.
     135                                            </li>
     136                                            <li><?php echo esc_attr(mo_sl( "If you have any existing wp_usermeta field then enter that field's name in"));?>
     137                                                <b><?php echo esc_attr(mo_sl('Existing
     138                                                    Field'));?></b> <?php echo esc_attr(mo_sl('column. For example, if you are saving'));?> <b><?php echo esc_attr(mo_sl('First Name'));?></b> <?php echo esc_attr(mo_sl('as'));?>
     139                                                <b><?php echo esc_attr(mo_sl('fname'));?></b>
     140                                                <?php echo esc_attr(mo_sl('in wp_usermeta field then enter <b>fname</b> in <b>Existing Field</b>
     141                                                column.'));?>
     142                                            </li>
     143                                            <li> <?php echo esc_attr(mo_sl('Select field name under the '));?><b><?php echo esc_attr(mo_sl('Field'));?></b> <?php echo esc_attr(mo_sl('dropdown'));?>.</li>
     144                                            <li> <?php echo esc_attr(mo_sl('If selected field is other than custom, then'));?> <b><?php echo esc_attr(mo_sl('Field Type'));?></b> <?php echo esc_attr(mo_sl('will
     145                                                automatically be'));?> <b><?php echo esc_attr(mo_sl('Textbox'));?></b> <?php echo esc_attr(mo_sl('and there is no need to enter'));?> <b><?php echo esc_attr(mo_sl('Custom
     146                                                    name'));?></b> <?php echo esc_attr(mo_sl('and'));?> <b><?php echo esc_attr(mo_sl('Field options'));?></b>.
     147                                            </li>
     148                                            <li> <?php echo esc_attr(mo_sl('If selected field is custom, then enter'));?> <b><?php echo esc_attr(mo_sl('Custom name'));?></b>.</li>
     149                                            <li> <?php echo esc_attr(mo_sl('Select'));?> <b><?php echo esc_attr(mo_sl('Field Type'));?></b>, <?php echo esc_attr(mo_sl('if selected'));?> <b><?php echo esc_attr(mo_sl('Field Type'));?></b> <?php echo esc_attr(mo_sl('is'));?>
     150                                                <b><?php echo esc_attr(mo_sl('Checkbox'));?></b><?php echo esc_attr(mo_sl( 'or'));?> <b><?php echo esc_attr(mo_sl('Dropdown'));?></b> <?php ('then enter the desire options in');?> <b><?php echo esc_attr(mo_sl('Field
     151                                                    Options'));?></b> <?php echo esc_attr(mo_sl('seprated by semicolon '));?><b>;</b>'<?php echo esc_attr(mo_sl( 'otherwise leave'));?> <b><?php echo esc_attr(mo_sl('Field
     152                                                    Options'));?></b> <?php echo esc_attr(mo_sl('blank.'));?>
     153                                            </li>
     154                                            <li> <?php echo esc_attr(mo_sl('Select'));?> <b><?php echo esc_attr(mo_sl('Required Field'));?></b> <?php echo esc_attr(mo_sl('as'));?> <b><?php echo esc_attr(mo_sl('Yes'));?></b> <?php echo esc_attr(mo_sl('if you want to make that field
     155                                                compulsory for user'));?>.
     156                                            </li>
     157                                            <li> <?php echo esc_attr(mo_sl('If you want to add more than 1 fields at a time click on'));?> <b>"+"</b>.</li>
     158                                            <li> <?php echo esc_attr(mo_sl('Last click on'));?> <b><?php echo esc_attr(mo_sl('Save'));?></b> <?php echo esc_attr(mo_sl('button'));?>.</li>
    159159                                        </ol>
    160160                                        </p>
     
    171171    </div>
    172172    <td>
    173         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     173        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    174174              target="_blank" method="post" >
    175175            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    185185    </td>
    186186    <td>
    187         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    188187        <script type="text/javascript">
    189188            //to set heading name
    190             jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Login Add On'); ?>');
     189            jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Social Login Add On')); ?>');
     190            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    191191            jQuery(document).ready(function($){
    192192                jQuery("#mosocial_purchase_cust_addon_verify").on("click",function(){
    193193                    jQuery.ajax({
    194                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     194                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    195195                        method: "POST", //request type,
    196196                        dataType: 'json',
    197197                        data: {
    198198                            action: 'mo_register_customer_toggle_update',
     199                            'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    199200                        },
    200201                        success: function (result){
     
    204205                            else{
    205206                                alert("Please register/login with miniOrange to verify key and use the Custom Registration Form Add on");
    206                                 window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     207                                window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    207208                            }
    208209                        }
     
    212213
    213214            function mo_verify_add_on_license_key() {
    214                 var mo_openid_addon_verify_license_nonce = '<?php echo wp_create_nonce("mo-openid-addon-verify-license"); ?>';
    215 
     215                var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
    216216                jQuery.ajax({
    217217                    type: 'POST',
    218                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     218                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    219219                    data: {
    220220                        action:'verify_addon_licience',
    221221                        plan_name: 'extra_attributes_addon',
    222                         'mo_openid_addon_verify_license_nonce' : mo_openid_addon_verify_license_nonce,
     222                        'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    223223                    },
    224224                    crossDomain :!0, dataType:"html",
  • miniorange-login-openid/trunk/view/add_on/mo_buddypress_add_on.php

    r2533932 r2853010  
    77            <tr>
    88                <td >
    9                     <h3><?php echo mo_sl('Buddypress Add-on');?>
    10                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     9                    <h3><?php echo esc_attr(mo_sl('Buddypress Add-on'));?>
     10                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1111                               onclick="mosocial_addonform('wp_social_login_buddypress_addon')"
    1212                               id="mosocial_purchase_buddy_addon"
    1313                               class="button button-primary button-large"
    1414                               style="float: right; margin-left: 10px;">
    15                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     15                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1616                               id="mosocial_purchase_buddypress_addon_verify"
    1717                               class="button button-primary button-large"
    1818                               style="float: right;">
    1919                    </h3>
    20                     <b><?php echo mo_sl('With BuddyPress/BuddyBoss Integration you will get various social login display options using which you can display the Social Login icons on your BuddyPress registration pages.
    21 The BuddyPress integration with social login can be done using any Social login app. If you have BuddyPress Integration enabled then user information will be mapped to their profile page.');?></b>
     20                    <b><?php echo esc_attr(mo_sl('With BuddyPress/BuddyBoss Integration you will get various social login display options using which you can display the Social Login icons on your BuddyPress registration pages.
     21The BuddyPress integration with social login can be done using any Social login app. If you have BuddyPress Integration enabled then user information will be mapped to their profile page.'));?></b>
    2222                </td>
    2323            </tr>
     
    3939    <br><br>
    4040    <div class="mo_openid_highlight">
    41         <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('BuddyPress / BuddyBoss Display Option');?></h3>
     41        <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('BuddyPress / BuddyBoss Display Option'));?></h3>
    4242    </div>
    4343
     
    4848                        <input type="checkbox" id="bp_before_register_page" name="mo_openid_bp_before_register_page" <?php checked( get_option('mo_openid_bp_before_register_page') == 1 );?> />
    4949                        <div style="padding-left: 7%">
    50                             <?php echo mo_sl("Before registration form");?>
     50                            <?php echo esc_attr(mo_sl("Before registration form"));?>
    5151                        </div>
    5252                        <span class="mo_openid_checkbox_checkmark_disable"></span>
    5353                        <div class="mo_openid_wca_box">
    5454                            <br>
    55                             <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_before_reg.png'; ?>">
     55                            <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/bp_add/new_before_reg.png'; ?>">
    5656                        </div>
    5757                    </label>
     
    5959                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    6060                        <div style="padding-left: 7%; width: 60% !important">
    61                         <?php echo mo_sl("Before Account Details");?>
     61                        <?php echo esc_attr(mo_sl("Before Account Details"));?>
    6262                        </div>
    6363                        <input type="checkbox"  /><br>
    6464                        <span class="mo_openid_checkbox_checkmark_disable"></span>
    6565                        <div class="mo_openid_wca_box">
    66                             <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_before_account.png';?>">
     66                            <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/bp_add/new_before_account.png';?>">
    6767                        </div>
    6868                    </label>
     
    7272                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    7373                        <div style="padding-left: 7%">
    74                         <?php echo mo_sl("After Registration Form");?>
     74                        <?php echo esc_attr(mo_sl("After Registration Form"));?>
    7575                        </div>
    7676                        <input type="checkbox"  /><br>
    7777                        <span class="mo_openid_checkbox_checkmark_disable"></span>
    7878                        <div class="mo_openid_wca_box">
    79                             <img style="width: 79%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_after_reg.png';?>">
     79                            <img style="width: 79%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/bp_add/new_after_reg.png';?>">
    8080                        </div>
    8181                    </label>
     
    8383            </div>
    8484            <br>
    85             <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
     85            <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo esc_attr(mo_sl('Save'));?> "  class="button button-primary button-large" />
    8686            <br>
    8787        </form>
    8888        <br><br>
    8989        <div class="mo_openid_highlight">
    90         <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('BuddyPress Extended Mapping Attributes');?></h3>
     90        <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('BuddyPress Extended Mapping Attributes'));?></h3>
    9191    </div>
    9292        <form>
     
    154154                </td>
    155155                <td>
    156                     <input type="submit" name="submit" value="<?php echo mo_sl("Save settings");?>" class="button button-primary button-large" disabled />
    157                         <input type="button" name="back" onclick="goBack();" value="<?php echo mo_sl("Back");?>" class="button button-primary button-large" disabled/>
     156                    <input type="submit" name="submit" value="<?php echo esc_attr(mo_sl("Save settings"));?>" class="button button-primary button-large" disabled />
     157                        <input type="button" name="back" onclick="goBack();" value="<?php echo esc_attr(mo_sl("Back"));?>" class="button button-primary button-large" disabled/>
    158158                </td>
    159159            </tr>
     
    163163            <tr>
    164164                <div class="mo-openid-bp-addon-img">
    165                 <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>includes/images/bp_add/integrations.png">
     165                <img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__)))); ?>includes/images/bp_add/integrations.png">
    166166            </div>
    167167            </tr>
     
    177177
    178178    <td>
    179         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     179        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    180180              target="_blank" method="post" >
    181181            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    191191    </td>
    192192    <td>
    193         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    194193        <script type="text/javascript">
    195194            //to set heading name
    196             jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('BuddyPress Add On'); ?>');
     195            jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('BuddyPress Add On')); ?>');
     196            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    197197            jQuery(document).ready(function($){
    198198                jQuery("#mosocial_purchase_buddypress_addon_verify").on("click",function(){
    199199                    jQuery.ajax({
    200                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     200                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    201201                        method: "POST", //request type,
    202202                        dataType: 'json',
    203203                        data: {
    204204                            action: 'mo_register_customer_toggle_update',
     205                            'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    205206                        },
    206207                        success: function (result){
     
    210211                            else{
    211212                                alert("Please register/login with miniOrange to verify key and use the Custom Registration Form Add on");
    212                                 window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     213                                window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    213214                            }
    214215                        }
     
    218219
    219220            function mo_verify_add_on_license_key() {
    220 
     221                var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
    221222                jQuery.ajax({
    222223                    type: 'POST',
    223                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     224                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    224225                    data: {
    225226                        action:'verify_addon_licience',
    226227                        plan_name:'WP_SOCIAL_LOGIN_BUDDYPRESS_ADDON',
     228                        'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    227229                    },
    228230                    crossDomain :!0, dataType:"html",
  • miniorange-login-openid/trunk/view/add_on/mo_discord_add_on.php

    r2788668 r2853010  
    77            <tr>
    88                <td>
    9                     <h3><?php echo mo_sl('Discord Add On');?>
    10                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     9                    <h3><?php echo esc_attr(mo_sl('Discord Add On'));?>
     10                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1111                               onclick="mosocial_addonform('wp_social_login_discord_addon')"
    1212                               id="mosocial_purchase_dis"
    1313                               class="button button-primary button-large"
    1414                               style="float: right; margin-left: 10px;">
    15                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     15                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1616                               id="mosocial_purchase_dis_verify"
    1717                               class="button button-primary button-large"
     
    1919                    </h3>
    2020                    <br>
    21                     <b><?php echo mo_sl('Discord Integration add-on allows you to restrict the login/registration of user based on whether the user is present in the Discord server');?></b>
     21                    <b><?php echo esc_attr(mo_sl('Discord Integration add-on allows you to restrict the login/registration of user based on whether the user is present in the Discord server'));?></b>
    2222                </td>
    2323            </tr>
     
    3434   <br>
    3535    <div class="mo_openid_highlight">
    36         <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Discord Integration');?></h3>
     36        <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('Discord Integration'));?></h3>
    3737    </div>
    3838
     
    7272    </div>
    7373    <td>
    74         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     74        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    7575              target="_blank" method="post" >
    7676            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    8686    </td>
    8787    <td>
    88         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    8988        <script type="text/javascript">
    9089            //to set heading name
     
    9695
    9796            function mo_verify_add_on_license_key() {
    98                 var mo_openid_addon_verify_license_nonce = '<?php echo wp_create_nonce("mo-openid-addon-verify-license"); ?>';
    99                 jQuery.ajax({
     97                var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
     98                    jQuery.ajax({
    10099                    type: 'POST',
    101                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     100                    url: '<?php echo esc_url(admin_url("admin-ajax.php") ); ?>',
    102101                    data: {
    103102                        action:'verify_addon_licience',
    104103                        plan_name: 'WP_SOCIAL_LOGIN_DISCORD_ADDON',
    105                         'mo_openid_addon_verify_license_nonce' : mo_openid_addon_verify_license_nonce,
    106 
     104                        'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    107105                    },
    108106                    crossDomain :!0, dataType:"html",
     
    118116                    },
    119117                    error: function (data){}
    120                 });
     118                })
     119               ;
    121120            }
    122121        </script>
  • miniorange-login-openid/trunk/view/add_on/mo_hubspot_add_on.php

    r2788668 r2853010  
    77            <tr>
    88                <td >
    9                     <h3><?php echo mo_sl('Hubspot Add-on');?>
    10                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     9                    <h3><?php echo esc_attr(mo_sl('Hubspot Add-on'));?>
     10                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1111                               onclick="mosocial_addonform('wp_social_login_hubspot_addon')"
    1212                               id="mosocial_purchase_hub"
    1313                               class="button button-primary button-large"
    1414                               style="float: right; margin-left: 10px;">
    15                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     15                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1616                               id="mosocial_purchase_hub_verify"
    1717                               class="button button-primary button-large"
     
    1919                    </h3>
    2020                    <br>
    21                     <b><?php echo mo_sl('Hubspot Addon provide hubspot integration where user contact will be automatically added to hubspot contact list on successful registration via social login applications. With Hubspot integration, you can monitor a use\'s activities on your website. User behavior involves the sites viewed by the user as well as the time spent on each page.');?></b>
     21                    <b><?php echo esc_attr(mo_sl('Hubspot Addon provide hubspot integration where user contact will be automatically added to hubspot contact list on successful registration via social login applications. With Hubspot integration, you can monitor a use\'s activities on your website. User behavior involves the sites viewed by the user as well as the time spent on each page.'));?></b>
    2222                </td>
    2323            </tr>
     
    2828    <br>
    2929    <div class="mo_openid_highlight">
    30         <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Hubspot Integration');?></h3>
     30        <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('Hubspot Integration'));?></h3>
    3131    </div>
    3232    <p style="font-weight: bold; font-size: 17px; display: inline-block; margin-left: 1.5%">Enter the Key</p>
     
    4141        <table style="width: 100%;">
    4242            <tr id="sel_apps">
    43                 <td><h3 ><?php echo mo_sl('Select Social Apps');?> </h3>
     43                <td><h3 ><?php echo esc_attr(mo_sl('Select Social Apps'));?> </h3>
    4444                    <table style="width: 100%">
    45                         <p style="font-size: 17px;"><?php echo mo_sl('Select Social Login Application for Hubspot Integration');?></p>
     45                        <p style="font-size: 17px;"><?php echo esc_attr(mo_sl('Select Social Login Application for Hubspot Integration'));?></p>
    4646
    4747                        <tr>
    4848                            <td style="width:25%">
    49                                 <label class="mo_openid_checkbox_container"><b><?php echo mo_sl('Click Here To Enable All Apps');?></b>
     49                                <label class="mo_openid_checkbox_container"><b><?php echo esc_attr(mo_sl('Click Here To Enable All Apps'));?></b>
    5050                                    <input type="checkbox" class="app_enable"/>
    5151                                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    6464                            return false;
    6565                        }
    66                         $all_apps='facebook#google#vkontakte#twitter#linkedin#instagram#amazon#paypal#salesforce#yahoo#apple#hubspot#wordpress#disqus#pinterest#yandex#spotify#twitch#vimeo#kakao#discord#dribbble#flickr#line#meetup#stackexchange#snapchat#reddit#odnoklassniki#foursquare#naver#teamsnap#livejournal#github#tumblr#wiebo#wechat#renren#baidu#mailru#qq';
     66                        $all_apps='facebook#google#vkontakte#twitter#linkedin#amazon#paypal#salesforce#yahoo#apple#hubspot#wordpress#disqus#pinterest#yandex#spotify#twitch#vimeo#kakao#discord#dribbble#flickr#line#meetup#stackexchange#snapchat#reddit#odnoklassniki#foursquare#naver#teamsnap#livejournal#github#tumblr#wiebo#wechat#renren#baidu#mailru#qq';
    6767                        $all_apps=explode('#',$all_apps);
    6868                        $count=0;
     
    7878                            ?>
    7979                            <td style="width:20%">
    80                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl($apps);?>
     80                                <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl($apps));?>
    8181                                    <input type="checkbox" class="app_enable"/>
    8282                                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    9797        </table>
    9898        <center>
    99             <input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" disabled />
     99            <input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" disabled />
    100100        </center>
    101101    </div>
    102102    <td>
    103         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     103        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    104104              target="_blank" method="post" >
    105105            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    115115    </td>
    116116    <td>
    117         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    118117        <script type="text/javascript">
    119118            //to set heading name
     119            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    120120           jQuery(document).ready(function($){
    121121                jQuery("#mosocial_purchase_hub_verify").on("click",function(){
    122122                    jQuery.ajax({
    123                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     123                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    124124                        method: "POST", //request type,
    125125                        dataType: 'json',
    126126                        data: {
    127127                            action: 'mo_register_customer_toggle_update',
     128                            'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    128129                        },
    129130                        success: function (result){
     
    133134                            else{
    134135                                alert("Please register/login with miniOrange to verify key and use the Custom Registration Form Add on");
    135                                 window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     136                                window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    136137                            }
    137138                        }
     
    141142
    142143            function mo_verify_add_on_license_key() {
    143                 var mo_openid_addon_verify_license_nonce = '<?php echo wp_create_nonce("mo-openid-addon-verify-license"); ?>';
     144                var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
    144145                jQuery.ajax({
    145146                    type: 'POST',
    146                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     147                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    147148                    data: {
    148149                        action:'verify_addon_licience',
    149150                        plan_name: 'WP_SOCIAL_LOGIN_HUBSPOT_ADDON',
    150                         'mo_openid_addon_verify_license_nonce' : mo_openid_addon_verify_license_nonce,
     151                        'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    151152                    },
    152153                    crossDomain :!0, dataType:"html",
  • miniorange-login-openid/trunk/view/add_on/mo_mailchimp_add_on.php

    r2788668 r2853010  
    44    <script>
    55        //to set heading name
    6         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl("Mailchimp Add On");?>');
     6        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl("Mailchimp Add On"));?>');
    77    </script>
    88    <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
     
    1010            <tr>
    1111                <td>
    12                     <h3><?php echo mo_sl('MailChimp Add On');?>
    13                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     12                    <h3><?php echo esc_attr(mo_sl('MailChimp Add On'));?>
     13                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1414                               onclick="mosocial_addonform('wp_social_login_mailchimp_addon')"
    1515                               id="mosocial_purchase_mail_addon"
    1616                               class="button button-primary button-large"
    1717                               style="float: right; margin-left: 10px;">
    18                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     18                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1919                               id="mosocial_purchase_mail_addon_verify"
    2020                               class="button button-primary button-large"
    2121                               style="float: right;">
    2222                    </h3>
    23                     <b><?php echo mo_sl('MailChimp is a marketing platform that allows you to manage and communicate with your companies, consumers, and other interested parties in one place. When a user registers on your website, the user\'s first name, last name, and email address are sent to your mailchimp account\'s mailing list, and the user is identified as subscribed.');?>.</b>
     23                    <b><?php echo esc_attr(mo_sl('MailChimp is a marketing platform that allows you to manage and communicate with your companies, consumers, and other interested parties in one place. When a user registers on your website, the user\'s first name, last name, and email address are sent to your mailchimp account\'s mailing list, and the user is identified as subscribed.'));?>.</b>
    2424                </td>
    2525            </tr>
     
    3030        <form>
    3131            <table><tr><td>
    32                         <p><b><?php echo mo_sl("A user is added as a subscriber to a mailing list in MailChimp when that user registers using social login. First name, last name and email are also captured for that user in the Mailing List.</b></p>
     32                        <p><b><?php echo esc_attr(mo_sl("A user is added as a subscriber to a mailing list in MailChimp when that user registers using social login. First name, last name and email are also captured for that user in the Mailing List.</b></p>
    3333                        (List ID in MailChimp : Lists -> Select your List -> Settings -> List Name and Defaults -> List ID) <br>
    34                         (API Key in MailChimp : Profile -> Extras -> API Keys -> Your API Key");?> )<br><br>
    35                                 <b><?php echo mo_sl("List Id");?>:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" > <br><br>
    36                                 <b><?php echo mo_sl("API Key");?>: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" ><br><br>
    37                                 <label class="mo_openid_checkbox_container_disable"><strong><?php echo mo_sl("User's Choice");?></strong>
     34                        (API Key in MailChimp : Profile -> Extras -> API Keys -> Your API Key"));?> )<br><br>
     35                                <b><?php echo esc_attr(mo_sl("List Id"));?>:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" > <br><br>
     36                                <b><?php echo esc_attr(mo_sl("API Key"));?>: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" ><br><br>
     37                                <label class="mo_openid_checkbox_container_disable"><strong><?php echo esc_attr(mo_sl("User's Choice"));?></strong>
    3838                                    <input type="checkbox" />
    3939                                    <span class="mo_openid_checkbox_checkmark"></span>
    4040                                </label>
    41                                 <strong><?php echo mo_sl("Ask user for permission to be added in MailChimp Subscriber list");?> </strong>
    42                                 <br><?php echo mo_sl("(If unchecked, user will get subscribed during registration.)");?>
     41                                <strong><?php echo esc_attr(mo_sl("Ask user for permission to be added in MailChimp Subscriber list"));?> </strong>
     42                                <br><?php echo esc_attr(mo_sl("(If unchecked, user will get subscribed during registration.)"));?>
    4343                                <br><h3 style="float: left">Edit MailChimp subscription form </h3>
    44                                 <img src="<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/demo_mailchimp.png">
     44                                <img src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/demo_mailchimp.png">
    4545                                <br><br>
    46                                 <b><?php echo mo_sl("Click on Download button to get a list of emails of WordPress users registered on your site. You can import this file in MailChimp");?>.<br><br>
    47                                     <input type="submit" value="<?php echo mo_sl("Save");?> " disabled="disabled"  class="button button-primary button-large" />
     46                                <b><?php echo esc_attr(mo_sl("Click on Download button to get a list of emails of WordPress users registered on your site. You can import this file in MailChimp"));?>.<br><br>
     47                                    <input type="submit" value="<?php echo esc_attr(mo_sl("Save"));?> " disabled="disabled"  class="button button-primary button-large" />
    4848                                    <a style="width:190px;" disabled="disabled" class="button button-primary button-large" href="#">
    49                                         <?php echo mo_sl("Download emails of users");?>
     49                                        <?php echo esc_attr(mo_sl("Download emails of users"));?>
    5050                                    </a><br>
    5151                    </td></tr></table>
    5252        </form>
    5353    </div>
    54     <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     54    <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' ) ). '/moas/login'; ?>"
    5555          target="_blank" method="post" >
    5656        <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    6464        }
    6565    </script>
    66     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    6766    <script type="text/javascript">
     67        var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    6868        jQuery(document).ready(function($){
    6969            jQuery("#mosocial_purchase_mail_addon_verify").on("click",function(){
    7070                jQuery.ajax({
    71                     url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     71                    url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    7272                    method: "POST", //request type,
    7373                    dataType: 'json',
    7474                    data: {
    7575                        action: 'mo_register_customer_toggle_update',
     76                        'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    7677                    },
    7778                    success: function (result){
     
    8182                        else{
    8283                            alert("Please register/login with miniOrange to verify key and use the Custom Registration Form Add on");
    83                             window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     84                            window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    8485                        }
    8586                    }
     
    8990
    9091        function mo_verify_add_on_license_key() {
    91             var mo_openid_addon_verify_license_nonce = '<?php echo wp_create_nonce("mo-openid-addon-verify-license"); ?>';
     92            var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
    9293            jQuery.ajax({
    9394                type: 'POST',
    94                 url: '<?php echo admin_url("admin-ajax.php"); ?>',
     95                url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    9596                data: {
    9697                    action:'verify_addon_licience',
    9798                    plan_name: 'WP_SOCIAL_LOGIN_MAILCHIMP_ADDON',
    98                     'mo_openid_addon_verify_license_nonce' : mo_openid_addon_verify_license_nonce,
     99                    'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    99100                },
    100101                crossDomain :!0, dataType:"html",
  • miniorange-login-openid/trunk/view/add_on/mo_woocommerce_add_on.php

    r2533932 r2853010  
    77            <tr>
    88                <td >
    9                     <h3><?php echo mo_sl('Woocommerce Add On');?>
    10                         <input type="button" value="<?php echo mo_sl('Purchase');?>"
     9                    <h3><?php echo esc_attr(mo_sl('Woocommerce Add On'));?>
     10                        <input type="button" value="<?php echo esc_attr(mo_sl('Purchase'));?>"
    1111                               onclick="mosocial_addonform('wp_social_login_woocommerce_addon')"
    1212                               id="mosocial_purchase_wca"
    1313                               class="button button-primary button-large"
    1414                               style="float: right; margin-left: 10px;">
    15                         <input type="button" value="<?php echo mo_sl('Verify Key');?>"
     15                        <input type="button" value="<?php echo esc_attr(mo_sl('Verify Key'));?>"
    1616                               id="mosocial_purchase_wca_verify"
    1717                               class="button button-primary button-large"
    1818                               style="float: right;">
    1919                    </h3>
    20                     <b><?php echo mo_sl('With WooCommerce Integration you will get various social login display options using which you can display the Social Login icons on your WooCommerce login, registration, and checkout pages.
    21 You\'ll also have the option to sync Woocommerce checkout fields, which will pre-fill a user\'s billing information with their first name, last name, and email address.');?>.</b>
     20                    <b><?php echo esc_attr(mo_sl('With WooCommerce Integration you will get various social login display options using which you can display the Social Login icons on your WooCommerce login, registration, and checkout pages.
     21You\'ll also have the option to sync Woocommerce checkout fields, which will pre-fill a user\'s billing information with their first name, last name, and email address.'));?>.</b>
    2222                </td>
    2323            </tr>
     
    4141        <br>
    4242        <div class="mo_openid_highlight">
    43             <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Woocommerce Display Options');?></h3>
     43            <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('Woocommerce Display Options'));?></h3>
    4444        </div>
    4545        <br>
     
    5151                        <input type="checkbox" id="woocommerce_before_login_form" name="mo_openid_woocommerce_before_login_form" <?php checked( get_option('mo_openid_woocommerce_before_login_form') == 1 );?> />
    5252                        <div style="padding-left: 7%">
    53                             <?php echo mo_sl("Before WooCommerce Login Form");?>
    54                         </div>
    55                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    56                         <div class="mo_openid_wca_box">
    57                             <br>
    58                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/1_before_login.png'; ?>">
     53                            <?php echo esc_attr(mo_sl("Before WooCommerce Login Form"));?>
     54                        </div>
     55                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     56                        <div class="mo_openid_wca_box">
     57                            <br>
     58                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/1_before_login.png'; ?>">
    5959                        </div>
    6060                    </label>
     
    6363                        <input type="checkbox" id="woocommerce_center_login_form" name="mo_openid_woocommerce_center_login_form" <?php checked( get_option('mo_openid_woocommerce_center_login_form') == 1 );?> />
    6464                        <div style="padding-left: 7%">
    65                             <?php echo mo_sl("Before 'Remember Me' of WooCommerce Login Form");?>
    66                         </div>
    67                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    68                         <div class="mo_openid_wca_box">
    69                             <br>
    70                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/2_login.png';?>">
     65                            <?php echo esc_attr(mo_sl("Before 'Remember Me' of WooCommerce Login Form"));?>
     66                        </div>
     67                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     68                        <div class="mo_openid_wca_box">
     69                            <br>
     70                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/2_login.png';?>">
    7171                        </div>
    7272                    </label>
     
    7474                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    7575                        <div style="padding-left: 7%">
    76                         <?php echo mo_sl('After WooCommerce Login Form');?>
    77                         </div>
    78                         <input type="checkbox"  /><br>
    79                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    80                         <div class="mo_openid_wca_box">
    81                             <br>
    82                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/3_after_login.png';?>">
    83                         </div>
    84                     </label>
    85 
    86                     <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    87                         <div style="padding-left: 7%">
    88                         <?php echo mo_sl('Before WooCommerce Registration Form');?>
    89                         </div>
    90 
    91                         <input type="checkbox"  /><br>
    92                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    93                         <div class="mo_openid_wca_box">
    94                             <br>
    95                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/4_before_reg.png';?>">
     76                        <?php echo esc_attr(mo_sl('After WooCommerce Login Form'));?>
     77                        </div>
     78                        <input type="checkbox"  /><br>
     79                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     80                        <div class="mo_openid_wca_box">
     81                            <br>
     82                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/3_after_login.png';?>">
     83                        </div>
     84                    </label>
     85
     86                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     87                        <div style="padding-left: 7%">
     88                        <?php echo esc_attr(mo_sl('Before WooCommerce Registration Form'));?>
     89                        </div>
     90
     91                        <input type="checkbox"  /><br>
     92                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     93                        <div class="mo_openid_wca_box">
     94                            <br>
     95                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/4_before_reg.png';?>">
    9696                        </div>
    9797                    </label>
     
    100100                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    101101                        <div style="padding-left: 7%">
    102                         <?php echo mo_sl("Before 'Register button' of WooCommerce Registration Form");?>
    103                         </div>
    104                         <input type="checkbox"  /><br>
    105                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    106                         <div class="mo_openid_wca_box">
    107                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/5_in_reg.png';?>">
    108                         </div>
    109                     </label>
    110 
    111                     <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    112                         <div style="padding-left: 7%">
    113                         <?php echo mo_sl('After WooCommerce Registration Form');?>
    114                         </div>
    115                         <input type="checkbox"  /><br>
    116                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    117                         <div class="mo_openid_wca_box">
    118                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/6_after_reg.png';?>">
    119                         </div>
    120                     </label>
    121 
    122                     <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    123                         <div style="padding-left: 7%">
    124                         <?php echo mo_sl('Before WooCommerce Checkout Form');?>
    125                         </div>
    126                         <input type="checkbox"  /><br>
    127                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    128                         <div class="mo_openid_wca_box">
    129                             <br>
    130                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/7_before_checkout.png';?>">
    131                         </div>
    132                     </label>
    133 
    134                     <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    135                         <div style="padding-left: 7%">
    136                         <?php echo mo_sl('After WooCommerce Checkout Form');?>
    137                         </div>
    138                         <input type="checkbox"  /><br>
    139                         <span class="mo_openid_checkbox_checkmark_disable"></span>
    140                         <div class="mo_openid_wca_box">
    141                             <br>
    142                             <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/8_after_checkout.png';?>">
     102                        <?php echo esc_attr(mo_sl("Before 'Register button' of WooCommerce Registration Form"));?>
     103                        </div>
     104                        <input type="checkbox"  /><br>
     105                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     106                        <div class="mo_openid_wca_box">
     107                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/5_in_reg.png';?>">
     108                        </div>
     109                    </label>
     110
     111                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     112                        <div style="padding-left: 7%">
     113                        <?php echo esc_attr(mo_sl('After WooCommerce Registration Form'));?>
     114                        </div>
     115                        <input type="checkbox"  /><br>
     116                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     117                        <div class="mo_openid_wca_box">
     118                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/6_after_reg.png';?>">
     119                        </div>
     120                    </label>
     121
     122                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     123                        <div style="padding-left: 7%">
     124                        <?php echo esc_attr(mo_sl('Before WooCommerce Checkout Form'));?>
     125                        </div>
     126                        <input type="checkbox"  /><br>
     127                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     128                        <div class="mo_openid_wca_box">
     129                            <br>
     130                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/7_before_checkout.png';?>">
     131                        </div>
     132                    </label>
     133
     134                    <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     135                        <div style="padding-left: 7%">
     136                        <?php echo esc_attr(mo_sl('After WooCommerce Checkout Form'));?>
     137                        </div>
     138                        <input type="checkbox"  /><br>
     139                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     140                        <div class="mo_openid_wca_box">
     141                            <br>
     142                            <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__))) . 'includes/images/wca/8_after_checkout.png';?>">
    143143                        </div>
    144144                    </label>
     
    146146            </div>
    147147            <br>
    148             <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
     148            <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo esc_attr(mo_sl('Save'));?> "  class="button button-primary button-large" />
    149149            <br>
    150150        </form>
     
    155155            <br>
    156156            <div class="mo_openid_highlight">
    157                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Woocommerce Integration');?></h3>
     157                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('Woocommerce Integration'));?></h3>
    158158            </div>
    159159            <table id="woocommerce_integration"><tr><td>
    160                         <p><b><?php echo mo_sl('WooCommerce Integration pre-fills the first name, last name and email in Billing Details on the WooCommerce Checkout Page.');?></b></p>
    161                         <label class="mo_openid_checkbox_container_disable"><strong><?php echo mo_sl('Sync Woocommerce checkout fields');?></strong>
     160                        <p><b><?php echo esc_attr(mo_sl('WooCommerce Integration pre-fills the first name, last name and email in Billing Details on the WooCommerce Checkout Page.'));?></b></p>
     161                        <label class="mo_openid_checkbox_container_disable"><strong><?php echo esc_attr(mo_sl('Sync Woocommerce checkout fields'));?></strong>
    162162                            <input  type="checkbox"/>
    163163                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    165165
    166166                        <br>
    167                         <img class="mo_openid_wcai_images" src="<?php echo plugin_dir_url(dirname(__DIR__))  . 'includes/images/wca/wcai.png';?>">
     167                        <img class="mo_openid_wcai_images" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__)))  . 'includes/images/wca/wcai.png';?>">
    168168                        <br>
    169169
    170                         <input style="width: 126px;" disabled type="button" value="<?php echo mo_sl('Save');?>" class="button button-primary button-large" />
     170                        <input style="width: 126px;" disabled type="button" value="<?php echo esc_attr(mo_sl('Save'));?>" class="button button-primary button-large" />
    171171                        <br>
    172172
     
    179179    </div>
    180180    <td>
    181         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     181        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_attr(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    182182              target="_blank" method="post" >
    183183            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
     
    193193    </td>
    194194    <td>
    195         <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    196195        <script type="text/javascript">
    197196            //to set heading name
    198             jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Woocommerce Add On'); ?>');
     197            jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Woocommerce Add On')); ?>');
     198            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    199199            jQuery(document).ready(function($){
    200200                jQuery("#mosocial_purchase_wca_verify").on("click",function(){
    201201                    jQuery.ajax({
    202                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     202                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    203203                        method: "POST", //request type,
    204204                        dataType: 'json',
    205205                        data: {
    206206                            action: 'mo_register_customer_toggle_update',
     207                            'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    207208                        },
    208209                        success: function (result){
     
    212213                            else{
    213214                                alert("Please register/login with miniOrange to verify key and use the Custom Registration Form Add on");
    214                                 window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     215                                window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    215216                            }
    216217                        }
     
    220221
    221222            function mo_verify_add_on_license_key() {
     223                var mo_openid_verify_addon_license_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-verify-addon-license-nonce")); ?>';
    222224                jQuery.ajax({
    223225                    type: 'POST',
    224                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     226                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    225227                    data: {
    226228                        action:'verify_addon_licience',
    227229                        plan_name: 'WP_SOCIAL_LOGIN_WOOCOMMERCE_ADDON',
     230                        'mo_openid_verify_addon_license_nonce' : mo_openid_verify_addon_license_nonce,
    228231                    },
    229232                    crossDomain :!0, dataType:"html",
  • miniorange-login-openid/trunk/view/config_apps/mo_openid_config_apps.php

    r2788668 r2853010  
    33function mo_openid_show_apps()
    44{
    5     if (isset($_POST['update_tour_status'])){
     5    if (isset($_POST['update_tour_status'])){ //phpcs:ignore
    66        update_option('mo_openid_tour_new','1');
    77    }
     
    1919                    {
    2020                        $icons=$apps;
    21                        if ($apps=='vkontakte'){
     21                        if ($apps=='vkontakte'){
    2222                            $icons='vk';
    2323                        }elseif ($apps=='stackexchange'){
     
    3838                        $blcolor=$social_app->color;
    3939                        ?>
    40                         <div class="mo-openid-sort-apps-div mo-openid-hover-div-sett" data-provider="<?php echo $apps?>" id="<?php echo $apps?>" style="opacity: <?php if(get_option('mo_openid_'.$apps.'_enable')) echo '1'; else echo '0.6'?>">
    41                             <div class="mo-openid-sort-apps-i-div mo-openid-sort-apps-open-settings-div" title="Configure Settings" style="cursor: pointer; background-color:<?php echo $blcolor?>;">
    42                                 <div style="position: absolute;right: 5px;top: 5px;<?php if($checked!='checked') { ?> display: none; <?php } ?>" id="mo_openid_<?php echo $apps?>_active_div">
    43                                     <span style="font-size: 10px;background: #236d31;color: white;font-weight: 600;padding: 1px 4px;border-radius: 4px;font-family: monospace;"><?php echo mo_sl('Active');?></span>
     40                        <div class="mo-openid-sort-apps-div mo-openid-hover-div-sett" data-provider="<?php echo esc_attr($apps) ?>" id="<?php echo esc_attr($apps); ?>" style="opacity: <?php if(get_option('mo_openid_'.$apps.'_enable')) echo '1'; else echo '0.6'?>">
     41                            <div class="mo-openid-sort-apps-i-div mo-openid-sort-apps-open-settings-div" title="Configure Settings" style="cursor: pointer; background-color:<?php echo esc_attr($blcolor)?>;">
     42                                <div style="position: absolute;right: 5px;top: 5px;<?php if($checked!='checked') { ?> display: none; <?php } ?>" id="mo_openid_<?php echo esc_attr($apps); ?>_active_div">
     43                                    <span style="font-size: 10px;background: #236d31;color: white;font-weight: 600;padding: 1px 4px;border-radius: 4px;font-family: monospace;"><?php echo esc_attr(mo_sl('Active'));?></span>
    4444                                </div>
    45                                     <i class="fab fa-<?php echo $icons;?>" style="font-size: 60px;color:white"></i>
     45                                    <i class="fab fa-<?php echo esc_attr($icons);?>" style="font-size: 60px;color:white"></i>
    4646
    4747                            </div>
    4848                            <div class="mo-openid-capp-sett" id="mo-openid-hover-app-sett-show">
    49                                 <div style="display: inline-block; padding-left: 3%; text-align: left;width: 75%;position: absolute;font-size: 13px;"><span style="color:black"><?php echo strtoupper($apps)?></span></div>
     49                                <div style="display: inline-block; padding-left: 3%; text-align: left;width: 75%;position: absolute;font-size: 13px;"><span style="color:black"><?php echo esc_attr(strtoupper($apps))?></span></div>
    5050                                <div style="text-align: left; width: 25%; float: right; display: inline-block">
    5151                                    <label class='mo-openid-switch-app'>
    52                                         <input type='checkbox' <?php echo $checked?> value="1" onclick='enable_default_app("<?php echo $apps ?>")' id='mo_apps_<?php echo $apps?>'  >
     52                                        <input type='checkbox' <?php echo esc_attr($checked);?> value="1" onclick='enable_default_app("<?php echo esc_attr($apps); ?>")' id='mo_apps_<?php echo esc_attr($apps)?>'  >
    5353                                        <div class='mo-openid-slider-app round' id='switch_checkbox' ></div>
    5454                                    </label>
    5555                                </div>
    5656                            </div>
    57                             <div title="Change Position" id="mo_openid_move_<?php echo $apps?>" class="mo-openid-sort-apps-move"></div>
     57                            <div title="Change Position" id="mo_openid_move_<?php echo esc_attr($apps); ?>" class="mo-openid-sort-apps-move"></div>
    5858                        </div>
    5959                        <?php
     
    7171                ?>
    7272                <div class="mo_openid_highlight">
    73                     <h3 style="margin-left: 1%;line-height: 210%;color:white;"><?php echo mo_sl('Premium Applications');?></h3>
     73                    <h3 style="margin-left: 1%;line-height: 210%;color:white;"><?php echo esc_attr(mo_sl('Premium Applications'));?></h3>
    7474                </div>
    7575                <div class="mo-openid-sort-apps ui-sortable">
     
    111111                        ?>
    112112                        <div class="mo-openid-sort-apps-div mo-openid-hover-div-sett">
    113                             <div class="mo-openid-sort-apps-i-div" style="background-color:<?php echo $blcolor?>;">
     113                            <div class="mo-openid-sort-apps-i-div" style="background-color:<?php echo esc_attr($blcolor); ?>;">
    114114                                <?php if($apps=='naver'||$apps=='disqus'||$apps=='teamsnap'||$apps=='livejournal'||$apps=='kakao'||$apps=='baidu'||$apps=='mailru'||$apps=='fitbit'){ ?>
    115                                     <img style="float: right" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/icons/<?php echo $apps?>.png" height="60px" width="60px"
    116                                          alt="<?php echo $apps?>"/>
     115                                    <img style="float: right" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/icons/'. esc_attr($apps).'.png'); ?>" height="60px" width="60px" alt="<?php echo esc_attr($apps); ?>"/>
    117116                                <?php }
    118117                                else{ ?>
    119                                     <i class="fab fa-<?php echo $icons;?>" style="font-size: 60px;color:white"></i>
     118                                    <i class="fab fa-<?php echo esc_attr($icons) ;?>" style="font-size: 60px;color:white"></i>
    120119                                <?php } ?>
    121120                            </div>
    122121                            <div id="mo-openid-hover-app-sett-show" style="display: block">
    123                                 <div style="display: inline-block; text-align: center;width: 100%;position: absolute;font-size: 13px;"><span style="color:black"><?php if($apps == 'mailru') $apps='mail.ru'; if($apps == 'wiebo') $apps='weibo'; echo strtoupper($apps)?></span></div>
     122                                <div style="display: inline-block; text-align: center;width: 100%;position: absolute;font-size: 13px;"><span style="color:black"><?php if($apps == 'mailru') $apps='mail.ru'; if($apps == 'wiebo') $apps='weibo'; echo esc_attr(strtoupper($apps)); ?></span></div>
    124123                            </div>
    125124                        </div>
     
    145144        //defination to enable app
    146145        function enable_app(a,app_name,toggle) {
     146            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    147147            var enable_app = 'mo_openid'.concat(app_name).concat('_enable');
    148148            var active_button = document.getElementById('mo_openid_'.concat(app_name).concat('_active_div'));
    149149            jQuery.ajax({
    150                 url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     150                url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    151151                method: "POST", //request type,
    152152                dataType: 'json',
    153153                data: {
    154154                    action: 'mo_register_customer_toggle_update',
     155                    'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    155156                },
    156157                success: function (result) {
     
    158159                    if (true) {
    159160                        if (a.checked == true) {
    160                             if (app_name == 'facebook' || app_name == 'twitter' || app_name == 'instagram' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord') {
    161                                 var mo_openid_check_capp_enable_nonce = '<?php echo wp_create_nonce("mo-openid-check-capp-enable"); ?>';
     161                            if (app_name == 'facebook' || app_name == 'twitter' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord') {
     162                                var mo_openid_check_capp_enable_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-check-capp-enable-nonce")); ?>';
    162163                                jQuery.ajax({
    163164                                    type: 'POST',
    164                                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     165                                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    165166                                    data: {
    166167                                        action: 'mo_openid_check_capp_enable',
     
    175176                                                jQuery("#mo_apps_".concat(app_name)).prop('checked', true);
    176177                                            mo_show_success_error_msg('success',app_name.charAt(0).toUpperCase()+app_name.substr(1)+' is activated sucessfully');
    177                                             var mo_openid_sso_enable_app_nonce = '<?php echo wp_create_nonce("mo-openid-sso-enable-app"); ?>';
     178                                            var mo_openid_sso_enable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-enable-app")); ?>';
    178179                                            jQuery.ajax({
    179180                                                type: 'POST',
    180                                                 url: '<?php echo admin_url("admin-ajax.php"); ?>',
     181                                                url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    181182                                                data: {
    182183                                                    'mo_openid_sso_enable_app_nonce': mo_openid_sso_enable_app_nonce,
     
    229230                                handle_salesforce();
    230231                            } else {
     232                                var mo_openid_check_capp_enable_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-check-capp-enable-nonce")); ?>';
    231233                                jQuery.ajax({
    232234                                    type: 'POST',
    233                                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     235                                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    234236                                    data: {
    235237                                        action: 'mo_openid_check_capp_enable',
    236238                                        app_name: app_name,
     239                                        'mo_openid_check_capp_enable_nonce': mo_openid_check_capp_enable_nonce,
    237240                                    },
    238241                                    success: function (result) {
     
    243246                                                jQuery("#mo_apps_".concat(app_name)).prop('checked', true);
    244247                                            mo_show_success_error_msg('success',app_name.charAt(0).toUpperCase()+app_name.substr(1)+' is activated sucessfully');
    245                                             var mo_openid_sso_enable_app_nonce = '<?php echo wp_create_nonce("mo-openid-sso-enable-app"); ?>';
     248                                            var mo_openid_sso_enable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-enable-app")); ?>';
    246249                                            jQuery.ajax({
    247250                                                type: 'POST',
    248                                                 url: '<?php echo admin_url("admin-ajax.php"); ?>',
     251                                                url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    249252                                                data: {
    250253                                                    'mo_openid_sso_enable_app_nonce': mo_openid_sso_enable_app_nonce,
     
    260263                                        } else {
    261264                                            jQuery("#mo_apps_".concat(app_name)).prop('checked', false);
    262                                             if(app_name=='facebook' || app_name == 'twitter' || app_name == 'instagram' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord')
     265                                            if(app_name=='facebook' || app_name == 'twitter' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord')
    263266                                            {
    264267                                                jQuery ("#mo_facebook_notice").show();
     
    268271                                            else {
    269272                                                jQuery ("#mo_facebook_notice").hide();
     273                                                var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    270274                                                jQuery.ajax({
    271                                                     url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     275                                                    url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    272276                                                    method: "POST", //request type,
    273277                                                    dataType: 'json',
    274278                                                    data: {
    275279                                                        action: 'mo_register_customer_toggle_update',
     280                                                        'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
     281
    276282                                                    },
    277283                                                    success: function (result){
     
    297303                            document.getElementById(app_name).setAttribute("style", "opacity:0.6");
    298304                            active_button.style.display = "none";
    299                             var mo_openid_sso_enable_app_nonce = '<?php echo wp_create_nonce("mo-openid-sso-enable-app"); ?>';
     305                            var mo_openid_sso_enable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-enable-app")); ?>';
    300306                            if(toggle=='1')
    301307                                jQuery("#mo_apps_".concat(app_name)).prop('checked', true);
     
    303309                            jQuery.ajax({
    304310                                type: 'POST',
    305                                 url: '<?php echo admin_url("admin-ajax.php"); ?>',
     311                                url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    306312                                data: {
    307313                                    'mo_openid_sso_enable_app_nonce': mo_openid_sso_enable_app_nonce,
     
    323329        //to enable/disable app
    324330        function enable_default_app_db(app_name, checked){
    325             var mo_openid_sso_enable_app_nonce = '<?php echo wp_create_nonce("mo-openid-sso-enable-app"); ?>';
     331            var mo_openid_sso_enable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-enable-app")); ?>';
    326332            jQuery.ajax({
    327333                type: 'POST',
    328                 url: '<?php echo admin_url("admin-ajax.php"); ?>',
     334                url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    329335                data: {
    330336                    'mo_openid_sso_enable_app_nonce': mo_openid_sso_enable_app_nonce,
     
    360366                '<div class="mo_openid_popup" popup-name="popup-1" border="1" id = "custom_app_div" style="display:none; float: left; width: 100%; overflow: hidden">' +
    361367                        '<div id="mo_openid_ajax_wait_fade"></div>'+
    362                         '<div id="mo_openid_ajax_wait_img"><img id="loader" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/wait.gif" /></div>'+
     368                        '<div id="mo_openid_ajax_wait_img"><img id="loader" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/wait.gif') ?>" /></div>'+
    363369                        '<div class="mo_openid_popup-content">'+
    364370                            '<div style="margin-bottom: 2px"><center><i style="margin-left:40%;color: white; border-radius:4px; display: inline; font-size:1.7em;padding:3px;" id="custom_app_name_image"></i>&nbsp;<h1 style="display: inline" id="custom_app_name"></h1></center></div>'+
     
    373379                                        '</div>' +
    374380                                    '</div>'+
    375                                     // '<div id="mo_set_pre_config_app" style="overflow: auto; margin-left:33%; padding-top:2%">' +
    376                                     //     '<div style="width: 25%; float: left; display: inline"><label style="display: contents;"><b> Enable App</b></label></div>' +
    377                                     //     '<div style="width: 71%; float: right; display: inline">' +
    378                                     //         '<label class="mo-openid-switch-app">' +
    379                                     //             '<input type="checkbox" id="mo_openid_enable_app" value="1" />' +
    380                                     //             '<div class="mo-openid-slider-app round" id="switch_checkbox" ></div>' +
    381                                     //         '</label>' +
    382                                     //     '</div>' +
    383                                     // '</div>'+
    384381                                    '<div id="mo_facebook_notice" style="overflow: auto; margin-left:25%; margin-right:3%; padding-top:2%"><label style="cursor:auto"><b></b></label></div><hr>'+
    385382                                    '<div><center><h3 style="margin-bottom: 2%">App Settings</h3></center></div>'+
    386383                                    '<div class="mo-openid-app-name" id="custom_app_name_rename" style="width: 100%">'+
    387384                                        '<div id="mo_register_customer_toggle" style="overflow: auto; margin-left:10%; margin-right:3%; padding-top:2%;margin-bottom:2%;">' +
    388                                             '<a href="<?php echo add_query_arg( array('tab' => 'profile'), $_SERVER['REQUEST_URI'] ); ?>">If you don\'t want to set up your own app then register with us and use our pre-configured apps</a>' +
     385                                            '<a href="<?php echo esc_url(add_query_arg( array('tab' => 'profile'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>">If you don\'t want to set up your own app then register with us and use our pre-configured apps</a>' +
    389386                                        '</div>'+
    390387                                        '<div style="padding: 0% 5% 5% 5%;">'+
     
    414411                '<div style="margin-top: 10px;">'+
    415412                '<center>' +
    416                 '<p style="margin-bottom:auto">Do you want to use social login icons on any particular theme? Go to <a style="cursor: pointer" href="<?php echo add_query_arg( array('tab' => 'shortcodes'), $_SERVER['REQUEST_URI'] ); ?>">Shortcode Tab</a> .</p>' +
     413                '<p style="margin-bottom:auto">Do you want to use social login icons on any particular theme? Go to <a style="cursor: pointer" href="<?php echo esc_url(add_query_arg( array('tab' => 'shortcodes'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>">Shortcode Tab</a> .</p>' +
    417414                '</center>'+
    418415                '</div>'+
     
    534531                else {
    535532                    mo_openid_ajax_wait_openModal();
     533                    var mo_openid_connect_register_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-connect-register-nonce")); ?>';
    536534                    jQuery.ajax({
    537                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     535                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    538536                        method: "POST", //request type,
    539537                        dataType : 'json',
     
    543541                            confirmPassword: confirmPassword,
    544542                            action: 'mo_register_new_user',
     543                            'mo_openid_connect_register_nonce' : mo_openid_connect_register_nonce,
    545544                        },
    546545                        success: function (result) {
     
    605604                else {
    606605                    mo_openid_ajax_wait_openModal();
     606                    var mo_openid_connect_verify_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-connect-verify-nonce")); ?>';
     607
    607608                    jQuery.ajax({
    608                         url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     609                        url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    609610                        method: "POST", //request type,
    610611                        dataType : 'json',
     
    613614                            password: password,
    614615                            action: 'mo_register_old_user',
     616                            'mo_openid_connect_verify_nonce' : mo_openid_connect_verify_nonce,
    615617                        },
    616618                        success: function (result) {
     
    656658                else
    657659                    custom_app_enable_change=0;
    658                    
    659                     var mo_openid_custom_app_enable_change_nonce = '<?php echo wp_create_nonce("mo-openid-custom-app-enable-change-nonce"); ?>';
    660 
     660                    var mo_openid_custom_app_enable_change_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-custom-app-enable-change-nonce")); ?>';
    661661                jQuery.ajax({
    662                     url:"<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     662                    url:"<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    663663                    method: "POST", //request type,
    664664                    dataType: 'json',
     
    667667                        custom_app_enable_change : custom_app_enable_change,
    668668                        action: 'custom_app_enable_change_update',
    669                         'mo_openid_custom_app_enable_change_nonce' : mo_openid_custom_app_enable_change_nonce,
     669                        'mo_openid_custom_app_enable_change_update_nonce' : mo_openid_custom_app_enable_change_update_nonce,
    670670                    },
    671671                    success:function(result){
     
    713713            jQuery('.mo_openid_clear_capp_settings').on('click',function () {
    714714                let app_name = jQuery(".mo-openid-app-name").attr("id");
    715                 var mo_openid_capp_delete_nonce = '<?php echo wp_create_nonce("mo-openid-capp-delete"); ?>';
     715                var mo_openid_capp_delete_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-capp-delete")); ?>';
    716716                jQuery.ajax({
    717717                    type: 'POST',
    718                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     718                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    719719                    data: {
    720720                        'mo_openid_capp_delete_nonce': mo_openid_capp_delete_nonce,
     
    723723                    },
    724724                    success: function (data) {
     725                        var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    725726                        jQuery("#app_id_value").val('');
    726727                        jQuery("#app_secret_value").val('');
    727728                        jQuery("#app_scope_value").val('');
    728729                        jQuery.ajax({
    729                             url:"<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     730                            url:"<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    730731                            method: "POST", //request type,
    731732                            dataType: 'json',
     
    733734                                action: 'mo_register_customer_toggle_update',
    734735                                app_name: app_name,
     736                                'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    735737                            },
    736738                            success: function(result){
     
    765767
    766768        function deactivate_app(app_name) {
    767             var mo_openid_disable_app_nonce = '<?php echo wp_create_nonce("mo-openid-disable-app"); ?>';
     769            var mo_openid_disable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-disable-app-nonce")); ?>';
     770
    768771            jQuery.ajax({
    769                 url:"<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     772                url:"<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    770773                method: "POST", //request type,
    771774                dataType: 'json',
     
    794797            }
    795798            else {
    796                 var mo_openid_capp_details_nonce = '<?php echo wp_create_nonce("mo-openid-capp-details"); ?>';
     799                var mo_openid_capp_details_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-capp-details")); ?>';
    797800                var a=document.getElementById('mo_apps_'.concat(app_name));
    798801                var enable_app='mo_openid'.concat(app_name).concat('_enable');
     
    803806                jQuery.ajax({
    804807                    type: 'POST',
    805                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     808                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    806809                    data: {
    807810                        'mo_openid_capp_details_nonce': mo_openid_capp_details_nonce,
     
    824827        function mo_test_config(){
    825828            let app_name = jQuery(".mo-openid-app-name").attr("id");
    826             var mo_openid_test_config_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-test-config-nonce")); ?>';
     829            var mo_openid_test_configuration_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-test-configuration-update-nonce")); ?>';
    827830            jQuery.ajax({
    828                 url:"<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     831                url:"<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    829832                method: "POST", //request type,
    830833                dataType: 'text',
     
    833836                    test_configuration : true,
    834837                    action: 'mo_openid_test_configuration_update',
    835                     'mo_openid_test_config_nonce' : mo_openid_test_config_nonce,
     838                    'mo_openid_test_configuration_update_nonce' : mo_openid_test_configuration_update_nonce,
    836839                },
    837840                success:function(result){
    838                     var myWindow = window.open('<?php echo attribute_url(); ?>' + '/?option=oauthredirect&app_name='+app_name+'&wp_nonce='+'<?php echo wp_create_nonce( 'mo-openid-oauth-app-nonce' ); ?>', "", "width=950, height=600");
     841                    var myWindow = window.open('<?php echo esc_url(attribute_url()); ?>' + '/?option=oauthredirect&app_name='+app_name+'&wp_nonce='+'<?php echo esc_attr(wp_create_nonce( 'mo-openid-oauth-app-nonce' )); ?>', "", "width=950, height=600");
    839842                }
    840843            });
     
    843846        jQuery(".mo-openid-sort-apps-open-settings-div").click(function () {
    844847            let app_name = jQuery(this).parents(".mo-openid-sort-apps-div").attr("id");
    845             if(app_name=='facebook' || app_name == 'twitter' || app_name == 'instagram' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord')
     848            if(app_name=='facebook' || app_name == 'twitter' || app_name == 'snapchat' || app_name == 'dribbble' || app_name == 'discord')
    846849            {
    847850                jQuery("#mo_facebook_notice").text("Please set custom app for "+app_name.charAt(0).toUpperCase()+app_name.substr(1));
     
    853856                document.getElementById('mo_openid_ajax_wait_fade').style.display = 'block';
    854857                jQuery ("#mo_facebook_notice").hide();
     858                var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    855859                jQuery.ajax({
    856                     url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     860                    url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    857861                    method: "POST", //request type,
    858862                    dataType: 'json',
    859863                    data: {
    860864                        action: 'mo_register_customer_toggle_update',
     865                        'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    861866                    },
    862867                    success: function (result) {
     
    888893            jQuery('#mo_openid_register_old_user').hide();
    889894            jQuery("#mo_app_config_notice").text("If you face any issues in setting up " + application_name.charAt(0).toUpperCase() + application_name.substr(1) + " app then please contact us we wil help you out");
    890             if(application_name == 'facebook' || application_name == 'twitter' || application_name == 'instagram' || application_name == 'snapchat' || application_name == 'dribbble' || application_name == 'discord') {
     895            if(application_name == 'facebook' || application_name == 'twitter' || application_name == 'snapchat' || application_name == 'dribbble' || application_name == 'discord') {
    891896                jQuery("#mo_set_pre_config_app").hide();
    892897            }
     
    895900                jQuery("#mo_set_pre_config_app").show();
    896901            }
    897             if(application_name == 'facebook' ||  application_name == 'instagram'||  application_name == 'google'||  application_name == 'discord') {
     902            if(application_name == 'facebook' ||  application_name == 'google'||  application_name == 'discord') {
    898903
    899904                jQuery("#mo_ssl_notice").text("SSL certificate is required for " + application_name.charAt(0).toUpperCase() + application_name.substr(1) + " custom app");
     
    909914            }
    910915            else if(application_name != null) {
    911                 var default_color= {'facebook':'#1877F2','google':'#DB4437','vkontakte':'#466482','twitter':'#2795e9','yahoo':'#430297','instagram':'#3f729b','linkedin':'#007bb6','salesforce':'#1ab7ea','dribbble':'#ee66aa','snapchat':'#fffc00','discord':"#7289DA"};
     916                var default_color= {'facebook':'#1877F2','google':'#DB4437','vkontakte':'#466482','twitter':'#2795e9','yahoo':'#430297','linkedin':'#007bb6','salesforce':'#1ab7ea','dribbble':'#ee66aa','snapchat':'#fffc00','discord':"#7289DA"};
    912917                var icon = application_name ;
    913918                if(application_name=='vkontakte'){
    914919                    icon= 'vk';
    915920                }
    916                
    917921                jQuery( "#custom_app_name").text(application_name.charAt(0).toUpperCase()+application_name.substr(1));
    918922                jQuery( ".mo-openid-app-name").attr('id',application_name);
     
    923927
    924928                jQuery( "#custom_app_instructions").text("Instructions to configure "+application_name.charAt(0).toUpperCase()+application_name.substr(1)+":");
    925                 var mo_openid_app_instructions_nonce = '<?php echo wp_create_nonce("mo-openid-app-instructions"); ?>';
     929                var mo_openid_app_instructions_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-app-instructions")); ?>';
    926930                jQuery.ajax({
    927931                    type: 'POST',
    928                     url: '<?php echo admin_url("admin-ajax.php"); ?>',
     932                    url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    929933                    data: {
    930934                        'mo_openid_app_instructions_nonce': mo_openid_app_instructions_nonce,
     
    972976            var enable_app='mo_openidsalesforce_enable';
    973977            var active_button=document.getElementById('mo_openid_salesforce_active_div');
     978            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    974979            jQuery.ajax({
    975                 url:"<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     980                url:"<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    976981                method: "POST", //request type,
    977982                dataType: 'json',
    978983                data: {
    979984                    action: 'mo_register_customer_toggle_update',
     985                    'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    980986                },
    981987                success: function(result){
     
    9941000                            mo_show_success_error_msg('success','Salesforce is deactivated sucessfully');
    9951001                        }
    996                         var mo_openid_sso_enable_app_nonce = '<?php echo wp_create_nonce("mo-openid-sso-enable-app"); ?>';
     1002                        var mo_openid_sso_enable_app_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-enable-app")); ?>';
    9971003                        jQuery.ajax({
    9981004                            type: 'POST',
    999                             url: '<?php echo admin_url("admin-ajax.php"); ?>',
     1005                            url: '<?php echo esc_url(admin_url("admin-ajax.php")); ?>',
    10001006                            data: {
    10011007                                'mo_openid_sso_enable_app_nonce': mo_openid_sso_enable_app_nonce,
     
    10121018                        var r = confirm('Salesforce do not provide any custom application. Please register with us to use pre configured app. To register click on OK.');
    10131019                        if(r)
    1014                             window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     1020                            window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    10151021                    }
    10161022                }
     
    10181024        }
    10191025        //to drag and save position of apps
    1020         var mo_openid_sso_sort_nonce = '<?php echo wp_create_nonce("mo-openid-sso-sort"); ?>';
     1026        var mo_openid_sso_sort_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-sso-sort")); ?>';
    10211027        jQuery( function() {
    10221028            jQuery( "#sortable" ).disableSelection();
     
    10661072
    10671073        jQuery(function() {
    1068             var mo_openid_check_cron= "<?php echo get_option('mo_openid_rateus_activation');?>";
    1069             var b = "<?php echo update_option('mo_openid_rateus_activation','8');?>";
     1074            var mo_openid_check_cron= "<?php echo esc_attr(get_option('mo_openid_rateus_activation'));?>";
     1075            var b = "<?php echo esc_attr(update_option('mo_openid_rateus_activation','8'));?>";
    10701076            if ( mo_openid_check_cron ==1){
    10711077            var popup2 = '<div class="mo_openid_popup" popup-name="popup-2" border="1" id = "mo_openid_delay_registration" style="display:none; float: left; width: 100%; overflow: hidden">' +
     
    10981104                            '<form id="cronmo_openid_rateus_submit_form" method="post" action="">\n'+
    10991105                                '<input type="hidden" name="option" value="cronmo_openid_rateus_query_option" />\n'+
    1100                                 '<input type="hidden" name="cronmo_openid_rateus_nonce" value="<?php echo wp_create_nonce( 'cronmo-openid-rateus-nonce' ); ?>"/>\n'+
     1106                                '<input type="hidden" name="cronmo_openid_rateus_nonce" value="<?php echo esc_attr(wp_create_nonce( 'cronmo-openid-rateus-nonce' )); ?>"/>\n'+
    11011107                                '<h4 style="margin-left: 10%">We would be glad to hear what you think</h4>\n'+
    1102                                 '<input class="mo_openid_modal_rateus_style" type="email" style=" margin-left: 5%;width: 87%; border-bottom: 1px solid; border-bottom-color:#0867b2 " type="email"  required placeholder="Enter your Email" name="cronmo_openid_rateus_email" value="<?php echo get_option("mo_openid_admin_email") ?>">\n'+
     1108                                '<input class="mo_openid_modal_rateus_style" type="email" style=" margin-left: 5%;width: 87%; border-bottom: 1px solid; border-bottom-color:#0867b2 " type="email"  required placeholder="Enter your Email" name="cronmo_openid_rateus_email" value="<?php echo esc_attr(get_option("mo_openid_admin_email")) ?>">\n'+
    11031109                                '<table style="margin-left: 5%; width: 91%;height: 30%">\n'+
    11041110                                    '<tr style="width: 50%">\n'+
     
    11501156
    11511157            function form_popup1(rating){
    1152                 var mo_openid_rating_given_nonce = '<?php echo wp_create_nonce('mo-openid-rating-given-nonce'); ?>';
    1153 
     1158                var mo_openid_rating_given_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-rating-given-nonce")); ?>';
    11541159                jQuery.ajax({
    1155                     url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     1160                    url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    11561161                    method: "POST", //request type,
    11571162                    dataType: 'json',
     
    11591164                        action: 'mo_openid_rating_given',
    11601165                        rating: rating,
    1161                         'mo_openid_rating_given_nonce' : mo_openid_rating_given_nonce,
     1166                        'mo_openid_rating_given' : mo_openid_rating_given,
    11621167                    },
    11631168                    success: function (result) { }
  • miniorange-login-openid/trunk/view/config_apps/mo_openid_config_apps_funct.php

    r2788668 r2853010  
    11<?php
    2 //to save positions of apps in DB
    3 function mo_openid_sso_sort_action(){
    4     $nonce = sanitize_text_field($_POST['mo_openid_sso_sort_nonce']);
    5     if (!wp_verify_nonce($nonce, 'mo-openid-sso-sort')) {
    6         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    7     } else {
    8         if(current_user_can('administrator')){
    9         $app_sequence=array_map( 'sanitize_text_field', $_POST['sequence']);
    10         $app_pos='';
    11         $flag=0;
    12         foreach ($app_sequence as $app_position) {
    13             if($flag==0){
    14                 $app_pos=$app_position;
    15                 $flag++;
    16             }
    17             else
    18                 $app_pos.='#'.$app_position;
    19         }
    20         update_option('app_pos',$app_pos);
    21         wp_send_json("hello_sort");
    22     }
    23     }
    24 }
    25 
    26 //To enable and disable apps
    27 function mo_openid_sso_enable_app()
    28 {
    29     $nonce = sanitize_text_field($_POST['mo_openid_sso_enable_app_nonce']);
    30     if (!wp_verify_nonce($nonce, 'mo-openid-sso-enable-app')) {
    31         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    32     } else {
    33         if(current_user_can('administrator')){
    34         $enable_app = sanitize_text_field($_POST['enabled']);
    35         if ($enable_app == "true") {
    36             update_option('mo_openid_' . sanitize_text_field($_POST['app_name']) . '_enable', 1);
    37         } else if ($enable_app == "false") {
    38             update_option('mo_openid_' . sanitize_text_field($_POST['app_name']) . '_enable', 0);
    39         }
    40     }
    41     }
    42 }
    43 
    44 //to load instructions of custom app
    45 function mo_openid_app_instructions_action()
    46 {
    47     $nonce = sanitize_text_field($_POST['mo_openid_app_instructions_nonce']);
    48     if (!wp_verify_nonce($nonce, 'mo-openid-app-instructions')) {
    49         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    50     } else {
    51         if(current_user_can('administrator')){
    52         $social_app = sanitize_text_field($_POST['app_name']);
    53         $instructions = plugin_url . $social_app . ".png##";
    54         $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    55         if ($appslist != "") {
    56             if(!isset($appslist[$social_app]['clientid']))
    57                 $instructions.="##";
    58             else
    59                 $instructions .= $appslist[$social_app]['clientid'] . "##";
    60             if(!isset($appslist[$social_app]['clientsecret']))
    61                 $instructions.="##";
    62             else
    63                 $instructions .= $appslist[$social_app]['clientsecret'] . "##";
    64         } else
    65             $instructions .= "####";
    66         if(get_option("mo_openid_enable_custom_app_".$social_app))
    67             $instructions .= "custom##";
    68 //        elseif (mo_openid_is_customer_registered()&& get_option('mo_openid_'.$social_app.'_enable'))
    69         elseif (get_option('mo_openid_'.$social_app.'_enable'))
    70             $instructions .= "default##";
    71         else
    72             $instructions .= "0##";
    73         if(get_option("mo_openid_".$social_app."_enable"))
    74             $instructions .= "1##";
    75         else
    76             $instructions .= "0##";
    77         $name=plugin_dir_path(dirname(__DIR__));
    78         $name=substr($name,0,strlen($name)-1).'//social_apps//'.$social_app.'.php';
    79         require($name);
    80         $mo_appname='mo_'.$social_app;
    81         $social_app = new $mo_appname();
    82         if(!isset($appslist[sanitize_text_field($_POST['app_name'])]['scope']))
    83             $instructions .= $social_app->scope . "##";
    84         else
    85             $instructions .= $appslist[sanitize_text_field($_POST['app_name'])]['scope'] . "##";
    86         if(isset($social_app->video_url))
    87             $instructions .= $social_app->video_url . "##";
    88         else
    89             $instructions .= "##";
    90         $instructions .= $social_app->instructions;
    91         wp_send_json($instructions);
    92     }
    93     }
    94 }
    95 
    96 function mo_openid_capp_details_action()
    97 {
    98     $nonce = sanitize_text_field($_POST['mo_openid_capp_details_nonce']);
    99     if (!wp_verify_nonce($nonce, 'mo-openid-capp-details')) {
    100         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    101     } else {
    102         if(current_user_can('administrator')){
    103         $clientid = stripslashes(sanitize_text_field($_POST['app_id']));
    104         $clientsecret = stripslashes(sanitize_text_field($_POST['app_secret']));
    105         $scope = stripslashes(sanitize_text_field($_POST['app_scope']));
    106         $appname = stripslashes(sanitize_text_field($_POST['app_name']));
    107         if (get_option('mo_openid_apps_list'))
    108             $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    109         else
    110             $appslist = array();
    111         $newapp = array();
    112         foreach ($appslist as $key => $currentapp) {
    113             if ($appname == $key) {
    114                 $newapp = $currentapp;
    115                 break;
    116             }
    117         }
    118         $newapp['clientid'] = $clientid;
    119         $newapp['clientsecret'] = $clientsecret;
    120         $newapp['scope'] = $scope;
    121         if ($appname == "facebook") {
    122             $newapp['resolution'] = get_option('facebook_profile_pic_resolution');
    123         }
    124         $appslist[$appname] = $newapp;
    125         update_option('mo_openid_apps_list', maybe_serialize($appslist));
    126         update_option('mo_openid_enable_custom_app_'.$appname, '1');
    127         update_option('mo_openid_' . $appname . '_enable', 1);
    128     }
    129     }
    130 }
    131 
    132 function mo_openid_capp_delete(){
    133     $nonce = sanitize_text_field($_POST['mo_openid_capp_delete_nonce']);
    134     if (!wp_verify_nonce($nonce, 'mo-openid-capp-delete')) {
    135         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    136     } else {
    137         if(current_user_can('administrator')){
    138     $appname = stripslashes(sanitize_text_field($_POST['app_name']));
    139     $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    140     $status= get_option('mo_openid_enable_custom_app_'.$appname);
    141     foreach($appslist as $key => $app){
    142         if($appname == $key){
    143             unset($appslist[$key]);
    144         }
    145     }
    146     if(!empty($appslist))
    147         update_option('mo_openid_apps_list', maybe_serialize($appslist));
    148     else
    149         delete_option('mo_openid_apps_list');
    150     update_option('mo_openid_enable_custom_app_'.$appname,'0');
    151     wp_send_json(["status" => $status]);
    152 }
    153     }
    154 }
    155 
    156 function mo_disable_app(){
    157     $nonce = sanitize_text_field($_POST['mo_openid_disable_app_nonce']);
    158     if (!wp_verify_nonce($nonce, 'mo-openid-disable-app')) {
    159         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    160     } else {
    161         if(current_user_can('administrator')){
    162     $appname = sanitize_text_field($_POST['app_name']);
    163     update_option('mo_openid_enable_custom_app_'.$appname,0);
    164     update_option('mo_openid_'.$appname.'_enable',0);
    165         }
    166     }
    167 }
    168 
    169 function mo_openid_test_configuration_update_action(){
    170     $nonce = sanitize_text_field($_POST['mo_openid_test_config_nonce']);
    171     if (!wp_verify_nonce($nonce, 'mo-openid-test-config-nonce')) {
    172         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    173     } else {
    174         if(current_user_can('administrator')){
    175     update_option('mo_openid_test_configuration',1);
    176         }
    177     }
    178 }
    179 
    180 function attribute_url(){
    181     $url = home_url();
    182     return $url;
    183 }
    184 
    185 function custom_app_enable_change_update()
    186 {
    187     $nonce = sanitize_text_field($_POST['mo_openid_custom_app_enable_change_nonce']);
    188     if (!wp_verify_nonce($nonce, 'mo-openid-custom-app-enable-change-nonce')) {
    189         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    190     } else {
    191         if(current_user_can('administrator')){
    192     $appname = stripslashes(sanitize_text_field($_POST['appname']));
    193     if (sanitize_text_field($_POST['custom_app_enable_change'])) {   //set default app
    194         if (mo_openid_is_customer_registered()) {
    195             update_option('mo_openid_' . $appname . '_enable', sanitize_text_field($_POST['custom_app_enable_change']));
    196             update_option('mo_openid_enable_custom_app_' . $appname, 0);
    197             wp_send_json(["status" => 'true']);
    198         } else {
    199 //            wp_send_json(["status" => 'false']);
    200             wp_send_json(["status" => 'true']);
    201         }
    202     } else {
    203         if (get_option('mo_openid_apps_list')) {
    204             $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    205             if (!empty($appslist[$appname]['clientid']) && !empty($appslist[$appname]['clientsecret'])) {
    206                 update_option('mo_openid_enable_custom_app_' . $appname, 1);
    207                 wp_send_json(["status" => "Turned_Off"]);
    208             }
    209             else {
    210                 update_option('mo_openid_enable_custom_app_' . $appname, 0);
    211                 wp_send_json(["status" => "No_cust_app"]);
    212             }
    213         }
    214         else
    215             wp_send_json(["status" => "No_cust_app"]);
    216     }
    217 }
    218 }
    219 }
    220 
    221 function mo_register_customer_toggle_update(){
    222     if(mo_openid_is_customer_registered()){
    223         $appname = stripslashes(sanitize_text_field($_POST['appname']));
    224         if(isset($appname))
    225             update_option('mo_openid_enable_custom_app_' . $appname, 0);
    226         wp_send_json(["status"=>true]);
    227     }
    228     else
    229         wp_send_json(["status"=>false]);
    230 }
    231 
    232 function mo_openid_check_capp_enable(){
    233    
    234     $nonce = sanitize_text_field($_POST['mo_openid_check_capp_enable_nonce']);
    235     if (!wp_verify_nonce($nonce, 'mo-openid-check-capp-enable')) {
    236         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    237     } else {
    238         if(current_user_can('administrator')){
    239     if (get_option('mo_openid_apps_list')){
    240         $appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
    241         $appname = stripslashes(sanitize_text_field($_POST['app_name']));
    242         if(!empty($appslist[$appname]['clientid']) && !empty($appslist[$appname]['clientsecret'])){
    243             wp_send_json(["status"=>true]);
    244         }
    245         else
    246             wp_send_json(["status"=>false]);
    247     }
    248     else
    249         wp_send_json(["status"=>false]);
    250         }
    251     }
    252     }
     2// to save positions of apps in DB
     3function mo_openid_sso_sort_action() {
     4    $nonce = sanitize_text_field( $_POST['mo_openid_sso_sort_nonce'] );
     5    if ( ! wp_verify_nonce( $nonce, 'mo-openid-sso-sort' ) ) {
     6        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     7    } else {
     8        if ( current_user_can( 'administrator' ) ) {
     9            $app_sequence = array_map( 'sanitize_text_field', $_POST['sequence'] );
     10            $app_pos      = '';
     11            $flag         = 0;
     12            foreach ( $app_sequence as $app_position ) {
     13                if ( $flag == 0 ) {
     14                    $app_pos = $app_position;
     15                    $flag++;
     16                } else {
     17                    $app_pos .= '#' . $app_position;
     18                }
     19            }
     20            update_option( 'app_pos', $app_pos );
     21            wp_send_json( 'hello_sort' );
     22        }
     23    }
     24}
     25
     26// To enable and disable apps
     27function mo_openid_sso_enable_app() {
     28    $nonce = sanitize_text_field( $_POST['mo_openid_sso_enable_app_nonce'] );
     29    if ( ! wp_verify_nonce( $nonce, 'mo-openid-sso-enable-app' ) ) {
     30        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     31    } else {
     32        if ( current_user_can( 'administrator' ) ) {
     33            $enable_app = sanitize_text_field( $_POST['enabled'] );
     34            if ( $enable_app == 'true' ) {
     35                update_option( 'mo_openid_' . sanitize_text_field( $_POST['app_name'] ) . '_enable', 1 );
     36            } elseif ( $enable_app == 'false' ) {
     37                update_option( 'mo_openid_' . sanitize_text_field( $_POST['app_name'] ) . '_enable', 0 );
     38            }
     39        }
     40    }
     41}
     42
     43// to load instructions of custom app
     44function mo_openid_app_instructions_action() {
     45    $nonce = sanitize_text_field( $_POST['mo_openid_app_instructions_nonce'] );
     46    if ( ! wp_verify_nonce( $nonce, 'mo-openid-app-instructions' ) ) {
     47        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     48    } else {
     49        if ( current_user_can( 'administrator' ) ) {
     50            $social_app   = sanitize_text_field( $_POST['app_name'] );
     51            $instructions = PLUGIN_URL . $social_app . '.png##';
     52            $appslist     = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     53            if ( $appslist != '' ) {
     54                if ( ! isset( $appslist[ $social_app ]['clientid'] ) ) {
     55                    $instructions .= '##';
     56                } else {
     57                    $instructions .= $appslist[ $social_app ]['clientid'] . '##';
     58                }
     59                if ( ! isset( $appslist[ $social_app ]['clientsecret'] ) ) {
     60                    $instructions .= '##';
     61                } else {
     62                    $instructions .= $appslist[ $social_app ]['clientsecret'] . '##';
     63                }
     64            } else {
     65                $instructions .= '####';
     66            }
     67            if ( get_option( 'mo_openid_enable_custom_app_' . $social_app ) ) {
     68                $instructions .= 'custom##';
     69            }
     70            // elseif (mo_openid_is_customer_registered()&& get_option('mo_openid_'.$social_app.'_enable'))
     71            elseif ( get_option( 'mo_openid_' . $social_app . '_enable' ) ) {
     72                $instructions .= 'default##';
     73            } else {
     74                $instructions .= '0##';
     75            }
     76            if ( get_option( 'mo_openid_' . $social_app . '_enable' ) ) {
     77                $instructions .= '1##';
     78            } else {
     79                $instructions .= '0##';
     80            }
     81            $name = plugin_dir_path( dirname( __DIR__ ) );
     82            $name = substr( $name, 0, strlen( $name ) - 1 ) . '//social_apps//' . $social_app . '.php';
     83            require $name;
     84            $mo_appname = 'mo_' . $social_app;
     85            $social_app = new $mo_appname();
     86            if ( ! isset( $appslist[ sanitize_text_field( $_POST['app_name'] ) ]['scope'] ) ) {
     87                $instructions .= $social_app->scope . '##';
     88            } else {
     89                $instructions .= $appslist[ sanitize_text_field( $_POST['app_name'] ) ]['scope'] . '##';
     90            }
     91            if ( isset( $social_app->video_url ) ) {
     92                $instructions .= $social_app->video_url . '##';
     93            } else {
     94                $instructions .= '##';
     95            }
     96            $instructions .= $social_app->instructions;
     97            wp_send_json( $instructions );
     98        }
     99    }
     100}
     101
     102function mo_openid_capp_details_action() {
     103    $nonce = sanitize_text_field( $_POST['mo_openid_capp_details_nonce'] );
     104    if ( ! wp_verify_nonce( $nonce, 'mo-openid-capp-details' ) ) {
     105        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     106    } else {
     107        if ( current_user_can( 'administrator' ) ) {
     108            $clientid     = stripslashes( sanitize_text_field( $_POST['app_id'] ) );
     109            $clientsecret = stripslashes( sanitize_text_field( $_POST['app_secret'] ) );
     110            $scope        = stripslashes( sanitize_text_field( $_POST['app_scope'] ) );
     111            $appname      = stripslashes( sanitize_text_field( $_POST['app_name'] ) );
     112            if ( get_option( 'mo_openid_apps_list' ) ) {
     113                $appslist = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     114            } else {
     115                $appslist = array();
     116            }
     117            $newapp = array();
     118            foreach ( $appslist as $key => $currentapp ) {
     119                if ( $appname == $key ) {
     120                    $newapp = $currentapp;
     121                    break;
     122                }
     123            }
     124            $newapp['clientid']     = $clientid;
     125            $newapp['clientsecret'] = $clientsecret;
     126            $newapp['scope']        = $scope;
     127            if ( $appname == 'facebook' ) {
     128                $newapp['resolution'] = get_option( 'facebook_profile_pic_resolution' );
     129            }
     130            $appslist[ $appname ] = $newapp;
     131            update_option( 'mo_openid_apps_list', maybe_serialize( $appslist ) );
     132            update_option( 'mo_openid_enable_custom_app_' . $appname, '1' );
     133            update_option( 'mo_openid_' . $appname . '_enable', 1 );
     134        }
     135    }
     136}
     137
     138function mo_openid_capp_delete() {
     139
     140    $nonce = sanitize_text_field( $_POST['mo_openid_capp_delete_nonce'] );
     141    if ( ! wp_verify_nonce( $nonce, 'mo-openid-capp-delete' ) ) {
     142        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     143    } else {
     144        if ( current_user_can( 'administrator' ) ) {
     145            $appname  = stripslashes( sanitize_text_field( $_POST['app_name'] ) );
     146            $appslist = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     147            $status   = get_option( 'mo_openid_enable_custom_app_' . $appname );
     148            foreach ( $appslist as $key => $app ) {
     149                if ( $appname == $key ) {
     150                    unset( $appslist[ $key ] );
     151                }
     152            }
     153            if ( ! empty( $appslist ) ) {
     154                update_option( 'mo_openid_apps_list', maybe_serialize( $appslist ) );
     155            } else {
     156                delete_option( 'mo_openid_apps_list' );
     157            }
     158            update_option( 'mo_openid_enable_custom_app_' . $appname, '0' );
     159            wp_send_json( array( 'status' => $status ) );
     160        }
     161    }
     162}
     163
     164function mo_disable_app() {
     165    $nonce = sanitize_text_field( $_POST['mo_openid_disable_app_nonce'] );
     166    if ( ! wp_verify_nonce( $nonce, 'mo-openid-disable-app-nonce' ) ) {
     167        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     168    } else {
     169        if ( current_user_can( 'administrator' ) ) {
     170            $appname = sanitize_text_field( $_POST['app_name'] );
     171            update_option( 'mo_openid_enable_custom_app_' . $appname, 0 );
     172            update_option( 'mo_openid_' . $appname . '_enable', 0 );
     173        }
     174    }
     175}
     176
     177function mo_openid_test_configuration_update_action() {
     178    $nonce = sanitize_text_field( $_POST['mo_openid_test_configuration_update_nonce'] );
     179    if ( ! wp_verify_nonce( $nonce, 'mo-openid-test-configuration-update-nonce' ) ) {
     180        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     181    } else {
     182        if ( current_user_can( 'administrator' ) ) {
     183            update_option( 'mo_openid_test_configuration', 1 );
     184        }
     185    }
     186}
     187
     188function attribute_url() {
     189    $url = home_url();
     190    return $url;
     191}
     192
     193function custom_app_enable_change_update() {
     194    $nonce = sanitize_text_field( $_POST['mo_openid_custom_app_enable_change_update_nonce'] );
     195    if ( ! wp_verify_nonce( $nonce, 'mo-openid-custom-app-enable-change-nonce' ) ) {
     196        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     197    } else {
     198        if ( current_user_can( 'administrator' ) ) {
     199            $appname = stripslashes( sanitize_text_field( $_POST['appname'] ) );
     200            if ( sanitize_text_field( $_POST['custom_app_enable_change'] ) ) {   // set default app
     201                if ( mo_openid_is_customer_registered() ) {
     202                    update_option( 'mo_openid_' . $appname . '_enable', sanitize_text_field( $_POST['custom_app_enable_change'] ) );
     203                    update_option( 'mo_openid_enable_custom_app_' . $appname, 0 );
     204                    wp_send_json( array( 'status' => 'true' ) );
     205                } else {
     206                    // wp_send_json(["status" => 'false']);
     207                    wp_send_json( array( 'status' => 'true' ) );
     208                }
     209            } else {
     210                if ( get_option( 'mo_openid_apps_list' ) ) {
     211                    $appslist = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     212                    if ( ! empty( $appslist[ $appname ]['clientid'] ) && ! empty( $appslist[ $appname ]['clientsecret'] ) ) {
     213                        update_option( 'mo_openid_enable_custom_app_' . $appname, 1 );
     214                        wp_send_json( array( 'status' => 'Turned_Off' ) );
     215                    } else {
     216                        update_option( 'mo_openid_enable_custom_app_' . $appname, 0 );
     217                        wp_send_json( array( 'status' => 'No_cust_app' ) );
     218                    }
     219                } else {
     220                    wp_send_json( array( 'status' => 'No_cust_app' ) );
     221                }
     222            }
     223        }
     224    }
     225}
     226
     227function mo_register_customer_toggle_update() {
     228    $nonce = sanitize_text_field( $_POST['mo_openid_customer_toggle_update_nonce'] );
     229    if ( ! wp_verify_nonce( $nonce, 'mo-openid-customer-toggle-update-nonce' ) ) {
     230        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     231    } else {
     232        if ( current_user_can( 'administrator' ) ) {
     233            if ( mo_openid_is_customer_registered() ) {
     234                $appname = stripslashes( sanitize_text_field( $_POST['appname'] ) );
     235                if ( isset( $appname ) ) {
     236                    update_option( 'mo_openid_enable_custom_app_' . $appname, 0 );
     237                }
     238                wp_send_json( array( 'status' => true ) );
     239            } else {
     240                wp_send_json( array( 'status' => false ) );
     241            }
     242        }
     243    }
     244}
     245
     246function mo_openid_check_capp_enable() {
     247    $nonce = sanitize_text_field( $_POST['mo_openid_check_capp_enable_nonce'] );
     248    if ( ! wp_verify_nonce( $nonce, 'mo-openid-check-capp-enable-nonce' ) ) {
     249        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     250    } else {
     251        if ( current_user_can( 'administrator' ) ) {
     252            if ( get_option( 'mo_openid_apps_list' ) ) {
     253                $appslist = maybe_unserialize( get_option( 'mo_openid_apps_list' ) );
     254                $appname  = stripslashes( sanitize_text_field( $_POST['app_name'] ) );
     255                if ( ! empty( $appslist[ $appname ]['clientid'] ) && ! empty( $appslist[ $appname ]['clientsecret'] ) ) {
     256                    wp_send_json( array( 'status' => true ) );
     257                } else {
     258                    wp_send_json( array( 'status' => false ) );
     259                }
     260            } else {
     261                wp_send_json( array( 'status' => false ) );
     262            }
     263        }
     264    }
     265}
  • miniorange-login-openid/trunk/view/customise_social_icons/mo_openid_cust_icons.php

    r2769271 r2853010  
    55    <form id="form-apps" name="form-apps" method="post" action="">
    66        <input type="hidden" name="option" value="mo_openid_customise_social_icons" />
    7         <input type="hidden" name="mo_openid_customise_social_icons_nonce" value="<?php echo wp_create_nonce( 'mo-openid-customise-social-icons-nonce' ); ?>"/>
     7        <input type="hidden" name="mo_openid_customise_social_icons_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-customise-social-icons-nonce' )); ?>"/>
    88
    99        <div style="min-height: 608px" class="mo_openid_table_layout">
     
    1111                <div style="width: 100%;">
    1212                    <div style="float:left;width:50%;">
    13                         <label style="font-size: 1.2em;"><b><?php echo mo_sl('Shape');?></b><br></label>
    14                         <label class="mo-openid-radio-container"><?php echo mo_sl('Round');?>
     13                        <label style="font-size: 1.2em;"><b><?php echo esc_attr(mo_sl('Shape'));?></b><br></label>
     14                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Round'));?>
    1515                            <input type="radio" id="mo_openid_login_shape_round"  name="mo_openid_login_theme" value="circle" onclick="shape_change();checkLoginButton();moLoginPreview(document.getElementById('mo_login_icon_size').value ,'circle',setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())" <?php checked( get_option('mo_openid_login_theme') == 'circle' );?> /><br>
    1616                            <span class="mo-openid-radio-checkmark"></span></label>
    17                         <label class="mo-openid-radio-container"><?php echo mo_sl('Rounded Edges');?>
     17                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Rounded Edges'));?>
    1818                            <input type="radio" id="mo_openid_login_shape_rounded_edges" name="mo_openid_login_theme" value="oval" onclick="shape_change();checkLoginButton();moLoginPreview(document.getElementById('mo_login_icon_size').value ,'oval',setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"  <?php checked( get_option('mo_openid_login_theme') == 'oval' );?> /><br>
    1919                            <span class="mo-openid-radio-checkmark"></span></label>
    2020
    21                         <label class="mo-openid-radio-container"><?php echo mo_sl('Square');?>
     21                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Square'));?>
    2222                            <input type="radio" id="mo_openid_login_shape_square" name="mo_openid_login_theme" value="square" onclick="shape_change();checkLoginButton();moLoginPreview(document.getElementById('mo_login_icon_size').value ,'square',setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())" <?php checked( get_option('mo_openid_login_theme') == 'square' );?> /><br>
    2323                            <span class="mo-openid-radio-checkmark"></span></label>
    24                         <label class="mo-openid-radio-container"><?php echo mo_sl('Long Button');?>
     24                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Long Button'));?>
    2525                            <input type="radio" id="mo_openid_login_shape_longbutton" name="mo_openid_login_theme" value="longbutton" onclick="shape_change();checkLoginButton();moLoginPreview(document.getElementById('mo_login_icon_width').value ,'longbutton',setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())" <?php checked( get_option('mo_openid_login_theme') == 'longbutton' );?> /><br>
    2626                            <span class="mo-openid-radio-checkmark"></span></label>
    2727                        <hr>
    28                         <label style="font-size: 1.2em;"><b><?php echo mo_sl('Effects');?></b><br></label>
    29                         <label class="mo-openid-radio-container"><?php echo mo_sl('No Effect');?>
     28                        <label style="font-size: 1.2em;"><b><?php echo esc_attr(mo_sl('Effects'));?></b><br></label>
     29                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('No Effect'));?>
    3030                            <input type="radio" id="mo_openid_button_theme_effect_no" name="mo_openid_button_theme_effect" value="noeffect" onclick="shape_change();checkLoginButton();moLoginPreview(setSizeOfIcons() ,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,'noeffect')" <?php checked( get_option('mo_openid_button_theme_effect') == 'noeffect' );?>/><br>
    3131                            <span class="mo-openid-radio-checkmark"></span></label>
    32                         <label class="mo-openid-radio-container"><?php echo mo_sl('Transform Effect');?>
     32                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Transform Effect'));?>
    3333                            <input type="radio" id="mo_openid_button_theme_effect_transform" name="mo_openid_button_theme_effect" value="transform" onclick="shape_change();checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,'transform')"  <?php checked( get_option('mo_openid_button_theme_effect') == 'transform' );?>/><br>
    3434                            <span class="mo-openid-radio-checkmark" ></span></label>
     
    3636                    </div>
    3737                    <div style="float: right; width: 50%;">
    38                         <label style="font-size: 1.2em;"><b><?php echo mo_sl('Theme');?></b><br></label>
    39                         <label class="mo-openid-radio-container"><?php echo mo_sl('Default');?>
     38                        <label style="font-size: 1.2em;"><b><?php echo esc_attr(mo_sl('Theme'));?></b><br></label>
     39                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Default'));?>
    4040                            <input type="radio" id="mo_openid_default_background_radio" name="mo_openid_login_custom_theme"
    4141                                   value="default" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'default',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
     
    4444
    4545
    46                         <label for="mo_openid_white_background_radio" class="mo-openid-radio-container"><?php echo mo_sl('White Background');?>
     46                        <label for="mo_openid_white_background_radio" class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('White Background'));?>
    4747                            <input type="radio" id="mo_openid_white_background_radio"  name="mo_openid_login_custom_theme"
    4848                                   value="white" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'white',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
     
    5050                            <span class="mo-openid-radio-checkmark"></span></label>
    5151
    52                         <label class="mo-openid-radio-container"><?php echo mo_sl('Custom background*');?>
     52                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Custom background*'));?>
    5353                            <input type="radio" id="mo_openid_custom_background_radio"  name="mo_openid_login_custom_theme" value="custom" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'custom',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
    5454                                <?php checked( get_option('mo_openid_login_custom_theme') == 'custom' );?> /><br>
     
    5858
    5959
    60                         <label for="mo_openid_hover_radio" class="mo-openid-radio-container"><?php echo mo_sl('Hover');?>
     60                        <label for="mo_openid_hover_radio" class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Hover'));?>
    6161                            <input type="radio" id="mo_openid_hover_radio"  name="mo_openid_login_custom_theme"
    6262                                   value="hover" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'hover',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
     
    6565
    6666
    67                         <label for="mo_openid_custom_hover_radio" class="mo-openid-radio-container"><?php echo mo_sl('Custom Hover');?>
     67                        <label for="mo_openid_custom_hover_radio" class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Custom Hover'));?>
    6868                            <input type="radio" id="mo_openid_custom_hover_radio"  name="mo_openid_login_custom_theme"
    6969                                   value="custom_hover" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'custom_hover',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
     
    7373
    7474
    75                         <label for="mo_openid_custom_smart_radio" class="mo-openid-radio-container"><?php echo mo_sl('Smart');?>
     75                        <label for="mo_openid_custom_smart_radio" class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Smart'));?>
    7676                            <input type="radio" id="mo_openid_custom_smart_radio"  name="mo_openid_login_custom_theme"
    7777                                   value="smart" onclick="checkLoginButton();moLoginPreview(setSizeOfIcons(), setLoginTheme(),'smart',document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value,document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())"
     
    8383                    </div>
    8484                </div>
    85                 <div style="width: 85%; float: left" class="mo_openid_note_style"><strong><?php echo mo_sl('*Custom background:');?></strong> <?php echo mo_sl('This will change the background color of login icons');?>.</div>
     85                <div style="width: 85%; float: left" class="mo_openid_note_style"><strong><?php echo esc_attr(mo_sl('*Custom background:'));?></strong> <?php echo esc_attr(mo_sl('This will change the background color of login icons'));?>.</div>
    8686
    8787                <div style="width: 100%; float: left">
    8888                    <div style="float:left;width:50%; margin-top: 5%">
    89                         <label style="font-size: 1.2em;"><b><?php echo mo_sl('Size of Icons');?></b></label>
     89                        <label style="font-size: 1.2em;"><b><?php echo esc_attr(mo_sl('Size of Icons'));?></b></label>
    9090                        <div id="long_button_size">
    91                             <?php echo mo_sl('Width:');?> &nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_width" onkeyup="moLoginWidthValidate(this)" name="mo_login_icon_custom_width" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_width'))?>" >
     91                            <?php echo esc_attr(mo_sl('Width:'));?> &nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_width" onkeyup="moLoginWidthValidate(this)" name="mo_login_icon_custom_width" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_width'))?>" >
    9292                            <input id="mo_login_width_plus" type="button" value="+" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value ,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" >
    9393                            <input id="mo_login_width_minus" type="button" value="-" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value ,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" ><br/>
    94                             <?php echo mo_sl('Height:');?>&nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_height" onkeyup="moLoginHeightValidate(this)" name="mo_login_icon_custom_height" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_height'))?>" >
     94                            <?php echo esc_attr(mo_sl('Height:'));?>&nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_height" onkeyup="moLoginHeightValidate(this)" name="mo_login_icon_custom_height" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_height'))?>" >
    9595                            <input id="mo_login_height_plus" type="button" value="+" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" >
    9696                            <input id="mo_login_height_minus" type="button" value="-" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" ><br/>
    97                             <?php echo mo_sl('Curve:');?>&nbsp;&nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_custom_boundary" onkeyup="moLoginBoundaryValidate(this)" name="mo_login_icon_custom_boundary" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_boundary'))?>" />
     97                            <?php echo esc_attr(mo_sl('Curve:'));?>&nbsp;&nbsp;<input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" id="mo_login_icon_custom_boundary" onkeyup="moLoginBoundaryValidate(this)" name="mo_login_icon_custom_boundary" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_custom_boundary'))?>" />
    9898                            <input id="mo_login_boundary_plus" type="button" value="+" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" />
    9999                            <input id="mo_login_boundary_minus" type="button" value="-" onmouseup="moLoginPreview(document.getElementById('mo_login_icon_width').value,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_height').value,document.getElementById('mo_login_icon_custom_boundary').value)" />
     
    106106                    </div>
    107107                    <div style="width: 50%;float: right;margin-top: 5%">
    108                         <label style="font-size: 1.2em;"><b><?php echo mo_sl('Space between Icons');?></b></label><br/>
     108                        <label style="font-size: 1.2em;"><b><?php echo esc_attr(mo_sl('Space between Icons'));?></b></label><br/>
    109109                        <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 16%;margin-bottom: 3px" onkeyup="moLoginSpaceValidate(this)" id="mo_login_icon_space" name="mo_login_icon_space" type="text" value="<?php echo esc_attr(get_option('mo_login_icon_space'))?>"/>
    110110                        <input id="mo_login_space_plus" type="button" value="+" onmouseup="moLoginPreview(setSizeOfIcons() ,setLoginTheme(),setLoginCustomTheme(),document.getElementById('mo_login_icon_custom_color').value,document.getElementById('mo_login_icon_space').value,document.getElementById('mo_login_icon_custom_boundary').value,'',document.getElementById('mo_login_icon_custom_hover_color').value,document.getElementById('mo_login_icon_custom_smart_color1').value,document.getElementById('mo_login_icon_custom_smart_color2').value,setLoginEffect())" />
     
    118118                    <br><hr>
    119119                    <div style="width: 100%">
    120                         <label class="mo_openid_checkbox_container"><?php echo mo_sl('Load Fontawesome files');?>
     120                        <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Load Fontawesome files'));?>
    121121                            <input  type="checkbox" id="mo_fonawesome_load" name="mo_openid_fonawesome_load" value="1" <?php checked( get_option('mo_openid_fonawesome_load') == 1 );?> /><br>
    122122                            <span class="mo_openid_checkbox_checkmark"></span>
    123123                        </label>
    124124
    125                         <label class="mo_openid_checkbox_container"><?php echo mo_sl('Load bootstrap files');?>
     125                        <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Load bootstrap files'));?>
    126126                            <input  type="checkbox" id="mo_bootstrap_load" name="mo_openid_bootstrap_load" value="1" <?php checked( get_option('mo_openid_bootstrap_load') == 1 );?> /><br>
    127127                            <span class="mo_openid_checkbox_checkmark"></span>
    128128                        </label>
    129                         <h4 style="font-size: 1.2em"><?php echo mo_sl('Customize Text For Social Login Buttons / Icons');?></h4>
     129                        <h4 style="font-size: 1.2em"><?php echo esc_attr(mo_sl('Customize Text For Social Login Buttons / Icons'));?></h4>
    130130
    131131                        <div style="width: 40%; float: left">
    132                             <label class="mo_openid_fix_fontsize"><?php echo mo_sl('Select color for customize text:');?></label>
     132                            <label class="mo_openid_fix_fontsize"><?php echo esc_attr(mo_sl('Select color for customize text:'));?></label>
    133133                        </div>
    134134                        <div style="width: 60%; float: right;">
     
    138138                    <div style="width: 100%; margin-top: 12%">
    139139                        <div style="width: 100%;">
    140                             <label class="mo_openid_fix_fontsize"><?php echo mo_sl('Enter text to show above login widget:');?></label>
     140                            <label class="mo_openid_fix_fontsize"><?php echo esc_attr(mo_sl('Enter text to show above login widget:'));?></label>
    141141                            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_openid_login_widget_customize_text" value="<?php echo esc_attr(get_option('mo_openid_login_widget_customize_text')); ?>" />
    142142                        </div>
     
    144144                    <div style="width: 100%; margin-top: 2%" id="long_button_text">
    145145                        <div style="width: 100%; float: left">
    146                             <label class="mo_openid_fix_fontsize"><?php echo mo_sl('Enter text to show on your login buttons:');?></label>
     146                            <label class="mo_openid_fix_fontsize"><?php echo esc_attr(mo_sl('Enter text to show on your login buttons:'));?></label>
    147147                            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_openid_login_button_customize_text" value="<?php echo esc_attr(get_option('mo_openid_login_button_customize_text')); ?>"  />
    148148                        </div>
     
    151151                <div style="width: 100%; float: left">
    152152                    <br><hr>
    153                     <h4 style="font-size: 1.2em"><?php echo mo_sl('Customize Text to show user after Login');?></h4>
     153                    <h4 style="font-size: 1.2em"><?php echo esc_attr(mo_sl('Customize Text to show user after Login'));?></h4>
    154154                    <div style="width: 100%;">
    155155                        <div style="width: 100%; float: left">
    156                             <label class="mo_openid_fix_fontsize"><?php echo mo_sl('Enter text to show before the logout link. Use ##username## to display current username:');?></label> <br>
     156                            <label class="mo_openid_fix_fontsize"><?php echo esc_attr(mo_sl('Enter text to show before the logout link. Use ##username## to display current username:'));?></label> <br>
    157157                            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_openid_login_widget_customize_logout_name_text"  value="<?php echo esc_attr(get_option('mo_openid_login_widget_customize_logout_name_text')); ?>" />
    158158                        </div>
     
    161161                        <br>
    162162                        <div style="width: 100%; float: left">
    163                             <label class="mo_openid_fix_fontsize"><?php echo mo_sl('Enter text to show as logout link:');?></label>
    164                             <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_openid_login_widget_customize_logout_text" value="<?php echo (get_option('mo_openid_login_widget_customize_logout_text')); ?>"  />
     163                            <label class="mo_openid_fix_fontsize"><?php echo esc_attr(mo_sl('Enter text to show as logout link:'));?></label>
     164                            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_openid_login_widget_customize_logout_text" value="<?php echo esc_attr(get_option('mo_openid_login_widget_customize_logout_text')); ?>"  />
    165165                        </div>
    166166                    </div>
    167167                    <br/>
    168168                    <div style="margin-top: 8%; margin-bottom: 2%">
    169                         <b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
     169                        <b><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
    170170                    </div>
    171171                </div>
     
    177177                <div style="padding-bottom: 1%; padding-top: 3%">
    178178                    <?php
    179                     $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','yahoo'=>'#430297','yandex'=>'#2795e9','instagram'=>'#3f729b','linkedin'=>'#007bb6','amazon'=>'#ff9900','paypal'=>'#0d127a','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','trello'=>'#0079bf','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','gitlab'=>'#30353e','slack'=>'#4c154d','dropbox'=>'#0061ff','mailru'=>'#0000FF','kakao'=>'#ffe812');
     179                    $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','yahoo'=>'#430297','yandex'=>'#2795e9','linkedin'=>'#007bb6','amazon'=>'#ff9900','paypal'=>'#0d127a','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','trello'=>'#0079bf','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','gitlab'=>'#30353e','slack'=>'#4c154d','dropbox'=>'#0061ff','mailru'=>'#0000FF','kakao'=>'#ffe812');
    180180
    181181                    $app_pos=get_option('app_pos');
     
    195195                                $icon = 'salesforce';
    196196                            }
    197                        
    198197                            if($active_app=='google'){
    199198                                $count_app++;
    200199                                ?>
    201                                 <i class="mo_login_icon_preview <?php echo $extra;?> fab fa-<?php echo $active_app;?>" id="mo_login_icon_preview_facebook" style="background:<?php echo $default_color[$active_app];?> !important;text-align:center;margin-top:5px;color: white" ></i>
    202                                 <a style="background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 38px, rgb(79, 113, 232) 5%) !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;" id="mo_login_button_preview_google" class="mo_btn mo_btn-block mo_btn-defaulttheme mo_btn-social mo_btn-google mo_btn-custom-size mo_login_button mo_btn-<?php echo $active_app ?> <?php echo $extra;?>"> <img class="fa" src="<?php echo plugin_url.'/g.png'?>"><?php
     200                                <i class="mo_login_icon_preview <?php echo esc_attr($extra);?> fab fa-<?php echo esc_attr($active_app);?>" id="mo_login_icon_preview_facebook" style="background:<?php echo esc_attr($default_color[$active_app]);?> !important;text-align:center;margin-top:5px;color: white" ></i>
     201                                <a style="background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 38px, rgb(79, 113, 232) 5%) !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;" id="mo_login_button_preview_google" class="mo_btn mo_btn-block mo_btn-defaulttheme mo_btn-social mo_btn-google mo_btn-custom-size mo_login_button mo_btn-<?php echo esc_attr($active_app) ?> <?php echo esc_attr($extra);?>"> <img class="fa" src="<?php echo esc_url(plugin_url.'/g.png')?>"><?php
    203202                                    ?> <span><?php echo esc_html(get_option('mo_openid_login_button_customize_text'));?> Google</span></a>
    204203
    205                                 <i class="mo_white_login_icon_preview  fab fa-google" id="mo_white_login_icon_preview_google"  style="color:<?php echo $default_color[$active_app];?>;text-align:center;margin-top:5px;"></i>
    206                                 <a id="mo_white_login_button_preview_google" class="mo_btn mo_btn-block mo_openid_mo_btn-whitetheme  mo_btn-social mo_btn-custom-size "> <img class="fa" src="<?php echo plugin_url.'/g.png'?>"><?php
     204                                <i class="mo_white_login_icon_preview  fab fa-google" id="mo_white_login_icon_preview_google"  style="color:<?php echo esc_attr($default_color[$active_app]);?>;text-align:center;margin-top:5px;"></i>
     205                                <a id="mo_white_login_button_preview_google" class="mo_btn mo_btn-block mo_openid_mo_btn-whitetheme  mo_btn-social mo_btn-custom-size "> <img class="fa" src="<?php echo esc_url(PLUGIN_URL.'/g.png')?>"><?php
    207206                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> Google</a>
    208207
    209                                 <div style="display: inline-block" id="mo_hover_div_google" class="mo_hover_div" onmouseover="mo_hover_on(this,'<?php echo $default_color[$active_app]?>','<?php echo $active_app; ?>')" onmouseout="mo_hover_off(this,'<?php echo $default_color[$active_app]?>','<?php echo $active_app; ?>')">
    210                                     <i class="mo_hover_login_icon_preview fab fa-<?php echo $icon ?> " id="mo_hover_login_icon_preview_<?php echo $active_app ?>"   style="color:<?php echo $default_color[$active_app];?>;text-align:center;margin-top:5px;"></i>
    211                                     <a id="mo_hover_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-hovertheme   mo_btn-social mo_btn-custom-size "> <i id="mo_hover_long_button_<?php echo $active_app ?>" style="color:<?php echo $default_color[$active_app];?>;" class="fab fa-<?php echo $icon ?> mofab"></i><?php
    212                                         echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     208                                <div style="display: inline-block" id="mo_hover_div_google" class="mo_hover_div" onmouseover="mo_hover_on(this,'<?php echo esc_attr($default_color[$active_app])?>','<?php echo esc_attr($active_app); ?>')" onmouseout="mo_hover_off(this,'<?php echo esc_attr($default_color[$active_app])?>','<?php echo esc_attr($active_app); ?>')">
     209                                    <i class="mo_hover_login_icon_preview fab fa-<?php echo esc_attr($icon) ?> " id="mo_hover_login_icon_preview_<?php echo esc_attr($active_app) ?>"   style="color:<?php echo esc_attr($default_color[$active_app]);?>;text-align:center;margin-top:5px;"></i>
     210                                    <a id="mo_hover_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-hovertheme   mo_btn-social mo_btn-custom-size "> <i id="mo_hover_long_button_<?php echo esc_attr($active_app) ?>" style="color:<?php echo esc_attr($default_color[$active_app]);?>;" class="fab fa-<?php echo esc_attr($icon) ?> mofab"></i><?php
     211                                        echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    213212                                </div>
    214213
    215                                 <div style="display: inline-block" id="mo_customhover_div_google" class="mo_customhover_div" onmouseover="mo_custom_hover_on(this,'<?php echo $active_app; ?>')" onmouseout="mo_custom_hover_off(this,'<?php echo $active_app; ?>')" >
    216                                     <i class="mo_custom_hover_login_icon_preview fab fa-<?php echo $icon ?> " id="mo_custom_hover_login_icon_preview_<?php echo $active_app ?>"   style="color:<?php echo get_option('mo_login_icon_custom_hover_color');?>;text-align:center;"></i>
    217                                     <a id="mo_custom_hover_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customhovertheme   mo_btn-social mo_btn-custom-size " style="color:#<?php echo get_option('mo_login_icon_custom_hover_color');?>;border-color:#<?php echo get_option('mo_login_icon_custom_hover_color');?>;"> <i id="mo_hover_long_button_<?php echo $active_app ?>" style="color:<?php echo get_option('mo_login_icon_custom_hover_color');?>;text-align:center;" class="fab mofab fa-<?php echo $icon ?>"></i><?php
    218                                         echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     214                                <div style="display: inline-block" id="mo_customhover_div_google" class="mo_customhover_div" onmouseover="mo_custom_hover_on(this,'<?php echo esc_attr($active_app); ?>')" onmouseout="mo_custom_hover_off(this,'<?php echo esc_attr($active_app); ?>')" >
     215                                    <i class="mo_custom_hover_login_icon_preview fab fa-<?php echo esc_attr($icon) ?> " id="mo_custom_hover_login_icon_preview_<?php echo esc_attr($active_app) ?>"   style="color:<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;text-align:center;"></i>
     216                                    <a id="mo_custom_hover_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customhovertheme   mo_btn-social mo_btn-custom-size " style="color:#<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;border-color:#<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;"> <i id="mo_hover_long_button_<?php echo esc_attr($active_app) ?>" style="color:<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;text-align:center;" class="fab mofab fa-<?php echo esc_attr($icon) ?>"></i><?php
     217                                        echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    219218                                </div>
    220219
    221                                 <i class="mo_custom_smart_login_icon_preview fab fa-google mo_button_smart_i " id="mo_custom_smart_login_icon_preview_google"  style="background:linear-gradient(90deg,#<?php echo get_option('mo_login_icon_custom_smart_color1');?>,#<?php echo get_option('mo_login_icon_custom_smart_color2');?>);text-align:center;margin-top:5px;color:#FFFFFF"></i>
    222                                 <a id="mo_custom_smart_login_button_preview_google" class="mo_btn_smart mo_btn-block   mo_btn-social mo_btn-custom-size mo_openid_mo_btn-smarttheme  mo_btn-social mo_btn-custom-size " style="background:linear-gradient(90deg,#<?php echo get_option('mo_login_icon_custom_smart_color1');?>,#<?php echo get_option('mo_login_icon_custom_smart_color2');?>);text-align:center;margin-top:5px;"> <i style="color:#FFFFFF" class="fab fa-google mofab"></i><?php
    223                                     echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     220                                <i class="mo_custom_smart_login_icon_preview fab fa-google mo_button_smart_i " id="mo_custom_smart_login_icon_preview_google"  style="background:linear-gradient(90deg,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color1'));?>,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color2'));?>);text-align:center;margin-top:5px;color:#FFFFFF"></i>
     221                                <a id="mo_custom_smart_login_button_preview_google" class="mo_btn_smart mo_btn-block   mo_btn-social mo_btn-custom-size mo_openid_mo_btn-smarttheme  mo_btn-social mo_btn-custom-size " style="background:linear-gradient(90deg,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color1'));?>,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color2'));?>);text-align:center;margin-top:5px;"> <i style="color:#FFFFFF" class="fab fa-google mofab"></i><?php
     222                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    224223
    225224
     
    234233                                $count_app++;
    235234                                ?>
    236                                 <i class="mo_login_icon_preview <?php echo $extra;?> fab fa-<?php echo $icon;?>" id="mo_login_icon_preview_facebook" style="background:<?php echo $default_color[$active_app];?>;text-align:center;margin-top:5px;color: #FFFFFF" ></i>
    237                                 <a id="mo_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_btn-defaulttheme mo_btn-social mo_btn-custom-size mo_login_button mo_btn-<?php echo $icon ?> <?php echo $extra;?>"> <i class="fab fa-<?php echo $icon ?> mo_login_button mofab"></i><?php
    238                                     echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app?></a>
    239 
    240                                 <i class="mo_white_login_icon_preview fab fa-<?php echo $icon ?> " id="mo_white_login_icon_preview_<?php echo $active_app ?>"  style="color:<?php echo $default_color[$active_app];?>;text-align:center;margin-top:5px;"></i>
    241                                 <a id="mo_white_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-whitetheme   mo_btn-social mo_btn-custom-size "> <i style="color:<?php echo $default_color[$active_app];?>;" class="fab fa-<?php echo $icon ?> mofab"></i><?php
    242                                     echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
    243 
    244                                 <div style="display: inline-block" class="mo_hover_div" id="mo_hover_div" onmouseover="mo_hover_on(this,'<?php echo $default_color[$active_app]?>','<?php echo $active_app; ?>')" onmouseout="mo_hover_off(this,'<?php echo $default_color[$active_app]?>','<?php echo $active_app; ?>')">
    245                                     <i class="mo_hover_login_icon_preview fab fa-<?php echo $icon ?> " id="mo_hover_login_icon_preview_<?php echo $active_app ?>"   style="color:<?php echo $default_color[$active_app];?>;text-align:center;margin-top:5px;"></i>
    246                                     <a id="mo_hover_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-hovertheme   mo_btn-social mo_btn-custom-size "> <i id="mo_hover_long_button_<?php echo $active_app ?>" style="color:<?php echo $default_color[$active_app];?>;" class="fab fa-<?php echo $icon ?>  mofab"></i><?php
    247                                         echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     235                                <i class="mo_login_icon_preview <?php echo esc_attr($extra);?> fab fa-<?php echo esc_attr($icon);?>" id="mo_login_icon_preview_facebook" style="background:<?php echo esc_attr($default_color[$active_app]);?>;text-align:center;margin-top:5px;color: #FFFFFF" ></i>
     236                                <a id="mo_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_btn-defaulttheme mo_btn-social mo_btn-custom-size mo_login_button mo_btn-<?php echo esc_attr($icon) ?> <?php echo esc_attr($extra);?>"> <i class="fab fa-<?php echo esc_attr($icon) ?> mo_login_button mofab"></i><?php
     237                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app)?></a>
     238
     239                                <i class="mo_white_login_icon_preview fab fa-<?php echo esc_attr($icon) ?> " id="mo_white_login_icon_preview_<?php echo esc_attr($active_app) ?>"  style="color:<?php echo esc_attr($default_color[$active_app]);?>;text-align:center;margin-top:5px;"></i>
     240                                <a id="mo_white_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-whitetheme   mo_btn-social mo_btn-custom-size "> <i style="color:<?php echo esc_attr($default_color[$active_app]);?>;" class="fab fa-<?php echo esc_attr($icon) ?> mofab"></i><?php
     241                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
     242
     243                                <div style="display: inline-block" class="mo_hover_div" id="mo_hover_div" onmouseover="mo_hover_on(this,'<?php echo esc_attr($default_color[$active_app])?>','<?php echo esc_attr($active_app); ?>')" onmouseout="mo_hover_off(this,'<?php echo esc_attr($default_color[$active_app])?>','<?php echo esc_attr($active_app); ?>')">
     244                                    <i class="mo_hover_login_icon_preview fab fa-<?php echo esc_attr($icon) ?> " id="mo_hover_login_icon_preview_<?php echo esc_attr($active_app) ?>"   style="color:<?php echo esc_attr($default_color[$active_app]);?>;text-align:center;margin-top:5px;"></i>
     245                                    <a id="mo_hover_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-hovertheme   mo_btn-social mo_btn-custom-size "> <i id="mo_hover_long_button_<?php echo esc_attr($active_app) ?>" style="color:<?php echo esc_attr($default_color[$active_app]);?>;" class="fab fa-<?php echo esc_attr($icon) ?>  mofab"></i><?php
     246                                        echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    248247                                </div>
    249248
    250                                 <div style="display: inline-block" class="mo_customhover_div" id="mo_customhover_div_<?php echo $active_app ?>" onmouseover="mo_custom_hover_on(this,'<?php echo $active_app; ?>')" onmouseout="mo_custom_hover_off(this,'<?php echo $active_app; ?>')" >
    251                                     <i class="mo_custom_hover_login_icon_preview fab fa-<?php echo $icon ?> " id="mo_custom_hover_login_icon_preview_<?php echo $active_app ?>"   style="color:#<?php echo get_option('mo_login_icon_custom_hover_color');?>;text-align:center;"></i>
    252                                     <a id="mo_custom_hover_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customhovertheme   mo_btn-social mo_btn-custom-size " style="color:#<?php echo get_option('mo_login_icon_custom_hover_color');?>;border-color:#<?php echo get_option('mo_login_icon_custom_hover_color');?>;"> <i id="mo_hover_long_button_<?php echo $active_app ?>" style="text-align:center;" class="fab fa-<?php echo $icon ?>  mofab"></i><?php
    253                                         echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     249                                <div style="display: inline-block" class="mo_customhover_div" id="mo_customhover_div_<?php echo esc_attr($active_app) ?>" onmouseover="mo_custom_hover_on(this,'<?php echo esc_attr($active_app); ?>')" onmouseout="mo_custom_hover_off(this,'<?php echo esc_attr($active_app); ?>')" >
     250                                    <i class="mo_custom_hover_login_icon_preview fab fa-<?php echo esc_attr($icon) ?> " id="mo_custom_hover_login_icon_preview_<?php echo esc_attr($active_app) ?>"   style="color:#<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;text-align:center;"></i>
     251                                    <a id="mo_custom_hover_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customhovertheme   mo_btn-social mo_btn-custom-size " style="color:#<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;border-color:#<?php echo esc_attr(get_option('mo_login_icon_custom_hover_color'));?>;"> <i id="mo_hover_long_button_<?php echo esc_attr($active_app) ?>" style="text-align:center;" class="fab fa-<?php echo esc_attr($icon) ?>  mofab"></i><?php
     252                                        echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    254253                                </div>
    255254
    256                                 <i class="mo_custom_smart_login_icon_preview fab fa-<?php echo $icon ?>  " id="mo_custom_smart_login_icon_preview_<?php echo $active_app ?>"  style="background:linear-gradient(90deg,#<?php echo get_option('mo_login_icon_custom_smart_color1');?>,#<?php echo get_option('mo_login_icon_custom_smart_color2');?>);text-align:center;margin-top:5px;color:#FFFFFF"></i>
    257                                 <a id="mo_custom_smart_login_button_preview_<?php echo $active_app ?>" class=" mo_btn-block   mo_btn-social mo_btn-custom-size mo_openid_mo_btn-smarttheme  mo_btn-social mo_btn-custom-size " style="background:linear-gradient(90deg,#<?php echo get_option('mo_login_icon_custom_smart_color1');?>,#<?php echo get_option('mo_login_icon_custom_smart_color2');?>);text-align:center;margin-top:5px;"> <i style="color:#FFFFFF" class="fab fa-<?php echo $icon ?> mofab"></i><?php
    258                                     echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
    259 
    260 
    261                                 <i class="mo_custom_login_icon_preview fab fa-<?php echo $icon ?>  " id="mo_custom_login_icon_preview_<?php echo $active_app ?>"  style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    262                                 <a id="mo_custom_login_button_preview_<?php echo $active_app ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customtheme mo_btn-social mo_btn-custom-size " style="color: #FFFFFF"> <i class="fab fa-<?php echo $icon ?> mofab"></i><?php
    263                                     echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo $active_app ?></a>
     255                                <i class="mo_custom_smart_login_icon_preview fab fa-<?php echo esc_attr($icon) ?>  " id="mo_custom_smart_login_icon_preview_<?php echo esc_attr($active_app) ?>"  style="background:linear-gradient(90deg,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color1'));?>,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color2'));?>);text-align:center;margin-top:5px;color:#FFFFFF"></i>
     256                                <a id="mo_custom_smart_login_button_preview_<?php echo esc_attr($active_app) ?>" class=" mo_btn-block   mo_btn-social mo_btn-custom-size mo_openid_mo_btn-smarttheme  mo_btn-social mo_btn-custom-size " style="background:linear-gradient(90deg,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color1'));?>,#<?php echo esc_attr(get_option('mo_login_icon_custom_smart_color2'));?>);text-align:center;margin-top:5px;"> <i style="color:#FFFFFF" class="fab fa-<?php echo esc_attr($icon) ?> mofab"></i><?php
     257                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
     258
     259
     260                                <i class="mo_custom_login_icon_preview fab fa-<?php echo esc_attr($icon) ?>  " id="mo_custom_login_icon_preview_<?php echo esc_attr($active_app) ?>"  style="color:#ffffff;text-align:center;margin-top:5px;"></i>
     261                                <a id="mo_custom_login_button_preview_<?php echo esc_attr($active_app) ?>" class="mo_btn mo_btn-block mo_openid_mo_btn-customtheme mo_btn-social mo_btn-custom-size " style="color: #FFFFFF"> <i class="fab fa-<?php echo esc_attr($icon) ?> mofab"></i><?php
     262                                    echo esc_html(get_option('mo_openid_login_button_customize_text'));?> <?php echo esc_attr($active_app) ?></a>
    264263                                <?php
    265264                            }
     
    273272            </div><br/>
    274273                <div style="border: 1px solid"><br>
    275                     <b style="font-size: 17px;"><?php echo mo_sl('Custom CSS');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></b>
     274                    <b style="font-size: 17px;"><?php echo esc_attr(mo_sl('Custom CSS'));?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>"><?php echo esc_attr(mo_sl('PRO'));?></a></b>
    276275                        <textarea disabled type="text" id="mo_openid_custom_css" style="resize: vertical; width:400px; height:180px;  margin:5% auto;" rows="6" name="mo_openid_custom_css"></textarea><br/><b>Example CSS:</b>
    277276                        <p>NOTE: Please keep the class name same as example CSS.</p>
  • miniorange-login-openid/trunk/view/disp_options/mo_openid_dispopt.php

    r2730588 r2853010  
    11<?php
    2 function mo_openid_disp_opt()
    3 {
    4 ?>
    5     <form id="display" name="display" method="post" action="">
    6         <input type="hidden" name="option" value="mo_openid_enable_display" />
    7         <input type="hidden" name="mo_openid_enable_display_nonce" value="<?php echo wp_create_nonce( 'mo-openid-enable-display-nonce' ); ?>"/>
    8         <div class="mo_openid_table_layout" id="mo_openid_disp_opt_tour"><br/>
    9             <div style="width:40%; background:white; float:left; border: 1px transparent;">
    10                 <b style="font-size: 17px"><?php echo mo_sl('Select the options where you want to display the social login icons');?></b><br><br>
    11                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Default Login Form [wp-admin]');?>
    12                     <input  type="checkbox" id="default_login_enable" name="mo_openid_default_login_enable" value="1" <?php checked( get_option('mo_openid_default_login_enable') == 1 );?> /><br>
    13                     <span class="mo_openid_checkbox_checkmark"></span>
    14                 </label>
    15 
    16                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Default Registration Form');?>
    17 
    18                     <input type="checkbox" id="default_register_enable" name="mo_openid_default_register_enable" value="1" <?php checked( get_option('mo_openid_default_register_enable') == 1 );?> /><br>
    19                     <span class="mo_openid_checkbox_checkmark"></span>
    20                 </label>
    21 
    22                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Comment Form');?>
    23                     <input type="checkbox" id="default_comment_enable" name="mo_openid_default_comment_enable" value="1" <?php checked( get_option('mo_openid_default_comment_enable') == 1 );?> /><br>
    24                     <span class="mo_openid_checkbox_checkmark"></span>
    25                 </label>
    26                 <label class="mo_openid_note_style" style="cursor: auto"><?php echo mo_sl("Don't find your login page in above options use");?> <code id='1'>[miniorange_social_login]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#1', '#shortcode_url_copy')"><span id="shortcode_url_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><?php echo mo_sl( 'to display social icons or');?> <a style="cursor: pointer" onclick="mo_openid_support_form('')"><?php echo mo_sl('Contact Us');?></a></label>
    27                 <br/><br/>
    28                 <b style="font-size:17px;"><?php echo mo_sl("Ultimate Member display options");?> </b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a><br><br>
    29 
    30                 <label class="mo_openid_checkbox_container_disable">
    31                     <input disabled type="checkbox" id="ultimate_before_login_form" /><?php echo mo_sl("Before Ultimate Member Login Form Fields");?>
    32                     <span class="mo_openid_checkbox_checkmark"></span>
    33                 </label>
    34                 <label class="mo_openid_checkbox_container_disable">
    35                     <input disabled type="checkbox" id="ultimate_after_login_form" /><?php echo mo_sl("After Ultimate Member Login Form Fields");?>
    36                     <span class="mo_openid_checkbox_checkmark"></span>
    37                 </label>
    38                 <label class="mo_openid_checkbox_container_disable">
    39                     <input disabled type="checkbox" id="ultimate_center_form" /><?php echo mo_sl("After 'Register button' of Ultimate Member Form");?>
    40                     <span class="mo_openid_checkbox_checkmark"></span>
    41                 </label>
    42                 <label class="mo_openid_checkbox_container_disable">
    43                     <input disabled type="checkbox" id="ultimate_register_form_start" /><?php echo mo_sl("Before Ultimate Member Registration Form Fields");?>
    44                     <span class="mo_openid_checkbox_checkmark"></span>
    45                 </label>
    46                 <label class="mo_openid_checkbox_container_disable">
    47                     <input disabled type="checkbox" id="ultimate_register_form_end" /><?php echo mo_sl("After Ultimate Member Registration Form Fields");?>
    48                     <span class="mo_openid_checkbox_checkmark"></span>
    49                 </label>
    50                 <br/><br/>
    51                 <b style="font-size:17px;"><?php echo mo_sl("MemberPress display options");?> </b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a><br><br>
    52 
    53                 <label class="mo_openid_checkbox_container_disable">
    54                     <input disabled type="checkbox"/><?php echo mo_sl("After MemberPress Login Form");?>
    55                     <span class="mo_openid_checkbox_checkmark"></span>
    56                 </label>
    57                 <label class="mo_openid_checkbox_container_disable">
    58                     <input disabled type="checkbox"/><?php echo mo_sl("After MemberPress Account Form");?>
    59                     <span class="mo_openid_checkbox_checkmark"></span>
    60                 </label>
    61                 <label class="mo_openid_checkbox_container_disable">
    62                     <input disabled type="checkbox"/><?php echo mo_sl("After MemberPress Checkout Form");?>
    63                     <span class="mo_openid_checkbox_checkmark"></span>
    64                 </label>
    65             </div>
    66             <div style="width:50%; background:white; float:right; border: 1px transparent;">
    67                 <b style="font-size:17px;"><?php echo mo_sl('Woocommerce display options');?></b><br><br><br>
    68 
    69                 <label class="mo_openid_checkbox_container">
    70                     <input type="checkbox" id="woocommerce_before_login_form" name="mo_openid_woocommerce_before_login_form" value="1" <?php checked( get_option('mo_openid_woocommerce_before_login_form') == 1 );?> /><?php echo mo_sl("Before WooCommerce Login Form");?>
    71                     <span class="mo_openid_checkbox_checkmark"></span>
    72                 </label>
    73                 <label class="mo_openid_checkbox_container">
    74                     <input type="checkbox" id="woocommerce_center_login_form" name="mo_openid_woocommerce_center_login_form" value="1" <?php checked( get_option('mo_openid_woocommerce_center_login_form') == 1 );?> /><?php echo mo_sl("Before 'Remember Me' of WooCommerce Login Form");?>
    75                     <span class="mo_openid_checkbox_checkmark"></span>
    76                 </label>
    77                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After WooCommerce Login Form');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    78                     <input type="checkbox"  /><br>
    79                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    80                 </label>
    81 
    82                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Before WooCommerce Registration Form');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    83                     <input type="checkbox"  /><br>
    84                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    85                 </label>
    86                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl("Before 'Register button' of WooCommerce Registration Form");?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    87                     <input type="checkbox"  /><br>
    88                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    89                 </label>
    90 
    91                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After WooCommerce Registration Form');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    92                     <input type="checkbox"  /><br>
    93                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    94                 </label>
    95 
    96                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Before WooCommerce Checkout Form');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    97                     <input type="checkbox"  /><br>
    98                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    99                 </label>
    100 
    101                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After WooCommerce Checkout Form');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    102                     <input type="checkbox"  /><br>
    103                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    104                 </label>
    105                 <br/>
    106                 <b style="font-size: 17px;"><?php echo mo_sl('BuddyPress / BuddyBoss display options');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></b><br><br>
    107 
    108                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Before BuddyPress / BuddyBoss Registration Form');?>
    109                     <input type="checkbox"  /><br>
    110                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    111                 </label>
    112 
    113                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Before BuddyPress Account Details');?>
    114                     <input type="checkbox"  /><br>
    115                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    116                 </label>
    117 
    118                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After BuddyPress / BuddyBoss Registration Form');?>
    119                     <input type="checkbox"  /><br><br>
    120                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    121                 </label>
    122                 <br/>
    123                 <b style="font-size: 17px;"><?php echo mo_sl('Paid Memberships Pro display options');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></b><br><br>
    124 
    125                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Before Paid Memberships Pro Checkout Page Submit Button');?>
    126                     <input type="checkbox"  /><br>
    127                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    128                 </label>
    129 
    130                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After Paid Memberships Pro Checkout Page Level Cost');?>
    131                     <input type="checkbox"  /><br>
    132                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    133                 </label>
    134 
    135                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('After Paid Memberships Pro Checkout Page Username');?>
    136                     <input type="checkbox"  /><br><br>
    137                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    138                 </label>
    139 
    140             </div>
    141             <div style="height:available;display: inline; width:100%; background:white; float:right; border: 1px transparent; padding-bottom: 10px;" >
    142                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Display miniOrange logo with social login icons on selected form');?>
    143                     <input type="checkbox" id="moopenid_logo_check" name="moopenid_logo_check" value="1"  <?php checked( get_option('moopenid_logo_check') == 1 );?> />
    144                     <span class="mo_openid_checkbox_checkmark"></span>
    145                 </label>
    146 
    147             <br/><b style="padding: 10px"><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
    148 
    149                <br><br> <label style="cursor: auto" class="mo_openid_note_style"> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo mo_sl('These features are available in premium version only. To know more about the premium plugin ');?><a href="https://plugins.miniorange.com/social-login-social-sharing "><?php echo mo_sl('click here');?></a>.</label>
    150                 <h3  id="mo_openid_show_add_login_icons" onclick="show_license_options1(this.id)"><a id="openid_login_shortcode_title"  aria-expanded="false" ><span class="dashicons dashicons-arrow-down " ></span><?php echo mo_sl('Add Login Icons');?></a></h3>
    151                 <div id="openid_login_shortcode" style="font-size:13px !important">
    152                     <ol>
    153                         <p><?php echo mo_sl('You can add login icons in the following areas from');?> <strong><?php echo mo_sl('Display Options');?></strong>.<?php echo mo_sl( 'For other areas(widget areas), use Login widget');?>.</p>
    154                         <ol>
    155                             <li><?php echo mo_sl('Default Login Form: This option places login icons below the default login form on wp-login');?>.</li>
    156                             <li><?php echo mo_sl('Default Registration Form: This option places login icons below the default registration form');?>.</li>
    157 
    158                             <li><?php echo mo_sl('Comment Form: This option places login icons above the comment section of all your posts');?>.</li>
    159                         </ol>
    160                     </ol>
    161                 </div>
    162 
    163                 <h3 id="mo_openid_show_add_login_icons1" onclick="show_add_login_icons1(this.id)"><a id="openid_sharing_shortcode_title"  ><span class="dashicons dashicons-arrow-down " ></span><?php echo mo_sl('Add Login Icons as Widget');?></a></h3>
    164                 <div  id="openid_sharing_shortcode" style="font-size:13px !important">
    165                     <ol>
    166                         <li><?php echo mo_sl('Go to Widgets. Among the available widgets you
     2function mo_openid_disp_opt() {     ?>
     3    <form id="display" name="display" method="post" action="">
     4        <input type="hidden" name="option" value="mo_openid_enable_display" />
     5        <input type="hidden" name="mo_openid_enable_display_nonce" value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-enable-display-nonce' ) ); ?>"/>
     6        <div class="mo_openid_table_layout" id="mo_openid_disp_opt_tour"><br/>
     7            <div style="width:40%; background:white; float:left; border: 1px transparent;">
     8                <b style="font-size: 17px"><?php echo esc_attr( mo_sl( 'Select the options where you want to display the social login icons' ) ); ?></b><br><br>
     9                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Default Login Form [wp-admin]' ) ); ?>
     10                    <input  type="checkbox" id="default_login_enable" name="mo_openid_default_login_enable" value="1" <?php checked( get_option( 'mo_openid_default_login_enable' ) == 1 ); ?> /><br>
     11                    <span class="mo_openid_checkbox_checkmark"></span>
     12                </label>
     13
     14                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Default Registration Form' ) ); ?>
     15
     16                    <input type="checkbox" id="default_register_enable" name="mo_openid_default_register_enable" value="1" <?php checked( get_option( 'mo_openid_default_register_enable' ) == 1 ); ?> /><br>
     17                    <span class="mo_openid_checkbox_checkmark"></span>
     18                </label>
     19
     20                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Comment Form' ) ); ?>
     21                    <input type="checkbox" id="default_comment_enable" name="mo_openid_default_comment_enable" value="1" <?php checked( get_option( 'mo_openid_default_comment_enable' ) == 1 ); ?> /><br>
     22                    <span class="mo_openid_checkbox_checkmark"></span>
     23                </label>
     24                <label class="mo_openid_note_style" style="cursor: auto"><?php echo esc_attr( mo_sl( "Don't find your login page in above options use" ) ); ?> <code id='1'>[miniorange_social_login]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#1', '#shortcode_url_copy')"><span id="shortcode_url_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><?php echo esc_attr( mo_sl( 'to display social icons or' ) ); ?> <a style="cursor: pointer" onclick="mo_openid_support_form('')"><?php echo esc_attr( mo_sl( 'Contact Us' ) ); ?></a></label>
     25                <br/><br/>
     26                <b style="font-size:17px;"><?php echo esc_attr( mo_sl( 'Ultimate Member display options' ) ); ?> </b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a><br><br>
     27
     28                <label class="mo_openid_checkbox_container_disable">
     29                    <input disabled type="checkbox" id="ultimate_before_login_form" /><?php echo esc_attr( mo_sl( 'Before Ultimate Member Login Form Fields' ) ); ?>
     30                    <span class="mo_openid_checkbox_checkmark"></span>
     31                </label>
     32                <label class="mo_openid_checkbox_container_disable">
     33                    <input disabled type="checkbox" id="ultimate_after_login_form" /><?php echo esc_attr( mo_sl( 'After Ultimate Member Login Form Fields' ) ); ?>
     34                    <span class="mo_openid_checkbox_checkmark"></span>
     35                </label>
     36                <label class="mo_openid_checkbox_container_disable">
     37                    <input disabled type="checkbox" id="ultimate_center_form" /><?php echo esc_attr( mo_sl( "After 'Register button' of Ultimate Member Form" ) ); ?>
     38                    <span class="mo_openid_checkbox_checkmark"></span>
     39                </label>
     40                <label class="mo_openid_checkbox_container_disable">
     41                    <input disabled type="checkbox" id="ultimate_register_form_start" /><?php echo esc_attr( mo_sl( 'Before Ultimate Member Registration Form Fields' ) ); ?>
     42                    <span class="mo_openid_checkbox_checkmark"></span>
     43                </label>
     44                <label class="mo_openid_checkbox_container_disable">
     45                    <input disabled type="checkbox" id="ultimate_register_form_end" /><?php echo esc_attr( mo_sl( 'After Ultimate Member Registration Form Fields' ) ); ?>
     46                    <span class="mo_openid_checkbox_checkmark"></span>
     47                </label>
     48                <br/><br/>
     49                <b style="font-size:17px;"><?php echo esc_attr( mo_sl( 'MemberPress display options' ) ); ?> </b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a><br><br>
     50
     51                <label class="mo_openid_checkbox_container_disable">
     52                    <input disabled type="checkbox"/><?php echo esc_attr( mo_sl( 'After MemberPress Login Form' ) ); ?>
     53                    <span class="mo_openid_checkbox_checkmark"></span>
     54                </label>
     55                <label class="mo_openid_checkbox_container_disable">
     56                    <input disabled type="checkbox"/><?php echo esc_attr( mo_sl( 'After MemberPress Account Form' ) ); ?>
     57                    <span class="mo_openid_checkbox_checkmark"></span>
     58                </label>
     59                <label class="mo_openid_checkbox_container_disable">
     60                    <input disabled type="checkbox"/><?php echo esc_attr( mo_sl( 'After MemberPress Checkout Form' ) ); ?>
     61                    <span class="mo_openid_checkbox_checkmark"></span>
     62                </label>
     63            </div>
     64            <div style="width:50%; background:white; float:right; border: 1px transparent;">
     65                <b style="font-size:17px;"><?php echo esc_attr( mo_sl( 'Woocommerce display options' ) ); ?></b><br><br><br>
     66
     67                <label class="mo_openid_checkbox_container">
     68                    <input type="checkbox" id="woocommerce_before_login_form" name="mo_openid_woocommerce_before_login_form" value="1" <?php checked( get_option( 'mo_openid_woocommerce_before_login_form' ) == 1 ); ?> /><?php echo esc_attr( mo_sl( 'Before WooCommerce Login Form' ) ); ?>
     69                    <span class="mo_openid_checkbox_checkmark"></span>
     70                </label>
     71                <label class="mo_openid_checkbox_container">
     72                    <input type="checkbox" id="woocommerce_center_login_form" name="mo_openid_woocommerce_center_login_form" value="1" <?php checked( get_option( 'mo_openid_woocommerce_center_login_form' ) == 1 ); ?> /><?php echo esc_attr( mo_sl( "Before 'Remember Me' of WooCommerce Login Form" ) ); ?>
     73                    <span class="mo_openid_checkbox_checkmark"></span>
     74                </label>
     75                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After WooCommerce Login Form' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     76                    <input type="checkbox"  /><br>
     77                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     78                </label>
     79
     80                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Before WooCommerce Registration Form' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     81                    <input type="checkbox"  /><br>
     82                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     83                </label>
     84                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( "Before 'Register button' of WooCommerce Registration Form" ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     85                    <input type="checkbox"  /><br>
     86                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     87                </label>
     88
     89                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After WooCommerce Registration Form' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     90                    <input type="checkbox"  /><br>
     91                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     92                </label>
     93
     94                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Before WooCommerce Checkout Form' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     95                    <input type="checkbox"  /><br>
     96                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     97                </label>
     98
     99                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After WooCommerce Checkout Form' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     100                    <input type="checkbox"  /><br>
     101                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     102                </label>
     103                <br/>
     104                <b style="font-size: 17px;"><?php echo esc_attr( mo_sl( 'BuddyPress / BuddyBoss display options' ) ); ?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></b><br><br>
     105
     106                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Before BuddyPress / BuddyBoss Registration Form' ) ); ?>
     107                    <input type="checkbox"  /><br>
     108                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     109                </label>
     110
     111                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Before BuddyPress Account Details' ) ); ?>
     112                    <input type="checkbox"  /><br>
     113                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     114                </label>
     115
     116                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After BuddyPress / BuddyBoss Registration Form' ) ); ?>
     117                    <input type="checkbox"  /><br><br>
     118                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     119                </label>
     120                <br/>
     121                <b style="font-size: 17px;"><?php echo esc_attr( mo_sl( 'Paid Memberships Pro display options' ) ); ?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></b><br><br>
     122
     123                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Before Paid Memberships Pro Checkout Page Submit Button' ) ); ?>
     124                    <input type="checkbox"  /><br>
     125                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     126                </label>
     127
     128                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After Paid Memberships Pro Checkout Page Level Cost' ) ); ?>
     129                    <input type="checkbox"  /><br>
     130                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     131                </label>
     132
     133                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'After Paid Memberships Pro Checkout Page Username' ) ); ?>
     134                    <input type="checkbox"  /><br><br>
     135                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     136                </label>
     137
     138            </div>
     139            <div style="height:available;display: inline; width:100%; background:white; float:right; border: 1px transparent; padding-bottom: 10px;" >
     140                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Display miniOrange logo with social login icons on selected form' ) ); ?>
     141                    <input type="checkbox" id="moopenid_logo_check" name="moopenid_logo_check" value="1"  <?php checked( get_option( 'moopenid_logo_check' ) == 1 ); ?> />
     142                    <span class="mo_openid_checkbox_checkmark"></span>
     143                </label>
     144
     145            <br/><b style="padding: 10px"><input type="submit" name="submit" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
     146
     147               <br><br> <label style="cursor: auto" class="mo_openid_note_style"> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo esc_attr( mo_sl( 'These features are available in premium version only. To know more about the premium plugin ' ) ); ?><a href="https://plugins.miniorange.com/social-login-social-sharing "><?php echo esc_attr( mo_sl( 'click here' ) ); ?></a>.</label>
     148                <h3  id="mo_openid_show_add_login_icons" onclick="show_license_options1(this.id)"><a id="openid_login_shortcode_title"  aria-expanded="false" ><span class="dashicons dashicons-arrow-down " ></span><?php echo esc_attr( mo_sl( 'Add Login Icons' ) ); ?></a></h3>
     149                <div id="openid_login_shortcode" style="font-size:13px !important">
     150                    <ol>
     151                        <p><?php echo esc_attr( mo_sl( 'You can add login icons in the following areas from' ) ); ?> <strong><?php echo esc_attr( mo_sl( 'Display Options' ) ); ?></strong>.<?php echo esc_attr( mo_sl( 'For other areas(widget areas), use Login widget' ) ); ?>.</p>
     152                        <ol>
     153                            <li><?php echo esc_attr( mo_sl( 'Default Login Form: This option places login icons below the default login form on wp-login' ) ); ?>.</li>
     154                            <li><?php echo esc_attr( mo_sl( 'Default Registration Form: This option places login icons below the default registration form' ) ); ?>.</li>
     155
     156                            <li><?php echo esc_attr( mo_sl( 'Comment Form: This option places login icons above the comment section of all your posts' ) ); ?>.</li>
     157                        </ol>
     158                    </ol>
     159                </div>
     160
     161                <h3 id="mo_openid_show_add_login_icons1" onclick="show_add_login_icons1(this.id)"><a id="openid_sharing_shortcode_title"  ><span class="dashicons dashicons-arrow-down " ></span><?php echo esc_attr( mo_sl( 'Add Login Icons as Widget' ) ); ?></a></h3>
     162                <div  id="openid_sharing_shortcode" style="font-size:13px !important">
     163                    <ol>
     164                        <li>
     165                        <?php
     166                        echo esc_attr(
     167                            mo_sl(
     168                                'Go to Widgets. Among the available widgets you
    167169                            will find miniOrange Social Login Widget, drag it to the widget area where
    168                             you want it to appear');?>.</li>
    169                         <li><?php echo mo_sl('Now logout and go to your site. You will see Social Login icon for which you enabled login.');?></li>
    170                         <li><?php echo mo_sl('Click that app icon and login with your existing app account to wordpress');?>.</li>
    171                     </ol>
    172                 </div>
    173 
    174                 <h3 id="mo_openid_show_add_login_icons2" onclick="show_add_login_icons2(this.id)"><a   id="openid_comments_shortcode_title"  ><span class="dashicons dashicons-arrow-down" ></span><?php echo mo_sl('Using Shortcode');?></a></h3>
    175                 <div  id="openid_comments_shortcode" style="font-size:13px !important">
    176                     <ol>
    177                         <p><?php echo mo_sl("You can use this shortcode <code id='2'>[miniorange_social_login]</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#2', '#shortcode_url2_copy')\"><span id=\"shortcode_url2_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i> to display social icons on any login page, post, popup and PHP pages.");?></p>
    178                         <p><?php echo mo_sl("* Detailed information about how to use shortcode is given in <a href=" . site_url() ."/wp-admin/admin.php?page=mo_openid_general_settings&tab=shortcodes>Shortcode</a> tab");?></p>
    179                     </ol>
    180                 </div>
    181             </div>
    182         </div>
    183     </form>
    184     <script>
    185         //to set heading name
    186         function show_license_options1(click_id){
    187             var span = jQuery('#' + click_id).find('span').attr('class');
    188             if (span.includes('dashicons-arrow-right')){
    189                 jQuery('#mo_openid_show_add_login_icons').find('span').removeClass( "dashicons-arrow-right" );
    190                 jQuery('#mo_openid_show_add_login_icons').find('span').addClass( "dashicons-arrow-down" );
    191             }
    192             else if(span.includes('dashicons-arrow-down')) {
    193                 jQuery('#mo_openid_show_add_login_icons').find('span').removeClass( "dashicons-arrow-down" );
    194                 jQuery('#mo_openid_show_add_login_icons').find('span').addClass( "dashicons-arrow-right" );
    195             }
    196             jQuery("#mo_openid_licence1").slideToggle(400);
    197         }
    198 
    199         function show_add_login_icons1(click_id){
    200             var span = jQuery('#' + click_id).find('span').attr('class');
    201             if (span.includes('dashicons-arrow-right')){
    202                 jQuery('#mo_openid_show_add_login_icons1').find('span').removeClass( "dashicons-arrow-right" );
    203                 jQuery('#mo_openid_show_add_login_icons1').find('span').addClass( "dashicons-arrow-down" );
    204             }
    205             else if(span.includes('dashicons-arrow-down')) {
    206                 jQuery('#mo_openid_show_add_login_icons1').find('span').removeClass( "dashicons-arrow-down" );
    207                 jQuery('#mo_openid_show_add_login_icons1').find('span').addClass( "dashicons-arrow-right" );
    208             }
    209         }
    210 
    211         function show_add_login_icons2(click_id){
    212             var span = jQuery('#' + click_id).find('span').attr('class');
    213             if (span.includes('dashicons-arrow-right')){
    214 
    215                 jQuery('#mo_openid_show_add_login_icons2').find('span').removeClass( "dashicons-arrow-right" );
    216                 jQuery('#mo_openid_show_add_login_icons2').find('span').addClass( "dashicons-arrow-down" );
    217             }
    218             else if(span.includes('dashicons-arrow-down')) {
    219                 jQuery('#mo_openid_show_add_login_icons2').find('span').removeClass( "dashicons-arrow-down" );
    220                 jQuery('#mo_openid_show_add_login_icons2').find('span').addClass( "dashicons-arrow-right" );
    221             }
    222         }
    223     </script>
    224     <?php
     170                            you want it to appear'
     171                            )
     172                        );
     173                        ?>
     174                            .</li>
     175                        <li><?php echo esc_attr( mo_sl( 'Now logout and go to your site. You will see Social Login icon for which you enabled login.' ) ); ?></li>
     176                        <li><?php echo esc_attr( mo_sl( 'Click that app icon and login with your existing app account to WordPress' ) ); ?>.</li>
     177                    </ol>
     178                </div>
     179
     180                <h3 id="mo_openid_show_add_login_icons2" onclick="show_add_login_icons2(this.id)"><a   id="openid_comments_shortcode_title"  ><span class="dashicons dashicons-arrow-down" ></span><?php echo esc_attr( mo_sl( 'Using Shortcode' ) ); ?></a></h3>
     181                <div  id="openid_comments_shortcode" style="font-size:13px !important">
     182                    <ol>
     183                        <p><?php echo esc_attr( mo_sl( "You can use this shortcode <code id='2'>[miniorange_social_login]</code><i style= \"width: 11px;height: 9px;padding-left:2px;padding-top:3px\" class=\"far fa-fw fa-lg fa-copy mo_copy mo_copytooltip\" onclick=\"copyToClipboard(this, '#2', '#shortcode_url2_copy')\"><span id=\"shortcode_url2_copy\" class=\"mo_copytooltiptext\">Copy to Clipboard</span></i> to display social icons on any login page, post, popup and PHP pages." ) ); ?></p>
     184                        <p><?php echo esc_attr( mo_sl( '* Detailed information about how to use shortcode is given in <a href=' . site_url() . '/wp-admin/admin.php?page=mo_openid_general_settings&tab=shortcodes>Shortcode</a> tab' ) ); ?></p>
     185                    </ol>
     186                </div>
     187            </div>
     188        </div>
     189    </form>
     190    <script>
     191        //to set heading name
     192        function show_license_options1(click_id){
     193            var span = jQuery('#' + click_id).find('span').attr('class');
     194            if (span.includes('dashicons-arrow-right')){
     195                jQuery('#mo_openid_show_add_login_icons').find('span').removeClass( "dashicons-arrow-right" );
     196                jQuery('#mo_openid_show_add_login_icons').find('span').addClass( "dashicons-arrow-down" );
     197            }
     198            else if(span.includes('dashicons-arrow-down')) {
     199                jQuery('#mo_openid_show_add_login_icons').find('span').removeClass( "dashicons-arrow-down" );
     200                jQuery('#mo_openid_show_add_login_icons').find('span').addClass( "dashicons-arrow-right" );
     201            }
     202            jQuery("#mo_openid_licence1").slideToggle(400);
     203        }
     204
     205        function show_add_login_icons1(click_id){
     206            var span = jQuery('#' + click_id).find('span').attr('class');
     207            if (span.includes('dashicons-arrow-right')){
     208                jQuery('#mo_openid_show_add_login_icons1').find('span').removeClass( "dashicons-arrow-right" );
     209                jQuery('#mo_openid_show_add_login_icons1').find('span').addClass( "dashicons-arrow-down" );
     210            }
     211            else if(span.includes('dashicons-arrow-down')) {
     212                jQuery('#mo_openid_show_add_login_icons1').find('span').removeClass( "dashicons-arrow-down" );
     213                jQuery('#mo_openid_show_add_login_icons1').find('span').addClass( "dashicons-arrow-right" );
     214            }
     215        }
     216
     217        function show_add_login_icons2(click_id){
     218            var span = jQuery('#' + click_id).find('span').attr('class');
     219            if (span.includes('dashicons-arrow-right')){
     220
     221                jQuery('#mo_openid_show_add_login_icons2').find('span').removeClass( "dashicons-arrow-right" );
     222                jQuery('#mo_openid_show_add_login_icons2').find('span').addClass( "dashicons-arrow-down" );
     223            }
     224            else if(span.includes('dashicons-arrow-down')) {
     225                jQuery('#mo_openid_show_add_login_icons2').find('span').removeClass( "dashicons-arrow-down" );
     226                jQuery('#mo_openid_show_add_login_icons2').find('span').addClass( "dashicons-arrow-right" );
     227            }
     228        }
     229    </script>
     230    <?php
    225231}
  • miniorange-login-openid/trunk/view/doc_tab/mo_openid_doc_tab.php

    r2769271 r2853010  
    7878                <div class="modt-leftbox">
    7979                    <div class="modt-imagedropshadow">
    80                         <img data-toggle="modal" data-target="#modt_app_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_apps.png" alt="doc tab wc"/>
     80                        <img data-toggle="modal" data-target="#modt_app_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_apps.png" alt="doc tab wc"/>
    8181                    </div>
    8282                    <footer class="modt-footer">
     
    8787                <div class="modt-middlebox">
    8888                    <div class="modt-imagedropshadow">
    89                         <img data-toggle="modal" data-target="#modt_wc_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_wc_new.png" alt="doc tab wc"/>
     89                        <img data-toggle="modal" data-target="#modt_wc_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_wc_new.png" alt="doc tab wc"/>
    9090                    </div>
    9191                    <footer class="modt-footer">
     
    9595                <div class="modt-rightbox">
    9696                    <div class="modt-imagedropshadow">
    97                         <img data-toggle="modal" data-target="#modt_bp_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_bp.png" alt="doc tab wc"/>
     97                        <img data-toggle="modal" data-target="#modt_bp_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_bp.png" alt="doc tab wc"/>
    9898                    </div>
    9999                    <footer class="modt-footer">
     
    103103                <div class="modt-leftbox">
    104104                    <div class="modt-imagedropshadow">
    105                         <img data-toggle="modal" data-target="#modt_pmpro_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_pmpro.png" alt="doc tab wc"/>
     105                        <img data-toggle="modal" data-target="#modt_pmpro_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_pmpro.png" alt="doc tab wc"/>
    106106                    </div>
    107107                    <footer class="modt-footer">
     
    112112                <div class="modt-middlebox">
    113113                    <div class="modt-imagedropshadow">
    114                         <img data-toggle="modal" data-target="#modt_mc_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_mc.png" alt="doc tab wc"/>
     114                        <img data-toggle="modal" data-target="#modt_mc_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_mc.png" alt="doc tab wc"/>
    115115                    </div>
    116116                    <footer class="modt-footer">
     
    120120                <div class="modt-rightbox">
    121121                    <div class="modt-imagedropshadow">
    122                         <img data-toggle="modal" data-target="#modt_sc_modal" width="350px" height="220px" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/modt_sc.png" alt="doc tab wc"/>
     122                        <img data-toggle="modal" data-target="#modt_sc_modal" width="350px" height="220px" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/modt_sc.png" alt="doc tab wc"/>
    123123                    </div>
    124124                    <footer class="modt-footer">
     
    211211                            </li>
    212212
    213                            
    214 
    215213                            <li class="modt-table-row">
    216214                                <div class="modt-table-col modt-table-col-1" data-label="Sr. No.">8</div>
     
    270268                                <div class="modt-table-col modt-table-col-1" data-label="Sr. No.">10</div>
    271269                                <div class="modt-table-col modt-table-col-2" data-label="App Name">
    272                                     <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/icons/disqus.png" alt="disqus" style="margin-bottom: 5px"/>
     270                                    <img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/icons/disqus.png" alt="disqus" style="margin-bottom: 5px"/>
    273271                                    <br>Disqus
    274272                                </div>
     
    300298                                <div class="modt-table-col modt-table-col-1" data-label="Sr. No.">14</div>
    301299                                <div class="modt-table-col modt-table-col-2" data-label="App Name">
    302                                     <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/icons/kakao.png" alt="kakao" style="margin-bottom: 5px"/>
     300                                    <img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/icons/kakao.png" alt="kakao" style="margin-bottom: 5px"/>
    303301                                    <br>Kakao
    304302                                </div>
     
    330328                                <div class="modt-table-col modt-table-col-1" data-label="Sr. No.">17</div>
    331329                                <div class="modt-table-col modt-table-col-2" data-label="App Name">
    332                                     <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/icons/naver.png" alt="naver" style="margin-bottom: 5px"/>
     330                                    <img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/icons/naver.png" alt="naver" style="margin-bottom: 5px"/>
    333331                                    <br>Naver
    334332                                </div>
     
    400398                                <div class="modt-table-col modt-table-col-1" data-label="Sr. No.">25</div>
    401399                                <div class="modt-table-col modt-table-col-2" data-label="App Name">
    402                                     <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/icons/teamsnap.png" alt="teamsnap" style="margin-bottom: 5px"/>
     400                                    <img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/icons/teamsnap.png" alt="teamsnap" style="margin-bottom: 5px"/>
    403401                                    <br>Teamsnap
    404402                                </div>
  • miniorange-login-openid/trunk/view/email_settings/mo_openid_set_email.php

    r2648308 r2853010  
    77                <input type="hidden" name="option" value="mo_openid_email_setting" />
    88                <input type="hidden" name="mo_openid_enable_email_setting_nonce"
    9                        value="<?php echo wp_create_nonce( 'mo-openid-enable-email-setting-nonce' ); ?>"/>
     9                       value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-email-setting-nonce' )); ?>"/>
    1010            <div class="mo_openid_highlight">
    11                 <h3 style="margin-left: 1%;line-height: 210%;color: white;" id="mo_openid_send_email_admin_collapse" onclick="show_disable_send_email_admin(this.id)"><?php echo mo_sl('Send mail to Admin');?><span class="dashicons dashicons-arrow-up toggle-div1" ></span></h3>
     11                <h3 style="margin-left: 1%;line-height: 210%;color: white;" id="mo_openid_send_email_admin_collapse" onclick="show_disable_send_email_admin(this.id)"><?php echo esc_attr(mo_sl('Send mail to Admin'));?><span class="dashicons dashicons-arrow-up toggle-div1" ></span></h3>
    1212                <style>
    1313                    .toggle-div1{
     
    1919            </div><br/>
    2020            <div id="mo_send_email_admin">
    21                 <b class="mo_openid_note_style"><?php echo mo_sl('*NOTE: This feature requires SMTP to be setup.');?></b><br/>
    22                 <label class="mo_openid_checkbox_container_disable"><b><?php echo mo_sl('Enable Email Notification to Admin - on User Registration*');?></b>
     21                <b class="mo_openid_note_style"><?php echo esc_attr(mo_sl('*NOTE: This feature requires SMTP to be setup.'));?></b><br/>
     22                <label class="mo_openid_checkbox_container_disable"><b><?php echo esc_attr(mo_sl('Enable Email Notification to Admin - on User Registration*'));?></b>
    2323                    <input type="checkbox"  />
    2424                    <span class="mo_openid_checkbox_checkmark_disable"></span>
    2525                </label>
    26                 <b><?php echo mo_sl('If you want to send Email Notification to multiple admins, enter emails of all admins here:')?></b><br><br><?php echo '(If left empty only administrator gets email)';?>
     26                <b><?php echo esc_attr(mo_sl('If you want to send Email Notification to multiple admins, enter emails of all admins here:'))?></b><br><br><?php echo '(If left empty only administrator gets email)';?>
    2727                <input type="text" disabled rows="2" placeholder="Emails should be separated by comma" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;padding: 1%;margin-top: 1%" ></input>
    2828                <br />
    29                 <br><b><?php echo mo_sl('Email Subject:');?></b>
     29                <br><b><?php echo esc_attr(mo_sl('Email Subject:'));?></b>
    3030                <br><input type="text" rows="2" placeholder="Enter your subject line here" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;padding: 1%;margin-top: 1%" disabled></input>
    3131                <br/><br>
     
    3838            </div><br/>
    3939            <div class="mo_openid_highlight">
    40                 <h3 style="margin-left: 1%;line-height: 210%;color: white;" id="mo_openid_send_email_user_collapse" onclick="show_disable_send_email_user(this.id)"><?php echo mo_sl('Send mail to User');?><span class="dashicons dashicons-arrow-up toggle-div1" ></span></h3>
     40                <h3 style="margin-left: 1%;line-height: 210%;color: white;" id="mo_openid_send_email_user_collapse" onclick="show_disable_send_email_user(this.id)"><?php echo esc_attr(mo_sl('Send mail to User'));?><span class="dashicons dashicons-arrow-up toggle-div1" ></span></h3>
    4141                <style>
    4242                    .toggle-div1{
     
    4949            <div  id="mo_send_email_user">
    5050
    51                 <b class="mo_openid_note_style"><?php echo mo_sl('*NOTE: This feature requires SMTP to be setup');?>.</b><br/>
    52                 <label class="mo_openid_checkbox_container_disable"><b><?php echo mo_sl('Email Notification to User on User Registration');?>*</b>
     51                <b class="mo_openid_note_style"><?php echo esc_attr(mo_sl('*NOTE: This feature requires SMTP to be setup'));?>.</b><br/>
     52                <label class="mo_openid_checkbox_container_disable"><b><?php echo esc_attr(mo_sl('Email Notification to User on User Registration'));?>*</b>
    5353                    <input type="checkbox"  />
    5454                    <span class="mo_openid_checkbox_checkmark_disable"></span>
    5555                </label>
    5656
    57               <b><?php echo mo_sl('Email Subject:');?></b>
     57              <b><?php echo esc_attr(mo_sl('Email Subject:'));?></b>
    5858                <input type="text" rows="2" placeholder="Enter your subject line here" class="mo_openid_textfield_css" style="padding:1%;border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 1%" disabled ></input>
    5959                <br/><br>
     
    6464                wp_editor( $content, $editor_id ,$editor_height);
    6565                ?>
    66                 <input disabled type="button" name="submit" value="<?php echo mo_sl('Save');?>" style="width:100px;"  class="button button-primary button-large" />
     66                <input disabled type="button" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:100px;"  class="button button-primary button-large" />
    6767                <br><br>
    6868            </div>
     
    7272    <script>
    7373        //to set heading name
    74         var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
     74        var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo esc_attr(add_query_arg(array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']))); ?>\">PRO</a>");
    7575
    7676        var win_height = jQuery('#mo_openid_menu_height').height();
  • miniorange-login-openid/trunk/view/integration/mo_openid_integrate.php

    r2648308 r2853010  
    11<?php
    2 function mo_openid_integrations(){
    3     $active_tab_int = isset( $_GET[ 'tab' ]) ? $_GET[ 'tab' ] : 'integration-woocommerce';
    4     if( $active_tab_int == 'integration' )
    5         $active_tab_int = 'integration-woocommerce';
    6     ?>
    7     <div id="tab">
    8         <h2 class="nav-tab-wrapper">
    9             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-woocommerce' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-woocommerce'), $_SERVER['REQUEST_URI'] ); ?>">WooCommerce</a>
    10             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-buddypress' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-buddypress'), $_SERVER['REQUEST_URI'] ); ?>">BuddyPress</a>
    11             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-mailchimp' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-mailchimp'), $_SERVER['REQUEST_URI'] ); ?>">MailChimp</a>
    12             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-hubspot' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-hubspot'), $_SERVER['REQUEST_URI'] ); ?>">HubSpot</a>
    13             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-discord' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-discord'), $_SERVER['REQUEST_URI'] ); ?>">Discord</a>
    14             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-paidmemb' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-paidmemb'), $_SERVER['REQUEST_URI'] ); ?>">Paid Membershi Pro</a>
    15             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-memberpress' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-memberpress'), $_SERVER['REQUEST_URI'] ); ?>">MemberPress</a>
    16             <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-customregistration' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'integration-customregistration'), $_SERVER['REQUEST_URI'] ); ?>">Custom Registration</a>
    17         </h2>
    18     </div>
    19 
    20     <?php
    21         if( $active_tab_int == 'integration-woocommerce' ) {
    22             ?>
    23             <div class="mo_openid_table_layout" id="wca_adv_disp" style="display: block">
    24                 <table>
    25                     <tr>
    26                         <td><br/>
    27                             <b><?php echo mo_sl('With WooCommerce Integration you will get various social login display options using which you can display the Social Login icons on your WooCommerce login, registration, and checkout pages.
    28 You\'ll also have the option to sync Woocommerce checkout fields, which will pre-fill a user\'s billing information with their first name, last name, and email address.');?></b>
    29                         </td>
    30                     </tr>
    31                 </table>
    32                 <br>
    33                 <div class="mo_openid_highlight">
    34                     <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Woocommerce Display Options');?></h3>
    35                 </div>
    36                 <br>
    37 
    38                 <form id="wa_display" name="wa_display" method="post" action="">
    39                     <div class="mo_openid_wca_table_layout_fake" style="height: 1450px"><br/>
    40                         <div style="width:40%; background:white; float:left; border: 1px transparent;">
    41                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    42                                 <input type="checkbox" id="woocommerce_before_login_form" name="mo_openid_woocommerce_before_login_form" <?php checked( get_option('mo_openid_woocommerce_before_login_form') == 1 );?> />
    43                                 <div style="padding-left: 7%">
    44                                     <?php echo mo_sl("Before WooCommerce Login Form");?>
    45                                 </div>
    46                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    47                                 <div class="mo_openid_wca_box">
    48                                     <br>
    49                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/1_before_login.png'; ?>">
    50                                 </div>
    51                             </label>
    52                             <br>
    53                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    54                                 <input type="checkbox" id="woocommerce_center_login_form" name="mo_openid_woocommerce_center_login_form" <?php checked( get_option('mo_openid_woocommerce_center_login_form') == 1 );?> />
    55                                 <div style="padding-left: 7%">
    56                                     <?php echo mo_sl("Before 'Remember Me' of WooCommerce Login Form");?>
    57                                 </div>
    58                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    59                                 <div class="mo_openid_wca_box">
    60                                     <br>
    61                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/2_login.png';?>">
    62                                 </div>
    63                             </label>
    64                             <br>
    65                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    66                                 <div style="padding-left: 7%">
    67                                     <?php echo mo_sl('After WooCommerce Login Form');?>
    68                                 </div>
    69                                 <input type="checkbox"  /><br>
    70                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    71                                 <div class="mo_openid_wca_box">
    72                                     <br>
    73                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/3_after_login.png';?>">
    74                                 </div>
    75                             </label>
    76 
    77                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    78                                 <div style="padding-left: 7%">
    79                                     <?php echo mo_sl('Before WooCommerce Registration Form');?>
    80                                 </div>
    81 
    82                                 <input type="checkbox"  /><br>
    83                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    84                                 <div class="mo_openid_wca_box">
    85                                     <br>
    86                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/4_before_reg.png';?>">
    87                                 </div>
    88                             </label>
    89                         </div>
    90                         <div style="width:50%; background:white; float:right; border: 1px transparent;">
    91                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    92                                 <div style="padding-left: 7%">
    93                                     <?php echo mo_sl("Before 'Register button' of WooCommerce Registration Form");?>
    94                                 </div>
    95                                 <input type="checkbox"  /><br>
    96                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    97                                 <div class="mo_openid_wca_box">
    98                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/5_in_reg.png';?>">
    99                                 </div>
    100                             </label>
    101 
    102                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    103                                 <div style="padding-left: 7%">
    104                                     <?php echo mo_sl('After WooCommerce Registration Form');?>
    105                                 </div>
    106                                 <input type="checkbox"  /><br>
    107                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    108                                 <div class="mo_openid_wca_box">
    109                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/6_after_reg.png';?>">
    110                                 </div>
    111                             </label>
    112 
    113                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    114                                 <div style="padding-left: 7%">
    115                                     <?php echo mo_sl('Before WooCommerce Checkout Form');?>
    116                                 </div>
    117                                 <input type="checkbox"  /><br>
    118                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    119                                 <div class="mo_openid_wca_box">
    120                                     <br>
    121                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/7_before_checkout.png';?>">
    122                                 </div>
    123                             </label>
    124 
    125                             <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    126                                 <div style="padding-left: 7%">
    127                                     <?php echo mo_sl('After WooCommerce Checkout Form');?>
    128                                 </div>
    129                                 <input type="checkbox"  /><br>
    130                                 <span class="mo_openid_checkbox_checkmark_disable"></span>
    131                                 <div class="mo_openid_wca_box">
    132                                     <br>
    133                                     <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/wca/8_after_checkout.png';?>">
    134                                 </div>
    135                             </label>
    136                         </div>
    137                     </div>
    138                     <br>
    139                     <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
    140                     <br>
    141                 </form>
    142 
    143                 <br><br><br>
    144 
    145                 <form>
    146                     <br>
    147                     <div class="mo_openid_highlight">
    148                         <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Woocommerce Integration');?></h3>
    149                     </div>
    150                     <table id="woocommerce_integration"><tr><td>
    151                                 <p><b><?php echo mo_sl('WooCommerce Integration pre-fills the first name, last name and email in Billing Details on the WooCommerce Checkout Page.');?></b></p>
    152                                 <label class="mo_openid_checkbox_container_disable"><strong><?php echo mo_sl('Sync Woocommerce checkout fields');?></strong>
    153                                     <input  type="checkbox"/>
    154                                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    155                                 </label>
    156 
    157                                 <br>
    158                                 <img class="mo_openid_wcai_images" src="<?php echo plugin_dir_url(dirname(__DIR__))  . 'includes/images/wca/wcai.png';?>">
    159                                 <br>
    160                                 <input style="width: 126px;" disabled type="button" value="<?php echo mo_sl('Save');?>" class="button button-primary button-large" />
    161                                 <br>
    162                                 <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-woocommerce-with-wordpress-social-login" target="_blank">WooCommerce Guide</a>  /  <a href="https://youtu.be/M20AR-wbKNI" target="_blank">WooCommerce Video</a></label>
    163                             </td></tr></table>
    164                 </form>
    165 
    166             </div>
    167             <td>
    168 
    169             </td>
    170             <?php
    171         }
    172 
    173         else if( $active_tab_int == 'integration-buddypress' ) {
    174             ?>
    175             <div id="bp_addon_head" style="display: block">
    176                 <table>
    177                     <tr>
    178                         <td>
    179                             <br/><b><?php echo mo_sl('With BuddyPress/BuddyBoss Integration you will get various social login display options using which you can display the Social Login icons on your BuddyPress registration pages.
    180 The BuddyPress integration with social login can be done using any Social login app. If you have BuddyPress Integration enabled then user information will be mapped to their profile page.');?></b>
    181                         </td>
    182                     </tr>
    183                 </table>
    184             </div>
    185             <br><br>
    186             <div class="mo_openid_highlight">
    187                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('BuddyPress / BuddyBoss Display Options');?></h3>
    188             </div>
    189 
    190             <form id="wa_display" name="wa_display" method="post" action="">
    191                 <div class="mo_openid_wca_table_layout_fake" style="height: 550px"><br/>
    192                     <div style="width:40%; background:white; float:left; border: 1px transparent; margin-left: 25px">
    193                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    194                             <input type="checkbox" id="bp_before_register_page" name="mo_openid_bp_before_register_page" <?php checked( get_option('mo_openid_bp_before_register_page') == 1 );?> />
    195                             <div style="padding-left: 7%">
    196                                 <?php echo mo_sl("Before registration form");?>
    197                             </div>
    198                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    199                             <div class="mo_openid_wca_box">
    200                                 <br>
    201                                 <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_before_reg.png'; ?>">
    202                             </div>
    203                         </label>
    204                         <br>
    205                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    206                             <div style="padding-left: 7%; width: 60% !important">
    207                                 <?php echo mo_sl("Before Account Details");?>
    208                             </div>
    209                             <input type="checkbox"  /><br>
    210                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    211                             <div class="mo_openid_wca_box">
    212                                 <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_before_account.png';?>">
    213                             </div>
    214                         </label>
    215 
    216                     </div>
    217                     <div style="width:50%; background:white; float:right; border: 1px transparent;">
    218                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    219                             <div style="padding-left: 7%">
    220                                 <?php echo mo_sl("After Registration Form");?>
    221                             </div>
    222                             <input type="checkbox"  /><br>
    223                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    224                             <div class="mo_openid_wca_box">
    225                                 <img style="width: 79%; height: 100%" class="mo_openid_wca_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/bp_add/new_after_reg.png';?>">
    226                             </div>
    227                         </label>
    228                     </div>
    229                 </div>
    230                 <br>
    231                 <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
    232                 <br>
    233             </form>
    234             <br><br>
    235             <div class="mo_openid_highlight">
    236                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('BuddyPress Extended Mapping Attributes');?></h3>
    237             </div>
    238             <form>
    239                 <br>
    240                 <div style="margin-left: 1.5%">
    241                     <table>
    242                         <tr>
    243 
    244                             <h3><b>Buddypress / BuddyBoss Extended Attributes Mapping</b></h3>
    245 
    246                         </tr>
    247                         <tr>
    248                             <td style="width: 60%">
    249                                 <font color="#FF0000">*</font>
    250                                 Select Application:
    251                             </td>
    252                             <td>
    253                                 <select class="mo_table_textbox" required="true" style="width:100%; height: 27px;" name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true" >
    254                                     <option value="" disabled selected hidden>Google</option>
    255                             </td>
    256                         </tr>
    257                         <tr>
    258                             <td style="width: 60%">
    259                                 <font color="#FF0000">*</font>
    260                                 Name:
    261                             </td>
    262                             <td>
    263                                 <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
    264                                     <option value="" disabled selected hidden>User Name</option>
    265                             </td>
    266                         </tr>
    267                         <tr>
    268                             <td style="width: 60%">
    269                                 <font color="#FF0000">*</font>
    270                                 Email:
    271                             </td>
    272                             <td>
    273                                 <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
    274                                     <option value="" disabled selected hidden>User Email_ID</option>
    275                             </td>
    276                         </tr>
    277                         <tr>
    278                             <td style="width: 60%">
    279                                 <font color="#FF0000">*</font>
    280                                 User First Name:
    281                             </td>
    282                             <td>
    283                                 <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
    284                                     <option value="" disabled selected hidden>First Name</option>
    285                             </td>
    286                         </tr>
    287                         <tr>
    288                             <td style="width: 60%">
    289                                 <font color="#FF0000">*</font>
    290                                 User Last Name
    291                             </td>
    292                             <td>
    293                                 <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
    294                                     <option value="" disabled selected hidden>Last Name</option>
    295                             </td>
    296                         </tr>
    297                         <tr>
    298                             <td>
    299                                 &nbsp;
    300                             </td>
    301                             <td>
    302                                 <input type="submit" name="submit" value="<?php echo mo_sl("Save settings");?>" class="button button-primary button-large" disabled />
    303                                 <input type="button" name="back" onclick="goBack();" value="<?php echo mo_sl("Back");?>" class="button button-primary button-large" disabled/>
    304                             </td>
    305                         </tr>
    306                     </table>
    307                     <br><br>
    308                     <table>
    309                         <tr>
    310                             <div class="mo-openid-bp-addon-img">
    311                                 <img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>includes/images/bp_add/integrations.png">
    312                             </div>
    313                         </tr>
    314                         <tr>
    315 
    316                             <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-buddypress-with-wordpress-social-login" target="_blank">BuddyPress Guide</a>  /  <a href="https://youtu.be/Iia1skKRYBU" target="_blank">BuddyPress Video</a></label>
    317 
    318                         </tr>
    319                     </table>
    320                 </div>
    321             </form>
    322             <td>
    323 
    324             </td>
    325             <?php
    326         }
    327 
    328         else if( $active_tab_int == 'integration-mailchimp' ) {
    329             ?>
    330 
    331             <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
    332                 <table>
    333                     <tr>
    334                         <td>
    335                             <br/><b><?php echo mo_sl('Mailchimp is a marketing platform that allows you to manage and communicate with your companies, consumers, and other interested parties in one place. When a user registers on your website, the user\'s first name, last name, and email address are sent to your mailchimp account\'s mailing list, and the user is identified as subscribed.');?>.</b>
    336                         </td>
    337                     </tr>
    338                 </table>
    339                 <table class="mo_openid_display_table table" id="mo_openid_mailchimp_video"></table>
    340                 <br>
    341                 <hr>
    342                 <form>
    343                     <table><tr><td>
    344                                 <p><b><?php echo mo_sl("A user is added as a subscriber to a mailing list in MailChimp when that user registers using social login. First name, last name and email are also captured for that user in the Mailing List.</b></p>
     2function mo_openid_integrations() {
     3    $active_tab_int = isset( $_GET[ 'tab' ]) ? sanitize_text_field($_GET[ 'tab' ]) : 'integration-woocommerce'; //phpcs:ignore
     4    if ( $active_tab_int == 'integration' ) {
     5        $active_tab_int = 'integration-woocommerce';
     6    }
     7    ?>
     8    <div id="tab">
     9        <h2 class="nav-tab-wrapper">
     10            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-woocommerce' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-woocommerce' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">WooCommerce</a>
     11            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-buddypress' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-buddypress' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">BuddyPress</a>
     12            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-mailchimp' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-mailchimp' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">MailChimp</a>
     13            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-hubspot' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-hubspot' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">HubSpot</a>
     14            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-discord' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-discord' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">Discord</a>
     15            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-paidmemb' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-paidmemb' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">Paid Membershi Pro</a>
     16            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-memberpress' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-memberpress' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">MemberPress</a>
     17            <a class="mo-nav-tab <?php echo $active_tab_int == 'integration-customregistration' ? 'mo-nav-tab-active' : ''; ?>" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'integration-customregistration' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>">Custom Registration</a>
     18        </h2>
     19    </div>
     20
     21    <?php
     22    if ( $active_tab_int == 'integration-woocommerce' ) {
     23        ?>
     24            <div class="mo_openid_table_layout" id="wca_adv_disp" style="display: block">
     25                <table>
     26                    <tr>
     27                        <td><br/>
     28                            <b>
     29                            <?php
     30                            echo esc_attr(
     31                                mo_sl(
     32                                    'With WooCommerce Integration you will get various social login display options using which you can display the Social Login icons on your WooCommerce login, registration, and checkout pages.
     33You\'ll also have the option to sync Woocommerce checkout fields, which will pre-fill a user\'s billing information with their first name, last name, and email address.'
     34                                )
     35                            );
     36                            ?>
     37                                </b>
     38                        </td>
     39                    </tr>
     40                </table>
     41                <br>
     42                <div class="mo_openid_highlight">
     43                    <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'Woocommerce Display Options' ) ); ?></h3>
     44                </div>
     45                <br>
     46
     47                <form id="wa_display" name="wa_display" method="post" action="">
     48                    <div class="mo_openid_wca_table_layout_fake" style="height: 1450px"><br/>
     49                        <div style="width:40%; background:white; float:left; border: 1px transparent;">
     50                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     51                                <input type="checkbox" id="woocommerce_before_login_form" name="mo_openid_woocommerce_before_login_form" <?php checked( get_option( 'mo_openid_woocommerce_before_login_form' ) == 1 ); ?> />
     52                                <div style="padding-left: 7%">
     53                                    <?php echo esc_attr( mo_sl( 'Before WooCommerce Login Form' ) ); ?>
     54                                </div>
     55                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     56                                <div class="mo_openid_wca_box">
     57                                    <br>
     58                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/1_before_login.png'; ?>">
     59                                </div>
     60                            </label>
     61                            <br>
     62                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     63                                <input type="checkbox" id="woocommerce_center_login_form" name="mo_openid_woocommerce_center_login_form" <?php checked( get_option( 'mo_openid_woocommerce_center_login_form' ) == 1 ); ?> />
     64                                <div style="padding-left: 7%">
     65                                    <?php echo esc_attr( mo_sl( "Before 'Remember Me' of WooCommerce Login Form" ) ); ?>
     66                                </div>
     67                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     68                                <div class="mo_openid_wca_box">
     69                                    <br>
     70                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/2_login.png'; ?>">
     71                                </div>
     72                            </label>
     73                            <br>
     74                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     75                                <div style="padding-left: 7%">
     76                                    <?php echo esc_attr( mo_sl( 'After WooCommerce Login Form' ) ); ?>
     77                                </div>
     78                                <input type="checkbox"  /><br>
     79                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     80                                <div class="mo_openid_wca_box">
     81                                    <br>
     82                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/3_after_login.png'; ?>">
     83                                </div>
     84                            </label>
     85
     86                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     87                                <div style="padding-left: 7%">
     88                                    <?php echo esc_attr( mo_sl( 'Before WooCommerce Registration Form' ) ); ?>
     89                                </div>
     90
     91                                <input type="checkbox"  /><br>
     92                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     93                                <div class="mo_openid_wca_box">
     94                                    <br>
     95                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/4_before_reg.png'; ?>">
     96                                </div>
     97                            </label>
     98                        </div>
     99                        <div style="width:50%; background:white; float:right; border: 1px transparent;">
     100                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     101                                <div style="padding-left: 7%">
     102                                    <?php echo esc_attr( mo_sl( "Before 'Register button' of WooCommerce Registration Form" ) ); ?>
     103                                </div>
     104                                <input type="checkbox"  /><br>
     105                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     106                                <div class="mo_openid_wca_box">
     107                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/5_in_reg.png'; ?>">
     108                                </div>
     109                            </label>
     110
     111                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     112                                <div style="padding-left: 7%">
     113                                    <?php echo esc_attr( mo_sl( 'After WooCommerce Registration Form' ) ); ?>
     114                                </div>
     115                                <input type="checkbox"  /><br>
     116                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     117                                <div class="mo_openid_wca_box">
     118                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/6_after_reg.png'; ?>">
     119                                </div>
     120                            </label>
     121
     122                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     123                                <div style="padding-left: 7%">
     124                                    <?php echo esc_attr( mo_sl( 'Before WooCommerce Checkout Form' ) ); ?>
     125                                </div>
     126                                <input type="checkbox"  /><br>
     127                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     128                                <div class="mo_openid_wca_box">
     129                                    <br>
     130                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/7_before_checkout.png'; ?>">
     131                                </div>
     132                            </label>
     133
     134                            <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     135                                <div style="padding-left: 7%">
     136                                    <?php echo esc_attr( mo_sl( 'After WooCommerce Checkout Form' ) ); ?>
     137                                </div>
     138                                <input type="checkbox"  /><br>
     139                                <span class="mo_openid_checkbox_checkmark_disable"></span>
     140                                <div class="mo_openid_wca_box">
     141                                    <br>
     142                                    <img style="box-shadow: 4px 4px #888888" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/8_after_checkout.png'; ?>">
     143                                </div>
     144                            </label>
     145                        </div>
     146                    </div>
     147                    <br>
     148                    <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?> "  class="button button-primary button-large" />
     149                    <br>
     150                </form>
     151
     152                <br><br><br>
     153
     154                <form>
     155                    <br>
     156                    <div class="mo_openid_highlight">
     157                        <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'Woocommerce Integration' ) ); ?></h3>
     158                    </div>
     159                    <table id="woocommerce_integration"><tr><td>
     160                                <p><b><?php echo esc_attr( mo_sl( 'WooCommerce Integration pre-fills the first name, last name and email in Billing Details on the WooCommerce Checkout Page.' ) ); ?></b></p>
     161                                <label class="mo_openid_checkbox_container_disable"><strong><?php echo esc_attr( mo_sl( 'Sync Woocommerce checkout fields' ) ); ?></strong>
     162                                    <input  type="checkbox"/>
     163                                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     164                                </label>
     165
     166                                <br>
     167                                <img class="mo_openid_wcai_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/wca/wcai.png'; ?>">
     168                                <br>
     169                                <input style="width: 126px;" disabled type="button" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?>" class="button button-primary button-large" />
     170                                <br>
     171                                <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-woocommerce-with-wordpress-social-login" target="_blank">WooCommerce Guide</a>  /  <a href="https://youtu.be/M20AR-wbKNI" target="_blank">WooCommerce Video</a></label>
     172                            </td></tr></table>
     173                </form>
     174
     175            </div>
     176            <td>
     177
     178            </td>
     179            <?php
     180    } elseif ( $active_tab_int == 'integration-buddypress' ) {
     181        ?>
     182            <div id="bp_addon_head" style="display: block">
     183                <table>
     184                    <tr>
     185                        <td>
     186                            <br/><b>
     187                            <?php
     188                            echo esc_attr(
     189                                mo_sl(
     190                                    'With BuddyPress/BuddyBoss Integration you will get various social login display options using which you can display the Social Login icons on your BuddyPress registration pages.
     191The BuddyPress integration with social login can be done using any Social login app. If you have BuddyPress Integration enabled then user information will be mapped to their profile page.'
     192                                )
     193                            );
     194                            ?>
     195                                    </b>
     196                        </td>
     197                    </tr>
     198                </table>
     199            </div>
     200            <br><br>
     201            <div class="mo_openid_highlight">
     202                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'BuddyPress / BuddyBoss Display Options' ) ); ?></h3>
     203            </div>
     204
     205            <form id="wa_display" name="wa_display" method="post" action="">
     206                <div class="mo_openid_wca_table_layout_fake" style="height: 550px"><br/>
     207                    <div style="width:40%; background:white; float:left; border: 1px transparent; margin-left: 25px">
     208                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     209                            <input type="checkbox" id="bp_before_register_page" name="mo_openid_bp_before_register_page" <?php checked( get_option( 'mo_openid_bp_before_register_page' ) == 1 ); ?> />
     210                            <div style="padding-left: 7%">
     211                                <?php echo esc_attr( mo_sl( 'Before registration form' ) ); ?>
     212                            </div>
     213                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     214                            <div class="mo_openid_wca_box">
     215                                <br>
     216                                <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/bp_add/new_before_reg.png'; ?>">
     217                            </div>
     218                        </label>
     219                        <br>
     220                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     221                            <div style="padding-left: 7%; width: 60% !important">
     222                                <?php echo esc_attr( mo_sl( 'Before Account Details' ) ); ?>
     223                            </div>
     224                            <input type="checkbox"  /><br>
     225                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     226                            <div class="mo_openid_wca_box">
     227                                <img style="width: 100%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/bp_add/new_before_account.png'; ?>">
     228                            </div>
     229                        </label>
     230
     231                    </div>
     232                    <div style="width:50%; background:white; float:right; border: 1px transparent;">
     233                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     234                            <div style="padding-left: 7%">
     235                                <?php echo esc_attr( mo_sl( 'After Registration Form' ) ); ?>
     236                            </div>
     237                            <input type="checkbox"  /><br>
     238                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     239                            <div class="mo_openid_wca_box">
     240                                <img style="width: 79%; height: 100%" class="mo_openid_wca_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/bp_add/new_after_reg.png'; ?>">
     241                            </div>
     242                        </label>
     243                    </div>
     244                </div>
     245                <br>
     246                <input style="width: 126px;margin-left: 2%" disabled type="button" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?> "  class="button button-primary button-large" />
     247                <br>
     248            </form>
     249            <br><br>
     250            <div class="mo_openid_highlight">
     251                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'BuddyPress Extended Mapping Attributes' ) ); ?></h3>
     252            </div>
     253            <form>
     254                <br>
     255                <div style="margin-left: 1.5%">
     256                    <table>
     257                        <tr>
     258
     259                            <h3><b>Buddypress / BuddyBoss Extended Attributes Mapping</b></h3>
     260
     261                        </tr>
     262                        <tr>
     263                            <td style="width: 60%">
     264                                <font color="#FF0000">*</font>
     265                                Select Application:
     266                            </td>
     267                            <td>
     268                                <select class="mo_table_textbox" required="true" style="width:100%; height: 27px;" name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true" >
     269                                    <option value="" disabled selected hidden>Google</option>
     270                            </td>
     271                        </tr>
     272                        <tr>
     273                            <td style="width: 60%">
     274                                <font color="#FF0000">*</font>
     275                                Name:
     276                            </td>
     277                            <td>
     278                                <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
     279                                    <option value="" disabled selected hidden>User Name</option>
     280                            </td>
     281                        </tr>
     282                        <tr>
     283                            <td style="width: 60%">
     284                                <font color="#FF0000">*</font>
     285                                Email:
     286                            </td>
     287                            <td>
     288                                <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
     289                                    <option value="" disabled selected hidden>User Email_ID</option>
     290                            </td>
     291                        </tr>
     292                        <tr>
     293                            <td style="width: 60%">
     294                                <font color="#FF0000">*</font>
     295                                User First Name:
     296                            </td>
     297                            <td>
     298                                <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
     299                                    <option value="" disabled selected hidden>First Name</option>
     300                            </td>
     301                        </tr>
     302                        <tr>
     303                            <td style="width: 60%">
     304                                <font color="#FF0000">*</font>
     305                                User Last Name
     306                            </td>
     307                            <td>
     308                                <select class="mo_table_textbox" required="true" style="width:100%; height: 27px; " name="mo_oauth_bp_app_name" onchange="selectapp()" disabled="true">
     309                                    <option value="" disabled selected hidden>Last Name</option>
     310                            </td>
     311                        </tr>
     312                        <tr>
     313                            <td>
     314                                &nbsp;
     315                            </td>
     316                            <td>
     317                                <input type="submit" name="submit" value="<?php echo esc_attr( mo_sl( 'Save settings' ) ); ?>" class="button button-primary button-large" disabled />
     318                                <input type="button" name="back" onclick="goBack();" value="<?php echo esc_attr( mo_sl( 'Back' ) ); ?>" class="button button-primary button-large" disabled/>
     319                            </td>
     320                        </tr>
     321                    </table>
     322                    <br><br>
     323                    <table>
     324                        <tr>
     325                            <div class="mo-openid-bp-addon-img">
     326                                <img src="<?php echo esc_url( plugin_dir_url( dirname( dirname( __FILE__ ) ) ) ); ?>includes/images/bp_add/integrations.png">
     327                            </div>
     328                        </tr>
     329                        <tr>
     330
     331                            <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-buddypress-with-wordpress-social-login" target="_blank">BuddyPress Guide</a>  /  <a href="https://youtu.be/Iia1skKRYBU" target="_blank">BuddyPress Video</a></label>
     332
     333                        </tr>
     334                    </table>
     335                </div>
     336            </form>
     337            <td>
     338
     339            </td>
     340            <?php
     341    } elseif ( $active_tab_int == 'integration-mailchimp' ) {
     342        ?>
     343
     344            <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
     345                <table>
     346                    <tr>
     347                        <td>
     348                            <br/><b><?php echo esc_attr( mo_sl( 'Mailchimp is a marketing platform that allows you to manage and communicate with your companies, consumers, and other interested parties in one place. When a user registers on your website, the user\'s first name, last name, and email address are sent to your mailchimp account\'s mailing list, and the user is identified as subscribed.' ) ); ?>.</b>
     349                        </td>
     350                    </tr>
     351                </table>
     352                <table class="mo_openid_display_table table" id="mo_openid_mailchimp_video"></table>
     353                <br>
     354                <hr>
     355                <form>
     356                    <table><tr><td>
     357                                <p><b>
     358                                <?php
     359                                echo esc_attr(
     360                                    mo_sl(
     361                                        'A user is added as a subscriber to a mailing list in MailChimp when that user registers using social login. First name, last name and email are also captured for that user in the Mailing List.</b></p>
    345362                        (List ID in MailChimp : Lists -> Select your List -> Settings -> List Name and Defaults -> List ID) <br>
    346                         (API Key in MailChimp : Profile -> Extras -> API Keys -> Your API Key");?> )<br><br>
    347                                         <b><?php echo mo_sl("List Id");?>:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" > <br><br>
    348                                         <b><?php echo mo_sl("API Key");?>: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" ><br><br>
    349                                         <label class="mo_openid_checkbox_container_disable"><strong><?php echo mo_sl("User's Choice");?></strong>
    350                                             <input type="checkbox" />
    351                                             <span class="mo_openid_checkbox_checkmark"></span>
    352                                         </label>
    353                                         <strong><?php echo mo_sl("Ask user for permission to be added in MailChimp Subscriber list");?> </strong>
    354                                         <br><?php echo mo_sl("(If unchecked, user will get subscribed during registration.)");?>
    355                                         <br><h3 style="float: left">Edit MailChimp subscription form </h3>
    356                                         <img src="<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/demo_mailchimp.png">
    357                                         <br><br>
    358                                         <b><?php echo mo_sl("Click on Download button to get a list of emails of WordPress users registered on your site. You can import this file in MailChimp");?>.<br><br>
    359                                             <input type="submit" value="<?php echo mo_sl("Save");?> " disabled="disabled"  class="button button-primary button-large" />
    360                                             <a style="width:190px;" disabled="disabled" class="button button-primary button-large" href="#">
    361                                                 <?php echo mo_sl("Download emails of users");?>
    362                                             </a><br>
    363                             </td></tr></table>
    364                 </form>
    365             </div>
    366             <?php
    367         }
    368 
    369         else if( $active_tab_int == 'integration-discord' ) {
    370             ?>
    371             <div class="mo_openid_table_layout">
    372                 <h4><span style="color: red">Note:</span> Discord Integration is not included with any of the premium plans and must be purchased as an add-on separately.</h4>
    373             <?php
    374             mo_openid_discord_add_on_display();
    375             ?>
    376             </div>
    377             <?php
    378         }
    379 
    380         else if( $active_tab_int == 'integration-customregistration' ) {
    381             ?>
    382 
    383             <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
    384                 <table>
    385                     <tr>
    386                         <td>
    387                             <b><?php echo mo_sl('The miniOrange Custom Registration Form Add-On allows you to obtain additional information from your customers. You can build your own custom form with as many fields as you want, even those returned by social sites, and the user will be redirected to it after a successful registration form social login. The meta table will save all of the details entered by the user.');?></b>
    388                         </td>
    389                     </tr>
    390                 </table>
    391                 <table>
    392                     <tr>
    393                         <td style="vertical-align:top; ">
    394                             <div class="mo_openid_table_layout"><br/>
    395                                 <form method="post">
    396                                     <h3><?php echo mo_sl('Customization Fields');?></h3>
    397                                     <input type="checkbox" disabled="disabled"
    398                                            value="1" checked
    399                                     <b><?php echo mo_sl('Enable Auto Field Registration Form');?></b>
    400 
    401                                     <style>
    402                                         .tableborder {
    403                                             border-collapse: collapse;
    404                                             width: 100%;
    405                                             border-color: #eee;
    406                                         }
    407 
    408                                         .tableborder th, .tableborder td {
    409                                             text-align: left;
    410                                             padding: 8px;
    411                                             border-color: #eee;
    412                                         }
    413 
    414                                         .tableborder tr:nth-child(even) {
    415                                             background-color: #f2f2f2
    416                                         }
    417                                     </style>
    418                                     <!--mo_openid_custom_field_update-->
    419                                     <table id="custom_field" style="width:100%; text-align: center;" class="table mo_openid_mywatermark">
    420                                         <div id="myCheck">
    421                                             <h4><?php echo mo_sl('Registration page link');?> <input type="text"
    422                                                                                                      style="width: 350px" disabled="disabled"
    423                                                                                                      required/></h4>
    424                                             <thead>
    425                                             <tr>
    426                                                 <th><?php echo mo_sl('Existing Field');?></th>
    427                                                 <th><?php echo mo_sl('Field');?></th>
    428                                                 <th><?php echo mo_sl('Custom name');?></th>
    429                                                 <th><?php echo mo_sl('Field Type');?></th>
    430                                                 <th><?php echo mo_sl('Field Options');?></th>
    431                                                 <th><?php echo mo_sl('Required Field');?></th>
    432                                                 <th></th>
    433                                             </tr>
    434                                             </thead>
    435                                             <?php
    436                                             ?>
    437                                             <tr>
    438                                                 <td style="width: 15%"><br><input type="text" disabled="disabled" placeholder="Existing meta field"
    439                                                                                   style="width:90%;"/></td>
    440                                                 <td style="width: 15%"><br><select id="field_1_name" disabled="disabled"
    441                                                                                    onchange="myFunction('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
    442                                                                                    style="width:80%">
    443                                                         <option value=""><?php echo mo_sl('Select Field');?></option>
    444                                                     </select></td>
    445                                                 <td style="width: 15%"><br><input type="text" id="opt_field_1_name" disabled="disabled"
    446                                                                                   placeholder="Custom Field Name"
    447                                                                                   style="width:90%;"/></td>
    448                                                 <td style="width: 15%"><br><select id="field_1_value" name="field_1_value" disabled="disabled"
    449                                                                                    onchange="myFunction2('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
    450                                                                                    style="width:80%">
    451                                                         <option value="default"><?php echo mo_sl('Select Type');?></option>
    452                                                     </select></td>
    453                                                 <td style="width: 20%"><br><input type="text" id="additional_field_1_value" disabled="disabled"
    454                                                                                   placeholder="e.g. opt1;opt2;opt3"
    455                                                                                   style="width:90%;"/></td>
    456                                                 <td style="width: 10%"><br><select name="mo_openid_custom_field_1_Required" disabled="disabled"
    457                                                                                    style="width:57%">
    458                                                         <option value="no"><?php echo mo_sl('No');?></option>
    459                                                     </select></td>
    460                                                 <td style="width: 10%"><br><input type="button" disabled="disabled"
    461                                                                                   value="+"
    462                                                                                   class=" button-primary"/>&nbsp;
    463                                                     <input type="button" name="mo_remove_attribute" value="-" disabled="disabled"
    464                                                            class=" button-primary"/>
    465                                                 </td>
    466                                             </tr>
    467                                         </div>
    468                                         <tr id="mo_openid_custom_field">
    469                                             <td align="center" colspan="7"><br>
    470                                                 <input name="mo_openid_save_config_element" type="submit" disabled="disabled"
    471                                                        value="Save"
    472                                                        class="button button-primary button-large"/>
    473                                                 &nbsp &nbsp <a class="button button-primary button-large" disabled="disabled"><?php echo mo_sl('Cancel');?></a>
    474                                             </td>
    475                                         </tr>
    476                                         <tr>
    477                                             <td align="left" colspan="7">
    478                                                 <h3><?php echo mo_sl('Instructions to setup');?>:</h3>
    479                                                 <p>
    480                                                 <ol>
    481                                                     <li> <?php echo mo_sl('Create a page and use shortcode');?> <b>[miniorange_social_custom_fields]</b>
    482                                                         <?php echo mo_sl('where you want your form to be displayed');?>.
    483                                                     </li>
    484                                                     <li><?php echo mo_sl( 'Copy the page link and paste it in the above field <b>Registration page
    485                                                     link');?></b>.
    486                                                     </li>
    487                                                     <li><?php echo mo_sl( "If you have any existing wp_usermeta field then enter that field's name in");?>
    488                                                         <b><?php echo mo_sl('Existing
    489                                                     Field');?></b> <?php echo mo_sl('column. For example, if you are saving');?> <b><?php echo mo_sl('First Name');?></b> <?php echo mo_sl('as');?>
    490                                                         <b><?php echo mo_sl('fname');?></b>
    491                                                         <?php echo mo_sl('in wp_usermeta field then enter <b>fname</b> in <b>Existing Field</b>
    492                                                 column.');?>
    493                                                     </li>
    494                                                     <li> <?php echo mo_sl('Select field name under the ');?><b><?php echo mo_sl('Field');?></b> <?php echo mo_sl('dropdown');?>.</li>
    495                                                     <li> <?php echo mo_sl('If selected field is other than custom, then');?> <b><?php echo mo_sl('Field Type');?></b> <?php echo mo_sl('will
    496                                                 automatically be');?> <b><?php echo mo_sl('Textbox');?></b> <?php echo mo_sl('and there is no need to enter');?> <b><?php echo mo_sl('Custom
    497                                                     name');?></b> <?php echo mo_sl('and');?> <b><?php echo mo_sl('Field options');?></b>.
    498                                                     </li>
    499                                                     <li> <?php echo mo_sl('If selected field is custom, then enter');?> <b><?php echo mo_sl('Custom name');?></b>.</li>
    500                                                     <li> <?php echo mo_sl('Select');?> <b><?php echo mo_sl('Field Type');?></b>, <?php echo mo_sl('if selected');?> <b><?php echo mo_sl('Field Type');?></b> <?php echo mo_sl('is');?>
    501                                                         <b><?php echo mo_sl('Checkbox');?></b><?php echo mo_sl( 'or');?> <b><?php echo mo_sl('Dropdown');?></b> <?php ('then enter the desire options in');?> <b><?php echo mo_sl('Field
    502                                                     Options');?></b> <?php echo mo_sl('seprated by semicolon ');?><b>;</b>'<?php echo mo_sl( 'otherwise leave');?> <b><?php echo mo_sl('Field
    503                                                     Options');?></b> <?php echo mo_sl('blank.');?>
    504                                                     </li>
    505                                                     <li> <?php echo mo_sl('Select');?> <b><?php echo mo_sl('Required Field');?></b> <?php echo mo_sl('as');?> <b><?php echo mo_sl('Yes');?></b> <?php echo mo_sl('if you want to make that field
    506                                                 compulsory for user');?>.
    507                                                     </li>
    508                                                     <li> <?php echo mo_sl('If you want to add more than 1 fields at a time click on');?> <b>"+"</b>.</li>
    509                                                     <li> <?php echo mo_sl('Last click on');?> <b><?php echo mo_sl('Save');?></b> <?php echo mo_sl('button');?>.</li>
    510                                                 </ol>
    511                                                 </p>
    512                                             </td>
    513                                         </tr>
    514                                     </table>
    515                                 </form>
    516                                 <br>
    517                                 <hr>
    518                             </div>
    519                         </td>
    520                     </tr>
    521                 </table>
    522             </div>
    523             <?php
    524         }
    525 
    526         else if( $active_tab_int == 'integration-hubspot' ) {
    527             ?>
    528             <div class="mo_openid_table_layout">
    529             <h4><span style="color: red">Note:</span> HubSpot Integration is not included with any of the premium plans and must be purchased as an add-on separately. With Hubspot integration, you can monitor a user's activities on your website.</h4>
    530             <?php
    531             mo_openid_hubspot_add_on_display();
    532             ?>
    533             </div>
    534             <?php
    535         }
    536 
    537         else if($active_tab_int == 'integration-memberpress'){
    538             ?>
    539             <div id="mmp_head" style="display: block">
    540                 <table>
    541                     <tr>
    542                         <td>
    543                             <br/><b><?php echo mo_sl('Membership is the member management and membership subscriptions plugin. With Membership Integration you will get various social login display options using which you can display the Social Login icons on your Membership Login, Account, and checkout page.
    544 You\'ll also have the choice of assigning a default membership level to users or allowing them to select from a list of available membership levels when they register.');?></b>
    545                         </td>
    546                     </tr>
    547                 </table>
    548             </div>
    549             <br><br>
    550             <div class="mo_openid_highlight">
    551                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('MemberPress Display Options');?></h3>
    552             </div>
    553 
    554             <form id="mmp_display" name="mmp_display" method="post" action="">
    555                 <div class="mo_openid_mmp_table_layout_fake" style="height: 430px"><br/>
    556                     <div style="width:45%; background:white; float:left; border: 1px transparent; margin-left: 25px">
    557                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    558                             <input type="checkbox"/>
    559                             <div style="padding-left: 7%">
    560                                 <?php echo mo_sl("After MemberPress Login Form");?>
    561                             </div>
    562                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    563                             <div class="mo_openid_mmp_box">
    564                                 <br>
    565                                 <img style="box-shadow: 4px 4px #888888; width: 100%; height: 75%" class="mo_openid_mmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/mmp/membership-2.png'; ?>">
    566                             </div>
    567                         </label>
    568                         <br/>
    569                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    570                             <input type="checkbox" />
    571                             <div style="padding-left: 7%">
    572                                 <?php echo mo_sl("After MemberPress Account Form");?>
    573                             </div>
    574                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    575                             <div class="mo_openid_mmp_box">
    576                                 <br>
    577                                 <img style="box-shadow: 4px 4px #888888; width: 100%; height: 75%" class="mo_openid_mmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/mmp/membership-1.png'; ?>">
    578                             </div>
    579                         </label>
    580 
    581 
    582 
    583                     </div>
    584                     <div style="width:45%; background:white; float:right; border: 1px transparent;">
    585                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    586                             <input type="checkbox" />
    587                             <div style="padding-left: 7%">
    588                                 <?php echo mo_sl("After MemberPress Checkout Form");?>
    589                             </div>
    590                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    591                             <div class="mo_openid_mmp_box">
    592                                 <br>
    593                                 <img style="box-shadow: 4px 4px #888888; width: 100%; height: 100%" class="mo_openid_mmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/mmp/membership-3.png'; ?>">
    594                             </div>
    595                         </label>
    596                     </div>
    597                 </div>
    598                 <br>
    599                 <input style="width: 126px;margin-left: 1%; margin-top:33%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
    600                 <br>
    601             </form>
    602             <br><br>
    603 
    604             <div class="mo_openid_highlight">
    605                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('MemberPress Levels Integration');?></h3>
    606             </div>
    607             <form>
    608                 <br>
    609                 <div style="margin-left: 1.5%">
    610                     <table>
    611                         <tr>
    612                             <div class="mo-openid-ppm-img">
    613                                 <img width="70%" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>includes/images/mmp/mmp_4.png">
    614                             </div>
    615                         </tr>
    616                     </table>
    617                 </div>
    618             </form>
    619             <td>
    620 
    621             </td>
    622             <?php
    623         }
    624 
    625         else if($active_tab_int == 'integration-paidmemb'){
    626             ?>
    627             <div id="pmp_head" style="display: block">
    628                 <table>
    629                     <tr>
    630                         <td>
    631                             <b><?php echo mo_sl('Paid Membership Pro is the member management and membership subscriptions plugin. With Paid Membership Integration you will get various social login display options using which you can display the Social Login icons on your Membership Pro checkout page.
    632 You\'ll also have the choice of assigning a default membership level to users or allowing them to select from a list of available membership levels when they register.');?></b>
    633                         </td>
    634                     </tr>
    635                 </table>
    636             </div>
    637             <br><br>
    638             <div class="mo_openid_highlight">
    639                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Paid Membership Pro Display Options');?></h3>
    640             </div>
    641 
    642             <form id="pmp_display" name="pmp_display" method="post" action="">
    643                 <div class="mo_openid_pmp_table_layout_fake" style="height: 550px"><br/>
    644                     <div style="width:45%; background:white; float:left; border: 1px transparent; margin-left: 25px">
    645                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    646                             <input type="checkbox" id="pmp_after_checkout_page_level_cost" name="pmp_after_checkout_page_level_cost" />
    647                             <div style="padding-left: 7%">
    648                                 <?php echo mo_sl("After Paid Memberships Pro Checkout Page Level Cost");?>
    649                             </div>
    650                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    651                             <div class="mo_openid_pmp_box">
    652                                 <br>
    653                                 <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/pmp/pmp_2.png'; ?>">
    654                             </div>
    655                         </label>
    656                         <br/>
    657                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    658                             <input type="checkbox" id="pmp_before_checkout_page_submit_button" name="pmp_before_checkout_page_submit_button" />
    659                             <div style="padding-left: 7%">
    660                                 <?php echo mo_sl("Before Paid Memberships Pro Checkout Page Submit Button");?>
    661                             </div>
    662                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    663                             <div class="mo_openid_pmp_box">
    664                                 <br>
    665                                 <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/pmp/pmp_1.png'; ?>">
    666                             </div>
    667                         </label>
    668 
    669 
    670 
    671                     </div>
    672                     <div style="width:45%; background:white; float:right; border: 1px transparent;">
    673                         <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
    674                             <input type="checkbox" id="pmp_after_checkout_page_username" name="pmp_after_checkout_page_username" />
    675                             <div style="padding-left: 7%">
    676                                 <?php echo mo_sl("After Paid Memberships Pro Checkout Page Username");?>
    677                             </div>
    678                             <span class="mo_openid_checkbox_checkmark_disable"></span>
    679                             <div class="mo_openid_pmp_box">
    680                                 <br>
    681                                 <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo plugin_dir_url(dirname(__DIR__)) . 'includes/images/pmp/pmp_3.png'; ?>">
    682                             </div>
    683                         </label>
    684                     </div>
    685                 </div>
    686                 <br>
    687                 <input style="width: 126px;margin-left: 1%; margin-top:33%" disabled type="button" value="<?php echo mo_sl('Save');?> "  class="button button-primary button-large" />
    688                 <br>
    689             </form>
    690             <br><br>
    691 
    692             <div class="mo_openid_highlight">
    693                 <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo mo_sl('Paid Membership Levels Integration');?></h3>
    694             </div>
    695             <form>
    696                 <br>
    697                 <div style="margin-left: 1.5%">
    698                     <table>
    699                         <tr>
    700                             <div class="mo-openid-ppm-img">
    701                                 <img width="70%" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?>includes/images/pmp/pmp_4.png">
    702                             </div>
    703                         </tr>
    704                         <tr>
    705                             <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-paid-membership-pro-with-wordpress-social-login" target="_blank">Paid Membership Pro Guide</a>  /  <a href="https://youtu.be/DHgIR6kyX3A" target="_blank">Paid Membership Pro Video</a></label>
    706                         </tr>
    707                     </table>
    708                 </div>
    709             </form>
    710             <td>
    711 
    712             </td>
    713             <?php
    714         }
     363                        (API Key in MailChimp : Profile -> Extras -> API Keys -> Your API Key'
     364                                    )
     365                                );
     366                                ?>
     367                                         )<br><br>
     368                                        <b><?php echo esc_attr( mo_sl( 'List Id' ) ); ?>:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" > <br><br>
     369                                        <b><?php echo esc_attr( mo_sl( 'API Key' ) ); ?>: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input size="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width:43%" type="text" disabled="disabled" ><br><br>
     370                                        <label class="mo_openid_checkbox_container_disable"><strong><?php echo esc_attr( mo_sl( "User's Choice" ) ); ?></strong>
     371                                            <input type="checkbox" />
     372                                            <span class="mo_openid_checkbox_checkmark"></span>
     373                                        </label>
     374                                        <strong><?php echo esc_attr( mo_sl( 'Ask user for permission to be added in MailChimp Subscriber list' ) ); ?> </strong>
     375                                        <br><?php echo esc_attr( mo_sl( '(If unchecked, user will get subscribed during registration.)' ) ); ?>
     376                                        <br><h3 style="float: left">Edit MailChimp subscription form </h3>
     377                                        <img src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ); ?>includes/images/demo_mailchimp.png">
     378                                        <br><br>
     379                                        <b><?php echo esc_attr( mo_sl( 'Click on Download button to get a list of emails of WordPress users registered on your site. You can import this file in MailChimp' ) ); ?>.<br><br>
     380                                            <input type="submit" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?> " disabled="disabled"  class="button button-primary button-large" />
     381                                            <a style="width:190px;" disabled="disabled" class="button button-primary button-large" href="#">
     382                                                <?php echo esc_attr( mo_sl( 'Download emails of users' ) ); ?>
     383                                            </a><br>
     384                            </td></tr></table>
     385                </form>
     386            </div>
     387            <?php
     388    } elseif ( $active_tab_int == 'integration-discord' ) {
     389        ?>
     390            <div class="mo_openid_table_layout">
     391                <h4><span style="color: red">Note:</span> Discord Integration is not included with any of the premium plans and must be purchased as an add-on separately.</h4>
     392        <?php
     393        mo_openid_discord_add_on_display();
     394        ?>
     395            </div>
     396        <?php
     397    } elseif ( $active_tab_int == 'integration-customregistration' ) {
     398        ?>
     399
     400            <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
     401                <table>
     402                    <tr>
     403                        <td>
     404                            <b><?php echo esc_attr( mo_sl( 'The miniOrange Custom Registration Form Add-On allows you to obtain additional information from your customers. You can build your own custom form with as many fields as you want, even those returned by social sites, and the user will be redirected to it after a successful registration form social login. The meta table will save all of the details entered by the user.' ) ); ?></b>
     405                        </td>
     406                    </tr>
     407                </table>
     408                <table>
     409                    <tr>
     410                        <td style="vertical-align:top; ">
     411                            <div class="mo_openid_table_layout"><br/>
     412                                <form method="post">
     413                                    <h3><?php echo esc_attr( mo_sl( 'Customization Fields' ) ); ?></h3>
     414                                    <input type="checkbox" disabled="disabled"
     415                                           value="1" checked
     416                                    <b><?php echo esc_attr( mo_sl( 'Enable Auto Field Registration Form' ) ); ?></b>
     417
     418                                    <style>
     419                                        .tableborder {
     420                                            border-collapse: collapse;
     421                                            width: 100%;
     422                                            border-color: #eee;
     423                                        }
     424
     425                                        .tableborder th, .tableborder td {
     426                                            text-align: left;
     427                                            padding: 8px;
     428                                            border-color: #eee;
     429                                        }
     430
     431                                        .tableborder tr:nth-child(even) {
     432                                            background-color: #f2f2f2
     433                                        }
     434                                    </style>
     435                                    <!--mo_openid_custom_field_update-->
     436                                    <table id="custom_field" style="width:100%; text-align: center;" class="table mo_openid_mywatermark">
     437                                        <div id="myCheck">
     438                                            <h4><?php echo esc_attr( mo_sl( 'Registration page link' ) ); ?> <input type="text"
     439                                                                                                     style="width: 350px" disabled="disabled"
     440                                                                                                     required/></h4>
     441                                            <thead>
     442                                            <tr>
     443                                                <th><?php echo esc_attr( mo_sl( 'Existing Field' ) ); ?></th>
     444                                                <th><?php echo esc_attr( mo_sl( 'Field' ) ); ?></th>
     445                                                <th><?php echo esc_attr( mo_sl( 'Custom name' ) ); ?></th>
     446                                                <th><?php echo esc_attr( mo_sl( 'Field Type' ) ); ?></th>
     447                                                <th><?php echo esc_attr( mo_sl( 'Field Options' ) ); ?></th>
     448                                                <th><?php echo esc_attr( mo_sl( 'Required Field' ) ); ?></th>
     449                                                <th></th>
     450                                            </tr>
     451                                            </thead>
     452                                                                                    <tr>
     453                                                <td style="width: 15%"><br><input type="text" disabled="disabled" placeholder="Existing meta field"
     454                                                                                  style="width:90%;"/></td>
     455                                                <td style="width: 15%"><br><select id="field_1_name" disabled="disabled"
     456                                                                                   onchange="myFunction('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
     457                                                                                   style="width:80%">
     458                                                        <option value=""><?php echo esc_attr( mo_sl( 'Select Field' ) ); ?></option>
     459                                                    </select></td>
     460                                                <td style="width: 15%"><br><input type="text" id="opt_field_1_name" disabled="disabled"
     461                                                                                  placeholder="Custom Field Name"
     462                                                                                  style="width:90%;"/></td>
     463                                                <td style="width: 15%"><br><select id="field_1_value" name="field_1_value" disabled="disabled"
     464                                                                                   onchange="myFunction2('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
     465                                                                                   style="width:80%">
     466                                                        <option value="default"><?php echo esc_attr( mo_sl( 'Select Type' ) ); ?></option>
     467                                                    </select></td>
     468                                                <td style="width: 20%"><br><input type="text" id="additional_field_1_value" disabled="disabled"
     469                                                                                  placeholder="e.g. opt1;opt2;opt3"
     470                                                                                  style="width:90%;"/></td>
     471                                                <td style="width: 10%"><br><select name="mo_openid_custom_field_1_Required" disabled="disabled"
     472                                                                                   style="width:57%">
     473                                                        <option value="no"><?php echo esc_attr( mo_sl( 'No' ) ); ?></option>
     474                                                    </select></td>
     475                                                <td style="width: 10%"><br><input type="button" disabled="disabled"
     476                                                                                  value="+"
     477                                                                                  class=" button-primary"/>&nbsp;
     478                                                    <input type="button" name="mo_remove_attribute" value="-" disabled="disabled"
     479                                                           class=" button-primary"/>
     480                                                </td>
     481                                            </tr>
     482                                        </div>
     483                                        <tr id="mo_openid_custom_field">
     484                                            <td align="center" colspan="7"><br>
     485                                                <input name="mo_openid_save_config_element" type="submit" disabled="disabled"
     486                                                       value="Save"
     487                                                       class="button button-primary button-large"/>
     488                                                &nbsp &nbsp <a class="button button-primary button-large" disabled="disabled"><?php echo esc_attr( mo_sl( 'Cancel' ) ); ?></a>
     489                                            </td>
     490                                        </tr>
     491                                        <tr>
     492                                            <td align="left" colspan="7">
     493                                                <h3><?php echo esc_attr( mo_sl( 'Instructions to setup' ) ); ?>:</h3>
     494                                                <p>
     495                                                <ol>
     496                                                    <li> <?php echo esc_attr( mo_sl( 'Create a page and use shortcode' ) ); ?> <b>[miniorange_social_custom_fields]</b>
     497                                                    <?php echo esc_attr( mo_sl( 'where you want your form to be displayed' ) ); ?>.
     498                                                    </li>
     499                                                    <li>
     500                                                    <?php
     501                                                    echo esc_attr(
     502                                                        mo_sl(
     503                                                            'Copy the page link and paste it in the above field <b>Registration page
     504                                                    link'
     505                                                        )
     506                                                    );
     507                                                    ?>
     508                                                        </b>.
     509                                                    </li>
     510                                                    <li><?php echo esc_attr( mo_sl( "If you have any existing wp_usermeta field then enter that field's name in" ) ); ?>
     511                                                        <b>
     512                                                        <?php
     513                                                        echo esc_attr(
     514                                                            mo_sl(
     515                                                                'Existing
     516                                                    Field'
     517                                                            )
     518                                                        );
     519                                                        ?>
     520                                                            </b> <?php echo esc_attr( mo_sl( 'column. For example, if you are saving' ) ); ?> <b><?php echo esc_attr( mo_sl( 'First Name' ) ); ?></b> <?php echo esc_attr( mo_sl( 'as' ) ); ?>
     521                                                        <b><?php echo esc_attr( mo_sl( 'fname' ) ); ?></b>
     522                                                        <?php
     523                                                        echo esc_attr(
     524                                                            mo_sl(
     525                                                                'in wp_usermeta field then enter <b>fname</b> in <b>Existing Field</b>
     526                                                column.'
     527                                                            )
     528                                                        );
     529                                                        ?>
     530                                                    </li>
     531                                                    <li> <?php echo esc_attr( mo_sl( 'Select field name under the ' ) ); ?><b><?php echo esc_attr( mo_sl( 'Field' ) ); ?></b> <?php echo esc_attr( mo_sl( 'dropdown' ) ); ?>.</li>
     532                                                    <li> <?php echo esc_attr( mo_sl( 'If selected field is other than custom, then' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Field Type' ) ); ?></b>
     533                                                                    <?php
     534                                                                    echo esc_attr(
     535                                                                        mo_sl(
     536                                                                            'will
     537                                                automatically be'
     538                                                                        )
     539                                                                    );
     540                                                                    ?>
     541                                                             <b><?php echo esc_attr( mo_sl( 'Textbox' ) ); ?></b> <?php echo esc_attr( mo_sl( 'and there is no need to enter' ) ); ?> <b>
     542                 <?php
     543                                                echo esc_attr(
     544                                                    mo_sl(
     545                                                        'Custom
     546                                                    name'
     547                                                    )
     548                                                );
     549                    ?>
     550</b> <?php echo esc_attr( mo_sl( 'and' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Field options' ) ); ?></b>.
     551                                                    </li>
     552                                                    <li> <?php echo esc_attr( mo_sl( 'If selected field is custom, then enter' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Custom name' ) ); ?></b>.</li>
     553                                                    <li> <?php echo esc_attr( mo_sl( 'Select' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Field Type' ) ); ?></b>, <?php echo esc_attr( mo_sl( 'if selected' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Field Type' ) ); ?></b> <?php echo esc_attr( mo_sl( 'is' ) ); ?>
     554                                                        <b><?php echo esc_attr( mo_sl( 'Checkbox' ) ); ?></b><?php echo esc_attr( mo_sl( 'or' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Dropdown' ) ); ?></b> <?php ( 'then enter the desire options in' ); ?> <b>
     555                                                                      <?php
     556                                                                        echo esc_attr(
     557                                                                            mo_sl(
     558                                                                                'Field
     559                                                    Options'
     560                                                                            )
     561                                                                        );
     562                                                                        ?>
     563                                                            </b> <?php echo esc_attr( mo_sl( 'seprated by semicolon ' ) ); ?><b>;</b>'<?php echo esc_attr( mo_sl( 'otherwise leave' ) ); ?> <b>
     564                  <?php
     565                                                    echo esc_attr(
     566                                                        mo_sl(
     567                                                            'Field
     568                                                    Options'
     569                                                        )
     570                                                    );
     571                    ?>
     572</b> <?php echo esc_attr( mo_sl( 'blank.' ) ); ?>
     573                                                    </li>
     574                                                    <li> <?php echo esc_attr( mo_sl( 'Select' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Required Field' ) ); ?></b> <?php echo esc_attr( mo_sl( 'as' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Yes' ) ); ?></b>
     575                                                                    <?php
     576                                                                    echo esc_attr(
     577                                                                        mo_sl(
     578                                                                            'if you want to make that field
     579                                                compulsory for user'
     580                                                                        )
     581                                                                    );
     582                                                                    ?>
     583                                                            .
     584                                                    </li>
     585                                                    <li> <?php echo esc_attr( mo_sl( 'If you want to add more than 1 fields at a time click on' ) ); ?> <b>"+"</b>.</li>
     586                                                    <li> <?php echo esc_attr( mo_sl( 'Last click on' ) ); ?> <b><?php echo esc_attr( mo_sl( 'Save' ) ); ?></b> <?php echo esc_attr( mo_sl( 'button' ) ); ?>.</li>
     587                                                </ol>
     588                                                </p>
     589                                            </td>
     590                                        </tr>
     591                                    </table>
     592                                </form>
     593                                <br>
     594                                <hr>
     595                            </div>
     596                        </td>
     597                    </tr>
     598                </table>
     599            </div>
     600            <?php
     601    } elseif ( $active_tab_int == 'integration-hubspot' ) {
     602        ?>
     603            <div class="mo_openid_table_layout">
     604            <h4><span style="color: red">Note:</span> HubSpot Integration is not included with any of the premium plans and must be purchased as an add-on separately. With Hubspot integration, you can monitor a user's activities on your website.</h4>
     605        <?php
     606        mo_openid_hubspot_add_on_display();
     607        ?>
     608            </div>
     609        <?php
     610    } elseif ( $active_tab_int == 'integration-memberpress' ) {
     611        ?>
     612            <div id="mmp_head" style="display: block">
     613                <table>
     614                    <tr>
     615                        <td>
     616                            <br/><b>
     617                            <?php
     618                            echo esc_attr(
     619                                mo_sl(
     620                                    'Membership is the member management and membership subscriptions plugin. With Membership Integration you will get various social login display options using which you can display the Social Login icons on your Membership Login, Account, and checkout page.
     621You\'ll also have the choice of assigning a default membership level to users or allowing them to select from a list of available membership levels when they register.'
     622                                )
     623                            );
     624                            ?>
     625                                    </b>
     626                        </td>
     627                    </tr>
     628                </table>
     629            </div>
     630            <br><br>
     631            <div class="mo_openid_highlight">
     632                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'MemberPress Display Options' ) ); ?></h3>
     633            </div>
     634
     635            <form id="mmp_display" name="mmp_display" method="post" action="">
     636                <div class="mo_openid_mmp_table_layout_fake" style="height: 430px"><br/>
     637                    <div style="width:45%; background:white; float:left; border: 1px transparent; margin-left: 25px">
     638                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     639                            <input type="checkbox"/>
     640                            <div style="padding-left: 7%">
     641                                <?php echo esc_attr( mo_sl( 'After MemberPress Login Form' ) ); ?>
     642                            </div>
     643                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     644                            <div class="mo_openid_mmp_box">
     645                                <br>
     646                                <img style="box-shadow: 4px 4px #888888; width: 100%; height: 75%" class="mo_openid_mmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/mmp/membership-2.png'; ?>">
     647                            </div>
     648                        </label>
     649                        <br/>
     650                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     651                            <input type="checkbox" />
     652                            <div style="padding-left: 7%">
     653                                <?php echo esc_attr( mo_sl( 'After MemberPress Account Form' ) ); ?>
     654                            </div>
     655                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     656                            <div class="mo_openid_mmp_box">
     657                                <br>
     658                                <img style="box-shadow: 4px 4px #888888; width: 100%; height: 75%" class="mo_openid_mmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/mmp/membership-1.png'; ?>">
     659                            </div>
     660                        </label>
     661
     662
     663
     664                    </div>
     665                    <div style="width:45%; background:white; float:right; border: 1px transparent;">
     666                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     667                            <input type="checkbox" />
     668                            <div style="padding-left: 7%">
     669                                <?php echo esc_attr( mo_sl( 'After MemberPress Checkout Form' ) ); ?>
     670                            </div>
     671                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     672                            <div class="mo_openid_mmp_box">
     673                                <br>
     674                                <img style="box-shadow: 4px 4px #888888; width: 100%; height: 100%" class="mo_openid_mmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/mmp/membership-3.png'; ?>">
     675                            </div>
     676                        </label>
     677                    </div>
     678                </div>
     679                <br>
     680                <input style="width: 126px;margin-left: 1%; margin-top:33%" disabled type="button" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?> "  class="button button-primary button-large" />
     681                <br>
     682            </form>
     683            <br><br>
     684
     685            <div class="mo_openid_highlight">
     686                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'MemberPress Levels Integration' ) ); ?></h3>
     687            </div>
     688            <form>
     689                <br>
     690                <div style="margin-left: 1.5%">
     691                    <table>
     692                        <tr>
     693                            <div class="mo-openid-ppm-img">
     694                                <img width="70%" src="<?php echo esc_url( plugin_dir_url( dirname( dirname( __FILE__ ) ) ) ); ?>includes/images/mmp/mmp_4.png">
     695                            </div>
     696                        </tr>
     697                    </table>
     698                </div>
     699            </form>
     700            <td>
     701
     702            </td>
     703            <?php
     704    } elseif ( $active_tab_int == 'integration-paidmemb' ) {
     705        ?>
     706            <div id="pmp_head" style="display: block">
     707                <table>
     708                    <tr>
     709                        <td>
     710                            <b>
     711                            <?php
     712                            echo esc_attr(
     713                                mo_sl(
     714                                    'Paid Membership Pro is the member management and membership subscriptions plugin. With Paid Membership Integration you will get various social login display options using which you can display the Social Login icons on your Membership Pro checkout page.
     715You\'ll also have the choice of assigning a default membership level to users or allowing them to select from a list of available membership levels when they register.'
     716                                )
     717                            );
     718                            ?>
     719                                </b>
     720                        </td>
     721                    </tr>
     722                </table>
     723            </div>
     724            <br><br>
     725            <div class="mo_openid_highlight">
     726                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'Paid Membership Pro Display Options' ) ); ?></h3>
     727            </div>
     728
     729            <form id="pmp_display" name="pmp_display" method="post" action="">
     730                <div class="mo_openid_pmp_table_layout_fake" style="height: 550px"><br/>
     731                    <div style="width:45%; background:white; float:left; border: 1px transparent; margin-left: 25px">
     732                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     733                            <input type="checkbox" id="pmp_after_checkout_page_level_cost" name="pmp_after_checkout_page_level_cost" />
     734                            <div style="padding-left: 7%">
     735                                <?php echo esc_attr( mo_sl( 'After Paid Memberships Pro Checkout Page Level Cost' ) ); ?>
     736                            </div>
     737                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     738                            <div class="mo_openid_pmp_box">
     739                                <br>
     740                                <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/pmp/pmp_2.png'; ?>">
     741                            </div>
     742                        </label>
     743                        <br/>
     744                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     745                            <input type="checkbox" id="pmp_before_checkout_page_submit_button" name="pmp_before_checkout_page_submit_button" />
     746                            <div style="padding-left: 7%">
     747                                <?php echo esc_attr( mo_sl( 'Before Paid Memberships Pro Checkout Page Submit Button' ) ); ?>
     748                            </div>
     749                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     750                            <div class="mo_openid_pmp_box">
     751                                <br>
     752                                <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/pmp/pmp_1.png'; ?>">
     753                            </div>
     754                        </label>
     755
     756
     757
     758                    </div>
     759                    <div style="width:45%; background:white; float:right; border: 1px transparent;">
     760                        <label style="padding-left: 0px;" class="mo_openid_checkbox_container_disable">
     761                            <input type="checkbox" id="pmp_after_checkout_page_username" name="pmp_after_checkout_page_username" />
     762                            <div style="padding-left: 7%">
     763                                <?php echo esc_attr( mo_sl( 'After Paid Memberships Pro Checkout Page Username' ) ); ?>
     764                            </div>
     765                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     766                            <div class="mo_openid_pmp_box">
     767                                <br>
     768                                <img style="width: 100%; height: 100%" class="mo_openid_pmp_images" src="<?php echo esc_url( plugin_dir_url( dirname( __DIR__ ) ) ) . 'includes/images/pmp/pmp_3.png'; ?>">
     769                            </div>
     770                        </label>
     771                    </div>
     772                </div>
     773                <br>
     774                <input style="width: 126px;margin-left: 1%; margin-top:33%" disabled type="button" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?> "  class="button button-primary button-large" />
     775                <br>
     776            </form>
     777            <br><br>
     778
     779            <div class="mo_openid_highlight">
     780                <h3 style="margin-left: 2%;line-height: 210%;color: white;"><?php echo esc_attr( mo_sl( 'Paid Membership Levels Integration' ) ); ?></h3>
     781            </div>
     782            <form>
     783                <br>
     784                <div style="margin-left: 1.5%">
     785                    <table>
     786                        <tr>
     787                            <div class="mo-openid-ppm-img">
     788                                <img width="70%" src="<?php echo esc_url( plugin_dir_url( dirname( dirname( __FILE__ ) ) ) ); ?>includes/images/pmp/pmp_4.png">
     789                            </div>
     790                        </tr>
     791                        <tr>
     792                            <label class="mo_openid_note_style" style="cursor: auto">For more information please refer to the <a href="https://plugins.miniorange.com/guide-to-configure-paid-membership-pro-with-wordpress-social-login" target="_blank">Paid Membership Pro Guide</a>  /  <a href="https://youtu.be/DHgIR6kyX3A" target="_blank">Paid Membership Pro Video</a></label>
     793                        </tr>
     794                    </table>
     795                </div>
     796            </form>
     797            <td>
     798
     799            </td>
     800            <?php
     801    }
    715802}
  • miniorange-login-openid/trunk/view/licensing_plans/mo_openid_lic_plans.php

    r2809759 r2853010  
    33function mo_openid_licensing_plans()
    44{
    5     wp_enqueue_style( 'mo_openid_plugins_page_style', plugin_dir_url(dirname(dirname(__FILE__))).'includes/css/mo_openid_licensing_plan.css?version='.MO_OPENID_SOCIAL_LOGIN_VERSION );
     5    wp_enqueue_style( 'mo_openid_plugins_page_style',esc_url( plugin_dir_url(dirname(dirname(__FILE__))).'includes/css/mo_openid_licensing_plan.css?version='.MO_OPENID_SOCIAL_LOGIN_VERSION));
    66    ?>
    77    <input type="hidden" id="mo_license_plan_selected" value="" />
     
    6060                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">13 Social Sharing Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;"> Facebook, Twitter, Vkontakte, WhatsApp, Tunmblr, StumbleUpon, LinkedIn, Reddit, Pinterest, Pocket, Digg, Email, Print.<br></span></div></li>
    6161                                        <li>
    62                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">41 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Discord, Twitch, Line, Hubspot, Paypal, Github, Dropbox, Wechat, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo,<span id="mo_openid_dots6">...</span><span id="mo_openid_more6" style="display:none" > Wordpress, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots6','mo_openid_more6','mo_openid_myBtn6')" id="mo_openid_myBtn6">Read more</button>
     62                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">41 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Discord, Twitch, Line, Hubspot, Paypal, Github, Dropbox, Wechat, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo,<span id="mo_openid_dots6">...</span><span id="mo_openid_more6" style="display:none" > Wordpress, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots6','mo_openid_more6','mo_openid_myBtn6')" id="mo_openid_myBtn6">Read more</button>
    6363                                            </div>
    6464                                        </li>
     
    114114                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    115115
    116                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    117                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    118                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     116                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     117                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     118                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    119119                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size: 2em; width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    120120                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    156156                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">13 Social Sharing Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;"> Facebook, Twitter, Vkontakte, WhatsApp, Tunmblr, StumbleUpon, LinkedIn, Reddit, Pinterest, Pocket, Digg, Email, Print.<br></span></div></li>
    157157                                        <li>
    158                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">41 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Discord, Twitch, Line, Hubspot, Paypal, Github, Dropbox, Wechat, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo,<span id="mo_openid_dots6">...</span><span id="mo_openid_more6" style="display:none" > Wordpress, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots6','mo_openid_more6','mo_openid_myBtn6')" id="mo_openid_myBtn6">Read more</button>
     158                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">41 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Discord, Twitch, Line, Hubspot, Paypal, Github, Dropbox, Wechat, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo,<span id="mo_openid_dots6">...</span><span id="mo_openid_more6" style="display:none" > Wordpress, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots6','mo_openid_more6','mo_openid_myBtn6')" id="mo_openid_myBtn6">Read more</button>
    159159                                            </div>
    160160                                        </li>
     
    210210                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    211211
    212                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    213                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    214                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     212                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     213                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     214                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    215215                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size: 2em; width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    216216                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    301301                                        </li>
    302302                                        <li>
    303                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
     303                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
    304304                                            </div>
    305305                                        </li>
     
    353353                                        <li>Disable Admin Bar</li>
    354354                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    355                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    356                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    357                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     355                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     356                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     357                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    358358                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size:2em;width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    359359                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    396396                                        </li>
    397397                                        <li>
    398                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
     398                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
    399399                                            </div>
    400400                                        </li>
     
    448448                                        <li>Disable Admin Bar</li>
    449449                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    450                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    451                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    452                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     450                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     451                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     452                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    453453                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size:2em;width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    454454                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    519519                                        </li>
    520520                                        <li>
    521                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
     521                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
    522522                                            </div>
    523523                                        </li>
     
    571571                                        <li>Disable Admin Bar</li>
    572572                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    573                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    574                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    575                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     573                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     574                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     575                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    576576                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size:2em;width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    577577                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    613613                                        </li>
    614614                                        <li>
    615                                             <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Instagram, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
     615                                            <div class="mo_openid_tooltip" style="padding-left: 40px;">42 Social Login Apps <i class="far fa-comment-dots " style="font-size:18px; color:#85929E"></i><span class="mo_openid_tooltiptext" style="width:100%;">Apple, Dropbox, Discord, Twitch, Line, Hubspot, Google, Facebook, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce, Yahoo.<span id="mo_openid_dots0">...</span><span id="mo_openid_more0" style="display:none" >Paypal, Wordpress, Github, Mail.RU, Disqus, Pinterest, Yandex, Spotify, Reddit, Tumblr, Vimeo, Kakao, Dribbble, Flickr, MeetUp, Stackexchange, Livejournal, Snapchat, Foursquare, Teamsnap, Naver, Odnoklassniki, Wiebo, Wechat, Baidu, Renren, QQ.</span><button style="border:transparent;background-color: transparent;color: tomato;" onclick="myFunction('mo_openid_dots0','mo_openid_more0','mo_openid_myBtn0')" id="mo_openid_myBtn0">Read more</button>
    616616                                            </div>
    617617                                        </li>
     
    665665                                        <li>Disable Admin Bar</li>
    666666                                        <li><span class="mo_openid_tooltip">MemberPress Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by MemberPress to the users login using Social Login</span></li>
    667                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/woocommerce.png" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
    668                                         <li><span class="mo_openid_tooltip"><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/paidmember.png" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
    669                                         <li><div class="mo_openid_tooltip" ><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/buddypress.png" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
     667                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/woocommerce.png')?>" alt="wc" style="width:35px;height:20px;"> Woocommerce Integration  <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;"> First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page. Social Login icons are displayed on the Woocommerce checkout page.</span></li>
     668                                        <li><span class="mo_openid_tooltip"><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/paidmember.png')?>" alt="pmpro" style="width:35px;height:20px;">  Paid Membership pro Integration <i class="far fa-comment-dots" style="font-size:18px;color:#85929E"></i> <span class="mo_openid_tooltiptext" style="width:100%;">Assign default levels or let users choose to set their levels provided by Paid Membership Pro to the users login using Social Login</span></li>
     669                                        <li><div class="mo_openid_tooltip" ><img src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))).'includes/images/buddypress.png')?>" alt="bp" style="width:35px;height:20px;"> BuddyPress Integration<i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;"> Extended attributes returned from social app are mapped to Custom BuddyPress fields. Profile picture from social media is mapped to Buddypress avatar.</span></li>
    670670                                        <li><div class="mo_openid_tooltip" ><i class="fab fa-mailchimp" style="font-size:2em;width:35px;height:20px;"></i> MailChimp Integration <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>
    671671                                        <li><div class="mo_openid_tooltip" >miniOrange OTP Integration<span style="color: red">*</span> <i class="far fa-comment-dots " style="font-size:18px;color:#85929E"> </i><span class="mo_openid_tooltiptext" style="width:100%;">Verify your users via OTP on registration.</span></li>
     
    12251225
    12261226        jQuery(document).ready(function($){
    1227             var x="<?php echo get_option('mo_openid_extension_tab'); ?>";
     1227            var x="<?php echo esc_attr(get_option('mo_openid_extension_tab')); ?>";
    12281228            if(x==1){
    12291229                document.getElementById('singlesite').checked= false;
     
    13231323    <?php
    13241324    $feature_array= array(
    1325     'free_feature'=>'<h2>Social Login Free Feature</h2><li>Social Login with Facebook, Google, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce & Yahoo</li><li>NO SETUP required for default social login apps.</li><li>Setup your own social login application with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Instagram, Amazon & Yahoo</li><li>Preview is available for Social Login icons</li><li>Icon Customizations – customize shape, theme, space & size of social login icons.</li><li>Profile completion (username, email) – Prompt user for email & username if social login app doesn’t return it. Email is verified with verification code.</li><li>Assign Roles to users – Assign WordPress roles to users logging in with social login application.</li><li>Add the Social Login Icons on: login page, registration page, comment form or anywhere on your site using our Social Login widget/ shortcode.</li><li>Sync Social Profile Picture with WordPress.</li><li>Enable Email Notification to admin when user registers with social login application.</li><li>Enable/disable user registration.</li><li>Customize Login/Logout Redirect URL.</li><li>Customizable Text For Social Login Icons.</li><li>SHORTCODE available for social login.</li><li>Support using email and in-plugin support form.</li>',
     1325    'free_feature'=>'<h2>Social Login Free Feature</h2><li>Social Login with Facebook, Google, Twitter, Vkontakte, LinkedIn, Amazon, Salesforce & Yahoo</li><li>NO SETUP required for default social login apps.</li><li>Setup your own social login application with APP ID and APP Secret for Facebook, Google, Twitter, Vkontakte, LinkedIn, Amazon & Yahoo</li><li>Preview is available for Social Login icons</li><li>Icon Customizations – customize shape, theme, space & size of social login icons.</li><li>Profile completion (username, email) – Prompt user for email & username if social login app doesn’t return it. Email is verified with verification code.</li><li>Assign Roles to users – Assign WordPress roles to users logging in with social login application.</li><li>Add the Social Login Icons on: login page, registration page, comment form or anywhere on your site using our Social Login widget/ shortcode.</li><li>Sync Social Profile Picture with WordPress.</li><li>Enable Email Notification to admin when user registers with social login application.</li><li>Enable/disable user registration.</li><li>Customize Login/Logout Redirect URL.</li><li>Customizable Text For Social Login Icons.</li><li>SHORTCODE available for social login.</li><li>Support using email and in-plugin support form.</li>',
    13261326    'mailchimp_adon'=>'<h2><i class="fab fa-mailchimp" style="width:35px;height:30px;color: #0c1f28; font-size: 2em"></i> Mailchimp Integration Add-on Feature</h2><h2>Description</h2><li>A user is added as a subscriber to a mailing list in MailChimp when that user registers using Social Login. First name, last name and email are also captured for that user in the Mailing List. Option is available to download csv file that has list of emails of all users in WordPress.</span></li>',
    1327     'custom_registration_adon'=>'<h2><img src="'. plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/miniorange_logo.png" style="width:35px;height:30px;">  Custom Registration Form Add-on Features</h2><li>Create a pre-registration form</li><li>Allow user to select Role while Registration</li> <li>All WordPress Themes Supported</li><li>Map Users Data returned from all Social Apps</li><li>Add Custom Fields in the Registration form</li><li>Edit Profile option using shortcode</li><li>Support input field types: text, date, checkbox or dropdown</li><li>Advanced Form Control</li><li>Sync existing meta field</li>',
    1328     'woocommerce_int_adon'=>'<h2><img src="'. plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/woocommerce.png" style="width:35px;height:30px;"> WooCommerce Integration Add-on Features</h2><li>WooCommerce Display Options</li><li>First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page.</li><li>Social Login on WooCommerce Login Page</li><li>Social Login on WooCommerce Registration Page</li><li>Social Login on WooCommerce Checkout Page</li><li>Before WooCommerce Login Form</li><li>Before "Remember Me" of WooCommerce Login Form</li> <li>After WooCommerce Login Form</li><li>Before WooCommerce Registration Form</li><li>Before "Register button" of WooCommerce Registration Form</li> <li>After WooCommerce Registration Form</li><li>Before & After WooCommerce Checkout Form</li>',
    1329     'buddypress_adon'=>' <h2><img src="'. plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/buddypress.png" style="width:35px;height:30px;"> Buddypress Integration Add-on Features</h2><h2>Description</h2><li>Social Login for BuddyPress</li> <li>Extended attributes returned from social app are mapped to Custom BuddyPress fields.</li><li> Profile picture from social media is mapped to Buddypress avatar</li><li>Before BuddyPress Registration Form</li><li>Before BuddyPress Account Details</li><li>After BuddyPress Registration Form</li>',
     1327    'custom_registration_adon'=>'<h2><img src="'. esc_url(plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/miniorange_logo.png').'" style="width:35px;height:30px;">  Custom Registration Form Add-on Features</h2><li>Create a pre-registration form</li><li>Allow user to select Role while Registration</li> <li>All WordPress Themes Supported</li><li>Map Users Data returned from all Social Apps</li><li>Add Custom Fields in the Registration form</li><li>Edit Profile option using shortcode</li><li>Support input field types: text, date, checkbox or dropdown</li><li>Advanced Form Control</li><li>Sync existing meta field</li>',
     1328    'woocommerce_int_adon'=>'<h2><img src="'. esc_url( plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/woocommerce.png').'" style="width:35px;height:30px;"> WooCommerce Integration Add-on Features</h2><li>WooCommerce Display Options</li><li>First name, last name and email are pre-filled in billing details of a user and on the Woocommerce checkout page.</li><li>Social Login on WooCommerce Login Page</li><li>Social Login on WooCommerce Registration Page</li><li>Social Login on WooCommerce Checkout Page</li><li>Before WooCommerce Login Form</li><li>Before "Remember Me" of WooCommerce Login Form</li> <li>After WooCommerce Login Form</li><li>Before WooCommerce Registration Form</li><li>Before "Register button" of WooCommerce Registration Form</li> <li>After WooCommerce Registration Form</li><li>Before & After WooCommerce Checkout Form</li>',
     1329    'buddypress_adon'=>' <h2><img src="'. esc_url(plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/buddypress.png').'" style="width:35px;height:30px;"> Buddypress Integration Add-on Features</h2><h2>Description</h2><li>Social Login for BuddyPress</li> <li>Extended attributes returned from social app are mapped to Custom BuddyPress fields.</li><li> Profile picture from social media is mapped to Buddypress avatar</li><li>Before BuddyPress Registration Form</li><li>Before BuddyPress Account Details</li><li>After BuddyPress Registration Form</li>',
    13301330    'hubspot_adon'=>' <h2><i class="fab fa-hubspot" style="width:35px;height:30px;color: orangered;font-size: 1.6em;"></i>Hubspot Integration Add-on Feature</h2><h2>Description</h2><li>Add social login user to Hubspot Contact List</li><li>Track the activities of the user on your website.</li>',
    13311331    'discord_adon1'=>' <h2><i class="fab fa-discord" style="width:35px;height:30px;color: #7289da;font-size: 1.6em;"></i> Discord Integration Add-on Feature</h2><h2>Description</h2><li>Manage your users and restrict the login/registration of user based on whether the user is present in the Discord server or not.</li>',
     
    13391339    'active_campaign_integration'=>' <h2><i class="fa fa-campground" style="width:35px;height:30px;color: #7289da;font-size: 1.6em;"></i> Active Campaign Add-on Feature</h2><h2>Description</h2><li>A user is added as a contact in to your active campaign list when user register with social media application. Captured first name, last name and email address.</li>',
    13401340    'hubspot_integration'=>' <h2><i class="fab fa-hubspot" style="width:35px;height:30px;color: #7289da;font-size: 1.6em;"></i>Hubspot Integration Add-on Feature</h2><h2>Description</h2><li>Add social login user to Hubspot Contact List</li><li>Track the activities of the user on your website.</li>',
    1341     'social_share'=>' <h2><img src="'. plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/miniorange_logo.png" style="width:35px;height:30px;"> Social Share Plan Feature</h2><li>All Free Features</li><li>45 Social Sharing Apps</li><li>Sharing Display Option</li><li>Hover Icons & Floating Icons</li><li>Discord Auto Post</li><li>Sharing Icons for BBPress</li><li>WooCommerce Product Sharing</li><li>E-mail subscriber</li><li>Facebook, Vkontakte, Stumble Upon, Buffer, Pinterest and Reddit Share Count</li><li>Facebook Like & Recommended</li><li>Pinterest Pin it Button</li><li>Twitter Follow Button</li>'
     1341    'social_share'=>' <h2><img src="'. esc_url(plugin_dir_url(dirname(dirname(__FILE__))) .'includes/images/miniorange_logo.png').'" style="width:35px;height:30px;"> Social Share Plan Feature</h2><li>All Free Features</li><li>45 Social Sharing Apps</li><li>Sharing Display Option</li><li>Hover Icons & Floating Icons</li><li>Discord Auto Post</li><li>Sharing Icons for BBPress</li><li>WooCommerce Product Sharing</li><li>E-mail subscriber</li><li>Facebook, Vkontakte, Stumble Upon, Buffer, Pinterest and Reddit Share Count</li><li>Facebook Like & Recommended</li><li>Pinterest Pin it Button</li><li>Twitter Follow Button</li>'
    13421342        )
    13431343
     
    13871387        }
    13881388        function mosocial_addonform(planType) {
     1389            var mo_openid_customer_toggle_update_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-customer-toggle-update-nonce")); ?>';
    13891390            jQuery.ajax({
    1390                 url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     1391                url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    13911392                method: "POST", //request type,
    13921393                dataType: 'json',
    13931394                data: {
    13941395                    action: 'mo_register_customer_toggle_update',
     1396                    'mo_openid_customer_toggle_update_nonce' : mo_openid_customer_toggle_update_nonce,
    13951397                },
    13961398                success: function (result) {
     
    14021404                    {
    14031405                        alert("It seems you are not registered with miniOrange. Please login or register with us to upgrade to premium plan.");
    1404                         window.location.href="<?php echo site_url()?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
     1406                        window.location.href="<?php echo esc_url(site_url())?>".concat("/wp-admin/admin.php?page=mo_openid_general_settings&tab=profile");
    14051407                    }
    14061408                }
     
    14121414
    14131415    <td>
    1414         <form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
     1416        <form style="display:none;" id="mosocial_loginform" action="<?php echo esc_url(get_option( 'mo_openid_host_name' )) . '/moas/login'; ?>"
    14151417              target="_blank" method="post" >
    14161418            <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
  • miniorange-login-openid/trunk/view/link_social_account/mo_openid_Acclink.php

    r2648308 r2853010  
    1212            <input type="hidden" name="option" value="mo_openid_account_linking" />
    1313            <input type="hidden" name="mo_openid_enable_account_linking_nonce"
    14                value="<?php echo wp_create_nonce( 'mo-openid-enable-account-linking-nonce' ); ?>"/>
     14               value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-account-linking-nonce' )); ?>"/>
    1515            <table>
    1616                <tr>
    1717                    <td colspan="2">
    1818                        <div>
    19                             <label class="mo_openid_note_style"> <?php echo mo_sl('Enable account linking to let your users link their Social accounts with existing WordPress account. Users will be prompted with the option to either link to any existing account using WordPress login page or register as a new user.');?></label><br/>
    20                             <label style="cursor: auto" class="mo_openid_checkbox_container"><?php echo mo_sl('Enable linking of Social Accounts');?>
     19                            <label class="mo_openid_note_style"> <?php echo esc_attr(mo_sl('Enable account linking to let your users link their Social accounts with existing WordPress account. Users will be prompted with the option to either link to any existing account using WordPress login page or register as a new user.'));?></label><br/>
     20                            <label style="cursor: auto" class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Enable linking of Social Accounts'));?>
    2121                                <input type="checkbox" id="account_linking_enable" name="mo_openid_account_linking_enable" value="1"
    2222                                    <?php checked( get_option('mo_openid_account_linking_enable') == 1 );?> onclick="customize_account_linking()" />
     
    3131                </tr>
    3232                <tr><td colspan="2"></td></tr>
    33                     <tr id="account_link_customized_text"><td colspan="2"><h3 style="float: left"><?php echo mo_sl('Customize Text for Account Linking');?></h3><a style="float: right;margin-right: 325px;margin-top: 20px" onclick="customize_account_linking_img()"><?php echo mo_sl('Preview Account Linking form');?></a></td></tr>
     33                    <tr id="account_link_customized_text"><td colspan="2"><h3 style="float: left"><?php echo esc_attr(mo_sl('Customize Text for Account Linking'));?></h3><a style="float: right;margin-right: 325px;margin-top: 20px" onclick="customize_account_linking_img()"><?php echo esc_attr(mo_sl('Preview Account Linking form'));?></a></td></tr>
    3434                    <tr id="acc_link_img"><td colspan="2"></td></tr>
    35                     <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1. <?php echo mo_sl('Enter title of Account linking form');?>:</td><td><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_title" value="<?php echo esc_attr(get_option('mo_account_linking_title')); ?>" /></td></tr>
    36                     <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">2.<?php echo mo_sl(' Enter button text for create new user');?>:</td><td><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_new_user_button" value="<?php echo esc_attr(get_option('mo_account_linking_new_user_button')); ?>"/></td></tr>
     35                    <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1. <?php echo esc_attr(mo_sl('Enter title of Account linking form'));?>:</td><td><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_title" value="<?php echo esc_attr(get_option('mo_account_linking_title')); ?>" /></td></tr>
     36                    <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">2.<?php echo esc_attr(mo_sl(' Enter button text for create new user'));?>:</td><td><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_new_user_button" value="<?php echo esc_attr(get_option('mo_account_linking_new_user_button')); ?>"/></td></tr>
    3737                    <tr id="account_link_customized_text">
    3838                        <td class="mo_openid_fix_fontsize" style="width: 40%">
    39                             3.<?php echo mo_sl( 'Enter button text for Link to existing user:');?></td><td><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_existing_user_button" value="<?php echo esc_attr(get_option('mo_account_linking_existing_user_button')); ?>"/></td></tr>
     39                            3.<?php echo esc_attr(mo_sl( 'Enter button text for Link to existing user:'));?></td><td><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" name="mo_account_linking_existing_user_button" value="<?php echo esc_attr(get_option('mo_account_linking_existing_user_button')); ?>"/></td></tr>
    4040                <tr><td></td></tr>
    41                     <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">4. <?php echo mo_sl('Enter instruction to Create New Account :');?><br/><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" type="text" name="mo_account_linking_new_user_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_new_user_instruction')); ?>"/>
     41                    <tr id="account_link_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">4. <?php echo esc_attr(mo_sl('Enter instruction to Create New Account :'));?><br/><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" type="text" name="mo_account_linking_new_user_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_new_user_instruction')); ?>"/>
    4242                        </td>
    4343                    </tr>
     
    4545                    <tr id="account_link_customized_text">
    4646                        <td class="mo_openid_fix_fontsize" colspan="2">
    47                             5.<?php echo mo_sl(' Enter instructions to link to an existing account :');?><br/><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" type="text" name="mo_account_linking_existing_user_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_existing_user_instruction')); ?>"/>
     47                            5.<?php echo esc_attr(mo_sl(' Enter instructions to link to an existing account :'));?><br/><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" type="text" name="mo_account_linking_existing_user_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_existing_user_instruction')); ?>"/>
    4848                        </td>
    4949                    </tr>
    5050                <tr><td></td></tr>
    51                     <tr id="account_link_customized_text"><td disabled class="mo_openid_fix_fontsize" colspan="2"><?php echo mo_sl('Enter extra instructions for account linking ');?>:<br/><input <?php echo $disable ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" style="width:98%;margin-left: 0px;" type="text" name="mo_account_linking_extra_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_extra_instruction')); ?>"/>
     51                    <tr id="account_link_customized_text"><td disabled class="mo_openid_fix_fontsize" colspan="2"><?php echo esc_attr(mo_sl('Enter extra instructions for account linking '));?>:<br/><input <?php echo esc_attr($disable) ?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 98%" style="width:98%;margin-left: 0px;" type="text" name="mo_account_linking_extra_instruction" value="<?php echo esc_attr(get_option('mo_account_linking_extra_instruction')); ?>"/>
    5252                        </td>
    5353                    </tr>
    5454                        <tr id="disp_logo"><td colspan="2"> <br/>
    55                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Display miniOrange logo with social login icons on account completion forms');?>
     55                                <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Display miniOrange logo with social login icons on account completion forms'));?>
    5656                                    <input  type="checkbox" id="moopenid_logo_check_account" name="moopenid_logo_check_account" value="1"
    5757                                        <?php checked( get_option('moopenid_logo_check_account') == 1 );?>  />
     
    6363                                </label>
    6464                                <br/></td></tr>
    65                                   <tr id="save_mo_btn"><td><br/><input <?php echo $disable?> type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></td></tr>
     65                                  <tr id="save_mo_btn"><td><br/><input <?php echo esc_attr($disable)?> type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></td></tr>
    6666                    <tr id="acc_link"><td> </td></tr>
    6767            </table>
     
    7373        //win_height=win_height+18;
    7474        jQuery(".mo_container").css({height:win_height});
    75         jQuery.ajax({
    76             url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
    77             method: "POST", //request type,
    78             dataType: 'json',
    79             data: {
    80                 action: 'mo_check_restrict_user',
    81             },
    82             success: function (result) {
    83                 if (result.status=='true') {
    84                     var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
    85                    // jQuery("#mo_openid_page_heading").append(temp);
    86                 }
    87                 else {
    88                     var temp = jQuery("");
    89                     //jQuery("#mo_openid_page_heading").append(temp);
    90                 }
    91             }
    92         });
     75       
    9376        var custom_link;
    9477        var custom_link_img;
     
    10487        function customize_account_linking_img(){
    10588            if(custom_link_img==1){
    106                 jQuery("<tr id=\"account_linking_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 15px;\" src=\"<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/account_linking.png\"></td></tr>").insertBefore(jQuery("#acc_link_img"));
     89                jQuery("<tr id=\"account_linking_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 15px;\" src=\"<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/account_linking.png\"></td></tr>").insertBefore(jQuery("#acc_link_img"));
    10790                custom_link_img=2;
    10891            }else{
     
    11396    </script>
    11497    <div class="mo_openid_highlight">
    115         <h3 style="margin-left: 1%;line-height: 210%;color: white;"><?php echo mo_sl('Domain Restriction');?></h3>
     98        <h3 style="margin-left: 1%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('Domain Restriction'));?></h3>
    11699    </div><br/>
    117100    <div class="mo_openid_table_layout">
     
    120103            <div>
    121104
    122                 <br>  <label style="cursor: context-menu" class="mo-openid-radio-container_disable"><?php echo mo_sl('Domain Restriction');?>
     105                <br>  <label style="cursor: context-menu" class="mo-openid-radio-container_disable"><?php echo esc_attr(mo_sl('Domain Restriction'));?>
    123106                    <input type="radio"   />
    124107                    <span class="mo-openid-radio-checkmark_disable"></span>
     
    126109
    127110            </div>
    128             <br/><label style="cursor: auto"><?php echo mo_sl('Users with these domains will not be able to register');?>.</label>
     111            <br/><label style="cursor: auto"><?php echo esc_attr(mo_sl('Users with these domains will not be able to register'));?>.</label>
    129112            <textarea rows="4" cols="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%" disabled placeholder="Add domain names semicolon(;) separated e.g. gmail.com;yahoo.com;miniorange.com"/></textarea>
    130113            </tr>
     
    133116                <br>
    134117                <div>
    135                     <label style="cursor: context-menu" class="mo-openid-radio-container_disable"><?php echo mo_sl('Allow Domain');?>
     118                    <label style="cursor: context-menu" class="mo-openid-radio-container_disable"><?php echo esc_attr(mo_sl('Allow Domain'));?>
    136119                        <input type="radio" />
    137120                        <span class="mo-openid-radio-checkmark_disable"></span>
    138121                    </label>
    139122                </div>
    140                 <br/><label style="cursor: auto"><?php echo mo_sl('Only users with these domains will be able to register');?>.</label>
     123                <br/><label style="cursor: auto"><?php echo esc_attr(mo_sl('Only users with these domains will be able to register'));?>.</label>
    141124                <textarea rows="4" cols="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%" disabled placeholder="Add domain names semicolon(;) separated e.g. gmail.com;yahoo.com;miniorange.com"/></textarea>
    142125                </td>
    143126            </tr>
    144             <td><br /><b><input disabled type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" />
     127            <td><br /><b><input disabled type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" />
    145128                </b>
    146129            </td>
  • miniorange-login-openid/trunk/view/link_social_account/mo_openid_link_soc_acc_funct.php

    r2788668 r2853010  
    11<?php
    22
    3 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){
    4     $path = mo_openid_get_wp_style();
    5     $nonce = wp_create_nonce( 'mo-openid-account-linking-nonce' );
    6     $html = "
     3function 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 ) {
     4    $path = mo_openid_get_wp_style();
     5    $nonce = wp_create_nonce( 'mo-openid-account-linking-nonce' );
     6    $html  = '
    77                <style>
    88                    .mocomp {
     
    1717                </style>
    1818                <head>
    19                 <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
    20                 <link rel=\"stylesheet\" href=".$path. " type='text/css' media='all' /><head>
     19                <meta name="viewport" content="width=device-width, initial-scale=1.0">
     20                <link rel="stylesheet" href=' . $path . " type='text/css' media='all' /><head>
    2121                <body class='login login-action-login wp-core-ui  locale-en-us'>
    2222                <div style=\"background:#f1f1f1;\"></div>
     
    2525                <form name = 'f' method = 'post' action='' style='margin-left: 2%;margin-right: 2%;'>
    2626                <input type = 'hidden' name = 'option' value = 'mo_openid_account_linking'/>
    27                 <input type='hidden' name='mo_openid_account_linking_nonce' value='". $nonce."'/>
    28                 <input type='hidden' name='user_email' value=".esc_attr($user_email).">
    29                 <input type='hidden' name='username' value=".esc_attr($username).">
    30                 <input type='hidden' name='first_name' value=".esc_attr($first_name).">
    31                 <input type='hidden' name='last_name' value=".esc_attr($last_name).">
    32                 <input type='hidden' name='user_full_name' value=".esc_attr($user_full_name).">
    33                 <input type='hidden' name='user_url' value=".esc_url($user_url).">
    34                 <input type='hidden' name='user_picture' value=".esc_url($user_picture).">
    35                 <input type='hidden' name='decrypted_app_name' value=".esc_attr($decrypted_app_name).">
    36                 <input type='hidden' name='decrypted_user_id' value=".esc_attr($decrypted_user_id).">
     27                <input type='hidden' name='mo_openid_account_linking_nonce' value='" . $nonce . "'/>
     28                <input type='hidden' name='user_email' value=" . esc_attr( $user_email ) . ">
     29                <input type='hidden' name='username' value=" . esc_attr( $username ) . ">
     30                <input type='hidden' name='first_name' value=" . esc_attr( $first_name ) . ">
     31                <input type='hidden' name='last_name' value=" . esc_attr( $last_name ) . ">
     32                <input type='hidden' name='user_full_name' value=" . esc_attr( $user_full_name ) . ">
     33                <input type='hidden' name='user_url' value=" . esc_url( $user_url ) . ">
     34                <input type='hidden' name='user_picture' value=" . esc_url( $user_picture ) . ">
     35                <input type='hidden' name='decrypted_app_name' value=" . esc_attr( $decrypted_app_name ) . ">
     36                <input type='hidden' name='decrypted_user_id' value=" . esc_attr( $decrypted_user_id ) . ">
    3737                <div  style = 'background-color:white; padding:12px;top:100px; right: 350px; padding-bottom: 20px;left:350px; overflow:hidden; outline:1px black;border-radius: 5px;'> 
    3838                <br>
    39                 <div style=\"text-align:center\"><span style='font-size: 24px;font-family: Arial;text-align:center'>".esc_html(get_option('mo_account_linking_title'))."</span></div><br>
     39                <div style=\"text-align:center\"><span style='font-size: 24px;font-family: Arial;text-align:center'>" . esc_html( get_option( 'mo_account_linking_title' ) ) . "</span></div><br>
    4040                <div style='padding: 12px;'></div>
    41                 <div style=' padding: 16px;background-color:rgba(1, 145, 191, 0.117647);color: black;'>".get_option('mo_account_linking_new_user_instruction').".<br><br>".get_option('mo_account_linking_existing_user_instruction')."".get_option('mo_account_linking_extra_instruction')."
     41                <div style=' padding: 16px;background-color:rgba(1, 145, 191, 0.117647);color: black;'>" . get_option( 'mo_account_linking_new_user_instruction' ) . '.<br><br>' . get_option( 'mo_account_linking_existing_user_instruction' ) . '' . get_option( 'mo_account_linking_extra_instruction' ) . "
    4242                </div>                   
    4343                <br><br>
    4444
    45                 <input type = 'submit' value = '".esc_attr(get_option('mo_account_linking_existing_user_button'))."' name = 'mo_openid_link_account' class='button button-primary button-large' style = 'margin-left: 3%;margin-right: 0%;'/>
     45                <input type = 'submit' value = '" . esc_attr( get_option( 'mo_account_linking_existing_user_button' ) ) . "' name = 'mo_openid_link_account' class='button button-primary button-large' style = 'margin-left: 3%;margin-right: 0%;'/>
    4646                   
    47                 <input type = 'submit' value = '".esc_attr(get_option('mo_account_linking_new_user_button'))."' name = 'mo_openid_create_new_account' class='button button-primary button-large'style = 'margin-left: 5%margin-right: 5%;'/>";
     47                <input type = 'submit' value = '" . esc_attr( get_option( 'mo_account_linking_new_user_button' ) ) . "' name = 'mo_openid_create_new_account' class='button button-primary button-large'style = 'margin-left: 5%margin-right: 5%;'/>";
    4848
    49     if(get_option('moopenid_logo_check_account') == 1) {
    50         $html .= mo_openid_customize_logo();
    51     }
     49    if ( get_option( 'moopenid_logo_check_account' ) == 1 ) {
     50        $html .= mo_openid_customize_logo();
     51    }
    5252
    53     $html .=   "</div>
     53    $html .= '</div>
    5454                    </form>
    5555                    </div>
    5656                    </div>
    57                     </body>";
    58     return $html;
     57                    </body>';
     58    return $html;
    5959}
    6060
    61 function mo_openid_account_linking($messages) {
    62     if(isset( $_GET['option']) && $_GET['option'] == 'disable-social-login_admin_verify'){
    63         update_option( 'account_linking_flow', 1);
    64         $messages = '<p class="message">You are trying to login as admin. Please fill the details and continue login.</p>';
    65     }
    66     if(isset( $_GET['option']) && $_GET['option'] == 'disable-social-login' ){
    67         update_option( 'account_linking_flow', 1);
    68         $messages = '<p class="message">'.get_option('mo_account_linking_message').'</p>';
    69     }
    70     return $messages;
     61function mo_openid_account_linking( $messages ) {
     62    if ( isset( $_GET['option'] ) && $_GET['option'] == 'disable-social-login_admin_verify' ) {
     63        update_option( 'account_linking_flow', 1 );
     64        $messages = '<p class="message">You are trying to login as admin. Please fill the details and continue login.</p>';
     65    }
     66    if ( isset( $_GET['option'] ) && $_GET['option'] == 'disable-social-login' ) {
     67        update_option( 'account_linking_flow', 1 );
     68        $messages = '<p class="message">' . get_option( 'mo_account_linking_message' ) . '</p>';
     69    }
     70    return $messages;
    7171}
    7272
     73function mo_openid_social_linking_action() {
     74    if ( ! mo_openid_restrict_user() ) {
     75        $nonce = sanitize_text_field( $_POST['mo_openid_social_linking_nonce'] );
     76        if ( ! wp_verify_nonce( $nonce, 'mo-openid-social-linking' ) ) {
     77            wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     78        } else {
     79            if ( current_user_can( 'administrator' ) ) {
     80                if ( sanitize_text_field( $_POST['enabled'] ) == 'true' ) {
     81                    update_option( 'mo_openid_account_linking_enable', 1 );
     82
     83                } else {
     84                    update_option( 'mo_openid_account_linking_enable', 0 );
     85                }
     86            }
     87        }
     88    }
     89}
  • miniorange-login-openid/trunk/view/premium_features/mo_openid_prem_feat.php

    r2648308 r2853010  
    11<?php
    22
    3 function mo_openid_premium_features(){
    4     ?>
    5     <style>
    6         * {
    7             font-family: "Open Sans";
    8         }
    9         *,
    10         *:before,
    11         *:after {
    12             box-sizing: border-box;
    13             -moz-box-sizing: border-box;
    14             -webkit-box-sizing: border-box;
    15         }
    16         .small-meta {
    17             font-size: 12px;
    18         }
    19         .dim {
    20             opacity: 0.4;
    21         }
    22         .grid-wrapper {
    23             margin: 0 auto;
    24             width: 80%;
    25             padding: 30px;
    26         }
    27         .switch {
    28             position: relative;
    29             display: inline-block;
    30             width: 60px;
    31             height: 25px;
    32         }
     3function mo_openid_premium_features() {
     4    ?>
     5    <style>
     6        * {
     7            font-family: "Open Sans";
     8        }
     9        *,
     10        *:before,
     11        *:after {
     12            box-sizing: border-box;
     13            -moz-box-sizing: border-box;
     14            -webkit-box-sizing: border-box;
     15        }
     16        .small-meta {
     17            font-size: 12px;
     18        }
     19        .dim {
     20            opacity: 0.4;
     21        }
     22        .grid-wrapper {
     23            margin: 0 auto;
     24            width: 80%;
     25            padding: 30px;
     26        }
     27        .switch {
     28            position: relative;
     29            display: inline-block;
     30            width: 60px;
     31            height: 25px;
     32        }
    3333
    34         .slider {
    35             position: absolute;
    36             cursor: pointer;
    37             top: 0;
    38             left: 0;
    39             right: 0;
    40             bottom: 0;
    41             background-color: #ccc;
    42             -webkit-transition: .4s;
    43             transition: .4s;
    44         }
     34        .slider {
     35            position: absolute;
     36            cursor: pointer;
     37            top: 0;
     38            left: 0;
     39            right: 0;
     40            bottom: 0;
     41            background-color: #ccc;
     42            -webkit-transition: .4s;
     43            transition: .4s;
     44        }
    4545
    46         .slider:before {
    47             position: absolute;
    48             content: "";
    49             height: 15px;
    50             width: 26px;
    51             left: 4px;
    52             bottom: 4px;
    53             background-color: white;
    54             -webkit-transition: .4s;
    55             transition: .4s;
    56         }
     46        .slider:before {
     47            position: absolute;
     48            content: "";
     49            height: 15px;
     50            width: 26px;
     51            left: 4px;
     52            bottom: 4px;
     53            background-color: white;
     54            -webkit-transition: .4s;
     55            transition: .4s;
     56        }
    5757
    58         input:checked + .slider {
    59             background-color: #2196F3;
    60         }
     58        input:checked + .slider {
     59            background-color: #2196F3;
     60        }
    6161
    62         input:focus + .slider {
    63             box-shadow: 0 0 1px #2196F3;
    64         }
     62        input:focus + .slider {
     63            box-shadow: 0 0 1px #2196F3;
     64        }
    6565
    66         input:checked + .slider:before {
    67             -webkit-transform: translateX(26px);
    68             -ms-transform: translateX(26px);
    69             transform: translateX(26px);
    70         }
     66        input:checked + .slider:before {
     67            -webkit-transform: translateX(26px);
     68            -ms-transform: translateX(26px);
     69            transform: translateX(26px);
     70        }
    7171
    72         /* Rounded sliders */
    73         .slider.round {
    74             border-radius: 34px;
    75         }
     72        /* Rounded sliders */
     73        .slider.round {
     74            border-radius: 34px;
     75        }
    7676
    77         .slider.round:before {
    78             border-radius: 50%;
    79         }
    80     </style>
    81     <div class="grid-wrapper">
    82         <div class="card-wrapper" title="This feature is available in the Premium versions">
    83             <label class="switch">
    84                 <input type="checkbox" class="c-card" disabled/>
    85                 <span class="slider"></span>
    86                 <div class="card-content">
    87                     <div class="card-state-icon"></div>
    88                     <label for="admin_pass_verify"></label>
    89                     <h4><?php echo mo_sl('Force Admin To Login Using Password');?></h4>
    90                     <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    91                     <p><?php echo mo_sl('Admin user tries to login using social login then he will need to enter WordPress admin login credentials to login.');?></p>
    92                     <p class="small-meta dim"></p>
    93                 </div>
    94             </label>
    95         </div>
     77        .slider.round:before {
     78            border-radius: 50%;
     79        }
     80    </style>
     81    <div class="grid-wrapper">
     82        <div class="card-wrapper" title="This feature is available in the Premium versions">
     83            <label class="switch">
     84                <input type="checkbox" class="c-card" disabled/>
     85                <span class="slider"></span>
     86                <div class="card-content">
     87                    <div class="card-state-icon"></div>
     88                    <label for="admin_pass_verify"></label>
     89                    <h4><?php echo esc_attr( mo_sl( 'Force Admin To Login Using Password' ) ); ?></h4>
     90                    <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     91                    <p><?php echo esc_attr( ( 'Admin user tries to login using social login then he will need to enter WordPress admin login credentials to login.' ) ); ?></p>
     92                    <p class="small-meta dim"></p>
     93                </div>
     94            </label>
     95        </div>
    9696
    97         <div class="card-wrapper" title="This feature is available in the Premium versions">
    98             <label class="switch">
    99                 <input type="checkbox" class="c-card" disabled/>
    100                 <span class="slider"></span>
    101                 <div class="card-content">
    102                     <div class="card-state-icon"></div>
    103                     <label for="mo_openid_user_moderation">    </label>
    104                     <h4><?php echo mo_sl('User Moderation');?></h4>
    105                     <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    106                     <p><?php echo mo_sl('Enable this feature to restrict the access of newly registered users. User created through social login will not be able to access your website until admin will not allow them by activating their accounts else');?></p>
    107                     <p class="small-meta dim">[ *<?php echo mo_sl('Notice: SMTP should be configured to send activation emails. ');?>]
    108                     </p>
    109                 </div>
    110             </label>
    111         </div>
     97        <div class="card-wrapper" title="This feature is available in the Premium versions">
     98            <label class="switch">
     99                <input type="checkbox" class="c-card" disabled/>
     100                <span class="slider"></span>
     101                <div class="card-content">
     102                    <div class="card-state-icon"></div>
     103                    <label for="mo_openid_user_moderation">    </label>
     104                    <h4><?php echo esc_attr( mo_sl( 'User Moderation' ) ); ?></h4>
     105                    <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     106                    <p><?php echo esc_attr( mo_sl( 'Enable this feature to restrict the access of newly registered users. User created through social login will not be able to access your website until admin will not allow them by activating their accounts else' ) ); ?></p>
     107                    <p class="small-meta dim">[ *<?php echo esc_attr( mo_sl( 'Notice: SMTP should be configured to send activation emails. ' ) ); ?>]
     108                    </p>
     109                </div>
     110            </label>
     111        </div>
    112112
    113         <div class="card-wrapper" title="This feature is available in the Premium versions">
    114             <label class="switch">
    115                 <input type="checkbox" class="c-card" disabled />
    116                 <span class="slider"></span>
    117                 <div class="card-content">
    118                     <div class="card-state-icon"></div>
    119                     <label for="mo_openid_notification_email"></label>
    120                     <h4><?php echo mo_sl('Reset Password');?> </h4>
    121                     <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    122                     <p><?php echo mo_sl('Send password reset link to user after registration');?></p>
    123                     <p class="small-meta dim">[ *<?php echo mo_sl('Notice: SMTP should be configured to send activation emails');?>. ]</p>
    124                 </div>
    125             </label>
    126         </div>
     113        <div class="card-wrapper" title="This feature is available in the Premium versions">
     114            <label class="switch">
     115                <input type="checkbox" class="c-card" disabled />
     116                <span class="slider"></span>
     117                <div class="card-content">
     118                    <div class="card-state-icon"></div>
     119                    <label for="mo_openid_notification_email"></label>
     120                    <h4><?php echo esc_attr( mo_sl( 'Reset Password' ) ); ?> </h4>
     121                    <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     122                    <p><?php echo esc_attr( mo_sl( 'Send password reset link to user after registration' ) ); ?></p>
     123                    <p class="small-meta dim">[ *<?php echo esc_attr( mesc_attr( o_sl( 'Notice: SMTP should be configured to send activation emails' ) ) ); ?>. ]</p>
     124                </div>
     125            </label>
     126        </div>
    127127
    128         <div class="card-wrapper" title="This feature is available in the Premium versions">
    129             <label class="switch">
    130                 <input type="checkbox" class="c-card" disabled />
    131                 <span class="slider roundededges"></span>
    132                 <div class="card-content">
    133                     <div class="card-state-icon"></div>
    134                     <h4><?php echo mo_sl('Extended User Attribute');?></h4>
    135                     <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    136                     <p><?php echo mo_sl('Mainly the required data(name,lastname,email) is mapped and use after the user gets login. If you want to use more data that is provided from the app you can enable this feature.(The data is depend on app to app)');?> </p>
    137                     <p class="small-meta dim"><?php echo mo_sl('Custom App of should be set for this feature');?></p>
    138                 </div>
    139             </label>
    140         </div>
     128        <div class="card-wrapper" title="This feature is available in the Premium versions">
     129            <label class="switch">
     130                <input type="checkbox" class="c-card" disabled />
     131                <span class="slider roundededges"></span>
     132                <div class="card-content">
     133                    <div class="card-state-icon"></div>
     134                    <h4><?php echo esc_attr( mo_sl( 'Extended User Attribute' ) ); ?></h4>
     135                    <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     136                    <p><?php echo esc_attr( mo_sl( 'Mainly the required data(name,lastname,email) is mapped and use after the user gets login. If you want to use more data that is provided from the app you can enable this feature.(The data is depend on app to app)' ) ); ?> </p>
     137                    <p class="small-meta dim"><?php echo esc_attr( mo_sl( 'Custom App of should be set for this feature' ) ); ?></p>
     138                </div>
     139            </label>
     140        </div>
    141141
    142         <div class="card-wrapper" title="This feature is available in the Premium versions">
    143             <label class="switch">
    144                 <input type="checkbox" class="c-card" disabled/>
    145                 <span class="slider roundededges"></span>
    146                 <div class="card-content">
    147                     <div class="card-state-icon"></div>
    148                     <h4><?php echo mo_sl('Redirect to social in a new window');?></h4>
    149                     <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    150                     <p><?php echo mo_sl('While login with social login. The login page opens in a new tab. After the login process the tab gets closed.');?></p>
    151                     <p class="small-meta dim"></p>
    152                 </div>
    153             </label>
    154         </div>
    155     </div>
     142        <div class="card-wrapper" title="This feature is available in the Premium versions">
     143            <label class="switch">
     144                <input type="checkbox" class="c-card" disabled/>
     145                <span class="slider roundededges"></span>
     146                <div class="card-content">
     147                    <div class="card-state-icon"></div>
     148                    <h4><?php echo esc_attr( mo_sl( 'Redirect to social in a new window' ) ); ?></h4>
     149                    <a style="left: 513%; top:40%; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     150                    <p><?php echo esc_attr( mo_sl( 'While login with social login. The login page opens in a new tab. After the login process the tab gets closed.' ) ); ?></p>
     151                    <p class="small-meta dim"></p>
     152                </div>
     153            </label>
     154        </div>
     155    </div>
    156156
    157157
    158     <?php
     158    <?php
    159159}
  • miniorange-login-openid/trunk/view/profile/mo_openid_profile.php

    r2648308 r2853010  
    1515            <form name="f" method="post" action="" id="register-form">
    1616                <input type="hidden" name="option" value="mo_openid_connect_register_customer" />
    17                 <input type="hidden" name="mo_openid_connect_register_nonce" value="<?php echo wp_create_nonce( 'mo-openid-connect-register-nonce' ); ?>"/>
     17                <input type="hidden" name="mo_openid_connect_register_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-connect-register-nonce' )); ?>"/>
    1818                <div class="mo_openid_table_layout">
    19                     <h3><?php echo mo_sl('Register with miniOrange');?></h3>
    20                     <p style="font-size:14px;"><b><?php echo mo_sl('Why should I register?');?> </b></p>
     19                    <h3><?php echo esc_attr(mo_sl('Register with miniOrange'));?></h3>
     20                    <p style="font-size:14px;"><b><?php echo esc_attr(mo_sl('Why should I register?'));?> </b></p>
    2121                    <div id="help_register_desc" style="background: aliceblue; padding: 10px 10px 10px 10px; border-radius: 10px;">
    22                         <?php echo mo_sl('By registering with miniOrange we take care of creating applications for you so that you don’t have to worry about creating applications in each social network.');?>
    23                         <br/><b><?php echo mo_sl('Please Note');?>:</b><?php echo mo_sl( 'We do not store any information except the email that you will use to register with us. You can go through our ');?><a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank"><?php echo mo_sl('Privacy Policy');?></a> <?php echo mo_sl('for how we use your information. We don’t sell your information to any third-party organization');?>.
     22                        <?php echo esc_attr(mo_sl('By registering with miniOrange we take care of creating applications for you so that you don’t have to worry about creating applications in each social network.'));?>
     23                        <br/><b><?php echo esc_attr(mo_sl('Please Note'));?>:</b><?php echo esc_attr(mo_sl( 'We do not store any information except the email that you will use to register with us. You can go through our '));?><a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank"><?php echo esc_attr(mo_sl('Privacy Policy'));?></a> <?php echo esc_attr(mo_sl('for how we use your information. We don’t sell your information to any third-party organization'));?>.
    2424                    </div><br/>
    2525                    <table class="mo_openid_settings_table" style="padding-right: 20%">
    2626                        <tr>
    27                             <td><b><font color="#FF0000">*</font><?php echo mo_sl('Email');?>:</b></td>
     27                            <td><b><font color="#FF0000">*</font><?php echo esc_attr(mo_sl('Email'));?>:</b></td>
    2828                            <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%" type="email" name="email"
    2929                                       required placeholder="person@example.com"
     
    3131                        </tr>
    3232                        <tr>
    33                             <td><b><font color="#FF0000">*</font><?php echo mo_sl('Password');?>:</b></td>
     33                            <td><b><font color="#FF0000">*</font><?php echo esc_attr(mo_sl('Password'));?>:</b></td>
    3434                            <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%" required type="password"
    3535                                       name="password" placeholder="Choose your password (Min. length 6)" /></td>
    3636                        </tr>
    3737                        <tr>
    38                             <td><b><font color="#FF0000">*</font><?php echo mo_sl('Confirm Password');?>:</b></td>
     38                            <td><b><font color="#FF0000">*</font><?php echo esc_attr(mo_sl('Confirm Password'));?>:</b></td>
    3939                            <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%" required type="password"
    4040                                       name="confirmPassword" placeholder="Confirm your password" /></td>
     
    4949                        </tr>
    5050                    </table>
    51                     <br/><?php echo mo_sl('By clicking Submit, you agree to our');?> <a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank"><?php echo mo_sl('Privacy Policy');?></a> <?php echo mo_sl('and');?> <a href="https://www.miniorange.com/usecases/miniOrange_User_Agreement.pdf" target="_blank"><?php echo mo_sl('User Agreement');?></a>.
     51                    <br/><?php echo esc_attr(mo_sl('By clicking Submit, you agree to our'));?> <a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank"><?php echo esc_attr(mo_sl('Privacy Policy'));?></a> <?php echo esc_attr(mo_sl('and'));?> <a href="https://www.miniorange.com/usecases/miniOrange_User_Agreement.pdf" target="_blank"><?php echo esc_attr(mo_sl('User Agreement'));?></a>.
    5252                </div>
    5353            </form>
     
    5555                <input type="hidden" name="option" value="mo_openid_go_back_registration"/>
    5656                <input type="hidden" name="mo_openid_go_back_registration_nonce"
    57                        value="<?php echo wp_create_nonce( 'mo-openid-go-back-register-nonce' ); ?>"/>
     57                       value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-go-back-register-nonce' )); ?>"/>
    5858            </form>
    5959            <script>
     
    7070        ?>
    7171        <div class="mo_openid_table_layout">
    72             <h2><?php echo mo_sl('Thank you for registering with miniOrange');?>.</h2>
     72            <h2><?php echo esc_attr(mo_sl('Thank you for registering with miniOrange'));?>.</h2>
    7373            <table border="1" style="background-color:#FFFFFF; border:1px solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:85%">
    7474                <tbody><tr>
    75                     <td style="width:45%; padding: 10px;"><?php echo mo_sl('miniOrange Account Email');?></td>
    76                     <td style="width:55%; padding: 10px;"><?php echo get_option("mo_openid_admin_email"); ?></td>
     75                    <td style="width:45%; padding: 10px;"><?php echo esc_attr(mo_sl('miniOrange Account Email'));?></td>
     76                    <td style="width:55%; padding: 10px;"><?php echo esc_attr(get_option("mo_openid_admin_email")); ?></td>
    7777                </tr>
    7878                <tr>
    79                     <td style="width:45%; padding: 10px;"><?php echo mo_sl('Customer ID');?></td>
    80                     <td style="width:55%; padding: 10px;"><?php echo get_option("mo_openid_admin_customer_key"); ?></td>
     79                    <td style="width:45%; padding: 10px;"><?php echo esc_attr(mo_sl('Customer ID'));?></td>
     80                    <td style="width:55%; padding: 10px;"><?php echo esc_attr(get_option("mo_openid_admin_customer_key")); ?></td>
    8181                </tr>
    8282                </tbody>
    8383            </table>
    84             <br/><label style="cursor: auto"><a href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('Click here');?></a><?php echo mo_sl(' to check our');?> <a style="left: 1%; position: static; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a> <?php echo mo_sl('plans');?></label>
     84            <br/><label style="cursor: auto"><a href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>"><?php echo esc_attr(mo_sl('Click here'));?></a><?php echo esc_attr(mo_sl(' to check our'));?> <a style="left: 1%; position: static; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>"><?php echo esc_attr(mo_sl('PRO'));?></a> <?php echo esc_attr(mo_sl('plans'));?></label>
    8585        </div>
    8686        <?php
  • miniorange-login-openid/trunk/view/profile_completion/mo_openid_prof_comp.php

    r2648308 r2853010  
    55        <form id="profile_completion" name="profile_completion" method="post" action="" >
    66            <input type="hidden" name="option" value="mo_openid_profile_completion" />
    7             <input type="hidden" name="mo_openid_enable_profile_completion_nonce" value="<?php echo wp_create_nonce( 'mo-openid-enable-premium-feature-nonce' ); ?>"/>
     7            <input type="hidden" name="mo_openid_enable_profile_completion_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-premium-feature-nonce' )); ?>"/>
    88            <div class="mo_openid_table_layout">
    99                <table style="width: 100%;">
    10                     <label class="mo_openid_checkbox_container"><?php echo mo_sl('Prompt users for username &amp; email when unavailable (profile completion)');?><br/>
    11                         <?php echo mo_sl('In case of unavailability of username or email from the social media application, user is prompted to input the same');?>
     10                    <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Prompt users for username &amp; email when unavailable (profile completion)'));?><br/>
     11                        <?php echo esc_attr(mo_sl('In case of unavailability of username or email from the social media application, user is prompted to input the same'));?>
    1212                        <input type="checkbox" id="profile_completion_enable" name="mo_openid_enable_profile_completion" value="1" <?php checked( get_option('mo_openid_enable_profile_completion') == '1' );?> />
    1313                        <span class="mo_openid_checkbox_checkmark"></span>
    1414                    </label>
    1515                    <label class="mo_openid_checkbox_container">
    16                         <input type="checkbox" id="mo_openid_enable_profile_completion1">Prompt user for username and email without email verification. (profile completion).<a style="left: 1%; position: static; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>">PRO</a>
     16                        <input type="checkbox" id="mo_openid_enable_profile_completion1">Prompt user for username and email without email verification. (profile completion).<a style="left: 1%; position: static; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>">PRO</a>
    1717                        <br>For getting profile completion without Otp verification through your email,you need to enable the both the checkboxes.</br>
    1818                        <span class="mo_openid_checkbox_checkmark_disable"></span>
    1919                    </label>
    2020                    <p class=" mo_openid_note_style" style="color:#000000;">
    21                         <b><?php echo mo_sl('*NOTE:');?></b> <?php echo mo_sl("Disabling profile completion is not recommended. Instagram and Twitter don't return email address. Please keep this enabled if you are using Instagram or Twitter. This feature requires SMTP to be setup for your WordPress website since we send a code to users over email to verify their email address.");?>
     21                        <b><?php echo esc_attr(mo_sl('*NOTE:'));?></b> <?php echo esc_attr(mo_sl("Disabling profile completion is not recommended. Instagram and Twitter don't return email address. Please keep this enabled if you are using Instagram or Twitter. This feature requires SMTP to be setup for your WordPress website since we send a code to users over email to verify their email address."));?>
    2222                    </p>
    2323                    <br/>
    24                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><h3 style="float: left"><?php echo mo_sl("Customize Text for Profile Completion");?></h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_profile_completion_img()"><?php echo mo_sl("Preview Profile Completion form");?></a></td></tr>
     24                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><h3 style="float: left"><?php echo esc_attr(mo_sl("Customize Text for Profile Completion"));?></h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_profile_completion_img()"><?php echo esc_attr(mo_sl("Preview Profile Completion form"));?></a></td></tr>
    2525                        <tr id="profile_completion_img_verify"><td colspan="2"></td></tr>
    26                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1.<?php echo mo_sl( 'Enter title of Profle Completion');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" name="mo_profile_complete_title" value="<?php echo esc_attr(get_option('mo_profile_complete_title')); ?>" /></td></tr>
    27                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">2.<?php echo mo_sl( 'Enter Username Label text');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_username_label" value="<?php echo esc_attr(get_option('mo_profile_complete_username_label')); ?>"/></td></tr>
    28                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">3.<?php echo mo_sl( 'Enter Email Label text');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_email_label" value="<?php echo esc_attr(get_option('mo_profile_complete_email_label')); ?>"/></td></tr>
    29                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">4. <?php echo mo_sl('Enter Submit button text');?>:</td><td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_submit_button" value="<?php echo esc_attr(get_option('mo_profile_complete_submit_button')); ?>"/></td></tr>
    30                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">5.<?php echo mo_sl( 'Enter instruction for Profile Completion');?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" style="width:98%;margin-left: 0px;margin-bottom:5px" type="text" name="mo_profile_complete_instruction" value="<?php echo esc_attr(get_option('mo_profile_complete_instruction')); ?>"/></td></tr>
     26                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1.<?php echo esc_attr(mo_sl( 'Enter title of Profle Completion'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" name="mo_profile_complete_title" value="<?php echo esc_attr(get_option('mo_profile_complete_title')); ?>" /></td></tr>
     27                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">2.<?php echo esc_attr(mo_sl( 'Enter Username Label text'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_username_label" value="<?php echo esc_attr(get_option('mo_profile_complete_username_label')); ?>"/></td></tr>
     28                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">3.<?php echo esc_attr(mo_sl( 'Enter Email Label text'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_email_label" value="<?php echo esc_attr(get_option('mo_profile_complete_email_label')); ?>"/></td></tr>
     29                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">4. <?php echo esc_attr(mo_sl('Enter Submit button text'));?>:</td><td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_profile_complete_submit_button" value="<?php echo esc_attr(get_option('mo_profile_complete_submit_button')); ?>"/></td></tr>
     30                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">5.<?php echo esc_attr(mo_sl( 'Enter instruction for Profile Completion'));?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" style="width:98%;margin-left: 0px;margin-bottom:5px" type="text" name="mo_profile_complete_instruction" value="<?php echo esc_attr(get_option('mo_profile_complete_instruction')); ?>"/></td></tr>
    3131                        <tr><td></td></tr>
    32                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">6.<?php echo mo_sl( 'Enter extra instruction for Profile Completion ');?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_profile_complete_extra_instruction" value="<?php echo esc_attr(get_option('mo_profile_complete_extra_instruction')); ?>"/></td></tr>
     32                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">6.<?php echo esc_attr(mo_sl( 'Enter extra instruction for Profile Completion '));?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_profile_complete_extra_instruction" value="<?php echo esc_attr(get_option('mo_profile_complete_extra_instruction')); ?>"/></td></tr>
    3333                        <tr><td></td></tr>
    34                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><?php echo mo_sl('Enter username already exists warning message text ');?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_profile_complete_uname_exist" value="<?php echo esc_attr(get_option('mo_profile_complete_uname_exist')); ?>"/></td></tr>
    35                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><h3 style="float: left"><?php echo mo_sl('Customize Text for Email Verification');?></h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_email_verify_img()"><?php echo mo_sl('Preview Email Verification form');?></a></td></tr>
     34                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><?php echo esc_attr(mo_sl('Enter username already exists warning message text '));?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_profile_complete_uname_exist" value="<?php echo esc_attr(get_option('mo_profile_complete_uname_exist')); ?>"/></td></tr>
     35                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><h3 style="float: left"><?php echo esc_attr(mo_sl('Customize Text for Email Verification'));?></h3><a style="float: right;margin-right: 300px;margin-top: 20px" onclick="customize_email_verify_img()"><?php echo esc_attr(mo_sl('Preview Email Verification form'));?></a></td></tr>
    3636                        <tr id="email_verify"><td colspan="2"></td></tr>
    37                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1. <?php echo mo_sl('Enter title of Email Verification form');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_title" value="<?php echo esc_attr(get_option('mo_email_verify_title')); ?>"/></td></tr>
    38                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">2. <?php echo mo_sl('Enter Resend OTP button text');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_resend_otp_button" value="<?php echo esc_attr(get_option('mo_email_verify_resend_otp_button')); ?>"/></td></tr>
    39                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">3. <?php echo mo_sl('Enter Back button text');?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_back_button" value="<?php echo esc_attr(get_option('mo_email_verify_back_button')); ?>"/></td></tr>
    40                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">4.<?php echo mo_sl( 'Enter instruction for Email Verification form');?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_message" value="<?php echo esc_attr(get_option('mo_email_verify_message')); ?>"/></td></tr>
     37                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" style="width: 40%">1. <?php echo esc_attr(mo_sl('Enter title of Email Verification form'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_title" value="<?php echo esc_attr(get_option('mo_email_verify_title')); ?>"/></td></tr>
     38                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">2. <?php echo esc_attr(mo_sl('Enter Resend OTP button text'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_resend_otp_button" value="<?php echo esc_attr(get_option('mo_email_verify_resend_otp_button')); ?>"/></td></tr>
     39                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize">3. <?php echo esc_attr(mo_sl('Enter Back button text'));?>:</td><td><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%;margin: 1px" type="text" name="mo_email_verify_back_button" value="<?php echo esc_attr(get_option('mo_email_verify_back_button')); ?>"/></td></tr>
     40                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">4.<?php echo esc_attr(mo_sl( 'Enter instruction for Email Verification form'));?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_message" value="<?php echo esc_attr(get_option('mo_email_verify_message')); ?>"/></td></tr>
    4141                        <tr><td></td></tr>
    42                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">5.<?php echo mo_sl( 'Enter verification code in Email Verification form');?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_verification_code_instruction" value="<?php echo esc_attr(get_option('mo_email_verify_verification_code_instruction')); ?>"/></td></tr>
     42                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2">5.<?php echo esc_attr(mo_sl( 'Enter verification code in Email Verification form'));?>:<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_verification_code_instruction" value="<?php echo esc_attr(get_option('mo_email_verify_verification_code_instruction')); ?>"/></td></tr>
    4343                        <tr><td></td></tr>
    44                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"> <?php echo mo_sl('Enter Message for wrong OTP');?> :<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_wrong_otp" value="<?php echo esc_attr(get_option('mo_email_verify_wrong_otp')); ?>"/></td></tr>
    45                         <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><br><h3> <b><?php echo mo_sl('Customized E-mail Message');?>:</b> </h3><textarea pattern="/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" required rows="6" id="mo_openid_email_message_id" style="width:100%" name="custom_otp_msg" ><?php echo esc_html(get_option('custom_otp_msg'))?></textarea></td></tr>
    46                         <tr id='profile_completion_customized_text'><td class="mo_openid_fix_fontsize" colspan="2"><b><?php echo mo_sl('NOTE');?></b>: <?php echo mo_sl('Please enter');?> <b>##otp##</b><?php echo mo_sl( 'in message where you want to show one time password.');?></td></tr><tr id="prof_completion"><td> </td></tr>
     44                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"> <?php echo esc_attr(mo_sl('Enter Message for wrong OTP'));?> :<br/><input  class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%;margin-top: 6px" type="text" name="mo_email_verify_wrong_otp" value="<?php echo esc_attr(get_option('mo_email_verify_wrong_otp')); ?>"/></td></tr>
     45                        <tr id="profile_completion_customized_text"><td class="mo_openid_fix_fontsize" colspan="2"><br><h3> <b><?php echo esc_attr(mo_sl('Customized E-mail Message'));?>:</b> </h3><textarea pattern="/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" required rows="6" id="mo_openid_email_message_id" style="width:100%" name="custom_otp_msg" ><?php echo esc_html(get_option('custom_otp_msg'))?></textarea></td></tr>
     46                        <tr id='profile_completion_customized_text'><td class="mo_openid_fix_fontsize" colspan="2"><b><?php echo esc_attr(mo_sl('NOTE'));?></b>: <?php echo esc_attr(mo_sl('Please enter'));?> <b>##otp##</b><?php echo esc_attr(mo_sl( 'in message where you want to show one time password.'));?></td></tr><tr id="prof_completion"><td> </td></tr>
    4747                        <tr id="prof_logo"><td colspan="2"><br/>
    48                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Display miniOrange logo with social login icons on profile completion forms');?>
     48                                <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Display miniOrange logo with social login icons on profile completion forms'));?>
    4949                                    <input type="checkbox" id="moopenid_logo_check_prof" name="moopenid_logo_check_prof" value="1"
    5050                                        <?php checked( get_option('moopenid_logo_check_prof') == 1 );?>  />
     
    5555
    5656                                </td></tr>
    57                         <tr id="save_mo_btn"><td colspan="2"><br/><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></td></tr>
     57                        <tr id="save_mo_btn"><td colspan="2"><br/><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></td></tr>
    5858                                            <tr id="prof"><td> </td></tr>
    5959                </table>
     
    7979        function customize_profile_completion_img(){
    8080            if(custom_profile_img==1){
    81                 jQuery("<tr id=\"profile_completion_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 85px;\" src=\"<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/profile_completion.png\" height=\"400\" width=\"550\"></td></tr>").insertBefore(jQuery("#profile_completion_img_verify"));
     81                jQuery("<tr id=\"profile_completion_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 85px;\" src=\"<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/profile_completion.png\" height=\"400\" width=\"550\"></td></tr>").insertBefore(jQuery("#profile_completion_img_verify"));
    8282                custom_profile_img=2;
    8383            }else{
     
    8888        function customize_email_verify_img(){
    8989            if(custom_email_verify_img==1){
    90                 jQuery("<tr id=\"email_verify_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 85px;\" src=\"<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/email_verify.png\" height=\"350\" width=\"550\"></td></tr>").insertBefore(jQuery("#email_verify"));
     90                jQuery("<tr id=\"email_verify_img\"><td colspan=\"2\"><img style=\"margin-top: 15px;margin-left: 85px;\" src=\"<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/email_verify.png\" height=\"350\" width=\"550\"></td></tr>").insertBefore(jQuery("#email_verify"));
    9191                custom_email_verify_img=2;
    9292            }else{
  • miniorange-login-openid/trunk/view/profile_completion/mo_openid_prof_comp_funct.php

    r2788668 r2853010  
    11<?php
    22
    3 function mo_openid_save_profile_completion_form($username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id){
    4     if(!isset($_POST['otp_field'])) {
    5         $user_email = sanitize_email($user_email);
    6         $username = preg_replace('/[\x00-\x1F][\x7F][\x81][\x8D][\x8F][\x90][\x9D][\xA0][\xAD]/', '', $username);
    7         $username = strtolower(str_replace(" ","",$username));
    8         global $wpdb;
    9         if(empty($user_email)){
    10             $email_user_id = NULL;
    11         }
    12         else {
    13             $email_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_email = %s", $user_email));
    14         }
    15         $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
    16 
    17         //if email exists, dont check if username is in db or not, send otp and get it over wordpress
    18         if( isset($email_user_id)){
    19             $send_content = send_otp_token($user_email);
    20             if($send_content['status']=='FAILURE'){
    21                 $message = "Error Code 1: ".get_option('mo_email_failure_message');
    22                 wp_die($message);
    23             }
    24             $transaction_id = $send_content['tId'];
    25             echo mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url,    $last_name, $user_full_name,$first_name, $decrypted_app_name, $decrypted_user_id);
    26             exit;
    27         }
    28         //email doesnt exist, check if username is in db or not, acc show form and proceed further
    29         else {
    30 
    31             if( isset($username_user_id) ){
    32                 $user_details= array(
    33                     'username' => $username,
    34                     'user_email' => $user_email,
    35                     'user_full_name' => $user_full_name,
    36                     'first_name' => $first_name,
    37                     'last_name' => $last_name,
    38                     'user_url' => $user_url,
    39                     'user_picture' => $user_picture,
    40                     'social_app_name' => $decrypted_app_name,
    41                     'social_user_id' => $decrypted_user_id,
    42                 );
    43                 echo mo_openid_profile_completion_form($user_details,'0');
    44                 exit;
    45             }
    46             else {
    47 
    48                 $send_content = send_otp_token($user_email);
    49                 if($send_content['status']=='FAILURE'){
    50                     $message = "Error Code 2: ".get_option('mo_email_failure_message');
    51                     wp_die($message);
    52                 }
    53                 $transaction_id = $send_content['tId'];
    54                 echo mo_openid_validate_otp_form($username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name,$first_name, $decrypted_app_name, $decrypted_user_id);
    55                 exit;
    56             }
    57 
    58         }
    59     }
    60 }
    61 
    62 function mo_openid_validate_otp_form($username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name ,$first_name, $decrypted_app_name, $decrypted_user_id,$message = ''){
    63     $path = mo_openid_get_wp_style();
    64     $nonce = wp_create_nonce( 'mo-openid-user-otp-validation-nonce' );
    65     if($message=='')
    66     {
    67         $message=get_option('mo_email_verify_message');
    68     }
    69     else
    70         $message=get_option('mo_email_verify_wrong_otp');
    71 
    72     $html = '<style>
     3function mo_openid_save_profile_completion_form( $username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id ) {
     4    $allowed_html = array(
     5        'style' => array(),
     6        'head'  => array(),
     7        'meta'  => array(
     8            'name'    => array(),
     9            'content' => array(),
     10        ),
     11        'link'  => array(
     12            'rel'   => array(),
     13            'href'  => array(),
     14            'type'  => array(),
     15            'media' => array(),
     16        ),
     17        'body'  => array( 'class' => array() ),
     18        'div'   => array(
     19            'style' => array(),
     20            'class' => array(),
     21            'id'    => array(),
     22        ),
     23        'form'  => array(
     24            'name'   => array(),
     25            'method' => array(),
     26            'action' => array(),
     27        ),
     28        'span'  => array(
     29            'style' => array(),
     30            'class' => array(),
     31            'align' => array(),
     32        ),
     33        'p'     => array(),
     34        'br'    => array(),
     35        'label' => array( 'for' => array() ),
     36        'input' => array(
     37            'type'  => array(),
     38            'class' => array(),
     39            'name'  => array(),
     40            'size'  => array(),
     41            'value' => array(),
     42        ),
     43    );
     44
     45    if(!isset($_POST['otp_field'])) {   // phpcs:ignore
     46        $user_email = sanitize_email( $user_email );
     47        $username   = preg_replace( '/[\x00-\x1F][\x7F][\x81][\x8D][\x8F][\x90][\x9D][\xA0][\xAD]/', '', $username );
     48        $username   = strtolower( str_replace( ' ', '', $username ) );
     49        global $wpdb;
     50        if ( empty( $user_email ) ) {
     51            $email_user_id = null;
     52        } else {
     53            $email_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_email = %s", $user_email ) );
     54        }
     55        $username_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_login = %s", $username ) );
     56
     57        // if email exists, dont check if username is in db or not, send otp and get it over WordPress
     58        if ( isset( $email_user_id ) ) {
     59            $send_content = send_otp_token( $user_email );
     60            if ( $send_content['status'] == 'FAILURE' ) {
     61                $message = 'Error Code 1: ' . get_option( 'mo_email_failure_message' );
     62                wp_die( esc_attr( $message ) );
     63            }
     64            $transaction_id = $send_content['tId'];
     65            echo wp_kses( mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id ), $allowed_html );
     66            exit;
     67        }
     68        // email doesnt exist, check if username is in db or not, acc show form and proceed further
     69        else {
     70
     71            if ( isset( $username_user_id ) ) {
     72                $user_details = array(
     73                    'username'        => $username,
     74                    'user_email'      => $user_email,
     75                    'user_full_name'  => $user_full_name,
     76                    'first_name'      => $first_name,
     77                    'last_name'       => $last_name,
     78                    'user_url'        => $user_url,
     79                    'user_picture'    => $user_picture,
     80                    'social_app_name' => $decrypted_app_name,
     81                    'social_user_id'  => $decrypted_user_id,
     82                );
     83                echo esc_attr( mo_openid_profile_completion_form( $user_details, '0' ) );
     84                exit;
     85            } else {
     86
     87                $send_content = send_otp_token( $user_email );
     88                if ( $send_content['status'] == 'FAILURE' ) {
     89                    $message = 'Error Code 2: ' . get_option( 'mo_email_failure_message' );
     90                    wp_die( esc_attr( $message ) );
     91                }
     92                $transaction_id = $send_content['tId'];
     93                echo wp_kses( mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id ), $allowed_html );
     94                exit;
     95            }
     96        }
     97    }
     98}
     99
     100function mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id, $message = '' ) {
     101    $path  = mo_openid_get_wp_style();
     102    $nonce = wp_create_nonce( 'mo-openid-user-otp-validation-nonce' );
     103    if ( $message == '' ) {
     104        $message = get_option( 'mo_email_verify_message' );
     105    } else {
     106        $message = get_option( 'mo_email_verify_wrong_otp' );
     107    }
     108
     109    $html = '<style>
    73110                            .mocomp {
    74111                                         margin: auto !important;
     
    83120                <head>
    84121                <meta name="viewport" content="width=device-width, initial-scale=1.0">
    85                 <link rel="stylesheet" href='.$path.' type="text/css" media="all" /></head>
     122                <link rel="stylesheet" href=' . $path . ' type="text/css" media="all" /></head>
    86123         
    87124                        <body class="login login-action-login wp-core-ui  locale-en-us">
     
    92129                        <div style="background: white;margin-top:-15px;padding: 15px;">
    93130                       
    94                         <div style="text-align:center"><span style="font-size: 24px;font-family: Arial">'.get_option('mo_email_verify_title').'</span></div><br>
     131                        <div style="text-align:center"><span style="font-size: 24px;font-family: Arial">' . get_option( 'mo_email_verify_title' ) . '</span></div><br>
    95132                        <div style="padding: 12px;"></div>
    96133                        <div style=" padding: 16px;background-color:rgba(1, 145, 191, 0.117647);color: black;">
    97                         <span style=" margin-left: 15px;color: black;font-weight: bold;float: right;font-size: 22px;line-height: 20px;cursor: pointer;font-family: Arial;transition: 0.3s"></span>'.$message.'</div>    <br>                   
     134                        <span style=" margin-left: 15px;color: black;font-weight: bold;float: right;font-size: 22px;line-height: 20px;cursor: pointer;font-family: Arial;transition: 0.3s"></span>' . $message . '</div>    <br>                   
    98135                        <p>
    99                         <label for="user_login">'.esc_html(get_option('mo_email_verify_verification_code_instruction')).'<br/>
     136                        <label for="user_login">' . esc_html( get_option( 'mo_email_verify_verification_code_instruction' ) ) . '<br/>
    100137                        <input type="text" pattern="\d{4,5}" class="input" name="otp_field" value=""  size="50" /></label>
    101138                        </p>
    102                         <input type="hidden" name="username_field" value='.esc_attr($username).'>
    103                         <input type="hidden" name="email_field" value='.esc_attr($user_email).'>                       
    104                         <input type="hidden" name="first_name" value='.esc_attr($first_name).'>
    105                         <input type="hidden" name="last_name" value='.esc_attr($last_name).'>
    106                         <input type="hidden" name="user_full_name" value='.esc_attr($user_full_name).'>
    107                         <input type="hidden" name="user_url" value='.esc_url($user_url).'>
    108                         <input type="hidden" name="user_picture" value='.esc_url($user_picture).'>
    109                         <input type="hidden" name="transaction_id" value='.esc_attr($transaction_id).'>
    110                         <input type="hidden" name="decrypted_app_name" value='.esc_attr($decrypted_app_name).'>
    111                         <input type="hidden" name="decrypted_user_id" value='.esc_attr($decrypted_user_id).'>               
     139                        <input type="hidden" name="username_field" value=' . esc_attr( $username ) . '>
     140                        <input type="hidden" name="email_field" value=' . esc_attr( $user_email ) . '>                     
     141                        <input type="hidden" name="first_name" value=' . esc_attr( $first_name ) . '>
     142                        <input type="hidden" name="last_name" value=' . esc_attr( $last_name ) . '>
     143                        <input type="hidden" name="user_full_name" value=' . esc_attr( $user_full_name ) . '>
     144                        <input type="hidden" name="user_url" value=' . esc_url( $user_url ) . '>
     145                        <input type="hidden" name="user_picture" value=' . esc_url( $user_picture ) . '>
     146                        <input type="hidden" name="transaction_id" value=' . esc_attr( $transaction_id ) . '>
     147                        <input type="hidden" name="decrypted_app_name" value=' . esc_attr( $decrypted_app_name ) . '>
     148                        <input type="hidden" name="decrypted_user_id" value=' . esc_attr( $decrypted_user_id ) . '>             
    112149                        <input type="hidden" name="option" value="mo_openid_otp_validation">
    113                         <input type="hidden" name="mo_openid_user_otp_validation_nonce" value="'.$nonce.'"/>
     150                        <input type="hidden" name="mo_openid_user_otp_validation_nonce" value="' . $nonce . '"/>
    114151                        </div>
    115152                        <div style="float: right;margin-right: 11px;"> 
    116                         <input type="submit" style="margin-left:10px"  name="wp-submit" id="wp-submit" class="button button-primary button-large" value="'.get_option('mo_profile_complete_submit_button').'"/>
     153                        <input type="submit" style="margin-left:10px"  name="wp-submit" id="wp-submit" class="button button-primary button-large" value="' . get_option( 'mo_profile_complete_submit_button' ) . '"/>
    117154
    118155                        </div>
    119156                        <div style="float: right">
    120                         <input type="button"  style="margin-left:10px" onclick="show_profile_completion_form()" name="otp_back" id="back" class="button button-primary button-large" value="'.get_option('mo_email_verify_back_button').'"/>&emsp;
    121                         <input type="submit" name="resend_otp" id="resend_otp" class="button button-primary button-large" value="'.get_option('mo_email_verify_resend_otp_button').'"/>
     157                        <input type="button"  style="margin-left:10px" onclick="show_profile_completion_form()" name="otp_back" id="back" class="button button-primary button-large" value="' . get_option( 'mo_email_verify_back_button' ) . '"/>&emsp;
     158                        <input type="submit" name="resend_otp" id="resend_otp" class="button button-primary button-large" value="' . get_option( 'mo_email_verify_resend_otp_button' ) . '"/>
    122159                        </div>';
    123160
    124 
    125     if(get_option('moopenid_logo_check_prof') == 1) {
    126         $html .= mo_openid_customize_logo();
    127     }
    128     $nonce = wp_create_nonce( 'mo-openid-user-show-profile-form-nonce' );
    129     $html.=    '</form>
     161    if ( get_option( 'moopenid_logo_check_prof' ) == 1 ) {
     162        $html .= mo_openid_customize_logo();
     163    }
     164    $nonce = wp_create_nonce( 'mo-openid-user-show-profile-form-nonce' );
     165    $html .= '</form>
    130166                    <form style="display:none;" name="go_back_form" id="go_back_form" method="post">
    131167                    <input hidden name="option" value="mo_openid_show_profile_form"/>
    132                     <input type="hidden" name="mo_openid_show_profile_form_nonce" value="'.$nonce.'"/>
    133                     <input type="hidden" name="username_field" value='.esc_attr($username).'>
    134                     <input type="hidden" name="email_field" value='.esc_attr($user_email).'>                       
    135                     <input type="hidden" name="first_name" value='.esc_attr($first_name).'>
    136                     <input type="hidden" name="last_name" value='.esc_attr($last_name).'>
    137                     <input type="hidden" name="user_full_name" value='.esc_attr($user_full_name).'>
    138                     <input type="hidden" name="user_url" value='.esc_url($user_url).'>
    139                     <input type="hidden" name="user_picture" value='.esc_url($user_picture).'>
    140                     <input type="hidden" name="transaction_id" value='.esc_attr($transaction_id).'>
    141                     <input type="hidden" name="decrypted_app_name" value='.esc_attr($decrypted_app_name).'>
    142                     <input type="hidden" name="decrypted_user_id" value='.esc_attr($decrypted_user_id).'>
     168                    <input type="hidden" name="mo_openid_show_profile_form_nonce" value="' . $nonce . '"/>
     169                    <input type="hidden" name="username_field" value=' . esc_attr( $username ) . '>
     170                    <input type="hidden" name="email_field" value=' . esc_attr( $user_email ) . '>                     
     171                    <input type="hidden" name="first_name" value=' . esc_attr( $first_name ) . '>
     172                    <input type="hidden" name="last_name" value=' . esc_attr( $last_name ) . '>
     173                    <input type="hidden" name="user_full_name" value=' . esc_attr( $user_full_name ) . '>
     174                    <input type="hidden" name="user_url" value=' . esc_url( $user_url ) . '>
     175                    <input type="hidden" name="user_picture" value=' . esc_url( $user_picture ) . '>
     176                    <input type="hidden" name="transaction_id" value=' . esc_attr( $transaction_id ) . '>
     177                    <input type="hidden" name="decrypted_app_name" value=' . esc_attr( $decrypted_app_name ) . '>
     178                    <input type="hidden" name="decrypted_user_id" value=' . esc_attr( $decrypted_user_id ) . '>
    143179                    </form>
    144180                    </div>
     
    150186                    }     
    151187                    </script>';
    152     return $html;
    153 }
    154 
    155 function send_otp_token($email){
    156     $otp = wp_rand(1000,99999);
    157     $customerKey = get_option('mo_openid_admin_customer_key');
    158     $stringToHash = $customerKey . $otp;
    159     $transactionId = hash("sha512", $stringToHash);
    160     //wp_email function will come here
    161     $subject= '['.get_bloginfo('name').'] Verify your email';
    162 
    163     $message=str_replace('##otp##', $otp, get_option('custom_otp_msg'));
    164 
    165     $response = wp_mail($email, $subject,$message);
    166 
    167     if($response){
    168         mo_openid_start_session();
    169         $_SESSION['mo_otptoken'] = true;
    170         $_SESSION['sent_on'] = time();
    171         $content = array('status' => 'SUCCESS','tId' => $transactionId);
    172     }
    173     else
    174         $content = array('status' => 'FAILURE');
    175     return $content;
    176 }
    177 
    178 function validate_otp_token($transactionId,$otpToken){
    179     mo_openid_start_session();
    180     $customerKey = get_option('mo_openid_admin_customer_key');
    181     if($_SESSION['mo_otptoken']){
    182         $pass = checkTimeStamp($_SESSION['sent_on'],time());
    183         $pass = checkTransactionId($customerKey, $otpToken, $transactionId, $pass);
    184         if($pass)
    185             $content = array('status' => 'SUCCESS');
    186         else
    187             $content = array('status' => 'FAILURE');
    188         unset($_SESSION['$mo_otptoken']);
    189     }
    190     else
    191         $content = array('status' =>'FAILURE');
    192 
    193     return $content;
    194 }
    195 
    196 function mo_openid_social_login_validate_otp($username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id, $otp_token, $transaction_id){
    197 
    198     $validate_content = validate_otp_token($transaction_id, $otp_token);
    199     $status = $validate_content['status'];
    200     //if invalid OTP
    201     if($status == 'FAILURE'){
    202         $message = 'You have entered an invalid verification code. Enter a valid code.';
    203         echo mo_openid_validate_otp_form($username, $user_email, $transaction_id, $user_picture, $user_url,  $last_name, $user_full_name,$first_name, $decrypted_app_name, $decrypted_user_id,$message);
    204         exit;
    205 
    206     }
    207     //if OTP is Valid
    208     else{
    209         $user_details= array(
    210             'username' => $username,
    211             'user_email' => $user_email,
    212             'user_full_name' => $user_full_name,
    213             'first_name' => $first_name,
    214             'last_name' => $last_name,
    215             'user_url' => $user_url,
    216             'user_picture' => $user_picture,
    217             'social_app_name' => $decrypted_app_name,
    218             'social_user_id' => $decrypted_user_id,
    219         );
    220         //check_existing_user
    221         global $wpdb;
    222         $db_prefix = $wpdb->prefix;
    223         $email_user_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_email = \"%s\"", $user_email));
    224         if (empty($user_email)) {
    225             $existing_email_user_id = NULL;
    226         } else {
    227             $existing_email_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_email = \"%s\"", $user_email));
    228         }
    229         if ((isset($email_user_id)) || (isset($existing_email_user_id))) {
    230 
    231             if (isset($email_user_id)) {
    232                 $user = get_user_by('id', $email_user_id);
    233                 $user_id = $user->ID;
    234             } else {
    235                 $user = get_user_by('id', $existing_email_user_id);
    236                 $user_id = $user->ID;
    237             }
    238             mo_openid_start_session_login($user_details);
    239             mo_openid_login_user($user_email,$user_id,$user,$user_picture,1);
    240             exit;
    241         }else{
    242             mo_create_new_user($user_details);
    243         }
    244 
    245     }
    246 }
    247 
    248 function mo_openid_profile_comp_action(){
    249 
    250     $nonce = sanitize_text_field($_POST['mo_openid_profile_comp_nonce']);
    251     if (!wp_verify_nonce($nonce, 'mo-openid-profile-comp')) {
    252         wp_die('<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.');
    253     } else {
    254         if(current_user_can('administrator')){
    255         if(sanitize_text_field($_POST['enabled'])=="true") {
    256             update_option('mo_openid_enable_profile_completion', 1);
    257 
    258         }
    259         else
    260             update_option('mo_openid_enable_profile_completion', 0);
    261     }
    262 }
    263 }
     188    return $html;
     189}
     190
     191function send_otp_token( $email ) {
     192    $otp           = wp_rand( 1000, 99999 );
     193    $customerKey   = get_option( 'mo_openid_admin_customer_key' );
     194    $stringToHash  = $customerKey . $otp;
     195    $transactionId = hash( 'sha512', $stringToHash );
     196    // wp_email function will come here
     197    $subject = '[' . get_bloginfo( 'name' ) . '] Verify your email';
     198
     199    $message = str_replace( '##otp##', $otp, get_option( 'custom_otp_msg' ) );
     200
     201    $response = wp_mail( $email, $subject, $message );
     202
     203    if ( $response ) {
     204        mo_openid_start_session();
     205        $_SESSION['mo_otptoken'] = true;
     206        $_SESSION['sent_on']     = time();
     207        $content                 = array(
     208            'status' => 'SUCCESS',
     209            'tId'    => $transactionId,
     210        );
     211    } else {
     212        $content = array( 'status' => 'FAILURE' );
     213    }
     214    return $content;
     215}
     216
     217function validate_otp_token( $transactionId, $otpToken ) {
     218    mo_openid_start_session();
     219    $customerKey = get_option( 'mo_openid_admin_customer_key' );
     220    if ( $_SESSION['mo_otptoken'] ) {
     221        $pass = checkTimeStamp( ( $_SESSION['sent_on'] ), time() );
     222        $pass = checkTransactionId( $customerKey, $otpToken, $transactionId, $pass );
     223        if ( $pass ) {
     224            $content = array( 'status' => 'SUCCESS' );
     225        } else {
     226            $content = array( 'status' => 'FAILURE' );
     227        }
     228        unset( $_SESSION['$mo_otptoken'] );
     229    } else {
     230        $content = array( 'status' => 'FAILURE' );
     231    }
     232
     233    return $content;
     234}
     235
     236function mo_openid_social_login_validate_otp( $username, $user_email, $first_name, $last_name, $user_full_name, $user_url, $user_picture, $decrypted_app_name, $decrypted_user_id, $otp_token, $transaction_id ) {
     237
     238    $validate_content = validate_otp_token( $transaction_id, $otp_token );
     239    $status           = $validate_content['status'];
     240    // if invalid OTP
     241    if ( $status == 'FAILURE' ) {
     242        $message = 'You have entered an invalid verification code. Enter a valid code.';
     243
     244        $allowed_html = array(
     245            'style' => array(),
     246            'head'  => array(),
     247            'meta'  => array(
     248                'name'    => array(),
     249                'content' => array(),
     250            ),
     251            'link'  => array(
     252                'rel'   => array(),
     253                'href'  => array(),
     254                'type'  => array(),
     255                'media' => array(),
     256            ),
     257            'body'  => array( 'class' => array() ),
     258            'div'   => array(
     259                'style' => array(),
     260                'class' => array(),
     261                'id'    => array(),
     262            ),
     263            'form'  => array(
     264                'name'   => array(),
     265                'method' => array(),
     266                'action' => array(),
     267            ),
     268            'span'  => array(
     269                'style' => array(),
     270                'class' => array(),
     271                'align' => array(),
     272            ),
     273            'p'     => array(),
     274            'br'    => array(),
     275            'label' => array( 'for' => array() ),
     276            'input' => array(
     277                'type'  => array(),
     278                'class' => array(),
     279                'name'  => array(),
     280                'size'  => array(),
     281                'value' => array(),
     282            ),
     283        );
     284
     285        echo wp_kses( mo_openid_validate_otp_form( $username, $user_email, $transaction_id, $user_picture, $user_url, $last_name, $user_full_name, $first_name, $decrypted_app_name, $decrypted_user_id, $message ), $allowed_html );
     286        exit;
     287
     288    }
     289    // if OTP is Valid
     290    else {
     291        $user_details = array(
     292            'username'        => $username,
     293            'user_email'      => $user_email,
     294            'user_full_name'  => $user_full_name,
     295            'first_name'      => $first_name,
     296            'last_name'       => $last_name,
     297            'user_url'        => $user_url,
     298            'user_picture'    => $user_picture,
     299            'social_app_name' => $decrypted_app_name,
     300            'social_user_id'  => $decrypted_user_id,
     301        );
     302        // check_existing_user
     303        global $wpdb;
     304        $email_user_id = $wpdb->get_var( $wpdb->prepare( 'SELECT user_id FROM ' . $wpdb->prefix . 'mo_openid_linked_user where linked_email = %s', $user_email ) );
     305        if ( empty( $user_email ) ) {
     306            $existing_email_user_id = null;
     307        } else {
     308            $existing_email_user_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users where user_email = %s", $user_email ) );
     309        }
     310        if ( ( isset( $email_user_id ) ) || ( isset( $existing_email_user_id ) ) ) {
     311
     312            if ( isset( $email_user_id ) ) {
     313                $user    = get_user_by( 'id', $email_user_id );
     314                $user_id = $user->ID;
     315            } else {
     316                $user    = get_user_by( 'id', $existing_email_user_id );
     317                $user_id = $user->ID;
     318            }
     319            mo_openid_start_session_login( $user_details );
     320            mo_openid_login_user( $user_email, $user_id, $user, $user_picture, 1 );
     321            exit;
     322        } else {
     323            mo_create_new_user( $user_details );
     324        }
     325    }
     326}
     327
     328function mo_openid_profile_comp_action() {
     329
     330    $nonce = sanitize_text_field( $_POST['mo_openid_profile_comp_nonce'] );
     331    if ( ! wp_verify_nonce( $nonce, 'mo-openid-profile-comp' ) ) {
     332        wp_die( '<strong>ERROR</strong>: Please Go back and Refresh the page and try again!<br/>If you still face the same issue please contact your Administrator.' );
     333    } else {
     334        if ( current_user_can( 'administrator' ) ) {
     335            if ( sanitize_text_field( $_POST['enabled'] ) == 'true' ) {
     336                update_option( 'mo_openid_enable_profile_completion', 1 );
     337
     338            } else {
     339                update_option( 'mo_openid_enable_profile_completion', 0 );
     340            }
     341        }
     342    }
     343}
  • miniorange-login-openid/trunk/view/rate_us/rate_us.php

    r2788668 r2853010  
    3434                                    <form id="mo_openid_rateus_submit_form" method="post" action="">
    3535                                        <input type="hidden" name="option" value="mo_openid_rateus_query_option" />
    36                                         <input type="hidden" name="mo_openid_rateus_nonce" value="'.wp_create_nonce("mo-openid-rateus-nonce").'"/>
     36                                        <input type="hidden" name="mo_openid_rateus_nonce" value="'.esc_attr(wp_create_nonce("mo-openid-rateus-nonce")).'"/>
    3737                                        <label style="margin-left: 4%"> We would be glad to hear what you think</label>
    38                                         <input class="mo_openid_modal_rateus_style" type="email" style=" margin-left: 5%;width: 87%; border-bottom: 1px solid; border-bottom-color:#0867b2 " type="email"  required placeholder="Enter your Email" name="mo_openid_rateus_email" value="'.get_option("mo_openid_admin_email").'">
     38                                        <input class="mo_openid_modal_rateus_style" type="email" style=" margin-left: 5%;width: 87%; border-bottom: 1px solid; border-bottom-color:#0867b2 " type="email"  required placeholder="Enter your Email" name="mo_openid_rateus_email" value="'.esc_attr(get_option("mo_openid_admin_email")).'">
    3939
    4040                                        <table style="margin-left: 5%; width: 91%;height: 30%">
     
    6464    }
    6565    function form_popup(rating){
    66         var mo_openid_rating_given_nonce= '<?php echo wp_create_nonce('mo-openid-rating-given-nonce'); ?>';
     66        var mo_openid_rating_given_nonce = '<?php echo esc_attr(wp_create_nonce("mo-openid-rating-given-nonce")); ?>';
    6767        jQuery.ajax({
    68             url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
     68            url: "<?php echo esc_url(admin_url("admin-ajax.php"));?>", //the page containing php script
    6969            method: "POST", //request type,
    7070            dataType: 'json',
     
    7272                action: 'mo_openid_rating_given',
    7373                rating: rating,
    74                 'mo_openid_rating_given_nonce' : mo_openid_rating_given_nonce,
     74                'mo_openid_rating_given' : mo_openid_rating_given,
    7575            },
    7676            success: function (result) {
  • miniorange-login-openid/trunk/view/recaptcha/mo_openid_recap.php

    r2648308 r2853010  
    66            <tr>
    77                <td>
    8                     <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Enable reCAPTCHA');?>
     8                    <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr(mo_sl('Enable reCAPTCHA'));?>
    99                        <input  type="checkbox"/>
    1010                        <span class="mo_openid_checkbox_checkmark_disable"></span>
    1111                    </label>
    1212                    <div>
    13                         <p class="mo_openid_note_style"><b><?php echo mo_sl('Prerequisite');?></b>: <?php echo mo_sl('Before you can use reCAPTCHA, you need to register your domain/website.');?> <a><b><?php echo mo_sl('Click here');?></b></a>.</p>
    14                         <p><?php echo mo_sl('Enter Site key and Secret key that you get after registration.');?></p>
     13                        <p class="mo_openid_note_style"><b><?php echo esc_attr(mo_sl('Prerequisite'));?></b>: <?php echo esc_attr(mo_sl('Before you can use reCAPTCHA, you need to register your domain/website.'));?> <a><b><?php echo esc_attr(mo_sl('Click here'));?></b></a>.</p>
     14                        <p><?php echo esc_attr(mo_sl('Enter Site key and Secret key that you get after registration.'));?></p>
    1515                        <table style="width: 100%;">
    1616                            <tr>
    17                                 <td colspan="2" style="width:30%"><?php echo mo_sl('Select type of reCAPTCHA ');?>:
     17                                <td colspan="2" style="width:30%"><?php echo esc_attr(mo_sl('Select type of reCAPTCHA '));?>:
    1818
    19                                     <label class="mo-openid-radio-container_disable"><?php echo mo_sl('reCAPTCHA v3');?>
     19                                    <label class="mo-openid-radio-container_disable"><?php echo esc_attr(mo_sl('reCAPTCHA v3'));?>
    2020                                        <input type="checkbox"  />
    2121                                        <span class="mo-openid-radio-checkmark_disable"></span>
     
    2424
    2525
    26                                     <label class="mo-openid-radio-container_disable"><?php echo mo_sl('reCAPTCHA v2');?>
     26                                    <label class="mo-openid-radio-container_disable"><?php echo esc_attr(mo_sl('reCAPTCHA v2'));?>
    2727                                        <input type="radio"  />
    2828                                        <span class="mo-openid-radio-checkmark_disable"></span>
     
    3232                            </tr>
    3333                            <tr>
    34                                 <td style="width:15%"><?php echo mo_sl('Site key');?>  : </td>
     34                                <td style="width:15%"><?php echo esc_attr(mo_sl('Site key'));?>  : </td>
    3535                                <td style="width:85%"><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" placeholder="site key" disabled/></td>
    3636                            </tr>
    3737                            <tr>
    38                                 <td><?php echo mo_sl('Secret key');?> : </td>
     38                                <td><?php echo esc_attr(mo_sl('Secret key'));?> : </td>
    3939                                <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" type="text" disabled/></td>
    4040                            </tr>
    4141                            <tr id="mo_limit_recaptcha_for">
    42                                 <td colspan="2" style="vertical-align:top;"><br><b><?php echo mo_sl('Enable reCAPTCHA for ');?>:</b></td>
     42                                <td colspan="2" style="vertical-align:top;"><br><b><?php echo esc_attr(mo_sl('Enable reCAPTCHA for '));?>:</b></td>
    4343                            </tr>
    4444                            <tr>
    4545                                <td colspan="2">
    46                                     <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('WordPress Login form');?>
     46                                    <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr(mo_sl('WordPress Login form'));?>
    4747                                        <input  type="checkbox"/>
    4848                                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    5555                                <td colspan="2">
    5656
    57                                     <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('WordPress Registration form');?>
     57                                    <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr(mo_sl('WordPress Registration form'));?>
    5858                                        <input  type="checkbox"/>
    5959                                        <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    6969            <tr>
    7070                <td>
    71                     <input disabled type="button" value="<?php echo mo_sl('Save Settings');?>" class="button button-primary button-large" />
    72                     <input disabled id="mo_limit_recaptcha_test" type="button" value="<?php echo mo_sl('Test reCAPTCHA Configuration');?>" class="button button-primary button-large" />
     71                    <input disabled type="button" value="<?php echo esc_attr(mo_sl('Save Settings'));?>" class="button button-primary button-large" />
     72                    <input disabled id="mo_limit_recaptcha_test" type="button" value="<?php echo esc_attr(mo_sl('Test reCAPTCHA Configuration'));?>" class="button button-primary button-large" />
    7373                </td>
    7474            </tr>
     
    7676        <script>
    7777            //to set heading name
    78             var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
     78            var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo esc_attr(add_query_arg(array('tab' => 'licensing_plans'), sanitize_text_field( $_SERVER['REQUEST_URI']))); ?>\">PRO</a>");
    7979
    8080            var win_height = jQuery('#mo_openid_menu_height').height();
     
    8585    </form>
    8686    <div class="mo_openid_highlight">
    87         <h3 style="margin-left: 1%;line-height: 210%;color: white;"><?php echo mo_sl('GDPR Settings');?></h3>
     87        <h3 style="margin-left: 1%;line-height: 210%;color: white;"><?php echo esc_attr(mo_sl('GDPR Settings'));?></h3>
    8888    </div><br/>
    8989    <?php
     
    9595    <form id="gdpr" name="gdpr" method="post" action="">
    9696        <input type="hidden" name="option" value="mo_openid_enable_gdpr" />
    97         <input type="hidden" name="mo_openid_enable_gdpr_nonce" value="<?php echo wp_create_nonce( 'mo-openid-enable-gdpr-nonce' ); ?>"/>
     97        <input type="hidden" name="mo_openid_enable_gdpr_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-gdpr-nonce' )); ?>"/>
    9898        <div class="mo_openid_table_layout">
    99             <label class=" mo_openid_note_style" style="font-size:small;padding:22px;"><?php echo mo_sl('If GDPR check is enabled, users will be asked to give consent before using Social Login. Users who will not give consent will not be able to log in. This setting stands true only when users are registering using Social Login. This will not interfere with users registering through the regular WordPress');?>.<br><br>(<?php echo mo_sl('Click');?> <a target="_blank" href="<?php echo add_query_arg( array('tab' => 'privacy_policy'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl( 'here');?> </a> <?php echo mo_sl("to read miniOrange Social Login Privacy Policy. Please update your website's privacy policy accordingly and enter the URL to your privacy policy below.");?></label>
     99            <label class=" mo_openid_note_style" style="font-size:small;padding:22px;"><?php echo esc_attr(mo_sl('If GDPR check is enabled, users will be asked to give consent before using Social Login. Users who will not give consent will not be able to log in. This setting stands true only when users are registering using Social Login. This will not interfere with users registering through the regular WordPress'));?>.<br><br>(<?php echo esc_attr(mo_sl('Click'));?> <a target="_blank" href="<?php echo esc_attr(add_query_arg( array('tab' => 'privacy_policy'), sanitize_text_field($_SERVER['REQUEST_URI'] ))); ?>"><?php echo esc_attr(mo_sl( 'here'));?> </a> <?php echo esc_attr(mo_sl("to read miniOrange Social Login Privacy Policy. Please update your website's privacy policy accordingly and enter the URL to your privacy policy below."));?></label>
    100100            <br/>
    101             <label class="mo_openid_checkbox_container"><?php echo mo_sl('Take consent from users');?>
     101            <label class="mo_openid_checkbox_container"><?php echo esc_attr(mo_sl('Take consent from users'));?>
    102102                <input style="padding-left: 15px" type="checkbox" id="mo_openid_gdpr_consent_" name="mo_openid_gdpr_consent_enable" value="1"
    103103                    <?php checked( get_option('mo_openid_gdpr_consent_enable') == 1 );?> />
     
    109109                <?php } ?>
    110110            </label>
    111             <label style="font-size: 12px"><?php echo mo_sl('Enter the Consent message:');?> </label><br/>
    112             <input type="text" <?php echo $disable?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_gdpr_consent_message" value="<?php echo esc_textarea(get_option('mo_openid_gdpr_consent_message'))?>"/>
     111            <label style="font-size: 12px"><?php echo esc_attr(mo_sl('Enter the Consent message:'));?> </label><br/>
     112            <input type="text" <?php echo esc_attr($disable)?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_gdpr_consent_message" value="<?php echo esc_textarea(get_option('mo_openid_gdpr_consent_message'))?>"/>
    113113            <br><br>
    114             <label style="font-size: 12px"> <?php echo mo_sl('Enter the text to be displayed for the Privacy Policy URL');?> :</label><br/>
    115             <input type="text" <?php echo $disable?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_privacy_policy_text" value="<?php echo esc_attr(get_option('mo_openid_privacy_policy_text'))?>" />
     114            <label style="font-size: 12px"> <?php echo esc_attr(mo_sl('Enter the text to be displayed for the Privacy Policy URL'));?> :</label><br/>
     115            <input type="text" <?php echo esc_attr($disable)?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_privacy_policy_text" value="<?php echo esc_attr(get_option('mo_openid_privacy_policy_text'))?>" />
    116116            <br><br>
    117             <label style="font-size: 12px"><?php echo mo_sl('Enter Privacy Policy URL');?>: </label><br/>
    118             <input type="text" <?php echo $disable?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_privacy_policy_url" value="<?php echo esc_url(get_option('mo_openid_privacy_policy_url'))?>" />
    119             <br/><br/><b><input type="submit" <?php echo $disable?> name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
     117            <label style="font-size: 12px"><?php echo esc_attr(mo_sl('Enter Privacy Policy URL'));?>: </label><br/>
     118            <input type="text" <?php echo esc_attr($disable)?> class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" name="mo_openid_privacy_policy_url" value="<?php echo esc_url(get_option('mo_openid_privacy_policy_url'))?>" />
     119            <br/><br/><b><input type="submit" <?php echo esc_attr($disable)?> name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
    120120        </div>
    121121    </form>
  • miniorange-login-openid/trunk/view/redirect_options/mo_openid_redirect_op.php

    r2730588 r2853010  
    55    <form id="mo_openid_redirect" name="redirect" method="post" action="">
    66        <input type="hidden" name="option" value="mo_openid_enable_redirect" />
    7         <input type="hidden" name="mo_openid_enable_redirect_nonce" value="<?php echo wp_create_nonce( 'mo-openid-enable-redirect-nonce' ); ?>"/>
     7        <input type="hidden" name="mo_openid_enable_redirect_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-redirect-nonce' )); ?>"/>
    88        <div class="mo_openid_table_layout">
    9             <b><h3><?php echo mo_sl('Redirect URL after login:');?></h3></b>
     9            <b><h3><?php echo esc_attr(mo_sl('Redirect URL after login:'));?></h3></b>
    1010            <table style="width: 100%;">
    1111                <tr>
    1212                    <td colspan="2">
    13                         <label class="mo-openid-radio-container"><b>*</b><?php echo mo_sl('Same page where user logged in');?>
     13                        <label class="mo-openid-radio-container"><b>*</b><?php echo esc_attr(mo_sl('Same page where user logged in'));?>
    1414                            <input type="radio" id="login_redirect_same_page" name="mo_openid_login_redirect" value="same" onclick="login_redirect()"
    1515                                <?php checked( get_option('mo_openid_login_redirect') == 'same' );?> />
     
    1919                <tr>
    2020                    <td>
    21                         <label class="mo-openid-radio-container"><?php echo mo_sl('Homepage');?>
     21                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Homepage'));?>
    2222                            <input type="radio" id="login_redirect_homepage" name="mo_openid_login_redirect" value="homepage" onclick="login_redirect()"
    2323                                <?php checked( get_option('mo_openid_login_redirect') == 'homepage' );?> />
     
    2525                    </td>
    2626                    <td>
    27                         <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span>
    28                     </td>
    29                 </tr>
    30                 <tr>
    31                     <td colspan="2">
    32                         <label class="mo-openid-radio-container"><?php echo mo_sl('Account dashboard');?>
     27                        <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span>
     28                    </td>
     29                </tr>
     30                <tr>
     31                    <td colspan="2">
     32                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Account dashboard'));?>
    3333                            <input type="radio" id="login_redirect_dashboard" name="mo_openid_login_redirect" value="dashboard" onclick="login_redirect()"
    3434                                <?php checked( get_option('mo_openid_login_redirect') == 'dashboard' );?> />
     
    3838                <tr>
    3939                    <td style="width: 30%">
    40                         <label class="mo-openid-radio-container"><?php echo mo_sl('Custom URL');?>
     40                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Custom URL'));?>
    4141                            <input type="radio" id="login_redirect_customurl" name="mo_openid_login_redirect" value="custom" onclick="login_redirect()"
    4242                                <?php checked( get_option('mo_openid_login_redirect') == 'custom' );?> />
     
    4949                <tr>
    5050                    <td style="width: 30%">
    51                         <label class="mo-openid-radio-container"><?php echo mo_sl('Relative URL');?>
     51                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Relative URL'));?>
    5252                            <input type="radio" id="login_redirect_relativeurl" name="mo_openid_login_redirect" onclick="login_redirect()" value="relative" <?php checked( get_option('mo_openid_login_redirect') == 'relative' );?> />
    5353                            <span class="mo-openid-radio-checkmark"></span></label>
    5454                    </td>
    5555                    <td style="width: 70%">
    56                         <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span><input type="text" id="login_redirect_url_relative" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%" name="mo_openid_relative_login_redirect_url" value="<?php echo esc_url(get_option('mo_openid_relative_login_redirect_url'))?>" />
     56                        <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span><input type="text" id="login_redirect_url_relative" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%" name="mo_openid_relative_login_redirect_url" value="<?php echo esc_url(get_option('mo_openid_relative_login_redirect_url'))?>" />
    5757                    </td>
    5858                </tr>
     
    6060                    <td colspan="2">
    6161                        <br>
    62                         <label style="cursor: auto" class="mo_openid_note_style"><?php echo mo_sl('*NOTE: If you login through WordPress default login page after login you will be redirected to Homepage');?>.</label>
     62                        <label style="cursor: auto" class="mo_openid_note_style"><?php echo esc_attr(mo_sl('*NOTE: If you login through WordPress default login page after login you will be redirected to Homepage'));?>.</label>
    6363                    </td>
    6464                </tr>
     
    6767                        <br><br>
    6868
    69                         <label class="mo_openid_checkbox_container"><b><?php echo mo_sl('Redirect URL after logout:');?></b>
     69                        <label class="mo_openid_checkbox_container"><b><?php echo esc_attr(mo_sl('Redirect URL after logout:'));?></b>
    7070                            <input type="checkbox" id="logout_redirection_enable" name="mo_openid_logout_redirection_enable" value="1"
    7171                                <?php checked( get_option('mo_openid_logout_redirection_enable') == 1 );?> /><b></b>
     
    7676                <tr>
    7777                    <td>
    78                         <label class="mo-openid-radio-container"><?php echo mo_sl('Home Page');?>
     78                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Home Page'));?>
    7979                            <input type="radio" id="logout_redirect_home" name="mo_openid_logout_redirect" value="homepage" onclick="logout_redirect();"
    8080                                <?php checked( get_option('mo_openid_logout_redirect') == 'homepage' );?> />
     
    8282                    </td>
    8383                    <td>
    84                         <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span>
     84                        <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span>
    8585                    </td>
    8686                </tr>
     
    8888                    <td>
    8989
    90                         <label class="mo-openid-radio-container"><?php echo mo_sl('Current Page');?>
     90                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Current Page'));?>
    9191                            <input type="radio" id="logout_redirect_current" name="mo_openid_logout_redirect" value="currentpage" onclick="logout_redirect();"
    9292                                <?php checked( get_option('mo_openid_logout_redirect') == 'currentpage' );?> />
     
    9898                    <td>
    9999
    100                         <label class="mo-openid-radio-container"><?php echo mo_sl('Login Page');?>
     100                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Login Page'));?>
    101101                            <input type="radio" id="logout_redirect_login" name="mo_openid_logout_redirect" value="login" onclick="logout_redirect();"
    102102                                <?php checked( get_option('mo_openid_logout_redirect') == 'login' );?> />
     
    108108                    <td style="width: 30%">
    109109
    110                         <label class="mo-openid-radio-container"><?php echo mo_sl('Relative URL');?>
     110                        <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Relative URL'));?>
    111111                            <input type="radio" id="logout_redirect_relativeurl" name="mo_openid_logout_redirect" value="custom" onclick="logout_redirect();"
    112112                                <?php checked( get_option('mo_openid_logout_redirect') == 'custom' );?> />
     
    115115                    </td>
    116116                    <td style="width: 70%">
    117                         <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span><input type="text" id="logout_redirect_url" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%" name="mo_openid_logout_redirect_url" value="<?php echo esc_url(get_option('mo_openid_logout_redirect_url'))?>" />
     117                        <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span><input type="text" id="logout_redirect_url" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%" name="mo_openid_logout_redirect_url" value="<?php echo esc_attr(get_option('mo_openid_logout_redirect_url'))?>" />
    118118                    </td>
    119119                </tr>
     
    122122                    <td>
    123123                        <br><br>
    124                         <label class="mo_openid_checkbox_container_disable"> <b>  <?php echo mo_sl("Enable Registration Redirection");?></b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
     124                        <label class="mo_openid_checkbox_container_disable"> <b>  <?php echo esc_attr(mo_sl("Enable Registration Redirection"));?></b><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>"><?php echo esc_attr(mo_sl('PRO'));?></a>
    125125                            <input type="checkbox"  /><br>
    126126                            <span class="mo_openid_checkbox_checkmark_disable"></span>
     
    131131                    <td colspan="2">
    132132                        <label class="mo-openid-radio-container_disable">
    133                             <input type="radio" /><b>*</b><?php echo mo_sl("Same page where user logged in");?>
    134                             <span class="mo-openid-radio-checkmark"></span></label>
    135                     </td>
    136                 </tr>
    137                 <tr>
    138                     <td>
    139                         <label class="mo-openid-radio-container_disable">
    140                             <input type="radio" /><?php echo mo_sl("Homepage");?>
    141                             <span class="mo-openid-radio-checkmark"></span></label>
    142                     </td>
    143 
    144                     <td>
    145                         <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span>
    146                     </td>
    147                 </tr>
    148                 <tr>
    149                     <td colspan="2">
    150                         <label class="mo-openid-radio-container_disable">
    151                             <input type="radio" /><?php echo mo_sl("Account dashboard");?>
    152                             <span class="mo-openid-radio-checkmark"></span></label>
    153                     </td>
    154                 </tr>
    155                 <tr>
    156                     <td style="width: 30%">
    157                         <label class="mo-openid-radio-container_disable"><?php echo mo_sl("Custom URL");?>
     133                            <input type="radio" /><b>*</b><?php echo esc_attr(mo_sl("Same page where user logged in"));?>
     134                            <span class="mo-openid-radio-checkmark"></span></label>
     135                    </td>
     136                </tr>
     137                <tr>
     138                    <td>
     139                        <label class="mo-openid-radio-container_disable">
     140                            <input type="radio" /><?php echo esc_attr(mo_sl("Homepage"));?>
     141                            <span class="mo-openid-radio-checkmark"></span></label>
     142                    </td>
     143
     144                    <td>
     145                        <span style="width:100%;border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span>
     146                    </td>
     147                </tr>
     148                <tr>
     149                    <td colspan="2">
     150                        <label class="mo-openid-radio-container_disable">
     151                            <input type="radio" /><?php echo esc_attr(mo_sl("Account dashboard"));?>
     152                            <span class="mo-openid-radio-checkmark"></span></label>
     153                    </td>
     154                </tr>
     155                <tr>
     156                    <td style="width: 30%">
     157                        <label class="mo-openid-radio-container_disable"><?php echo esc_attr(mo_sl("Custom URL"));?>
    158158                            <input type="radio" />
    159159                            <span class="mo-openid-radio-checkmark"></span></label>
     
    167167                    <td style="width: 30%">
    168168                        <label class="mo-openid-radio-container_disable">
    169                             <input type="radio" /><?php echo mo_sl("Relative URL");?>
     169                            <input type="radio" /><?php echo esc_attr(mo_sl("Relative URL"));?>
    170170                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    171171                            <span class="mo-openid-radio-checkmark"></span></label>
    172172                    </td>
    173173                    <td style="width: 60%">
    174                         <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo site_url();?></span>&nbsp;<input disabled type="text" id="registration_redirect_url" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%"/>
    175                     </td>
    176                 </tr>
    177                 <tr>
    178                     <td colspan="2"><br/><b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
     174                        <span style="border: 1px #0867b2 solid;padding: 4px 6px;background-color: #ddedf9;margin-right: -5px;"><?php echo esc_url(site_url());?></span>&nbsp;<input disabled type="text" id="registration_redirect_url" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 35%"/>
     175                    </td>
     176                </tr>
     177                <tr>
     178                    <td colspan="2"><br/><b><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
    179179                    </td>
    180180                </tr>
  • miniorange-login-openid/trunk/view/registration/mo_openid_registration.php

    r2648308 r2853010  
    11<?php
    2 function mo_openid_registration()
    3 {
    4     ?>
    5     <form id="registration" name="registration" method="post" action="">
    6         <input type="hidden" name="option" value="mo_openid_enable_registration" />
    7         <input type="hidden" name="mo_openid_enable_registration_nonce" value="<?php echo wp_create_nonce( 'mo-openid-enable-registration-nonce' ); ?>"/>
    8         <div class="mo_openid_table_layout">
    9             <h3><?php echo mo_sl('Auto Registration');?></h3>
    10             <div>
    11                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Auto-register users');?>.
    12                     <input style="font-size: 16px;" type="checkbox" id="auto_register_enable" name="mo_openid_auto_register_enable" value="1"
    13                         <?php checked( get_option('mo_openid_auto_register_enable') == 1 );?> /><b style="font-size: 15px;"></b>                    <span class="mo_openid_checkbox_checkmark"></span>
    14                 </label>
    15                 <?php echo mo_sl('Registration disabled message');?>:
    16                 <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%" id="auto_register_disabled_message" name="mo_openid_register_disabled_message" value="<?php echo esc_textarea(get_option('mo_openid_register_disabled_message'))?>" />
    17                 <label style="cursor: auto" class="mo_openid_note_style"><?php echo mo_sl('If Auto-register users is unchecked, users will not be able to register using Social Login. The users who already have an account will be able to login.  This setting stands true only when users are registering using Social Login. This will not interfere with users registering through the regular WordPress registration form.');?></label>
    18             </div>
    19             <br><hr>
    20             <h3><?php echo mo_sl('Role Mapping');?></h3>
    21             <div>
    22                 <?php echo mo_sl('Universal Role');?>:
    23                 <select name="mapping_value_default" style="margin-left: 2%; color: #000000;width:20%;font-size: 15px; background-color: #d4d7ee" id="default_group_mapping"> <?php
    24                     if(get_option('mo_openid_login_role_mapping'))
    25                         $default_role = get_option('mo_openid_login_role_mapping');
    26                     else
    27                         $default_role = get_option('default_role');
    28                     wp_dropdown_roles($default_role); ?>
    29                 </select>
    30                 <label style="cursor: auto" class="mo_openid_note_style"> <?php echo mo_sl('Use Role Mapping to assign this role to the all users registering through Social Login. According to the role mapped user will be granted role on the website.');?></label>
    31                 <label style="cursor: auto" class="mo_openid_note_style">If you want the user to select the role/profile please use our Custom Registration Form Add on.
    32                     <?php if (!is_plugin_active('miniorange-login-openid-extra-attributes-addon/miniorange_openid_sso_customization_addon.php')) {?>
    33                         <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo site_url().'/wp-admin/admin.php?page=mo_openid_settings_addOn&tab=licensing_plans'; ?>"><?php echo mo_sl('PRO');?></a>
    34                     <?php } ?>
    35                 </label>
    36             </div><br><hr>
    37             <h3><?php echo mo_sl('Enable Email Notification to Admin');?></h3>
    38             <div>
    39                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Enable Email Notification to Admin - on User Registration');?>
    40                     <input style="font-size: 16px;" type="checkbox" id="mo_openid_email_enable" name="mo_openid_email_enable" value="1"
    41                         <?php checked( get_option('mo_openid_email_enable') == 1 );?> /><b style="font-size: 15px;"></b><span class="mo_openid_checkbox_checkmark"></span>
    42                 </label>
    43                 <label style="cursor: auto" class="mo_openid_note_style"><?php echo mo_sl('This feature requires SMTP to be configured');?>.</label>
    44             </div>
    45             <br/><hr>
    46             <h3><?php echo mo_sl('Set Display Picture for User');?></h3>
    47             <div>
    48                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Set Display Picture for User - on User Registration');?>
    49                     <input style="font-size: 16px;" type="checkbox" id="moopenid_social_login_avatar" name="moopenid_social_login_avatar" value="1"
    50                         <?php checked( get_option('moopenid_social_login_avatar') == 1 );?> /><b style="font-size: 15px;"></b><span class="mo_openid_checkbox_checkmark"></span>
    51                 </label>
    52             </div>
    53             <br/><hr>
    54             <h3><?php echo mo_sl('Admin Disable bar');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h3>
    55             <div>
    56                 <input type="checkbox" disabled>Administrator &nbsp;&nbsp;&nbsp;
    57                 <input type="checkbox" disabled>Author &nbsp;&nbsp;&nbsp;
    58                 <input type="checkbox" disabled>Editor &nbsp;&nbsp;&nbsp;
    59                 <input type="checkbox" disabled>Contributor &nbsp;&nbsp;&nbsp;
    60                 <input type="checkbox" disabled>Subscriber &nbsp;&nbsp;&nbsp;
    61             </div>
    62             <label style="cursor: auto" class="mo_openid_note_style"><?php echo mo_sl('This feature disables admin bar form selected roles of the users');?>.</label>
     2function mo_openid_registration() {     ?>
     3    <form id="registration" name="registration" method="post" action="">
     4        <input type="hidden" name="option" value="mo_openid_enable_registration" />
     5        <input type="hidden" name="mo_openid_enable_registration_nonce" value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-enable-registration-nonce' ) ); ?>"/>
     6        <div class="mo_openid_table_layout">
     7            <h3><?php echo esc_attr( mo_sl( 'Auto Registration' ) ); ?></h3>
     8            <div>
     9                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Auto-register users' ) ); ?>.
     10                    <input style="font-size: 16px;" type="checkbox" id="auto_register_enable" name="mo_openid_auto_register_enable" value="1"
     11                        <?php checked( get_option( 'mo_openid_auto_register_enable' ) == 1 ); ?> /><b style="font-size: 15px;"></b>                    <span class="mo_openid_checkbox_checkmark"></span>
     12                </label>
     13                <?php echo esc_attr( mo_sl( 'Registration disabled message' ) ); ?>:
     14                <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 80%" id="auto_register_disabled_message" name="mo_openid_register_disabled_message" value="<?php echo esc_textarea( get_option( 'mo_openid_register_disabled_message' ) ); ?>" />
     15                <label style="cursor: auto" class="mo_openid_note_style"><?php echo esc_attr( mo_sl( 'If Auto-register users is unchecked, users will not be able to register using Social Login. The users who already have an account will be able to login.  This setting stands true only when users are registering using Social Login. This will not interfere with users registering through the regular WordPress registration form.' ) ); ?></label>
     16            </div>
     17            <br><hr>
     18            <h3><?php echo esc_attr( mo_sl( 'Role Mapping' ) ); ?></h3>
     19            <div>
     20                <?php echo esc_attr( mo_sl( 'Universal Role' ) ); ?>:
     21                <select name="mapping_value_default" style="margin-left: 2%; color: #000000;width:20%;font-size: 15px; background-color: #d4d7ee" id="default_group_mapping">
     22                <?php
     23                if ( get_option( 'mo_openid_login_role_mapping' ) ) {
     24                    $default_role = get_option( 'mo_openid_login_role_mapping' );
     25                } else {
     26                    $default_role = get_option( 'default_role' );
     27                }
     28                    wp_dropdown_roles( $default_role );
     29                ?>
     30                </select>
     31                <label style="cursor: auto" class="mo_openid_note_style"> <?php echo esc_attr( mo_sl( 'Use Role Mapping to assign this role to the all users registering through Social Login. According to the role mapped user will be granted role on the website.' ) ); ?></label>
     32                <label style="cursor: auto" class="mo_openid_note_style">If you want the user to select the role/profile please use our Custom Registration Form Add on.
     33                    <?php if ( ! is_plugin_active( 'miniorange-login-openid-extra-attributes-addon/miniorange_openid_sso_customization_addon.php' ) ) { ?>
     34                        <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_url( site_url() . '/wp-admin/admin.php?page=mo_openid_settings_addOn&tab=licensing_plans' ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     35                    <?php } ?>
     36                </label>
     37            </div><br><hr>
     38            <h3><?php echo esc_attr( mo_sl( 'Enable Email Notification to Admin' ) ); ?></h3>
     39            <div>
     40                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Enable Email Notification to Admin - on User Registration' ) ); ?>
     41                    <input style="font-size: 16px;" type="checkbox" id="mo_openid_email_enable" name="mo_openid_email_enable" value="1"
     42                        <?php checked( get_option( 'mo_openid_email_enable' ) == 1 ); ?> /><b style="font-size: 15px;"></b><span class="mo_openid_checkbox_checkmark"></span>
     43                </label>
     44                <label style="cursor: auto" class="mo_openid_note_style"><?php echo esc_attr( mo_sl( 'This feature requires SMTP to be configured' ) ); ?>.</label>
     45            </div>
     46            <br/><hr>
     47            <h3><?php echo esc_attr( mo_sl( 'Set Display Picture for User' ) ); ?></h3>
     48            <div>
     49                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Set Display Picture for User - on User Registration' ) ); ?>
     50                    <input style="font-size: 16px;" type="checkbox" id="moopenid_social_login_avatar" name="moopenid_social_login_avatar" value="1"
     51                        <?php checked( get_option( 'moopenid_social_login_avatar' ) == 1 ); ?> /><b style="font-size: 15px;"></b><span class="mo_openid_checkbox_checkmark"></span>
     52                </label>
     53            </div>
     54            <br/><hr>
     55            <h3><?php echo esc_attr( mo_sl( 'Admin Disable bar' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h3>
     56            <div>
     57                <input type="checkbox" disabled>Administrator &nbsp;&nbsp;&nbsp;
     58                <input type="checkbox" disabled>Author &nbsp;&nbsp;&nbsp;
     59                <input type="checkbox" disabled>Editor &nbsp;&nbsp;&nbsp;
     60                <input type="checkbox" disabled>Contributor &nbsp;&nbsp;&nbsp;
     61                <input type="checkbox" disabled>Subscriber &nbsp;&nbsp;&nbsp;
     62            </div>
     63            <label style="cursor: auto" class="mo_openid_note_style"><?php echo esc_attr( mo_sl( 'This feature disables admin bar form selected roles of the users' ) ); ?>.</label>
    6364
    64             <br/><hr>
    65             <h3><?php echo mo_sl('Send user activation link over email');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h3>
    66             <div>
    67                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Send user activation link over email - on User Registration');?>
    68                     <input type="checkbox"  /><br>
    69                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    70                 </label>
    71                 <?php
    72                 $editor_height = array("editor_height"=>100);
    73                 $content = 'Please click on link to activate your account  ##link##';
    74                 $editor_id = 'mo_openid_registration_email_content';
    75                 wp_editor( $content, $editor_id,$editor_height);
    76                 ?>
     65            <br/><hr>
     66            <h3><?php echo esc_attr( mo_sl( 'Send user activation link over email' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h3>
     67            <div>
     68                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Send user activation link over email - on User Registration' ) ); ?>
     69                    <input type="checkbox"  /><br>
     70                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     71                </label>
     72                <?php
     73                $editor_height = array( 'editor_height' => 100 );
     74                $content      = 'Please click on link to activate your account  ##link##';
     75                $editor_id    = 'mo_openid_registration_email_content';
     76                wp_editor( $content, $editor_id, $editor_height );
     77                ?>
    7778
    78             </div>
     79            </div>
    7980
    8081
    81             <br/><hr>
    82             <h3><?php echo mo_sl('Enable Registration For Pages');?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h3>
    83             <div>
    84                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Enable registration for specific pages');?>
    85                     <input type="checkbox"  /><br>
    86                     <span class="mo_openid_checkbox_checkmark_disable"></span>
    87                     <br/>
    88                     <label style="cursor: auto"><?php echo mo_sl('Enter Page URLs to Enable Registration:');?></label>
    89                     <textarea rows="4" cols="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%" disabled placeholder="Please enter URLs seperated by semicolon(;)"/></textarea>
    90                     <br/><label style="cursor: auto"><?php echo mo_sl('Enter Page URL to Redeirect if user is not allowed to register:');?></label>
    91                     <textarea rows="4" cols="50" class="mo_openid_textfield_css" disabled style="border: 1px solid ;border-color: #0867b2;width: 100%"/></textarea>
    92                 </label>
     82            <br/><hr>
     83            <h3><?php echo esc_attr( mo_sl( 'Enable Registration For Pages' ) ); ?><a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h3>
     84            <div>
     85                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Enable registration for specific pages' ) ); ?>
     86                    <input type="checkbox"  /><br>
     87                    <span class="mo_openid_checkbox_checkmark_disable"></span>
     88                    <br/>
     89                    <label style="cursor: auto"><?php echo esc_attr( mo_sl( 'Enter Page URLs to Enable Registration:' ) ); ?></label>
     90                    <textarea rows="4" cols="50" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 100%" disabled placeholder="Please enter URLs seperated by semicolon(;)"/></textarea>
     91                    <br/><label style="cursor: auto"><?php echo esc_attr( mo_sl( 'Enter Page URL to Redeirect if user is not allowed to register:' ) ); ?></label>
     92                    <textarea rows="4" cols="50" class="mo_openid_textfield_css" disabled style="border: 1px solid ;border-color: #0867b2;width: 100%"/></textarea>
     93                </label>
    9394
    94             </div>
    95             <br/><b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
    96         </div>
    97     </form>
     95            </div>
     96            <br/><b><input type="submit" name="submit" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
     97        </div>
     98    </form>
    9899
    99     <?php
     100    <?php
    100101}
  • miniorange-login-openid/trunk/view/reports/mo_openid_reports.php

    r2500378 r2853010  
    111111        <br><br>
    112112
    113         <img style="display: block; margin-left: auto; margin-right: auto;" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/usage_share_reports.png" alt="usage share"/>
     113        <img style="display: block; margin-left: auto; margin-right: auto;" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/usage_share_reports.png" alt="usage share"/>
    114114        <br><br>
    115115
     
    166166    <br><br>
    167167
    168     <img style="display: block; margin-left: auto; margin-right: auto;" src="<?php echo plugin_dir_url(dirname(dirname(__FILE__)));?>includes/images/most_visited_reports.png" alt="usage share"/>
     168    <img style="display: block; margin-left: auto; margin-right: auto;" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))));?>includes/images/most_visited_reports.png" alt="usage share"/>
    169169
    170170    <br><br>
  • miniorange-login-openid/trunk/view/rest_api/mo_rest_api_page.php

    r2560192 r2853010  
    77    <br>
    88    <center>
    9     <img src="<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/rest_api8.jpg" style="width: 60%;">
     9    <img src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/rest_api8.jpg" style="width: 60%;">
    1010    </center>
    1111    <br>
     
    2020    <br>
    2121    <center>
    22         <img style="width: 70%" src="<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/rest_api5.gif">
     22        <img style="width: 70%" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/rest_api5.gif">
    2323    </center>
    2424<br>
     
    3131         </ol>
    3232    <center>
    33         <img style="width: 40%" src="<?php echo plugin_dir_url(dirname(__DIR__));?>includes/images/rest_api_image.png">
     33        <img style="width: 40%" src="<?php echo esc_url(plugin_dir_url(dirname(__DIR__)));?>includes/images/rest_api_image.png">
    3434    </center>
    3535    <br>
  • miniorange-login-openid/trunk/view/shrtco/mo_openid_shrtco.php

    r2769271 r2853010  
    77                <td>
    88                    <div id="mo_openid_login_shortcode" style="font-size:13px !important">
    9                         <h4><?php echo mo_sl("Use social login Shortcode in the content of required page/post where you want to display Social Login Icons.");?></h4>
    10                         <h3><?php echo mo_sl("Default Social Login Shortcode");?></h3>
    11                         <?php echo mo_sl("This will display Social Login Icons with same default settings");?><br/>
     9                        <h4><?php echo esc_attr(mo_sl("Use social login Shortcode in the content of required page/post where you want to display Social Login Icons."));?></h4>
     10                        <h3><?php echo esc_attr(mo_sl("Default Social Login Shortcode"));?></h3>
     11                        <?php echo esc_attr(mo_sl("This will display Social Login Icons with same default settings"));?><br/>
    1212                        <code id='1'>[miniorange_social_login]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#1', '#shortcode_url_copy')"><span id="shortcode_url_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><hr>
    1313
    14                         <h3><?php echo mo_sl("For Icons");?></h3>
    15                         <?php echo mo_sl("You can use  different attribute to customize social login icons. All attributes are optional except view.");?><br/><br/>
    16                         <b><?php echo mo_sl("Square Shape Example");?>:</b> <code id='2'>[miniorange_social_login shape="square" theme="default" space="4" size="35"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#2', '#shortcode_url1_copy')"><span id="shortcode_url1_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
     14                        <h3><?php echo esc_attr(mo_sl("For Icons"));?></h3>
     15                        <?php echo esc_attr(mo_sl("You can use  different attribute to customize social login icons. All attributes are optional except view."));?><br/><br/>
     16                        <b><?php echo esc_attr(mo_sl("Square Shape Example"));?>:</b> <code id='2'>[miniorange_social_login shape="square" theme="default" space="4" size="35"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#2', '#shortcode_url1_copy')"><span id="shortcode_url1_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    1717                        <a class=" login-button" rel="nofollow" title=" Login with Facebook"><i class="fab fa-facebook login-button square" style="width:35px !important;height: 30px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #1877F2;color: #FFFFFF;padding-top: 8px;"></i></a>
    1818                        <a class=" login-button" rel="nofollow" title=" Login with Google"><i class="fab fa-google login-button square" style="width:35px !important;height: 30px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #DB4437;color: #FFFFFF;padding-top: 8px;"></i></a>
     
    2121                        <a class=" login-button" rel="nofollow" title=" Login with instagram"><i class="fab fa-instagram login-button square" style="width:35px !important;height: 30px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #3f729b;color: #FFFFFF;padding-top: 8px;"></i></a><br/><br/>
    2222
    23                         <b><?php echo mo_sl("Round Shape Example");?>:</b> <code id='3'>[miniorange_social_login shape="round" theme="default" space="4" size="35"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#3', '#shortcode_url2_copy')"><span id="shortcode_url2_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
     23                        <b><?php echo esc_attr(mo_sl("Round Shape Example"));?>:</b> <code id='3'>[miniorange_social_login shape="round" theme="default" space="4" size="35"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#3', '#shortcode_url2_copy')"><span id="shortcode_url2_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    2424                        <a class=" login-button" rel="nofollow" title=" Login with Facebook"><i class="fab fa-facebook login-button round" style="width:35px !important;height: 28px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #1877F2;color: #FFFFFF;padding-top: 6px;"></i></a>
    2525                        <a class=" login-button" rel="nofollow" title=" Login with Google"><i class="fab fa-google login-button round" style="width:35px !important;height: 28px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #DB4437;color: #FFFFFF;padding-top: 6px;"></i></a>
     
    2828                        <a class=" login-button" rel="nofollow" title=" Login with instagram"><i class="fab fa-instagram login-button round" style="width:35px !important;height: 28px !important;margin-left: 4px !important;font-size: 1.8em;text-align: center;background: #3f729b;color: #FFFFFF;padding-top: 6px;"></i></a><br/><br/>
    2929                        <hr>
    30                         <h3><?php echo mo_sl("For Long-Buttons");?></h3>
    31                         <?php echo mo_sl("You can use different attribute to customize social login buttons. All attributes are optional");?>.<br/><br/>
    32                         <b><?php echo mo_sl('Vertical View Example');?>:<br/></b><code id='4'>[miniorange_social_login shape="longbuttonwithtext" theme="default" space="8" width="180" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#4', '#shortcode_url3_copy')"><span id="shortcode_url3_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
     30                        <h3><?php echo esc_attr(mo_sl("For Long-Buttons"));?></h3>
     31                        <?php echo esc_attr(mo_sl("You can use different attribute to customize social login buttons. All attributes are optional"));?>.<br/><br/>
     32                        <b><?php echo esc_attr(mo_sl('Vertical View Example'));?>:<br/></b><code id='4'>[miniorange_social_login shape="longbuttonwithtext" theme="default" space="8" width="180" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#4', '#shortcode_url3_copy')"><span id="shortcode_url3_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    3333                        <a rel="nofollow" style="margin-left: 8px !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 3px !important;border-radius: 4px !important;" class="mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-facebook mo_btn-custom-dec login-button"> <svg xmlns="http://www.w3.org/2000/svg" style="padding-top:5px;border-right:none;margin-left: 2%;"><path fill="#fff" d="M22.688 0H1.323C.589 0 0 .589 0 1.322v21.356C0 23.41.59 24 1.323 24h11.505v-9.289H9.693V11.09h3.124V8.422c0-3.1 1.89-4.789 4.658-4.789 1.322 0 2.467.1 2.8.145v3.244h-1.922c-1.5 0-1.801.711-1.801 1.767V11.1h3.59l-.466 3.622h-3.113V24h6.114c.734 0 1.323-.589 1.323-1.322V1.322A1.302 1.302 0 0 0 22.688 0z"></path></svg>Login with Facebook</a>
    3434                        <a rel="nofollow" style="margin-left: 8px !important;background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 38px, rgb(79, 113, 232) 5%) !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 3px !important;border-radius: 4px !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;" class="mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-google mo_btn-custom-dec login-button"> <i style="padding-top:6px !important;border-right:none;" class="fa"><svg xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#4285F4" fill-rule="nonzero" d="M20.64 12.2045c0-.6381-.0573-1.2518-.1636-1.8409H12v3.4814h4.8436c-.2086 1.125-.8427 2.0782-1.7959 2.7164v2.2581h2.9087c1.7018-1.5668 2.6836-3.874 2.6836-6.615z"></path><path fill="#34A853" fill-rule="nonzero" d="M12 21c2.43 0 4.4673-.806 5.9564-2.1805l-2.9087-2.2581c-.8059.54-1.8368.859-3.0477.859-2.344 0-4.3282-1.5831-5.036-3.7104H3.9574v2.3318C5.4382 18.9832 8.4818 21 12 21z"></path><path fill="#FBBC05" fill-rule="nonzero" d="M6.964 13.71c-.18-.54-.2822-1.1168-.2822-1.71s.1023-1.17.2823-1.71V7.9582H3.9573A8.9965 8.9965 0 0 0 3 12c0 1.4523.3477 2.8268.9573 4.0418L6.964 13.71z"></path><path fill="#EA4335" fill-rule="nonzero" d="M12 6.5795c1.3214 0 2.5077.4541 3.4405 1.346l2.5813-2.5814C16.4632 3.8918 14.426 3 12 3 8.4818 3 5.4382 5.0168 3.9573 7.9582L6.964 10.29C7.6718 8.1627 9.6559 6.5795 12 6.5795z"></path><path d="M3 3h18v18H3z"></path></g></svg></i><span style="color:#ffffff;">Login with Google</span></a>
    3535                        <a rel="nofollow" style="margin-left: 8px !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 3px !important;border-radius: 4px !important;" class="mo_btn mo_btn-mo mo_btn-block mo_btn-social mo_btn-vk mo_btn-custom-dec login-button"> <i style="padding-top:0px !important" class="fab fa-vk"></i>Login with Vkontakte</a><br/>
    3636
    37                         <b><?php echo mo_sl('Horizontal View Example');?>:</b><code id='5'>[miniorange_social_login shape="longbuttonwithtext" view="horizontal" appcnt="3" theme="default" space="35" width="180" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#5', '#shortcode_url4_copy')"><span id="shortcode_url4_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
     37                        <b><?php echo esc_attr(mo_sl('Horizontal View Example'));?>:</b><code id='5'>[miniorange_social_login shape="longbuttonwithtext" view="horizontal" appcnt="3" theme="default" space="35" width="180" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#5', '#shortcode_url4_copy')"><span id="shortcode_url4_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    3838                        <a rel="nofollow" style="margin-left: 35px !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 30px !important;border-radius: 4px !important;" class="mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-facebook mo_btn-custom-dec login-button"> <svg xmlns="http://www.w3.org/2000/svg" style="padding-top:5px;border-right:none;margin-left: 2%;"><path fill="#fff" d="M22.688 0H1.323C.589 0 0 .589 0 1.322v21.356C0 23.41.59 24 1.323 24h11.505v-9.289H9.693V11.09h3.124V8.422c0-3.1 1.89-4.789 4.658-4.789 1.322 0 2.467.1 2.8.145v3.244h-1.922c-1.5 0-1.801.711-1.801 1.767V11.1h3.59l-.466 3.622h-3.113V24h6.114c.734 0 1.323-.589 1.323-1.322V1.322A1.302 1.302 0 0 0 22.688 0z"></path></svg>Login with Facebook</a>
    3939                        <a rel="nofollow" style="margin-left: 35px !important;background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 38px, rgb(79, 113, 232) 5%) !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 30px !important;border-radius: 4px !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;" class="mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-google mo_btn-custom-dec login-button"> <i style="padding-top:6px !important;border-right:none;" class="fa"><svg xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#4285F4" fill-rule="nonzero" d="M20.64 12.2045c0-.6381-.0573-1.2518-.1636-1.8409H12v3.4814h4.8436c-.2086 1.125-.8427 2.0782-1.7959 2.7164v2.2581h2.9087c1.7018-1.5668 2.6836-3.874 2.6836-6.615z"></path><path fill="#34A853" fill-rule="nonzero" d="M12 21c2.43 0 4.4673-.806 5.9564-2.1805l-2.9087-2.2581c-.8059.54-1.8368.859-3.0477.859-2.344 0-4.3282-1.5831-5.036-3.7104H3.9574v2.3318C5.4382 18.9832 8.4818 21 12 21z"></path><path fill="#FBBC05" fill-rule="nonzero" d="M6.964 13.71c-.18-.54-.2822-1.1168-.2822-1.71s.1023-1.17.2823-1.71V7.9582H3.9573A8.9965 8.9965 0 0 0 3 12c0 1.4523.3477 2.8268.9573 4.0418L6.964 13.71z"></path><path fill="#EA4335" fill-rule="nonzero" d="M12 6.5795c1.3214 0 2.5077.4541 3.4405 1.346l2.5813-2.5814C16.4632 3.8918 14.426 3 12 3 8.4818 3 5.4382 5.0168 3.9573 7.9582L6.964 10.29C7.6718 8.1627 9.6559 6.5795 12 6.5795z"></path><path d="M3 3h18v18H3z"></path></g></svg></i><span style="color:#ffffff;">Login with Google</span></a>
    4040                        <a rel="nofollow" style="margin-left: 35px !important;width: 180px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 30px !important;border-radius: 4px !important;" class="mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-vk mo_btn-custom-dec login-button"> <i style="padding-top:0px !important" class="fab fa-vk"></i>Login with Vkontakte</a><br/>
    41                         <b><?php echo mo_sl('Note:');?></b> <?php echo mo_sl('By default Long-Button view is');?> <b><?php echo mo_sl('Vertical');?></b><hr>
    42 
    43                         <h3><?php echo mo_sl('For Selected Applications');?></h3>
    44                        <?php echo mo_sl('If you want to show selected applications without setting up default settings then use this shortcode. You can use different attribute to customize social login buttons. All attributes are optional');?>.<br/><br/>
    45                         <b><?php echo mo_sl('Example');?>:</b><code id='6'>[miniorange_social_login apps="vk,google,fb" shape="longbuttonwithtext" view="horizontal" theme="default" space="10" width="200" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#6', '#shortcode_url5_copy')"><span id="shortcode_url5_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
     41                        <b><?php echo esc_attr(mo_sl('Note:'));?></b> <?php echo esc_attr(mo_sl('By default Long-Button view is'));?> <b><?php echo esc_attr(mo_sl('Vertical'));?></b><hr>
     42
     43                        <h3><?php echo esc_attr(mo_sl('For Selected Applications'));?></h3>
     44                       <?php echo esc_attr(mo_sl('If you want to show selected applications without setting up default settings then use this shortcode. You can use different attribute to customize social login buttons. All attributes are optional'));?>.<br/><br/>
     45                        <b><?php echo esc_attr(mo_sl('Example'));?>:</b><code id='6'>[miniorange_social_login apps="vk,google,fb" shape="longbuttonwithtext" view="horizontal" theme="default" space="10" width="200" height="35" color="000000"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#6', '#shortcode_url5_copy')"><span id="shortcode_url5_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    4646                        <a rel="nofollow" style="margin-left: 10px !important;width: 200px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 5px !important;border-radius: 4px !important;" class="mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-vk mo_btn-custom-dec login-button"> <i style="padding-top:0px !important" class="fab fa-vk"></i>Login with Vkontakte</a>
    4747                        <a rel="nofollow" style="margin-left: 10px !important;background: rgb(255,255,255)!important; background:linear-gradient(90deg, rgba(255,255,255,1) 38px, rgb(79, 113, 232) 5%) !important;width: 200px !important;padding-top:6px !important;padding-bottom:6px !important;margin-bottom: 5px !important;border-radius: 4px !important;border-color: rgba(79, 113, 232, 1);border-bottom-width: thin;" class="mo_btn mo_btn-mo mo_btn-block-inline mo_btn-social mo_btn-google mo_btn-custom-dec login-button"> <i style="padding-top:6px !important;border-right:none;" class="fa"><svg xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#4285F4" fill-rule="nonzero" d="M20.64 12.2045c0-.6381-.0573-1.2518-.1636-1.8409H12v3.4814h4.8436c-.2086 1.125-.8427 2.0782-1.7959 2.7164v2.2581h2.9087c1.7018-1.5668 2.6836-3.874 2.6836-6.615z"></path><path fill="#34A853" fill-rule="nonzero" d="M12 21c2.43 0 4.4673-.806 5.9564-2.1805l-2.9087-2.2581c-.8059.54-1.8368.859-3.0477.859-2.344 0-4.3282-1.5831-5.036-3.7104H3.9574v2.3318C5.4382 18.9832 8.4818 21 12 21z"></path><path fill="#FBBC05" fill-rule="nonzero" d="M6.964 13.71c-.18-.54-.2822-1.1168-.2822-1.71s.1023-1.17.2823-1.71V7.9582H3.9573A8.9965 8.9965 0 0 0 3 12c0 1.4523.3477 2.8268.9573 4.0418L6.964 13.71z"></path><path fill="#EA4335" fill-rule="nonzero" d="M12 6.5795c1.3214 0 2.5077.4541 3.4405 1.346l2.5813-2.5814C16.4632 3.8918 14.426 3 12 3 8.4818 3 5.4382 5.0168 3.9573 7.9582L6.964 10.29C7.6718 8.1627 9.6559 6.5795 12 6.5795z"></path><path d="M3 3h18v18H3z"></path></g></svg></i><span style="color:#ffffff;">Login with Google</span></a>
     
    9696                                            <td >sforce</td>
    9797                                        </tr>
    98                                        
     98                                        <tr>
     99                                            <td ><b>Windows Live</b></td>
     100                                            <td >wlive</td>
     101                                        </tr>
    99102                                        <tr>
    100103                                            <td ><b>Yahoo</b></td>
     
    105108                        </table><br/>
    106109                        <div class="mo_openid_note_style">
    107                                 <b><?php echo mo_sl('Note');?>:</b>
    108                                 <?php echo mo_sl('1. If you are not registered with miniOrange and ');?><b><?php echo mo_sl('Custom App');?></b><?php echo mo_sl( 'is also not set up then please register with us first or set up');?> <b><?php echo mo_sl('Custom App');?></b> <?php echo mo_sl('otherwise the buttons will be');?> <b><?php echo mo_sl('disabled');?></b><br/>
    109                                 <?php echo mo_sl('2. If Facebook is selected then please set up ');?><b><?php echo mo_sl('Custom App');?></b> <?php echo mo_sl('first otherwise the buttons will be ');?><b><?php echo mo_sl('disabled');?></b>
     110                                <b><?php echo esc_attr(mo_sl('Note'));?>:</b>
     111                                <?php echo esc_attr(mo_sl('1. If you are not registered with miniOrange and '));?><b><?php echo esc_attr(mo_sl('Custom App'));?></b><?php echo esc_attr(mo_sl( 'is also not set up then please register with us first or set up'));?> <b><?php echo esc_attr(mo_sl('Custom App'));?></b> <?php echo esc_attr(mo_sl('otherwise the buttons will be'));?> <b><?php echo esc_attr(mo_sl('disabled'));?></b><br/>
     112                                <?php echo esc_attr(mo_sl('2. If Facebook is selected then please set up '));?><b><?php echo esc_attr(mo_sl('Custom App'));?></b> <?php echo esc_attr(mo_sl('first otherwise the buttons will be '));?><b><?php echo esc_attr(mo_sl('disabled'));?></b>
    110113                                <br/>
    111114                        </div><br>
     
    118121                        <table style="margin-left: 8%" id="mo_shortcode_table">
    119122                            <tr>
    120                                 <th colspan="2" style="align-content: center"><?php echo mo_sl('Available values for attributes');?></th>
    121                             </tr>
    122 
    123                             <tr>
    124                                 <td><b><?php echo mo_sl('view');?></b></td>
    125                                 <td><?php echo mo_sl('horizontal, vertical');?></td>
    126 
    127                             </tr>
    128                             <tr>
    129                                 <td><b><?php echo mo_sl('shape');?></b></td>
    130                                 <td><?php echo mo_sl('round, roundededges, square, longbuttonwithtext');?></td>
    131 
    132                             </tr>
    133                             <tr>
    134                                 <td><b><?php echo mo_sl('theme');?></b></td>
    135                                 <td><?php echo mo_sl('default, custombackground');?></td>
    136 
    137                             </tr>
    138                             <tr>
    139                                 <td><b><?php echo mo_sl('size');?></b></td>
    140                                 <td><?php echo mo_sl('Any value between 20 to 100');?></td>
    141 
    142                             </tr>
    143                             <tr>
    144                                 <td><b><?php echo mo_sl('space');?></b></td>
    145                                 <td><?php echo mo_sl("Any value between 0 to 100");?></td>
    146 
    147                             </tr>
    148                             <tr>
    149                                 <td><b><?php echo mo_sl('width');?></b></td>
    150                                 <td><?php echo mo_sl('Any value between 200 to 1000');?></td>
    151 
    152                             </tr>
    153                             <tr>
    154                                 <td><b><?php echo mo_sl('height');?></b></td>
    155                                 <td><?php echo mo_sl('Any value between 35 to 50');?></td>
    156 
    157                             </tr>
    158                             <tr>
    159                                 <td><b><?php echo mo_sl('color');?></b></td>
    160                                 <td><?php echo mo_sl('Enter color code for example');?>, FFFFFF</td>
    161 
    162                             </tr>
    163                             <tr>
    164                                 <td><b><?php echo mo_sl('heading');?></b></td>
    165                                 <td><?php echo mo_sl('Enter custom heading');?></td>
    166 
    167                             </tr>
    168                             <tr>
    169                                 <td><b><?php echo mo_sl('appcnt');?></b></td>
    170                                 <td><?php echo mo_sl('Any value for number of icons in one row');?></td>
     123                                <th colspan="2" style="align-content: center"><?php echo esc_attr(mo_sl('Available values for attributes'));?></th>
     124                            </tr>
     125
     126                            <tr>
     127                                <td><b><?php echo esc_attr(mo_sl('view'));?></b></td>
     128                                <td><?php echo esc_attr(mo_sl('horizontal, vertical'));?></td>
     129
     130                            </tr>
     131                            <tr>
     132                                <td><b><?php echo esc_attr(mo_sl('shape'));?></b></td>
     133                                <td><?php echo esc_attr(mo_sl('round, roundededges, square, longbuttonwithtext'));?></td>
     134
     135                            </tr>
     136                            <tr>
     137                                <td><b><?php echo esc_attr(mo_sl('theme'));?></b></td>
     138                                <td><?php echo esc_attr(mo_sl('default, custombackground'));?></td>
     139
     140                            </tr>
     141                            <tr>
     142                                <td><b><?php echo esc_attr(mo_sl('size'));?></b></td>
     143                                <td><?php echo esc_attr(mo_sl('Any value between 20 to 100'));?></td>
     144
     145                            </tr>
     146                            <tr>
     147                                <td><b><?php echo esc_attr(mo_sl('space'));?></b></td>
     148                                <td><?php echo esc_attr(mo_sl("Any value between 0 to 100"));?></td>
     149
     150                            </tr>
     151                            <tr>
     152                                <td><b><?php echo esc_attr(mo_sl('width'));?></b></td>
     153                                <td><?php echo esc_attr(mo_sl('Any value between 200 to 1000'));?></td>
     154
     155                            </tr>
     156                            <tr>
     157                                <td><b><?php echo esc_attr(mo_sl('height'));?></b></td>
     158                                <td><?php echo esc_attr(mo_sl('Any value between 35 to 50'));?></td>
     159
     160                            </tr>
     161                            <tr>
     162                                <td><b><?php echo esc_attr(mo_sl('color'));?></b></td>
     163                                <td><?php echo esc_attr(mo_sl('Enter color code for example'));?>, FFFFFF</td>
     164
     165                            </tr>
     166                            <tr>
     167                                <td><b><?php echo esc_attr(mo_sl('heading'));?></b></td>
     168                                <td><?php echo esc_attr(mo_sl('Enter custom heading'));?></td>
     169
     170                            </tr>
     171                            <tr>
     172                                <td><b><?php echo esc_attr(mo_sl('appcnt'));?></b></td>
     173                                <td><?php echo esc_attr(mo_sl('Any value for number of icons in one row'));?></td>
    171174
    172175                            </tr>
     
    176179                    </div>
    177180                    <br/><hr><br/>
    178                     <h3><?php echo mo_sl("Shortcode in php file");?></h3>
    179                     <?php echo mo_sl("You can use shortcode in PHP file as following: ");?>
    180                     <code>&lt;&#63;php echo apply_shortcodes('SHORTCODE') /&#63;&gt;</code><br/><br/>
    181                     <?php echo mo_sl('Replace SHORTCODE in above code with the required shortcode like <code>[miniorange_social_login theme="default"]</code>, so the final code looks like following :');?><br/><br/>
     181                    <h3><?php echo esc_attr(mo_sl("Shortcode in php file"));?></h3>
     182                    <?php echo esc_attr(mo_sl("You can use shortcode in PHP file as following: "));?>
     183                    <code>&lt;&#63;<?php echo esc_attr(apply_shortcodes('SHORTCODE'))?> /&#63;&gt;</code><br/><br/>
     184                    <?php echo esc_attr(mo_sl('Replace SHORTCODE in above code with the required shortcode like <code>[miniorange_social_login theme="default"]</code>, so the final code looks like following :'));?><br/><br/>
    182185                    <code id='7'>&lt;&#63;php echo apply_shortcodes('[miniorange_social_login theme="default"]') &#63;&gt;</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#7', '#shortcode_url33_copy')"><span id="shortcode_url33_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    183186                    <br/><hr><br/>
    184                     <h3><?php echo mo_sl("Shortcode for logout");?></h3>
    185                     <?php echo mo_sl("You can use the following shortcode for Logout: ");?>
     187                    <h3><?php echo esc_attr(mo_sl("Shortcode for logout"));?></h3>
     188                    <?php echo esc_attr(mo_sl("You can use the following shortcode for Logout: "));?>
    186189                    <code id='8'>[miniorange_social_login_logout]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#8', '#shortcode_url34_copy')"><span id="shortcode_url34_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
    187190                </td>
  • miniorange-login-openid/trunk/view/soc_com/com_Cust/mo_openid_comm_cust.php

    r2273370 r2853010  
    66            <input type="hidden" name="option" value="mo_openid_comment_labels" />
    77            <input type="hidden" name="mo_openid_enable_comment_labels_nonce"
    8                    value="<?php echo wp_create_nonce( 'mo-openid-enable-comment-labels-nonce' ); ?>"/>
     8                   value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-comment-labels-nonce' )); ?>"/>
    99            <br/><table class="mo_openid_display_table" style="width: 70%">
    1010                <tr>
    11                     <td><b><?php echo mo_sl('Comment Section Heading');?>:</b></td>
     11                    <td><b><?php echo esc_attr(mo_sl('Comment Section Heading'));?>:</b></td>
    1212                    <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 70%" type="text" name="mo_openid_social_comment_heading_label"  value="<?php echo esc_attr(get_option('mo_openid_social_comment_heading_label')); ?>" /></td>
    1313                </tr>
    1414                <tr>
    15                     <td><b><?php echo mo_sl('Comments - Default Label');?>:</b></td>
     15                    <td><b><?php echo esc_attr(mo_sl('Comments - Default Label'));?>:</b></td>
    1616                    <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 70%" type="text" name="mo_openid_social_comment_default_label"  value="<?php echo esc_attr(get_option('mo_openid_social_comment_default_label')); ?>" /></td>
    1717                </tr>
    1818                <tr>
    19                     <td><b><?php echo mo_sl('Comments - Facebook Label');?>:</b></td>
     19                    <td><b><?php echo esc_attr(mo_sl('Comments - Facebook Label'));?>:</b></td>
    2020                    <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 70%" type="text" name="mo_openid_social_comment_fb_label"  value="<?php echo esc_attr(get_option('mo_openid_social_comment_fb_label')); ?>" /></td>
    2121                </tr>
    2222                <tr>
    23                     <td><b><?php echo mo_sl('Comments - Disqus Label');?>:</b></td>
     23                    <td><b><?php echo esc_attr(mo_sl('Comments - Disqus Label'));?>:</b></td>
    2424                    <td><input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 70%" type="text" name="mo_openid_social_comment_disqus_label"  value="<?php echo esc_attr(get_option('mo_openid_social_comment_disqus_label')); ?>" /></td>
    2525                </tr>
    2626                <tr>
    27                     <td colspan="2"><br /><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:100px;"  class="button button-primary button-large" />
     27                    <td colspan="2"><br /><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:100px;"  class="button button-primary button-large" />
    2828                    </td>
    2929                </tr>
     
    3232    </div>
    3333    <script>
    34         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Customize Text For Social Comment Labels');?>');
     34        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Customize Text For Social Comment Labels'));?>');
    3535    </script>
    3636<?php  }
  • miniorange-login-openid/trunk/view/soc_com/com_Enable/mo_openid_comm_enable.php

    r2236209 r2853010  
    77                <td colspan="2">
    88                    <p>
    9                         <h3><?php echo mo_sl('Enable Social Comments');?></h3>
    10                         <?php echo mo_sl('To enable Social Comments, please select Facebook Comments from');?> <strong><?php echo mo_sl('Select Applications');?></strong>.<?php echo mo_sl(' Also select one or both of the options from');?> <strong><?php echo mo_sl('Display Options');?></strong>.
    11                         <h3><?php echo mo_sl('Add Social Comments');?></h3>
    12                         <?php echo mo_sl('You can add social comments in the following areas from ');?><strong><?php echo mo_sl('Display Options');?></strong>. <?php echo mo_sl('If you require a shortcode, please contact us from the Support form on the right.');?>
     9                        <h3><?php echo esc_attr(mo_sl('Enable Social Comments'));?></h3>
     10                        <?php echo esc_attr(mo_sl('To enable Social Comments, please select Facebook Comments from'));?> <strong><?php echo esc_attr(mo_sl('Select Applications'));?></strong>.<?php echo esc_attr(mo_sl(' Also select one or both of the options from'));?> <strong><?php echo esc_attr(mo_sl('Display Options'));?></strong>.
     11                        <h3><?php echo esc_attr(mo_sl('Add Social Comments'));?></h3>
     12                        <?php echo esc_attr(mo_sl('You can add social comments in the following areas from '));?><strong><?php echo esc_attr(mo_sl('Display Options'));?></strong>. <?php echo esc_attr(mo_sl('If you require a shortcode, please contact us from the Support form on the right.'));?>
    1313                        <ol>
    14                             <li><?php echo mo_sl('Blog Post: This option enables Social Comments on Posts / Blog Post');?>.</li>
    15                             <li><?php echo mo_sl('Static pages: This option places Social Comments on Pages / Static Pages with comments enabled');?>.</li>
     14                            <li><?php echo esc_attr(mo_sl('Blog Post: This option enables Social Comments on Posts / Blog Post'));?>.</li>
     15                            <li><?php echo esc_attr(mo_sl('Static pages: This option places Social Comments on Pages / Static Pages with comments enabled'));?>.</li>
    1616                        </ol>
    1717                    </p>
     
    2121    </div>
    2222    <script>
    23         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Enable Social Comments');?> ');
     23        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Enable Social Comments'));?> ');
    2424    </script>
    2525<?php
  • miniorange-login-openid/trunk/view/soc_com/com_display_options/mo_openid_comm_disp_opt.php

    r2236209 r2853010  
    77            <input type="hidden" name="option" value="mo_openid_comment_display" />
    88            <input type="hidden" name="mo_openid_enable_comment_display_nonce"
    9                    value="<?php echo wp_create_nonce( 'mo-openid-enable-comment-display-nonce' ); ?>"/>
     9                   value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-comment-display-nonce' )); ?>"/>
    1010            <br/>
    1111            <table id="disp_opt" class="mo_openid_display_table">
    1212                <tr>
    1313                    <td>
    14                         <?php echo mo_sl('Select the options where you want to add social comments');?>.
     14                        <?php echo esc_attr(mo_sl('Select the options where you want to add social comments'));?>.
    1515                    </td>
    1616                </tr>
     
    1818                <tr>
    1919                    <td>
    20                         <label class="mo_openid_checkbox_container"> <b><?php echo mo_sl('Blog Post');?></b>
     20                        <label class="mo_openid_checkbox_container"> <b><?php echo esc_attr(mo_sl('Blog Post'));?></b>
    2121                            <input type="checkbox" id="mo_openid_social_comment_blogpost" name="mo_openid_social_comment_blogpost" value="1"  <?php checked( get_option('mo_openid_social_comment_blogpost') == 1 );?> />
    2222                            <span class="mo_openid_checkbox_checkmark"></span>
     
    2626                <tr>
    2727                    <td>
    28                         <label class="mo_openid_checkbox_container"> <b><?php echo mo_sl('Static Pages');?></b>
     28                        <label class="mo_openid_checkbox_container"> <b><?php echo esc_attr(mo_sl('Static Pages'));?></b>
    2929                            <input type="checkbox" id="mo_openid_social_comment_static" name="mo_openid_social_comment_static" value="1"  <?php checked( get_option('mo_openid_social_comment_static') == 1 );?> />
    3030                            <span class="mo_openid_checkbox_checkmark"></span>
     
    3434            </table>
    3535            <div><br/>
    36                 <input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" />
     36                <input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" />
    3737            </div>
    3838        </form>
    3939    </div>
    4040    <script>
    41         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Display Options');?>');
     41        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Display Options'));?>');
    4242    </script>
    4343<?php }
  • miniorange-login-openid/trunk/view/soc_com/com_select_app/mo_openid_comm_select_app.php

    r2273370 r2853010  
    77                <td colspan="2">
    88                    <br>
    9                     <b><?php echo mo_sl('Select applications to add Social Comments. These commenting applications will be added to your blog post pages at the location of your comments.');?></b>
     9                    <b><?php echo esc_attr(mo_sl('Select applications to add Social Comments. These commenting applications will be added to your blog post pages at the location of your comments.'));?></b>
    1010                </td>
    1111            </tr>
     
    1414        <input type="hidden" name="option" value="mo_openid_comment_selectapp" />
    1515        <input type="hidden" name="mo_openid_enable_comment_selectapp_nonce"
    16                value="<?php echo wp_create_nonce( 'mo-openid-enable-comment-selectapp-nonce' ); ?>"/>
     16               value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-comment-selectapp-nonce' )); ?>"/>
    1717        <table id="sel_app">
    1818            <tr>
    1919                <td>
    20                     <h3><?php echo mo_sl('Select Applications');?></h3>
    21                     <?php echo mo_sl('If none of the below are selected, default WordPress comments will only be visible. Only selecting Default WordPress Comments will not result in any changes');?>.
     20                    <h3><?php echo esc_attr(mo_sl('Select Applications'));?></h3>
     21                    <?php echo esc_attr(mo_sl('If none of the below are selected, default WordPress comments will only be visible. Only selecting Default WordPress Comments will not result in any changes'));?>.
    2222                </td>
    2323            </tr>
     
    2626            <td>
    2727
    28                 <label class="mo_openid_checkbox_container"> <b><?php echo mo_sl('Default WordPress Comments');?></b>
     28                <label class="mo_openid_checkbox_container"> <b><?php echo esc_attr(mo_sl('Default WordPress Comments'));?></b>
    2929                    <input type="checkbox" id="mo_openid_social_comment_default" name="mo_openid_social_comment_default" value="1"  <?php checked( get_option('mo_openid_social_comment_default') == 1 );?> />
    3030                    <span class="mo_openid_checkbox_checkmark"></span>
     
    3737                <td>
    3838
    39                     <label class="mo_openid_checkbox_container"> <b><?php echo mo_sl('Facebook Comments');?></b>
     39                    <label class="mo_openid_checkbox_container"> <b><?php echo esc_attr(mo_sl('Facebook Comments'));?></b>
    4040                        <input type="checkbox" id="mo_openid_social_comment_fb" name="mo_openid_social_comment_fb" value="1" <?php checked( get_option('mo_openid_social_comment_fb') == 1 );?> />
    4141                        <span class="mo_openid_checkbox_checkmark"></span>
     
    4848                <td>
    4949
    50                     <label class="mo_openid_checkbox_container"> <b><?php echo mo_sl('Disqus Comments');?></b>
     50                    <label class="mo_openid_checkbox_container"> <b><?php echo esc_attr(mo_sl('Disqus Comments'));?></b>
    5151                        <input type="checkbox" id="mo_openid_social_comment_disqus" name="mo_openid_social_comment_disqus" value="1" <?php checked( get_option('mo_openid_social_comment_disqus') == 1 );?> />
    5252                        <span class="mo_openid_checkbox_checkmark"></span>
     
    5858        </table>
    5959        <div><br/> <br/>
    60             <input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" />
     60            <input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" />
    6161
    6262        </div>
     
    6464    </div>
    6565    <script>
    66         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Comments');?>');
     66        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Social Comments'));?>');
    6767    </script>
    6868<?php }
  • miniorange-login-openid/trunk/view/soc_com/com_shrtco/comm_shrtco.php

    r2560192 r2853010  
    77        <i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#10', '#shortcode_url10_copy')"><span id="shortcode_url10_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i>
    88        <br/><br/>
    9             1. <?php echo mo_sl('Configure Social Comments in the Social Comments tab of the plugin');?>.<br>
    10             2. <?php echo mo_sl('Keep both the display options checked and Save');?>.<br>
    11             3. <?php echo mo_sl('Enable Comments for the post/page you want to add');?> <br>
    12             4. <b><?php echo mo_sl('Pages-> Quick Edit-> Allow Comments');?></b> <?php echo mo_sl('(Skip this step if you already have Comments enabled.)');?><br>
    13             5. <?php echo mo_sl('Add the shortcode ');?>[miniorange_social_comments] <?php echo mo_sl('to an individual page/post');?>.<br>
     9            1. <?php echo esc_attr(mo_sl('Configure Social Comments in the Social Comments tab of the plugin'));?>.<br>
     10            2. <?php echo esc_attr(mo_sl('Keep both the display options checked and Save'));?>.<br>
     11            3. <?php echo esc_attr(mo_sl('Enable Comments for the post/page you want to add'));?> <br>
     12            4. <b><?php echo esc_attr(mo_sl('Pages-> Quick Edit-> Allow Comments'));?></b> <?php echo esc_attr(mo_sl('(Skip this step if you already have Comments enabled.)'));?><br>
     13            5. <?php echo esc_attr(mo_sl('Add the shortcode '));?>[miniorange_social_comments] <?php echo esc_attr(mo_sl('to an individual page/post'));?>.<br>
    1414    </div>
    1515<script>
    16     jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Comments Shortcodes');?>');
     16    jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Social Comments Shortcodes'));?>');
    1717</script>
    1818    <?php
  • miniorange-login-openid/trunk/view/soc_sha/cust_text/mo_openid_cust_shricon.php

    r2769271 r2853010  
    11<?php
    22function mo_openid_customize_icons(){
    3     $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','digg'=>'#000000','yahoo'=>'#430297','yandex'=>'#2795e9','instagram'=>'#3f729b','linkedin'=>'#007bb6','pocket'=>'#ee4056','print'=>'#ee4056','whatsapp'=>'#25D366','mail'=>'#787878','amazon'=>'#ff9900','paypal'=>'#0d127a','stumble'=>'#f74425','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'#0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','kakao'=>'#ffe812','livejournal'=>'#3c1361','naver'=>'#3EAF0E','teamsnap'=>'#ff9a1a');
     3    $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vkontakte'=>'#466482','twitter'=>'#2795e9','digg'=>'#000000','yahoo'=>'#430297','yandex'=>'#2795e9','linkedin'=>'#007bb6','pocket'=>'#ee4056','print'=>'#ee4056','whatsapp'=>'#25D366','mail'=>'#787878','amazon'=>'#ff9900','paypal'=>'#0d127a','stumble'=>'#f74425','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'#0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','kakao'=>'#ffe812','livejournal'=>'#3c1361','naver'=>'#3EAF0E','teamsnap'=>'#ff9a1a');
    44
    55    ?>
     
    88    <input type="hidden" name="option" value="mo_openid_enable_customize_text" />
    99    <input type="hidden" name="mo_openid_enable_customize_text_nonce"
    10            value="<?php echo wp_create_nonce( 'mo-openid-enable-customize-text-nonce' ); ?>"/>
     10           value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-enable-customize-text-nonce' )); ?>"/>
    1111
    1212    <div class="mo_openid_table_layout">
     
    1919                <tr>
    2020                    <td>
    21                         <h3><?php echo mo_sl('Customize Sharing Icons');?></h3>
    22                         <p style="font-size: 17px"><?php echo mo_sl('Customize shape, size and background for sharing icons');?></p>
     21                        <h3><?php echo esc_attr(mo_sl('Customize Sharing Icons'));?></h3>
     22                        <p style="font-size: 17px"><?php echo esc_attr(mo_sl('Customize shape, size and background for sharing icons'));?></p>
    2323                    </td>
    2424                </tr>
     
    2727                        <table style="width=100%">
    2828                            <tr >
    29                                 <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo mo_sl('Shape');?></td>
    30                                 <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo mo_sl('Theme');?></td>
    31                                 <td class="mo_openid_fix_fontsize_semiheading" style="width: 25%"><?php echo mo_sl('Space between Icons');?></td>
    32                                 <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo mo_sl('Size of Icons');?></td>
     29                                <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo esc_attr(mo_sl('Shape'));?></td>
     30                                <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo esc_attr(mo_sl('Theme'));?></td>
     31                                <td class="mo_openid_fix_fontsize_semiheading" style="width: 25%"><?php echo esc_attr(mo_sl('Space between Icons'));?></td>
     32                                <td class="mo_openid_fix_fontsize_semiheading" style="width: 30%"><?php echo esc_attr(mo_sl('Size of Icons'));?></td>
    3333                            </tr>
    3434
     
    3838
    3939
    40                                     <label class="mo-openid-radio-container"><?php echo mo_sl('Round');?>
     40                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Round'));?>
    4141                                        <input type="radio" id="mo_openid_share_theme_circle"  name="mo_openid_share_theme" value="circle" onclick="tempHorShape = 'circle';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, 'circle', setCustomTheme(), document.getElementById('mo_sharing_icon_custom_color').value, document.getElementById('mo_sharing_icon_space').value, document.getElementById('mo_sharing_icon_custom_font').value)" <?php checked( get_option('mo_openid_share_theme') == 'circle' );?> />
    4242                                    <span class="mo-openid-radio-checkmark"></span></label>
     
    4444                                    <br>
    4545
    46                                     <label class="mo-openid-radio-container"><?php echo mo_sl('Rounded Edges');?>
     46                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Rounded Edges'));?>
    4747                                        <input type="radio"   name="mo_openid_share_theme"  value="oval" onclick="tempHorShape = 'oval';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, 'oval', setCustomTheme(), document.getElementById('mo_sharing_icon_custom_color').value, document.getElementById('mo_sharing_icon_space').value)"  <?php checked( get_option('mo_openid_share_theme') == 'oval' );?> /></br>
    4848                                        <span class="mo-openid-radio-checkmark"></span></label>
    4949
    5050                                    <br>
    51                                     <label class="mo-openid-radio-container"><?php echo mo_sl('Square');?>
     51                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Square'));?>
    5252                                        <input type="radio"   name="mo_openid_share_theme" value="square" onclick="tempHorShape = 'square';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, setTheme(), setCustomTheme(), document.getElementById('mo_sharing_icon_custom_color').value, document.getElementById('mo_sharing_icon_space').value)" <?php checked( get_option('mo_openid_share_theme') == 'square' );?> />
    5353                                        <span class="mo-openid-radio-checkmark"></span></label>
     
    5858
    5959
    60                                     <label class="mo-openid-radio-container"><?php echo mo_sl('Default');?>
     60                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Default'));?>
    6161                                        <input type="radio" id="mo_openid_default_background_radio"  name="mo_openid_share_custom_theme" value="default" onclick="tempHorTheme = 'default';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, setTheme(), 'default', document.getElementById('mo_sharing_icon_custom_color').value, document.getElementById('mo_sharing_icon_space').value, document.getElementById('mo_sharing_icon_custom_font').value)"
    6262                                            <?php checked( get_option('mo_openid_share_custom_theme') == 'default' );?> /><br>
     
    7070
    7171
    72                                     <label class="mo-openid-radio-container"><?php echo mo_sl('Custom background');?>*
     72                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('Custom background'));?>*
    7373                                        <input type="radio" id="mo_openid_custom_background_radio"  name="mo_openid_share_custom_theme" value="custom" onclick="tempHorTheme = 'custom';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, setTheme(),'custom',document.getElementById('mo_sharing_icon_custom_color').value,document.getElementById('mo_sharing_icon_space').value)"
    7474                                            <?php checked( get_option('mo_openid_share_custom_theme') == 'custom' );?> /><br>
     
    8080
    8181
    82                                     <label class="mo-openid-radio-container"><?php echo mo_sl('No background');?>*
     82                                    <label class="mo-openid-radio-container"><?php echo esc_attr(mo_sl('No background'));?>*
    8383                                        <input type="radio" id="mo_openid_no_background_radio"  name="mo_openid_share_custom_theme" value="customFont" onclick="tempHorTheme = 'customFont';moSharingPreview('horizontal', document.getElementById('mo_sharing_icon_size').value, setTheme(),'customFont',document.getElementById('mo_sharing_icon_custom_color').value,document.getElementById('mo_sharing_icon_space').value,document.getElementById('mo_sharing_icon_custom_font').value)"  <?php checked( get_option('mo_openid_share_custom_theme') == 'customFont' );?> /><br>
    8484                                        <span class="mo-openid-radio-checkmark"></span></label>
     
    106106
    107107                            <tr>
    108                                <td colspan="4" class="mo_openid_note_style" style="width: 328%; padding: 10px;"><b>*<?php echo mo_sl('NOTE');?>:</b> <?php echo mo_sl('Custom background: This will change the background color of share icons');?>.<br> <?php echo mo_sl('No background:This will remove the background color of share icons');?>.</td>
     108                               <td colspan="4" class="mo_openid_note_style" style="width: 328%; padding: 10px;"><b>*<?php echo esc_attr(mo_sl('NOTE'));?>:</b> <?php echo esc_attr(mo_sl('Custom background: This will change the background color of share icons'));?>.<br> <?php echo esc_attr(mo_sl('No background:This will remove the background color of share icons'));?>.</td>
    109109                            </tr>
    110110
    111111                            <tr>
    112112                                <td colspan="4">
    113                                     <br><b><?php echo mo_sl('Preview');?> : </b><br/>
     113                                    <br><b><?php echo esc_attr(mo_sl('Preview'));?> : </b><br/>
    114114                                    <div>
    115115                                        <?php
     
    139139
    140140                                                        ?>
    141                                                     <i class="mo_sharing_icon_preview fab fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$active_app]; ?>;color: #ffffff"
    142                                                        id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    143                                                         <i class="mo_custom_sharing_icon_preview fab fa-<?php echo $icon ?>"
    144                                                            id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
     141                                                    <i class="mo_sharing_icon_preview fab fa-<?php echo esc_attr($icon) ?>" style="display: none;text-align:center;background: <?php echo esc_attr($default_color[$active_app]); ?>;color: #ffffff"
     142                                                       id="mo_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"></i>
     143                                                        <i class="mo_custom_sharing_icon_preview fab fa-<?php echo esc_attr($icon) ?>"
     144                                                           id="mo_custom_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"
    145145                                                           style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    146                                                         <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo $icon ?>"
    147                                                            id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
     146                                                        <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo esc_attr($icon) ?>"
     147                                                           id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr($active_app) ?>"
    148148                                                           style="text-align:center;margin-top:5px;"></i>
    149149
     
    153153
    154154                                                    ?>
    155                                                     <i class="mo_sharing_icon_preview far fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$active_app]; ?>;color: #ffffff"
    156                                                        id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    157                                                     <i class="mo_custom_sharing_icon_preview far fa-<?php echo $icon ?>"
    158                                                        id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
     155                                                    <i class="mo_sharing_icon_preview far fa-<?php echo esc_attr($icon) ?>" style="display: none;text-align:center;background: <?php echo esc_attr($default_color[$active_app]); ?>;color: #ffffff"
     156                                                       id="mo_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"></i>
     157                                                    <i class="mo_custom_sharing_icon_preview far fa-<?php echo esc_attr($icon) ?>"
     158                                                       id="mo_custom_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"
    159159                                                       style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    160                                                     <i class="mo_custom_sharing_icon_font_preview far fa-<?php echo $icon ?>"
    161                                                        id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
     160                                                    <i class="mo_custom_sharing_icon_font_preview far fa-<?php echo esc_attr($icon) ?>"
     161                                                       id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr($active_app) ?>"
    162162                                                       style="text-align:center;margin-top:5px;"></i>
    163163
     
    168168                                                    if ($active_app == 'vkontakte') {
    169169                                                        ?>
    170                                                         <i class="mo_sharing_icon_preview fab fa-vk" style="display: none;text-align:center;background: <?php echo $default_color[$active_app]; ?>;color: #ffffff;"
    171                                                            id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    172 
    173                                                         <i class="mo_custom_sharing_icon_preview fab fa-<?php echo $icon ?>"
    174                                                            id="mo_custom_sharing_icon_preview_<?php echo $icon ?>"
     170                                                        <i class="mo_sharing_icon_preview fab fa-vk" style="display: none;text-align:center;background: <?php echo esc_attr($default_color[$active_app]); ?>;color: #ffffff;"
     171                                                           id="mo_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"></i>
     172
     173                                                        <i class="mo_custom_sharing_icon_preview fab fa-<?php echo esc_attr($icon) ?>"
     174                                                           id="mo_custom_sharing_icon_preview_<?php echo esc_attr($icon) ?>"
    175175                                                           style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    176176
    177177
    178                                                         <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo $icon ?>"
    179                                                            id="mo_custom_sharing_icon_font_preview_<?php echo $icon ?>"
     178                                                        <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo esc_attr($icon) ?>"
     179                                                           id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr($icon) ?>"
    180180                                                           style="text-align:center;margin-top:5px;"></i>
    181181
     
    184184
    185185                                                        ?>
    186                                                         <i class="mo_sharing_icon_preview fab fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$icon]; ?>;color: #ffffff"
    187                                                            id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    188                                                         <i class="mo_custom_sharing_icon_preview fab fa-<?php echo $active_app ?>"
    189                                                            id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
     186                                                        <i class="mo_sharing_icon_preview fab fa-<?php echo esc_attr($icon) ?>" style="display: none;text-align:center;background: <?php echo esc_attr($default_color[$icon]); ?>;color: #ffffff"
     187                                                           id="mo_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"></i>
     188                                                        <i class="mo_custom_sharing_icon_preview fab fa-<?php echo esc_attr($active_app) ?>"
     189                                                           id="mo_custom_sharing_icon_preview_<?php echo esc_attr($active_app) ?>"
    190190                                                           style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    191191
    192                                                         <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo $active_app ?>"
    193                                                            id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
     192                                                        <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo esc_attr($active_app) ?>"
     193                                                           id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr($active_app) ?>"
    194194                                                           style="text-align:center;margin-top:5px;"></i>
    195195
     
    211211
    212212            <br>
    213             <h3><?php echo mo_sl('Customize Text For Social Share Icons');?></h3>
     213            <h3><?php echo esc_attr(mo_sl('Customize Text For Social Share Icons'));?></h3>
    214214            <style>
    215215                .share_text{
     
    219219            </style>
    220220            <hr>
    221                     <b class="share_text"><?php echo mo_sl('Select color for share heading');?>:</b>
     221                    <b class="share_text"><?php echo esc_attr(mo_sl('Select color for share heading'));?>:</b>
    222222            <input id="mo_openid_table_textbox" style="width:135px;margin-left: 17.5%" name="mo_openid_share_widget_customize_text_color" class="color" value="<?php echo esc_attr(get_option('mo_openid_share_widget_customize_text_color'))?>" >
    223223            <br><br>
    224                     <b class="share_text" ><?php echo mo_sl('Enter text to show above share widget');?>:</b>
     224                    <b class="share_text" ><?php echo esc_attr(mo_sl('Enter text to show above share widget'));?>:</b>
    225225            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 40%;margin-left: 10%" type="text" name="mo_openid_share_widget_customize_text" value="<?php echo esc_attr(get_option('mo_openid_share_widget_customize_text')); ?>"  />
    226226            <br><br>
    227                     <b class="share_text" ><?php echo mo_sl('Enter your twitter Username (without @)');?>:</b>
     227                    <b class="share_text" ><?php echo esc_attr(mo_sl('Enter your twitter Username (without @)'));?>:</b>
    228228            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 40%;margin-left: 8.5%" type="text" name="mo_openid_share_twitter_username" value="<?php echo esc_attr(get_option('mo_openid_share_twitter_username')); ?>"  />
    229229            <br><br>
    230230
    231                     <b class="share_text"><?php echo mo_sl('Enter the Email subject (email share)');?>:</b>
     231                    <b class="share_text"><?php echo esc_attr(mo_sl('Enter the Email subject (email share)'));?>:</b>
    232232            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 40%;margin-left: 12%" type="text" name="mo_openid_share_email_subject" value="<?php echo esc_attr(get_option('mo_openid_share_email_subject')); ?>"  />
    233233            <br><br>
    234234
    235                     <b class="share_text"><?php echo mo_sl('Enter the Email body (add ##url## to place the URL)');?>:</b>
     235                    <b class="share_text"><?php echo esc_attr(mo_sl('Enter the Email body (add ##url## to place the URL)'));?>:</b>
    236236            <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 40%;margin-left: 2%" type="text" name="mo_openid_share_email_body" value="<?php echo esc_attr(get_option('mo_openid_share_email_body')); ?>"  />
    237237
     
    239239            <br><br>
    240240
    241                     <b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
     241                    <b><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
    242242
    243243
     
    354354
    355355        function addSelectedApps(e,app_name) {
    356             var radio = "<?php echo get_option('mo_openid_share_custom_theme') ?>";
     356            var radio = "<?php echo esc_attr(get_option('mo_openid_share_custom_theme')) ?>";
    357357            var flag = jQuery("#sel_apps .app_enable:checked").length + 1;
    358358            var value_of_app_default= ("#mo_sharing_icon_preview_" + app_name);
     
    399399    <script>
    400400        //to set heading name
    401         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Customize text for Social Share Icons');?>');
     401        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Customize text for Social Share Icons'));?>');
    402402    </script>
    403403
  • miniorange-login-openid/trunk/view/soc_sha/disp_shropt/mo_openid_disp_shropt.php

    r2350373 r2853010  
    11<?php
    2 function mo_openid_display_share_opt(){
    3     ?>
    4 
    5     <br>
    6     <form id="share_display" name="share_display" method="post" action="">
    7     <input type="hidden" name="option" value="mo_openid_enable_share_display" />
    8     <input type="hidden" name="mo_openid_enable_share_display_nonce"
    9            value="<?php echo wp_create_nonce( 'mo-openid-enable-share-display-nonce' ); ?>"/>
    10 
    11             <div class="mo_openid_table_layout" >
    12                 <table style="height: 200%">
    13                     <style>
    14                         #upleft {
    15                             width:45%;
    16                             height:330px;
    17                             background:white;
    18                             float:left;
    19                             border: 1px transparent;
    20                         }
    21                     #upright {
    22                             width:45%;
    23                             height:380px;
    24                             background:white;
    25                             float:right;
    26                             border: 1px transparent;
    27                         }
    28                         #below {
    29                             height:available;
    30                             display: inline;
    31                             width:100%;
    32                             background:white;
    33                             float:right;
    34                             border: 1px transparent;
    35                             padding-bottom: 10px;
    36                         }
    37                         #above{
    38                             height:50px;
    39                             width:100%;
    40                             background:white;
    41                             float:right;
    42                             border: 1px transparent;
    43                         }
    44                     </style>
    45                     <div id="above">
    46            <strong style="font-size: 14px"><?php echo mo_sl('Select the options where you want to display social share icons');?></strong>
    47                     </div>
    48                     <div id="upleft" style="font-size: 14px;">
    49 
    50 
    51                         <label class="mo_openid_checkbox_container"> <?php echo mo_sl('Home Page');?>
    52                             <input type="checkbox" id="mo_apps_home_page"  name="mo_share_options_home_page"  value="1"  <?php checked( get_option('mo_share_options_enable_home_page') == 1 );?>>
    53                             <span class="mo_openid_checkbox_checkmark"></span>
    54                         </label>
    55                         <div style="margin-left: 8%">
    56 
    57                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    58                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="before"  <?php checked( get_option('mo_share_options_home_page_position') == 'before' );?>>
    59                             <span class="mo-openid-radio-checkmark"></span></label>
    60 
    61                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    62                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="after"  <?php checked( get_option('mo_share_options_home_page_position') == 'after' );?>>
    63                             <span class="mo-openid-radio-checkmark"></span></label>
    64 
    65                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    66                             <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="both"  <?php checked( get_option('mo_share_options_home_page_position') == 'both' );?>>
    67                             <span class="mo-openid-radio-checkmark"></span></label>
    68 
    69                     </div>
    70 
    71                                <br>
    72 
    73 
    74                         <label class="mo_openid_checkbox_container"> <?php echo mo_sl('Blog Post');?>
    75                             <input type="checkbox" id="mo_apps_posts"  name="mo_share_options_post" value="1"  <?php checked( get_option('mo_share_options_enable_post') == '1' );?>>
    76                             <span class="mo_openid_checkbox_checkmark"></span>
    77                         </label>
    78                         <div style="margin-left: 8%">
    79 
    80 
    81                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    82                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="before"  <?php checked( get_option('mo_share_options_enable_post_position') == 'before' );?>>
    83                             <span class="mo-openid-radio-checkmark"></span></label>
    84 
    85                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    86                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="after"  <?php checked( get_option('mo_share_options_enable_post_position') == 'after' );?>>
    87                             <span class="mo-openid-radio-checkmark"></span></label>
    88 
    89 
    90 
    91                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    92                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="both"  <?php checked( get_option('mo_share_options_enable_post_position') == 'both' );?>>
    93                             <span class="mo-openid-radio-checkmark"></span></label>
    94                     </div>
    95 
    96                         <br>
    97 
    98                         <label class="mo_openid_checkbox_container"> <?php echo mo_sl('Static Pages');?>
    99                             <input type="checkbox" id="mo_apps_static_page"  name="mo_share_options_static_pages"  value="1"  <?php checked( get_option('mo_share_options_enable_static_pages') == 1 );?>>
    100                             <span class="mo_openid_checkbox_checkmark"></span>
    101                         </label>
    102                         <div style="margin-left: 8%">
    103 
    104 
    105                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    106                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="before"  <?php checked( get_option('mo_share_options_static_pages_position') == 'before' );?>>
    107                             <span class="mo-openid-radio-checkmark"></span></label>
    108 
    109                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    110                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="after"  <?php checked( get_option('mo_share_options_static_pages_position') == 'after' );?>>
    111                             <span class="mo-openid-radio-checkmark"></span></label>
    112 
    113 
    114                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    115                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="both"  <?php checked( get_option('mo_share_options_static_pages_position') == 'both' );?>>
    116                             <span class="mo-openid-radio-checkmark"></span></label>
    117                     </div>
    118                         <br>
    119 
    120                         <label class="mo_openid_checkbox_container_disable "> <?php echo mo_sl(' WooCommerce Individual Product Page(Top)');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    121                             <input type="checkbox" id="mo_apps_wc_sp_page_top"  name="mo_share_options_wc_sp_summary_top"  value="1"  >
    122                             <span class="mo_openid_checkbox_checkmark "></span>
    123                         </label>
    124                         <label class="mo_openid_checkbox_container_disable "> <?php echo mo_sl('Below WooCommerce Product');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    125                             <input type="checkbox" id="mo_apps_wc_product"  name="mo_share_options_wc_product"  value="1" >
    126                         <span class="mo_openid_checkbox_checkmark "></span>
    127                         </label>
    128 
    129                     </div>
    130                     <div id="upright" style="font-size: 14px;">
    131                         <br>
    132 
    133                         <label class="mo_openid_checkbox_container_disable"> <?php echo mo_sl('WooCommerce Individual Product Page');?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    134                             <input type="checkbox" id="mo_apps_wc_sp_page"  name="mo_share_options_wc_sp_summary"  value="1">
    135                             <span class="mo_openid_checkbox_checkmark"></span>
    136                         </label>
    137 
    138                         <label class="mo_openid_checkbox_container" ">  <?php echo mo_sl('BBPress Forums Page');?>
    139                         <input type="checkbox" id="mo_apps_bb_forum"  name="mo_share_options_bb_forum"  value="1"  <?php checked( get_option('mo_share_options_bb_forum') == 1 );?>>
    140                         <span class="mo_openid_checkbox_checkmark "></span>
    141                         </label>
    142                         <div style="margin-left: 8%">
    143                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    144                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="before"  <?php checked( get_option('mo_share_options_bb_forum_position') == 'before' );?>>
    145                             <span class="mo-openid-radio-checkmark"></span></label>
    146 
    147                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    148                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="after" <?php checked( get_option('mo_share_options_bb_forum_position') == 'after' );?>>
    149                             <span class="mo-openid-radio-checkmark"></span></label>
    150 
    151 
    152                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    153                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="both"  <?php checked( get_option('mo_share_options_bb_forum_position') == 'both' );?>>
    154                             <span class="mo-openid-radio-checkmark"></span></label>
    155                     </div>
    156                         <br>
    157 
    158                         <label class="mo_openid_checkbox_container"> <?php echo mo_sl('BBPress Topic Page');?>
    159                             <input type="checkbox" id="mo_apps_bb_topic"  name="mo_share_options_bb_topic"  value="1"  <?php checked( get_option('mo_share_options_bb_topic') == 1 );?>>
    160                             <span class="mo_openid_checkbox_checkmark"></span>
    161                         </label>
    162                         <div style="margin-left: 8%">
    163                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    164                             <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="before"  <?php checked( get_option('mo_share_options_bb_topic_position') == 'before' );?>>
    165                             <span class="mo-openid-radio-checkmark"></span></label>
    166 
    167                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    168                             <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="after"  <?php checked( get_option('mo_share_options_bb_topic_position') == 'after' );?>>
    169                             <span class="mo-openid-radio-checkmark"></span></label>
    170 
    171 
    172                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    173                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="both"  <?php checked( get_option('mo_share_options_bb_topic_position') == 'both' );?>>
    174                             <span class="mo-openid-radio-checkmark"></span></label>
    175 
    176                         </div>
    177 
    178                         <br>
    179 
    180 
    181                         <label class="mo_openid_checkbox_container"> <?php echo mo_sl('BBPress Reply Page');?>
    182                             <input type="checkbox" id="mo_apps_bb_reply"  name="mo_share_options_bb_reply"  value="1"  <?php checked( get_option('mo_share_options_bb_reply') == 1 );?>>
    183                             <span class="mo_openid_checkbox_checkmark"></span>
    184                         </label>
     2function mo_openid_display_share_opt() {
     3    ?>
     4
     5    <br>
     6    <form id="share_display" name="share_display" method="post" action="">
     7    <input type="hidden" name="option" value="mo_openid_enable_share_display" />
     8    <input type="hidden" name="mo_openid_enable_share_display_nonce"
     9           value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-enable-share-display-nonce' ) ); ?>"/>
     10
     11            <div class="mo_openid_table_layout" >
     12                <table style="height: 200%">
     13                    <style>
     14                        #upleft {
     15                            width:45%;
     16                            height:330px;
     17                            background:white;
     18                            float:left;
     19                            border: 1px transparent;
     20                        }
     21                    #upright {
     22                            width:45%;
     23                            height:380px;
     24                            background:white;
     25                            float:right;
     26                            border: 1px transparent;
     27                        }
     28                        #below {
     29                            height:available;
     30                            display: inline;
     31                            width:100%;
     32                            background:white;
     33                            float:right;
     34                            border: 1px transparent;
     35                            padding-bottom: 10px;
     36                        }
     37                        #above{
     38                            height:50px;
     39                            width:100%;
     40                            background:white;
     41                            float:right;
     42                            border: 1px transparent;
     43                        }
     44                    </style>
     45                    <div id="above">
     46           <strong style="font-size: 14px"><?php echo esc_attr( mo_sl( 'Select the options where you want to display social share icons' ) ); ?></strong>
     47                    </div>
     48                    <div id="upleft" style="font-size: 14px;">
     49
     50
     51                        <label class="mo_openid_checkbox_container"> <?php echo esc_attr( mo_sl( 'Home Page' ) ); ?>
     52                            <input type="checkbox" id="mo_apps_home_page"  name="mo_share_options_home_page"  value="1"  <?php checked( get_option( 'mo_share_options_enable_home_page' ) == 1 ); ?>>
     53                            <span class="mo_openid_checkbox_checkmark"></span>
     54                        </label>
     55                        <div style="margin-left: 8%">
     56
     57                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     58                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="before"  <?php checked( get_option( 'mo_share_options_home_page_position' ) == 'before' ); ?>>
     59                            <span class="mo-openid-radio-checkmark"></span></label>
     60
     61                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     62                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="after"  <?php checked( get_option( 'mo_share_options_home_page_position' ) == 'after' ); ?>>
     63                            <span class="mo-openid-radio-checkmark"></span></label>
     64
     65                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     66                            <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_home_page_position" value="both"  <?php checked( get_option( 'mo_share_options_home_page_position' ) == 'both' ); ?>>
     67                            <span class="mo-openid-radio-checkmark"></span></label>
     68
     69                    </div>
     70
     71                               <br>
     72
     73
     74                        <label class="mo_openid_checkbox_container"> <?php echo esc_attr( mo_sl( 'Blog Post' ) ); ?>
     75                            <input type="checkbox" id="mo_apps_posts"  name="mo_share_options_post" value="1"  <?php checked( get_option( 'mo_share_options_enable_post' ) == '1' ); ?>>
     76                            <span class="mo_openid_checkbox_checkmark"></span>
     77                        </label>
     78                        <div style="margin-left: 8%">
     79
     80
     81                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     82                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="before"  <?php checked( get_option( 'mo_share_options_enable_post_position' ) == 'before' ); ?>>
     83                            <span class="mo-openid-radio-checkmark"></span></label>
     84
     85                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     86                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="after"  <?php checked( get_option( 'mo_share_options_enable_post_position' ) == 'after' ); ?>>
     87                            <span class="mo-openid-radio-checkmark"></span></label>
     88
     89
     90
     91                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     92                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_enable_post_position" value="both"  <?php checked( get_option( 'mo_share_options_enable_post_position' ) == 'both' ); ?>>
     93                            <span class="mo-openid-radio-checkmark"></span></label>
     94                    </div>
     95
     96                        <br>
     97
     98                        <label class="mo_openid_checkbox_container"> <?php echo esc_attr( mo_sl( 'Static Pages' ) ); ?>
     99                            <input type="checkbox" id="mo_apps_static_page"  name="mo_share_options_static_pages"  value="1"  <?php checked( get_option( 'mo_share_options_enable_static_pages' ) == 1 ); ?>>
     100                            <span class="mo_openid_checkbox_checkmark"></span>
     101                        </label>
     102                        <div style="margin-left: 8%">
     103
     104
     105                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     106                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="before"  <?php checked( get_option( 'mo_share_options_static_pages_position' ) == 'before' ); ?>>
     107                            <span class="mo-openid-radio-checkmark"></span></label>
     108
     109                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     110                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="after"  <?php checked( get_option( 'mo_share_options_static_pages_position' ) == 'after' ); ?>>
     111                            <span class="mo-openid-radio-checkmark"></span></label>
     112
     113
     114                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     115                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_static_pages_position" value="both"  <?php checked( get_option( 'mo_share_options_static_pages_position' ) == 'both' ); ?>>
     116                            <span class="mo-openid-radio-checkmark"></span></label>
     117                    </div>
     118                        <br>
     119
     120                        <label class="mo_openid_checkbox_container_disable "> <?php echo esc_attr( mo_sl( ' WooCommerce Individual Product Page(Top)' ) ); ?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     121                            <input type="checkbox" id="mo_apps_wc_sp_page_top"  name="mo_share_options_wc_sp_summary_top"  value="1"  >
     122                            <span class="mo_openid_checkbox_checkmark "></span>
     123                        </label>
     124                        <label class="mo_openid_checkbox_container_disable "> <?php echo esc_attr( mo_sl( 'Below WooCommerce Product' ) ); ?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     125                            <input type="checkbox" id="mo_apps_wc_product"  name="mo_share_options_wc_product"  value="1" >
     126                        <span class="mo_openid_checkbox_checkmark "></span>
     127                        </label>
     128
     129                    </div>
     130                    <div id="upright" style="font-size: 14px;">
     131                        <br>
     132
     133                        <label class="mo_openid_checkbox_container_disable"> <?php echo esc_attr( mo_sl( 'WooCommerce Individual Product Page' ) ); ?> <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     134                            <input type="checkbox" id="mo_apps_wc_sp_page"  name="mo_share_options_wc_sp_summary"  value="1">
     135                            <span class="mo_openid_checkbox_checkmark"></span>
     136                        </label>
     137
     138                        <label class="mo_openid_checkbox_container" ">  <?php echo esc_attr( mo_sl( 'BBPress Forums Page' ) ); ?>
     139                        <input type="checkbox" id="mo_apps_bb_forum"  name="mo_share_options_bb_forum"  value="1"  <?php checked( get_option( 'mo_share_options_bb_forum' ) == 1 ); ?>>
     140                        <span class="mo_openid_checkbox_checkmark "></span>
     141                        </label>
     142                        <div style="margin-left: 8%">
     143                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     144                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="before"  <?php checked( get_option( 'mo_share_options_bb_forum_position' ) == 'before' ); ?>>
     145                            <span class="mo-openid-radio-checkmark"></span></label>
     146
     147                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     148                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="after" <?php checked( get_option( 'mo_share_options_bb_forum_position' ) == 'after' ); ?>>
     149                            <span class="mo-openid-radio-checkmark"></span></label>
     150
     151
     152                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     153                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_forum_position" value="both"  <?php checked( get_option( 'mo_share_options_bb_forum_position' ) == 'both' ); ?>>
     154                            <span class="mo-openid-radio-checkmark"></span></label>
     155                    </div>
     156                        <br>
     157
     158                        <label class="mo_openid_checkbox_container"> <?php echo esc_attr( mo_sl( 'BBPress Topic Page' ) ); ?>
     159                            <input type="checkbox" id="mo_apps_bb_topic"  name="mo_share_options_bb_topic"  value="1"  <?php checked( get_option( 'mo_share_options_bb_topic' ) == 1 ); ?>>
     160                            <span class="mo_openid_checkbox_checkmark"></span>
     161                        </label>
     162                        <div style="margin-left: 8%">
     163                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     164                            <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="before"  <?php checked( get_option( 'mo_share_options_bb_topic_position' ) == 'before' ); ?>>
     165                            <span class="mo-openid-radio-checkmark"></span></label>
     166
     167                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     168                            <input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="after"  <?php checked( get_option( 'mo_share_options_bb_topic_position' ) == 'after' ); ?>>
     169                            <span class="mo-openid-radio-checkmark"></span></label>
     170
     171
     172                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     173                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_topic_position" value="both"  <?php checked( get_option( 'mo_share_options_bb_topic_position' ) == 'both' ); ?>>
     174                            <span class="mo-openid-radio-checkmark"></span></label>
     175
     176                        </div>
     177
     178                        <br>
     179
     180
     181                        <label class="mo_openid_checkbox_container"> <?php echo esc_attr( mo_sl( 'BBPress Reply Page' ) ); ?>
     182                            <input type="checkbox" id="mo_apps_bb_reply"  name="mo_share_options_bb_reply"  value="1"  <?php checked( get_option( 'mo_share_options_bb_reply' ) == 1 ); ?>>
     183                            <span class="mo_openid_checkbox_checkmark"></span>
     184                        </label>
    185185
    186186<div style="margin-left: 8%">
    187187
    188                         <label class="mo-openid-radio-container"><?php echo mo_sl('Before content');?>
    189                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="before"  <?php checked( get_option('mo_share_options_bb_reply_position') == 'before' );?>>
    190                             <span class="mo-openid-radio-checkmark"></span></label>
    191 
    192                         <label class="mo-openid-radio-container"><?php echo mo_sl('After content');?>
    193                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="after"  <?php checked( get_option('mo_share_options_bb_reply_position') == 'after' );?>>
    194                             <span class="mo-openid-radio-checkmark"></span></label>
    195 
    196 
    197                         <label class="mo-openid-radio-container"><?php echo mo_sl('Both before and after content');?>
    198                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="both"  <?php checked( get_option('mo_share_options_bb_reply_position') == 'both' );?>>
    199                             <span class="mo-openid-radio-checkmark"></span></label>
     188                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Before content' ) ); ?>
     189                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="before"  <?php checked( get_option( 'mo_share_options_bb_reply_position' ) == 'before' ); ?>>
     190                            <span class="mo-openid-radio-checkmark"></span></label>
     191
     192                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'After content' ) ); ?>
     193                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="after"  <?php checked( get_option( 'mo_share_options_bb_reply_position' ) == 'after' ); ?>>
     194                            <span class="mo-openid-radio-checkmark"></span></label>
     195
     196
     197                        <label class="mo-openid-radio-container"><?php echo esc_attr( mo_sl( 'Both before and after content' ) ); ?>
     198                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="mo_apps_posts_options"  name="mo_share_options_bb_reply_position" value="both"  <?php checked( get_option( 'mo_share_options_bb_reply_position' ) == 'both' ); ?>>
     199                            <span class="mo-openid-radio-checkmark"></span></label>
    200200
    201201</div>
    202                     </div>
    203                     <div id="below" style="margin: 14px">
    204                         <p class="mo_openid_note_style" ><strong><?php echo mo_sl('NOTE');?>:</strong> <?php echo mo_sl('The icons in above pages will be placed horizontally. For vertical icons, add ');?><b><?php echo mo_sl('miniOrange Sharing - Vertical');?></b> <?php echo mo_sl('widget from Appearance->Widgets.');?></p>
    205 
    206                     </div>
    207                     <tr>
    208                         <td><br /><b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
    209                         </td>
    210                     </tr>
    211 
    212                 </table>
    213     </div>
    214     </form>
    215     <script>
    216         //to set heading name
    217         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Display Options');?>');
    218     </script>
    219 
    220     <?php
     202                    </div>
     203                    <div id="below" style="margin: 14px">
     204                        <p class="mo_openid_note_style" ><strong><?php echo esc_attr( mo_sl( 'NOTE' ) ); ?>:</strong> <?php echo esc_attr( mo_sl( 'The icons in above pages will be placed horizontally. For vertical icons, add ' ) ); ?><b><?php echo esc_attr( mo_sl( 'miniOrange Sharing - Vertical' ) ); ?></b> <?php echo esc_attr( mo_sl( 'widget from Appearance->Widgets.' ) ); ?></p>
     205
     206                    </div>
     207                    <tr>
     208                        <td><br /><b><input type="submit" name="submit" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" /></b>
     209                        </td>
     210                    </tr>
     211
     212                </table>
     213    </div>
     214    </form>
     215    <script>
     216        //to set heading name
     217        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr( mo_sl( 'Display Options' ) ); ?>');
     218    </script>
     219
     220    <?php
    221221}
    222222?>
  • miniorange-login-openid/trunk/view/soc_sha/share_cnt/mo_openid_shrcnt.php

    r2560192 r2853010  
    66        <input type="hidden" name="option" value="mo_openid_share_cnt" />
    77        <input type="hidden" name="mo_openid_share_cnt_nonce"
    8                value="<?php echo wp_create_nonce( 'mo-openid-share-cnt-nonce' ); ?>"/>
     8               value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-share-cnt-nonce' )); ?>"/>
    99
    1010
     
    1515                    <td>
    1616
    17                         <p class="mo_openid_note_style" style="font-size: 15px;"><?php echo mo_sl('Share counts are supported for <b>Facebook</b> If you are Enabling share counts then it will give you the exact counts of share that is done by that particular social media.');?><br><br><?php echo mo_sl(' <b>Vkontakte</b>, <b>Stumble Upon</b>, <b>Buffer</b>, <b>Pinterest</b> and <b>Reddit</b> are supported in Paid Version');?>.<a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>.</p>
     17                        <p class="mo_openid_note_style" style="font-size: 15px;"><?php echo esc_attr(mo_sl('Share counts are supported for <b>Facebook</b> If you are Enabling share counts then it will give you the exact counts of share that is done by that particular social media.'));?><br><br><?php echo esc_attr(mo_sl(' <b>Vkontakte</b>, <b>Stumble Upon</b>, <b>Buffer</b>, <b>Pinterest</b> and <b>Reddit</b> are supported in Paid Version'));?>.<a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr(add_query_arg( array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']) )); ?>"><?php echo esc_attr(mo_sl('PRO'));?></a>.</p>
    1818
    1919                        <br>
    20                         <label class="mo_openid_checkbox_container"> <b style="font-size: 14px;"><?php echo mo_sl('Enable share counts');?></b>
     20                        <label class="mo_openid_checkbox_container"> <b style="font-size: 14px;"><?php echo esc_attr(mo_sl('Enable share counts'));?></b>
    2121                            <input type="checkbox" id="share_count" name="mo_openid_share_count" value="1" <?php checked(get_option('mo_openid_share_count') == 1); ?> />
    2222                            <span class="mo_openid_checkbox_checkmark"></span>
    2323                        </label>
    2424                        <br>
    25                         <input type="button" id="delete_count_transient" value="<?php echo mo_sl('Delete Count Session');?>" name="delete_count_transient" style="width:150px; margin-bottom: 0px" onclick="delete_transit()" class="button button-primary button-large"/>
     25                        <input type="button" id="delete_count_transient" value="<?php echo esc_attr(mo_sl('Delete Count Session'));?>" name="delete_count_transient" style="width:150px; margin-bottom: 0px" onclick="delete_transit()" class="button button-primary button-large"/>
    2626                        <br><br>
    2727                    </td>
     
    4444                            </ul>
    4545                            <div style="font-size: 14px;">
    46                                 <b><?php echo mo_sl('Facebook Access Token');?></b> <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" type="text" name="mo_openid_Facebook_share_count_api" value="<?php echo esc_attr(get_option('mo_openid_Facebook_share_count_api')); ?>"><br/>
    47                                 <p><b><?php echo mo_sl('Instructions to configure Facebook Share Counts');?>:</b></p>
     46                                <b><?php echo esc_attr(mo_sl('Facebook Access Token'));?></b> <input class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2;width: 50%" type="text" name="mo_openid_Facebook_share_count_api" value="<?php echo esc_attr(get_option('mo_openid_Facebook_share_count_api')); ?>"><br/>
     47                                <p><b><?php echo esc_attr(mo_sl('Instructions to configure Facebook Share Counts'));?>:</b></p>
    4848                                <ol>
    49                                     <li><?php echo mo_sl('Go to');?> <a href="https://developers.facebook.com/tools/explorer/" target="_blank">https://developers.facebook.com/tools/explorer/</a>. <?php echo mo_sl('Sign in with your Facebook account');?>.
     49                                    <li><?php echo esc_attr(mo_sl('Go to'));?> <a href="https://developers.facebook.com/tools/explorer/" target="_blank">https://developers.facebook.com/tools/explorer/</a>. <?php echo esc_attr(mo_sl('Sign in with your Facebook account'));?>.
    5050                                    </li>
    51                                     <li><?php echo mo_sl('Use an existing app if you already have one or create a new facebook
    52                                         app by clicking on ');?><b><?php echo mo_sl('Create App');?></b>. <?php echo mo_sl('Go to');?> <b><?php echo mo_sl('My Apps');?></b> <?php echo mo_sl('and
    53                                         select');?> <b><?php echo mo_sl('Create App');?></b>.<?php echo mo_sl(' Enter Display Name i.e App Name and click
    54                                         on');?> <b><?php echo mo_sl('Create App ID');?></b>.
     51                                    <li><?php echo esc_attr(mo_sl('Use an existing app if you already have one or create a new facebook
     52                                        app by clicking on '));?><b><?php echo esc_attr(mo_sl('Create App'));?></b>. <?php echo esc_attr(mo_sl('Go to'));?> <b><?php echo esc_attr(mo_sl('My Apps'));?></b> <?php echo esc_attr(mo_sl('and
     53                                        select'));?> <b><?php echo esc_attr(mo_sl('Create App'));?></b>.<?php echo esc_attr(mo_sl(' Enter Display Name i.e App Name and click
     54                                        on'));?> <b><?php echo esc_attr(mo_sl('Create App ID'));?></b>.
    5555                                    </li>
    56                                     <li><?php echo mo_sl('Go to');?> <b><?php echo mo_sl('Tools');?></b><?php echo mo_sl( 'select');?> <b><?php echo mo_sl('Graph API Explorer');?></b> <?php echo mo_sl('and click on');?> <b><?php echo mo_sl('Get
    57                                             Access Token');?></b>.
     56                                    <li><?php echo esc_attr(mo_sl('Go to'));?> <b><?php echo esc_attr(mo_sl('Tools'));?></b><?php echo esc_attr(mo_sl( 'select'));?> <b><?php echo esc_attr(mo_sl('Graph API Explorer'));?></b> <?php echo esc_attr(mo_sl('and click on'));?> <b><?php echo esc_attr(mo_sl('Get
     57                                            Access Token'));?></b>.
    5858                                    </li>
    59                                     <li><?php echo mo_sl('Now, go to');?> <a href="https://developers.facebook.com/tools/accesstoken" target="_blank"><?php echo mo_sl('Access Token Tool');?></a> <?php echo mo_sl('and press');?> <b><?php echo mo_sl('Debug');?></b> <?php echo mo_sl('option at right side for the ');?><b><?php echo mo_sl('User Token');?></b></li>
    60                                     <li><?php echo mo_sl('Now copy the');?> <b><?php echo mo_sl('Access Token');?></b> <?php echo mo_sl('and paste it in the above field and
    61                                         click on');?> <b><?php echo mo_sl('save');?></b>.
     59                                    <li><?php echo esc_attr(mo_sl('Now, go to'));?> <a href="https://developers.facebook.com/tools/accesstoken" target="_blank"><?php echo esc_attr(mo_sl('Access Token Tool'));?></a> <?php echo esc_attr(mo_sl('and press'));?> <b><?php echo esc_attr(mo_sl('Debug'));?></b> <?php echo esc_attr(mo_sl('option at right side for the '));?><b><?php echo esc_attr(mo_sl('User Token'));?></b></li>
     60                                    <li><?php echo esc_attr(mo_sl('Now copy the'));?> <b><?php echo esc_attr(mo_sl('Access Token'));?></b> <?php echo esc_attr(mo_sl('and paste it in the above field and
     61                                        click on'));?> <b><?php echo esc_attr(mo_sl('save'));?></b>.
    6262                                    </li>
    6363                                </ol>
    64                                 <p class="mo_openid_note_style"><span style="color: red">*</span><strong><?php echo mo_sl('According to the new updates of
     64                                <p class="mo_openid_note_style"><span style="color: red">*</span><strong><?php echo esc_attr(mo_sl('According to the new updates of
    6565                                        Facebook API it will expires after every 60 days. So to avoid any
    66                                         issues update it again before 60 days');?>.</strong></p>
     66                                        issues update it again before 60 days'));?>.</strong></p>
    6767                            </div>
    6868                        </div>
     
    7171                </tr>
    7272                <tr>
    73                     <td><br/><b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" />
     73                    <td><br/><b><input type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" />
    7474                        </b>
    7575                    </td>
     
    9898    <script>
    9999        //to set heading name
    100         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Share Counts');?>');
     100        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Share Counts'));?>');
    101101    </script>
    102102
  • miniorange-login-openid/trunk/view/soc_sha/shrt_co/mo_openid_shrtco.php

    r2560192 r2853010  
    88        <td style="font-size: 15px;">
    99
    10                 <br><br><b><?php echo mo_sl('Horizontal');?></b> --> <code id="1">[miniorange_social_sharing]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#1', '#shortcode_url1_copy')"><span id="shortcode_url1_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i></b><br><br>
    11                 <b><?php echo mo_sl('Vertical');?></b> --> <code id="2">[miniorange_social_sharing_vertical]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#2', '#shortcode_url2_copy')"><span id="shortcode_url2_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i>
     10                <br><br><b><?php echo esc_attr(mo_sl('Horizontal'));?></b> --> <code id="1">[miniorange_social_sharing]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#1', '#shortcode_url1_copy')"><span id="shortcode_url1_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i></b><br><br>
     11                <b><?php echo esc_attr(mo_sl('Vertical'));?></b> --> <code id="2">[miniorange_social_sharing_vertical]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#2', '#shortcode_url2_copy')"><span id="shortcode_url2_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i>
    1212                <!--Use [miniorange_social_sharing] Shortcode in the content of required page/post where you want to display horizontal Social Sharing Icons. Use [miniorange_social_sharing_vertical] shortcode for vertical Social Sharing Icons.--><br>
    1313
    1414               <br>
    15                 <h4><?php echo mo_sl('For Sharing Icons');?></h4>
    16                <?php echo mo_sl(' You can use  different attribute to customize social sharing icons. All attributes are optional');?>.<br>
    17                 <b><?php echo mo_sl('Example');?>:</b> <code id="3" style="font-size: 14px"> [miniorange_social_sharing  shape="square" heading="Share with" color="#000000" fontcolor="blue" theme="customFont" space="14" size="30" url="https://www.miniorange.com"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#3', '#shortcode_url3_copy')"><span id="shortcode_url3_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i>
     15                <h4><?php echo esc_attr(mo_sl('For Sharing Icons'));?></h4>
     16               <?php echo esc_attr(mo_sl(' You can use  different attribute to customize social sharing icons. All attributes are optional'));?>.<br>
     17                <b><?php echo esc_attr(mo_sl('Example'));?>:</b> <code id="3" style="font-size: 14px"> [miniorange_social_sharing  shape="square" heading="Share with" color="#000000" fontcolor="blue" theme="customFont" space="14" size="30" url="https://www.miniorange.com"]</code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="far fa-fw fa-lg fa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#3', '#shortcode_url3_copy')"><span id="shortcode_url3_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i>
    1818                <br><br>
    1919
    20                 <h4 style="margin-bottom:0 !important"><?php echo mo_sl('Common attributes - Horizontal and Vertical');?></h4>
    21                 <b><?php echo mo_sl('shape');?></b>:<?php echo mo_sl(' round, roundededges, square');?><br>
    22                 <b><?php echo mo_sl('theme');?></b>: <?php echo mo_sl('default, custombackground, nobackground');?><br>
    23                 <b><?php echo mo_sl('size');?></b>: <?php echo mo_sl('Any value between 20 to 100');?><br>
    24                 <b><?php echo mo_sl('space');?></b>: <?php echo mo_sl('Any value between 0 to 50');?><br>
    25                 <b><?php echo mo_sl('url');?></b>: <?php echo mo_sl('Enter custom URL for sharing');?><br>
    26                 <b><?php echo mo_sl('fontcolor');?></b>: <?php echo mo_sl('Enter custom color for icons (only works with no background theme');?><br>
    27                 <b><?php echo mo_sl('sharecnt');?></b>:<?php echo mo_sl(' yes, no ');?><b>*<?php echo mo_sl('To see social share count*');?></b><br>
    28                 <h4 style="margin-bottom:0 !important"><?php echo mo_sl('Horizontal attributes');?></h4>
    29                 <b><?php echo mo_sl('heading');?></b>: <?php echo mo_sl('Enter custom heading text');?><br>
    30                 <b><?php echo mo_sl('color');?></b>:<?php echo mo_sl(' Enter custom text color for heading eg: cyan, red, blue, orange, yellow');?> <br>
     20                <h4 style="margin-bottom:0 !important"><?php echo esc_attr(mo_sl('Common attributes - Horizontal and Vertical'));?></h4>
     21                <b><?php echo esc_attr(mo_sl('shape'));?></b>:<?php echo esc_attr(mo_sl(' round, roundededges, square'));?><br>
     22                <b><?php echo esc_attr(mo_sl('theme'));?></b>: <?php echo esc_attr(mo_sl('default, custombackground, nobackground'));?><br>
     23                <b><?php echo esc_attr(mo_sl('size'));?></b>: <?php echo esc_attr(mo_sl('Any value between 20 to 100'));?><br>
     24                <b><?php echo esc_attr(mo_sl('space'));?></b>: <?php echo esc_attr(mo_sl('Any value between 0 to 50'));?><br>
     25                <b><?php echo esc_attr(mo_sl('url'));?></b>: <?php echo esc_attr(mo_sl('Enter custom URL for sharing'));?><br>
     26                <b><?php echo esc_attr(mo_sl('fontcolor'));?></b>: <?php echo esc_attr(mo_sl('Enter custom color for icons (only works with no background theme'));?><br>
     27                <b><?php echo esc_attr(mo_sl('sharecnt'));?></b>:<?php echo esc_attr(mo_sl(' yes, no '));?><b>*<?php echo esc_attr(mo_sl('To see social share count*'));?></b><br>
     28                <h4 style="margin-bottom:0 !important"><?php echo esc_attr(mo_sl('Horizontal attributes'));?></h4>
     29                <b><?php echo esc_attr(mo_sl('heading'));?></b>: <?php echo esc_attr(mo_sl('Enter custom heading text'));?><br>
     30                <b><?php echo esc_attr(mo_sl('color'));?></b>:<?php echo esc_attr(mo_sl(' Enter custom text color for heading eg: cyan, red, blue, orange, yellow'));?> <br>
    3131                <br>
    32                 <b><?php echo mo_sl('Vertical attributes');?></b><br>
    33                 <b><?php echo mo_sl('alignment');?></b>: <?php echo mo_sl('left,right');?><br>
    34                 <b><?php echo mo_sl('topoffset');?></b>: <?php echo mo_sl('Any value(height from top) between 0 to 1000');?><br>
    35                 <b><?php echo mo_sl('rightoffset(Applicable if alignment is right)');?></b>: <?php echo mo_sl('Any value between 0 to 200');?><br>
    36                 <b><?php echo mo_sl('leftoffset(Applicable if alignment is left)');?></b>: <?php echo mo_sl('Any value between 0 to 200');?><br>
     32                <b><?php echo esc_attr(mo_sl('Vertical attributes'));?></b><br>
     33                <b><?php echo esc_attr(mo_sl('alignment'));?></b>: <?php echo esc_attr(mo_sl('left,right'));?><br>
     34                <b><?php echo esc_attr(mo_sl('topoffset'));?></b>: <?php echo esc_attr(mo_sl('Any value(height from top) between 0 to 1000'));?><br>
     35                <b><?php echo esc_attr(mo_sl('rightoffset(Applicable if alignment is right)'));?></b>: <?php echo esc_attr(mo_sl('Any value between 0 to 200'));?><br>
     36                <b><?php echo esc_attr(mo_sl('leftoffset(Applicable if alignment is left)'));?></b>: <?php echo esc_attr(mo_sl('Any value between 0 to 200'));?><br>
    3737
    3838
     
    4343    <script>
    4444        //to set heading name
    45         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Sharing Shortcode');?>');
     45        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Social Sharing Shortcode'));?>');
    4646
    4747        //copy to clipboard
  • miniorange-login-openid/trunk/view/soc_sha/soc_apps/mo_openid_sharing.php

    r2788668 r2853010  
    11<?php
    2 require_once( ABSPATH . 'wp-includes/plugin.php' );
    3 function mo_openid_share_apps()
    4 {
    5 
    6     ?>
     2require_once ABSPATH . 'wp-includes/plugin.php';
     3function mo_openid_share_apps() {
     4    ?>
    75
    86<form id="social_share" name="social_share" method="post" action="">
    9     <input type="hidden" name="option" value="mo_openid_social_settings"/>
    10     <input type="hidden" name="mo_openid_social_settings_nonce"
    11            value="<?php echo wp_create_nonce('mo-openid-social-settings-nonce'); ?>"/>
    12     <div class="mo_openid_table_layout">
    13         <table style="width: 100%;">
    14             <tr id="sel_apps">
    15                 <td><h3 ><?php echo mo_sl('Select Social Apps');?> </h3>
    16                     <table style="width: 100%">
    17                         <p style="font-size: 17px;"><?php echo mo_sl('Select applications to enable social sharing');?></p>
    18                         <tr>
    19                             <td class="mo_openid_table_td_checkbox">
    20 
    21                         <tr>
    22 
    23                             <td style="width:20%">
    24 
    25                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Facebook');?>
    26                                     <input type="checkbox" id="mo_openid_facebook_share_enable" class="app_enable"
    27                                            name="mo_openid_facebook_share_enable" value="1"
    28                                            onclick="addSelectedApps(this,'facebook');moSharingPreview();mo_openid_enable_share('mo_openid_facebook_share_enable');" <?php checked(get_option('mo_openid_facebook_share_enable') == 1); ?> />
    29                                     <span class="mo_openid_checkbox_checkmark"></span>
    30                                 </label>
    31                             </td>
    32                             <td style="width:20%">
    33                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Twitter');?>.
    34                                     <input type="checkbox"
    35                                            id="mo_openid_twitter_share_enable" class="app_enable"
    36                                            name="mo_openid_twitter_share_enable" value="1" onclick="addSelectedApps(this,'twitter');mo_openid_enable_share('mo_openid_twitter_share_enable');"
    37                                         <?php checked(get_option('mo_openid_twitter_share_enable') == 1); ?> />
    38                                       <span class="mo_openid_checkbox_checkmark"></span>
    39                                 </label>
    40                             </td>
    41                             <td style="width:20%">
    42 
    43 
    44                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Google');?>
    45                                     <input type="checkbox" id="mo_openid_google_share_enable" class="app_enable"
    46                                            name="mo_openid_google_share_enable" value="1" onclick="addSelectedApps(this,'google');mo_openid_enable_share('mo_openid_google_share_enable');"
    47                                         <?php checked(get_option('mo_openid_google_share_enable') == 1); ?> />
    48                                     <span class="mo_openid_checkbox_checkmark"></span>
    49                                 </label>
    50 
    51 
    52 
    53                             </td>
    54 
    55                             <td style="width:20%">
    56 
    57 
    58                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Vkontakte');?>
    59                                     <input type="checkbox" id="mo_openid_vkontakte_share_enable" class="app_enable"
    60                                            name="mo_openid_vkontakte_share_enable" value="1"
    61                                            onclick="addSelectedApps(this,'vkontakte');mo_openid_enable_share('mo_openid_vkontakte_share_enable');" <?php checked(get_option('mo_openid_vkontakte_share_enable') == 1); ?> />
    62                                     <span class="mo_openid_checkbox_checkmark"></span>
    63                                 </label>
    64 
    65 
    66 
    67                             </td>
    68                             <td style="width:20%">
    69 
    70 
    71                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Tumblr');?>
    72                                     <input type="checkbox"
    73                                            id="mo_openid_tumblr_share_enable" class="app_enable"
    74                                            name="mo_openid_tumblr_share_enable" value="1" onclick="addSelectedApps(this,'tumblr');mo_openid_enable_share('mo_openid_tumblr_share_enable');"
    75                                         <?php checked(get_option('mo_openid_tumblr_share_enable') == 1); ?> />
    76                                     <span class="mo_openid_checkbox_checkmark"></span>
    77                                 </label>
    78 
    79 
    80 
    81 
    82                             </td>
    83                         </tr>
    84                         <tr>
    85                             <td style="width:20%">
    86 
    87 
    88                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('StumbleUpon');?>
    89                                     <input type="checkbox" id="mo_openid_stumble_share_enable" class="app_enable"
    90                                            name="mo_openid_stumble_share_enable" value="1"
    91                                            onclick="addSelectedApps(this,'stumble');mo_openid_enable_share('mo_openid_stumble_share_enable');" <?php checked(get_option('mo_openid_stumble_share_enable') == 1); ?> />
    92                                     <span class="mo_openid_checkbox_checkmark"></span>
    93                                 </label>
    94 
    95 
    96 
    97 
    98                             </td>
    99                             <td style="width:20%">
    100 
    101 
    102                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('LinkedIn');?>
    103                                     <input type="checkbox" id="mo_openid_linkedin_share_enable" class="app_enable"
    104                                            name="mo_openid_linkedin_share_enable" value="1" onclick="addSelectedApps(this,'linkedin');mo_openid_enable_share('mo_openid_linkedin_share_enable');"
    105                                         <?php checked(get_option('mo_openid_linkedin_share_enable') == 1); ?> />
    106                                     <span class="mo_openid_checkbox_checkmark"></span>
    107                                 </label>
    108 
    109 
    110 
    111                             </td>
    112                             <td style="width:20%">
    113 
    114 
    115                                 <label class="mo_openid_checkbox_container">Reddit
    116                                     <input type="checkbox"
    117                                            id="mo_openid_reddit_share_enable" class="app_enable"
    118                                            name="mo_openid_reddit_share_enable" value="1" onclick="addSelectedApps(this,'reddit');mo_openid_enable_share('mo_openid_reddit_share_enable');"
    119                                         <?php checked(get_option('mo_openid_reddit_share_enable') == 1); ?> />
    120                                     <span class="mo_openid_checkbox_checkmark"></span>
    121                                 </label>
    122 
    123 
    124 
    125 
    126                             </td>
    127                             <td style="width:20%">
    128 
    129 
    130 
    131                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Pinterest');?>
    132                                     <input type="checkbox" id="mo_openid_pinterest_share_enable" class="app_enable"
    133                                            name="mo_openid_pinterest_share_enable" value="1"
    134                                            onclick="addSelectedApps(this,'pinterest');mo_openid_enable_share('mo_openid_pinterest_share_enable');"
    135                                         <?php checked(get_option('mo_openid_pinterest_share_enable') == 1); ?> />
    136                                     <span class="mo_openid_checkbox_checkmark"></span>
    137                                 </label>
    138 
    139 
    140 
    141 
    142                             </td>
    143                             <td style="width:20%">
    144 
    145                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Pocket');?>
    146                                     <input type="checkbox" id="mo_openid_pocket_share_enable" class="app_enable"
    147                                            name="mo_openid_pocket_share_enable" value="1"
    148                                            onclick="addSelectedApps(this,'pocket');mo_openid_enable_share('mo_openid_pocket_share_enable');" <?php checked(get_option('mo_openid_pocket_share_enable') == 1); ?> />
    149                                     <span class="mo_openid_checkbox_checkmark"></span>
    150                                 </label>
    151 
    152 
    153 
    154 
    155 
    156                             </td>
    157                         </tr>
    158                         <tr>
    159                             <td style="width:20%">
    160 
    161 
    162                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Digg');?>
    163                                     <input type="checkbox" id="mo_openid_digg_share_enable" class="app_enable"
    164                                            name="mo_openid_digg_share_enable" value="1"
    165                                            onclick="addSelectedApps(this,'digg');mo_openid_enable_share('mo_openid_digg_share_enable');" <?php checked(get_option('mo_openid_digg_share_enable') == 1); ?> />
    166                                     <span class="mo_openid_checkbox_checkmark"></span>
    167                                 </label>
    168 
    169                             <td style="width:20%">
    170 
    171                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Email');?>
    172                                     <input type="checkbox" id="mo_openid_mail_share_enable" class="app_enable"
    173                                            name="mo_openid_mail_share_enable" value="1"
    174                                            onclick="addSelectedApps(this,'mail');mo_openid_enable_share('mo_openid_mail_share_enable');" <?php checked(get_option('mo_openid_mail_share_enable') == 1); ?> />
    175                                     <span class="mo_openid_checkbox_checkmark"></span>
    176                                 </label>
    177 
    178 
    179 
    180                             </td>
    181                             <td style="width:20%">
    182 
    183                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl("Print");?>
    184                                     <input type="checkbox" id="mo_openid_print_share_enable" class="app_enable"
    185                                            name="mo_openid_print_share_enable" value="1"
    186                                            onclick="addSelectedApps(this,'print');mo_openid_enable_share('mo_openid_print_share_enable');" <?php checked(get_option('mo_openid_print_share_enable') == 1); ?> />
    187                                     <span class="mo_openid_checkbox_checkmark"></span>
    188                                 </label>
    189 
    190 
    191                             </td>
    192                             <td style="width:20%">
    193 
    194                                 <label class="mo_openid_checkbox_container"><?php echo mo_sl('Whatsapp');?>
    195                                     <input type="checkbox" id="mo_openid_whatsapp_share_enable" class="app_enable"
    196                                            name="mo_openid_whatsapp_share_enable" value="1"
    197                                            onclick="addSelectedApps(this,'whatsapp');mo_openid_enable_share('mo_openid_whatsapp_share_enable');" <?php checked(get_option('mo_openid_whatsapp_share_enable') == 1); ?> />
    198                                     <span class="mo_openid_checkbox_checkmark"></span>
    199                                 </label>
    200 
    201 
    202                             </td>
    203                             <td style="width:20%">
    204 
    205 
    206                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Amazon_wishlist');?>
    207                                     <input type="checkbox" id="mo_openid_amazon_wishlist_share_enable" disabled/>
    208                                     <span class="mo_openid_checkbox_checkmark"></span>
    209                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    210                                 </label>
    211 
    212 
    213                             </td>
    214                         </tr>
    215                         <tr>
    216                             <td style="width:20%">
    217 
    218 
    219                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Telegram');?>
    220                                     <input type="checkbox" id="mo_openid_telegram_share_enable"  disabled/>
    221                                     <span class="mo_openid_checkbox_checkmark"></span>
    222                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    223                                 </label>
    224 
    225 
    226                             </td>
    227                             <td style="width:20%">
    228 
    229 
    230                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Line');?>
    231                                     <input type="checkbox" id="mo_openid_line_share_enable"  disabled/>
    232                                     <span class="mo_openid_checkbox_checkmark"></span>
    233                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    234                                 </label>
    235 
    236 
    237                             </td>
    238                             <td style="width:20%">
    239 
    240 
    241                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Yahoo');?>
    242                                     <input type="checkbox" id="mo_openid_yahoo_mail_share_enable" disabled/>
    243                                     <span class="mo_openid_checkbox_checkmark"></span>
    244                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    245                                 </label>
    246 
    247 
    248                             </td>
    249                              <td style="width:20%">
    250 
    251 
    252                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Renren');?>
    253                                     <input type="checkbox" id="mo_openid_renren_share_enable"  disabled/>
    254                                     <span class="mo_openid_checkbox_checkmark"></span>
    255                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    256                                 </label>
    257 
    258 
    259                             </td>
    260                             <td style="width:20%">
    261 
    262 
    263                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Buffer');?>
    264                                     <input type="checkbox" id="mo_openid_buffer_share_enable"  disabled/>
    265                                     <span class="mo_openid_checkbox_checkmark"></span>
    266                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    267                                 </label>
    268 
    269                         </tr>
    270                         <tr>
    271                             <td style="width:20%">
    272 
    273 
    274                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Instapaper');?>
    275                                     <input type="checkbox" id="mo_openid_instapaper_share_enable" disabled/>
    276                                     <span class="mo_openid_checkbox_checkmark"></span>
    277                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    278                                 </label>
    279 
    280 
    281                             </td>
    282                             <td style="width:20%">
    283 
    284 
    285                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Mewe');?>
    286                                     <input type="checkbox" id="mo_openid_mewe_share_enable" disabled/>
    287                                     <span class="mo_openid_checkbox_checkmark"></span>
    288                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    289                                 </label>
    290 
    291 
    292                             </td>
    293                             <td style="width:20%">
    294 
    295 
    296                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Livejournal');?>
    297                                     <input type="checkbox" id="mo_openid_livejournal_share_enable" disabled/>
    298                                     <span class="mo_openid_checkbox_checkmark"></span>
    299                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    300                                 </label>
    301 
    302 
    303                             </td>
    304                             <td style="width:20%">
    305 
    306 
    307                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Mix');?>
    308                                     <input type="checkbox" id="mo_openid_mix_share_enable" disabled/>
    309                                     <span class="mo_openid_checkbox_checkmark"></span>
    310                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    311                                 </label>
    312 
    313 
    314                             </td>
    315                             <td style="width:20%">
    316 
    317 
    318                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Aol_mail');?>
    319                                     <input type="checkbox" id="mo_openid_aol_mail_share_enable" disabled/>
    320                                     <span class="mo_openid_checkbox_checkmark"></span>
    321                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    322                                 </label>
    323 
    324 
    325                             </td>
    326                         </tr>
    327                         <tr>
    328                             <td style="width:20%">
    329 
    330 
    331                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Qzone');?>
    332                                     <input type="checkbox" id="mo_openid_qzone_share_enable" disabled/>
    333                                     <span class="mo_openid_checkbox_checkmark"></span>
    334                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    335                                 </label>
    336 
    337 
    338                             </td>
    339                             <td style="width:20%">
    340 
    341 
    342                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Gmail');?>
    343                                     <input type="checkbox" id="mo_openid_gmail_share_enable" disabled/>
    344                                     <span class="mo_openid_checkbox_checkmark"></span>
    345                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    346                                 </label>
    347 
    348 
    349                             </td>
    350                             <td style="width:20%">
    351 
    352 
    353                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Typepad_post');?>
    354                                     <input type="checkbox" id="mo_openid_typepad_post_share_enable"  disabled/>
    355                                     <span class="mo_openid_checkbox_checkmark"></span>
    356                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    357                                 </label>
    358 
    359 
    360                             </td>
    361                             <td style="width:20%">
    362 
    363 
    364                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Fark');?>
    365                                     <input type="checkbox" id="mo_openid_fark_share_enable"  disabled/>
    366                                     <span class="mo_openid_checkbox_checkmark"></span>
    367                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    368                                 </label>
    369 
    370 
    371                             </td>
    372                             <td style="width:20%">
    373 
    374 
    375                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Bookmark');?>
    376                                     <input type="checkbox" id="mo_openid_bookmark_share_enable"  disabled/>
    377                                     <span class="mo_openid_checkbox_checkmark"></span>
    378                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    379                                 </label>
    380 
    381 
    382                             </td>
    383                         </tr>
    384                         <tr>
    385                             <td style="width:20%">
    386 
    387 
    388                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Fintel');?>
    389                                     <input type="checkbox" id="mo_openid_fintel_share_enable"  disabled/>
    390                                     <span class="mo_openid_checkbox_checkmark"></span>
    391                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    392                                 </label>
    393 
    394 
    395                             </td>
    396                             <td style="width:20%">
    397 
    398 
    399                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Mendeley');?>
    400                                     <input type="checkbox" id="mo_openid_mendeley_share_enable"  disabled/>
    401                                     <span class="mo_openid_checkbox_checkmark"></span>
    402                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    403                                 </label>
    404 
    405 
    406                             </td>
    407                             <td style="width:20%">
    408 
    409 
    410                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Slashdot');?>
    411                                     <input type="checkbox" id="mo_openid_slashdot_share_enable"
    412                                             disabled/>
    413                                     <span class="mo_openid_checkbox_checkmark"></span>
    414                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    415                                 </label>
    416 
    417 
    418                             </td>
    419                             <td style="width:20%">
    420 
    421 
    422                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Wanelo');?>
    423                                     <input type="checkbox" id="mo_openid_wanelo_share_enable" disabled/>
    424                                     <span class="mo_openid_checkbox_checkmark"></span>
    425                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    426                                 </label>
    427 
    428 
    429                             </td>
    430                             <td style="width:20%">
    431 
    432 
    433                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Classroom');?>
    434                                     <input type="checkbox" id="mo_openid_google_classroom_share_enable"  disabled/>
    435                                     <span class="mo_openid_checkbox_checkmark"></span>
    436                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    437                                 </label>
    438 
    439 
    440                             </td>
    441                         </tr>
    442                         <tr>
    443                             <td style="width:20%">
    444 
    445 
    446                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Yummly');?>
    447                                     <input type="checkbox" id="mo_openid_yummly_share_enable"  disabled/>
    448                                     <span class="mo_openid_checkbox_checkmark"></span>
    449                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    450                                 </label>
    451 
    452 
    453                             </td>
    454                             <td style="width:20%">
    455 
    456 
    457                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Hacker_news');?>
    458                                     <input type="checkbox" id="mo_openid_hacker_news_share_enable"  disabled/>
    459                                     <span class="mo_openid_checkbox_checkmark"></span>
    460                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    461                                 </label>
    462 
    463 
    464                             </td>
    465                             <td style="width:20%">
    466 
    467 
    468                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Kakao');?>
    469                                     <input type="checkbox" id="mo_openid_kakao_share_enable" disabled/>
    470                                     <span class="mo_openid_checkbox_checkmark"></span>
    471                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    472                                 </label>
    473 
    474 
    475                             </td>
    476                             <td style="width:20%">
    477 
    478 
    479                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Plurk');?>
    480                                     <input type="checkbox" id="mo_openid_plurk_share_enable"  disabled/>
    481                                     <span class="mo_openid_checkbox_checkmark"></span>
    482                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    483                                 </label>
    484 
    485 
    486                             </td>
    487                             <td style="width:20%">
    488 
    489 
    490                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Trello');?>
    491                                     <input type="checkbox" id="mo_openid_trello_share_enable" disabled/>
    492                                     <span class="mo_openid_checkbox_checkmark"></span>
    493                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    494                                 </label>
    495 
    496 
    497                             </td>
    498                         </tr>
    499                         <tr>
    500                             <td style="width:20%">
    501 
    502 
    503                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Wykop');?>
    504                                     <input type="checkbox" id="mo_openid_wykop_share_enable"  disabled/>
    505                                     <span class="mo_openid_checkbox_checkmark"></span>
    506                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    507                                 </label>
    508 
    509 
    510                             </td>
    511                             <td style="width:20%">
    512 
    513 
    514                                 <label class="mo_openid_checkbox_container_disable"><?php echo mo_sl('Weibo');?>
    515                                     <input type="checkbox" id="mo_openid_weibo_share_enable" disabled/>
    516                                     <span class="mo_openid_checkbox_checkmark"></span>
    517                                     <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a>
    518                                 </label>
    519 
    520 
    521                             </td>
    522 
    523                             </td>
    524                         </tr>
    525 
    526                         </td>
    527                         </tr>
    528 
    529                         </td>
    530                         </tr>
    531                     </table>
    532 
    533             <tr><td>&nbsp;</td></tr>
    534 
    535             <tr>
    536                 <td><b>Preview: </b><br/><span hidden id="no_apps_text"><?php echo mo_sl('No apps selected');?></span></td>
    537             </tr>
    538 
    539             <tr>
    540                 <td>
    541 
    542                     <div>
    543                         <?php
    544                         $default_color= array('facebook'=>'#1877F2','google'=>'#DB4437','vk'=>'#466482','twitter'=>'#2795e9','digg'=>'#000000','yahoo'=>'#430297','yandex'=>'#2795e9','instagram'=>'#3f729b','linkedin'=>'#007bb6','pocket'=>'#ee4056','print'=>'#ee4056','whatsapp'=>'#25D366','mail'=>'#787878','amazon'=>'#ff9900','paypal'=>'#0d127a','stumble'=>'#f74425','salesforce'=>'#1ab7ea','apple'=>'#000000','steam'=>'#000000','wordpress'=>'#587ea3','pinterest'=>'#cb2027','spotify'=>'#19bf61','tumblr'=>'#2c4762','twitch'=>'#720e9e','github'=>'#000000','dribbble'=>'#ee66aa','flickr'=>'#ff0084','stackexchange'=>'0000ff','snapchat'=>'#fffc00','reddit'=>'#ff4301','odnoklassniki'=>'#f97400','foursquare'=>'#f94877','wechat'=>'#00c300','vimeo'=>'#1ab7ea','line'=>'#00c300','hubspot'=>'#fa7820','discord'=>'#7289da','meetup'=>'#e51937','stackexchange'=>'#0000FF','wiebo'=>'#df2029','kakao'=>'#ffe812','livejournal'=>'#3c1361','naver'=>'#3EAF0E','teamsnap'=>'#ff9a1a');
    545 
    546                         $share_app=get_option('share_app');
    547                        
    548                         $share_app=explode('#',$share_app);
    549                         foreach ($share_app as $active_app) {
    550                             $icon = $active_app;
    551                             if ($active_app == 'vkontakte') {
    552                                 $icon = 'vk';
    553                             }
    554                             if ($active_app == 'mail') {
    555                                 $icon = 'envelope';
    556                             }
    557                             if ($active_app == 'pocket') {
    558                                 $icon = 'get-pocket';
    559                             }
    560                             if ($active_app == 'print') {
    561                                 $icon = 'file-alt';
    562                             }
    563                             if ($active_app == 'stumble') {
    564                                 $icon = 'stumbleupon';
    565                             }
    566                             if ( $active_app == 'pocket' || $active_app == 'stumble') {
    567 
    568                                 ?>
    569 
    570                                 <i class="mo_sharing_icon_preview fab fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$active_app]; ?>;color: #ffffff"
    571                                    id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    572                                 <i class="mo_custom_sharing_icon_preview fab fa-<?php echo $icon ?>"
    573                                    id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
    574                                    style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    575                                 <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo $icon ?>"
    576                                    id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
    577                                    style="text-align:center;margin-top:5px;"></i>
    578 
    579 
    580                                 <?php
    581                             }
    582                             else if ( $active_app == 'print' || $active_app == 'mail') {
    583 
    584                                 ?>
    585 
    586                                 <i class="mo_sharing_icon_preview far fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$active_app]; ?>;color: #ffffff"
    587                                      id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    588                                 <i class="mo_custom_sharing_icon_preview far fa-<?php echo $icon ?>"
    589                                    id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
    590                                    style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    591                                 <i class="mo_custom_sharing_icon_font_preview far fa-<?php echo $icon ?>"
    592                                    id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
    593                                    style="text-align:center;margin-top:5px;"></i>
    594 
    595 
    596                                 <?php
    597                             }
    598 
    599                            else {
    600 
    601                                     ?>
    602                                     <i class="mo_sharing_icon_preview fab fa-<?php echo $icon ?>" style="display: none;text-align:center;background: <?php echo $default_color[$icon]; ?>;color: #ffffff"
    603                                        id="mo_sharing_icon_preview_<?php echo $active_app ?>"></i>
    604 
    605                                     <i class="mo_custom_sharing_icon_preview fab fa-<?php echo $active_app ?>"
    606                                        id="mo_custom_sharing_icon_preview_<?php echo $active_app ?>"
    607                                        style="color:#ffffff;text-align:center;margin-top:5px;"></i>
    608 
    609                                     <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo $active_app ?>"
    610                                        id="mo_custom_sharing_icon_font_preview_<?php echo $active_app ?>"
    611                                        style="text-align:center;margin-top:5px;"></i>
    612 
    613                                     <?php
    614                                 }
    615                         }
    616 
    617 
    618 
    619                         ?>
    620                         <script>
    621                             var radio = "<?php echo get_option('mo_openid_share_custom_theme') ?>";
    622 
    623                             var application = ["facebook","twitter","google","vkontakte","tumblr","stumble","linkedin","reddit","pinterest","pocket","digg","delicious","odnoklassniki","mail","print","whatsapp"];
    624                             jQuery(document).ready(function () {
    625                                 application.forEach(myFunction);
    626                                 check_sharing_enable_apps();
    627                             });
    628                             function myFunction(item) {
    629 
    630                                 var b = '#mo_sharing_icon_preview_' + item;
    631                                 var c='#mo_custom_sharing_icon_preview_'+item;
    632                                 var d='#mo_custom_sharing_icon_font_preview_'+item;
    633                                 jQuery(d).toggle(0.00000000000000000000000000000000000000000000000000000001);
    634                                 jQuery(c).toggle(0.00000000000000000000000000000000000000000000000000000001);
    635 
    636                                 jQuery(b).toggle(0.00000000000000000000000000000000000000000000000000000001);
    637                                 if(radio !== "default"){
    638                                     jQuery(b).toggle(0.00000000000000000000000000000000000000000000000000000001);
    639 
    640                                 }
    641                                 if(radio !=="custom") {
    642                                     jQuery(c).toggle(0.00000000000000000000000000000000000000000000000000000001);
    643                                 }
    644                                 if(radio !=="customFont") {
    645                                     jQuery(d).toggle(0.00000000000000000000000000000000000000000000000000000001);
    646                                 }
    647                             }
    648 
    649                             function check_sharing_enable_apps() {
    650                                 var mo_sharing_app_value_nonce = <?php echo wp_create_nonce('mo-sharing-app-value-nonce'); ?>;
    651                                 jQuery.ajax({
    652                                     url: "<?php echo admin_url("admin-ajax.php");?>", //the page containing php script
    653                                     method: "POST", //request type,
    654                                     data: {
    655                                         action: 'mo_sharing_app_value',
    656                                         app_name: application,
    657                                         'mo_sharing_app_value_nonce': mo_sharing_app_value_nonce,
    658                                     },
    659                                     success: function (result){
    660                                         var strArray = result.split("#");
    661                                         strArray.forEach(show_apps);
    662 
    663                                     }
    664                                 });
    665                             }
    666                             function show_apps(apps) {
    667 
    668                                 if(radio=="default") {
    669                                     jQuery('#mo_sharing_icon_preview_' + apps).show();
    670                                 }
    671                                 if(radio=="custom") {
    672                                     jQuery('#mo_custom_sharing_icon_preview_' + apps).show();
    673                                 }
    674                                 if(radio=="customFont") {
    675                                     jQuery('#mo_custom_sharing_icon_font_preview_' + apps).show();
    676                                 }
    677                             }
    678 
    679                         </script>
    680                     </div>
    681 
    682                 </td>
    683             </tr>
    684 
    685 
    686 
    687             </td>
    688             </tr>
    689 
    690             <script>
    691                 var tempHorSize = '<?php echo esc_attr(get_option('mo_sharing_icon_custom_size')) ?>';
    692                 var tempHorShape = '<?php echo esc_attr(get_option('mo_openid_share_theme')) ?>';
    693                 var tempHorTheme = '<?php echo esc_attr(get_option('mo_openid_share_custom_theme')) ?>';
    694                 var tempbackColor = '<?php echo esc_attr(get_option('mo_sharing_icon_custom_color'))?>';
    695                 var tempHorSpace = '<?php echo esc_attr(get_option('mo_sharing_icon_space'))?>';
    696                 var tempHorFontColor = '<?php echo esc_attr(get_option('mo_sharing_icon_custom_font'))?>';
    697 
    698             </script>
    699 
    700 
    701             <script type="text/javascript">
    702                 var selectedApps = [];
    703 
    704 
    705                 function addSelectedApps(e,app_name) {
    706                     var radio = "<?php echo get_option('mo_openid_share_custom_theme') ?>";
    707                     var flag = jQuery("#sel_apps .app_enable:checked").length + 1;
    708                     var value_of_app_default= ("#mo_sharing_icon_preview_" + app_name);
    709                     var value_of_app_custom=("#mo_custom_sharing_icon_preview_"+app_name);
    710                     var value_of_app_no=("#mo_custom_sharing_icon_font_preview_"+app_name);
    711 
    712 
    713                     if (e.checked) {
    714 
    715                         flag++;
    716                         if (radio== 'default') {
    717 
    718                             jQuery(value_of_app_default).show();
    719                         }
    720                         if (radio== 'custom') {
    721 
    722                             jQuery(value_of_app_custom).show();
    723                         }
    724                         if (radio=='customFont') {
    725 
    726                             jQuery(value_of_app_no).show();
    727                         }
    728                     } else if (!e.checked) {
    729 
    730 
    731                         flag--;
    732                         jQuery(value_of_app_default).hide();
    733                         jQuery(value_of_app_custom).hide();
    734                         jQuery(value_of_app_no).hide();
    735                     }
    736 
    737                     if (flag) {
    738 
    739                         jQuery("#no_apps_text").hide();
    740                     } else {
    741                         jQuery("#no_apps_text").show();
    742                     }
    743 
    744                 }
    745 
    746                 function moSharingPreview(e,t,r,w,h,n,x){
    747 
    748 
    749                     if("default"==w){
    750                         var a="mo_sharing_icon_preview";
    751                         jQuery('.mo_sharing_icon_preview').show();
    752                         jQuery('.mo_custom_sharing_icon_preview').hide();
    753                         jQuery('.mo_custom_sharing_icon_font_preview').hide();
    754                         jQuery("."+a).css({height:t-8,width:t});
    755                         jQuery("."+a).css("font-size",(t-16)+"px");
    756                         jQuery("."+a).css("padding-top","8px");
    757 
    758 
    759                         if(r=="circle"){
    760                             jQuery("."+a).css("borderRadius","999px");
    761                         }else if(r=="oval"){
    762                             jQuery("."+a).css("borderRadius","5px");
    763                         }else if(r=="square"){
    764                             jQuery("."+a).css("borderRadius","0px");
    765                         }
    766 
    767                     }
    768                     else if(w == "custom"){
    769                         var a="mo_custom_sharing_icon_preview";
    770                         jQuery('.mo_sharing_icon_preview').hide();
    771                         jQuery('.mo_custom_sharing_icon_font_preview').hide();
    772                         jQuery('.mo_custom_sharing_icon_preview').show();
    773                         jQuery("."+a).css("background","#"+h);
    774                         jQuery("."+a).css("padding-top","8px");
    775                         jQuery("."+a).css({height:t-8,width:t});
    776                         jQuery("."+a).css("font-size",(t-16)+"px");
    777 
    778                         if(r=="circle"){
    779                             jQuery("."+a).css("borderRadius","999px");
    780                         }else if(r=="oval"){
    781                             jQuery("."+a).css("borderRadius","5px");
    782                         }else if(r=="square"){
    783                             jQuery("."+a).css("borderRadius","0px");
    784                         }
    785 
    786                         jQuery("."+a).css("margin-left",(n-4)+"px");
    787                     }
    788 
    789                     else if("customFont"==w){
    790 
    791                         var a="mo_custom_sharing_icon_font_preview";
    792                         jQuery('.mo_sharing_icon_preview').hide();
    793                         jQuery('.mo_custom_sharing_icon_preview').hide();
    794                         jQuery('.mo_custom_sharing_icon_font_preview').show();
    795                         jQuery("."+a).css("font-size",t+"px");
    796                         jQuery('.mo_custom_sharing_icon_font_preview').css("color","#"+x);
    797                         jQuery("."+a).css("margin-left",(n-4)+"px");
    798 
    799                         if(r=="circle"){
    800                             jQuery("."+a).css("borderRadius","999px");
    801 
    802                         }else if(r=="oval"){
    803                             jQuery("."+a).css("borderRadius","5px");
    804                         }else if(r=="square"){
    805                             jQuery("."+a).css("borderRadius","0px");
    806                         }
    807 
    808                     }
    809                     //addSelectedApps();
    810 
    811 
    812 
    813                 }
    814                 moSharingPreview('horizontal', tempHorSize, tempHorShape, tempHorTheme, tempbackColor, tempHorSpace, tempHorFontColor);
    815 
    816 
    817 
    818                 function mo_openid_enable_share(id_name) {
    819 
    820                     id=document.getElementById(id_name);
    821 
    822                     var mo_openid_share_nonce = '<?php echo wp_create_nonce("mo-openid-share"); ?>';
    823                     jQuery.ajax({
    824                         type: "POST",
    825                         url: '<?php echo admin_url("admin-ajax.php"); ?>',
    826                         data: {
    827                             'mo_openid_share_nonce': mo_openid_share_nonce,
    828                             id_name: id_name,
    829                             action:'mo_openid_share',
    830                             enabled:id.checked,
    831                         },
    832                         success: function(data) {
    833 
    834                         },
    835                         error: function (data){}
    836                     });
    837                 }
    838 
    839             </script>
    840 
    841             <tr>
    842                 <td>
    843                     <br/>
    844                     <p class="mo_openid_note_style"><strong>*<?php echo mo_sl('NOTE');?>:</strong><br/><?php echo mo_sl('Custom background: This will
    845                         change the background color of sharing icons');?>.
    846                         <br/><?php echo mo_sl('No background: This will change the font color of icons without background');?>.
    847                     </p>
    848                 </td>
    849             </tr>
    850 
    851 
    852 
    853         </table>
    854 
    855     </div>
    856     <script>
    857         //to set heading name
    858         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Sharing');?>');
    859     </script>
    860     <?php
    861     }
    862     ?>
     7    <input type="hidden" name="option" value="mo_openid_social_settings"/>
     8    <input type="hidden" name="mo_openid_social_settings_nonce"
     9           value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-social-settings-nonce' ) ); ?>"/>
     10    <div class="mo_openid_table_layout">
     11        <table style="width: 100%;">
     12            <tr id="sel_apps">
     13                <td><h3 ><?php echo esc_attr( mo_sl( 'Select Social Apps' ) ); ?> </h3>
     14                    <table style="width: 100%">
     15                        <p style="font-size: 17px;"><?php echo esc_attr( mo_sl( 'Select applications to enable social sharing' ) ); ?></p>
     16                        <tr>
     17                            <td class="mo_openid_table_td_checkbox">
     18
     19                        <tr>
     20
     21                            <td style="width:20%">
     22
     23                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Facebook' ) ); ?>
     24                                    <input type="checkbox" id="mo_openid_facebook_share_enable" class="app_enable"
     25                                           name="mo_openid_facebook_share_enable" value="1"
     26                                           onclick="addSelectedApps(this,'facebook');moSharingPreview();mo_openid_enable_share('mo_openid_facebook_share_enable');" <?php checked( get_option( 'mo_openid_facebook_share_enable' ) == 1 ); ?> />
     27                                    <span class="mo_openid_checkbox_checkmark"></span>
     28                                </label>
     29                            </td>
     30                            <td style="width:20%">
     31                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Twitter' ) ); ?>.
     32                                    <input type="checkbox"
     33                                           id="mo_openid_twitter_share_enable" class="app_enable"
     34                                           name="mo_openid_twitter_share_enable" value="1" onclick="addSelectedApps(this,'twitter');mo_openid_enable_share('mo_openid_twitter_share_enable');"
     35                                        <?php checked( get_option( 'mo_openid_twitter_share_enable' ) == 1 ); ?> />
     36                                      <span class="mo_openid_checkbox_checkmark"></span>
     37                                </label>
     38                            </td>
     39                            <td style="width:20%">
     40
     41
     42                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Google' ) ); ?>
     43                                    <input type="checkbox" id="mo_openid_google_share_enable" class="app_enable"
     44                                           name="mo_openid_google_share_enable" value="1" onclick="addSelectedApps(this,'google');mo_openid_enable_share('mo_openid_google_share_enable');"
     45                                        <?php checked( get_option( 'mo_openid_google_share_enable' ) == 1 ); ?> />
     46                                    <span class="mo_openid_checkbox_checkmark"></span>
     47                                </label>
     48
     49
     50
     51                            </td>
     52
     53                            <td style="width:20%">
     54
     55
     56                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Vkontakte' ) ); ?>
     57                                    <input type="checkbox" id="mo_openid_vkontakte_share_enable" class="app_enable"
     58                                           name="mo_openid_vkontakte_share_enable" value="1"
     59                                           onclick="addSelectedApps(this,'vkontakte');mo_openid_enable_share('mo_openid_vkontakte_share_enable');" <?php checked( get_option( 'mo_openid_vkontakte_share_enable' ) == 1 ); ?> />
     60                                    <span class="mo_openid_checkbox_checkmark"></span>
     61                                </label>
     62
     63
     64
     65                            </td>
     66                            <td style="width:20%">
     67
     68
     69                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Tumblr' ) ); ?>
     70                                    <input type="checkbox"
     71                                           id="mo_openid_tumblr_share_enable" class="app_enable"
     72                                           name="mo_openid_tumblr_share_enable" value="1" onclick="addSelectedApps(this,'tumblr');mo_openid_enable_share('mo_openid_tumblr_share_enable');"
     73                                        <?php checked( get_option( 'mo_openid_tumblr_share_enable' ) == 1 ); ?> />
     74                                    <span class="mo_openid_checkbox_checkmark"></span>
     75                                </label>
     76
     77
     78
     79
     80                            </td>
     81                        </tr>
     82                        <tr>
     83                            <td style="width:20%">
     84
     85
     86                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'StumbleUpon' ) ); ?>
     87                                    <input type="checkbox" id="mo_openid_stumble_share_enable" class="app_enable"
     88                                           name="mo_openid_stumble_share_enable" value="1"
     89                                           onclick="addSelectedApps(this,'stumble');mo_openid_enable_share('mo_openid_stumble_share_enable');" <?php checked( get_option( 'mo_openid_stumble_share_enable' ) == 1 ); ?> />
     90                                    <span class="mo_openid_checkbox_checkmark"></span>
     91                                </label>
     92
     93
     94
     95
     96                            </td>
     97                            <td style="width:20%">
     98
     99
     100                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'LinkedIn' ) ); ?>
     101                                    <input type="checkbox" id="mo_openid_linkedin_share_enable" class="app_enable"
     102                                           name="mo_openid_linkedin_share_enable" value="1" onclick="addSelectedApps(this,'linkedin');mo_openid_enable_share('mo_openid_linkedin_share_enable');"
     103                                        <?php checked( get_option( 'mo_openid_linkedin_share_enable' ) == 1 ); ?> />
     104                                    <span class="mo_openid_checkbox_checkmark"></span>
     105                                </label>
     106
     107
     108
     109                            </td>
     110                            <td style="width:20%">
     111
     112
     113                                <label class="mo_openid_checkbox_container">Reddit
     114                                    <input type="checkbox"
     115                                           id="mo_openid_reddit_share_enable" class="app_enable"
     116                                           name="mo_openid_reddit_share_enable" value="1" onclick="addSelectedApps(this,'reddit');mo_openid_enable_share('mo_openid_reddit_share_enable');"
     117                                        <?php checked( get_option( 'mo_openid_reddit_share_enable' ) == 1 ); ?> />
     118                                    <span class="mo_openid_checkbox_checkmark"></span>
     119                                </label>
     120
     121
     122
     123
     124                            </td>
     125                            <td style="width:20%">
     126
     127
     128
     129                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Pinterest' ) ); ?>
     130                                    <input type="checkbox" id="mo_openid_pinterest_share_enable" class="app_enable"
     131                                           name="mo_openid_pinterest_share_enable" value="1"
     132                                           onclick="addSelectedApps(this,'pinterest');mo_openid_enable_share('mo_openid_pinterest_share_enable');"
     133                                        <?php checked( get_option( 'mo_openid_pinterest_share_enable' ) == 1 ); ?> />
     134                                    <span class="mo_openid_checkbox_checkmark"></span>
     135                                </label>
     136
     137
     138
     139
     140                            </td>
     141                            <td style="width:20%">
     142
     143                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Pocket' ) ); ?>
     144                                    <input type="checkbox" id="mo_openid_pocket_share_enable" class="app_enable"
     145                                           name="mo_openid_pocket_share_enable" value="1"
     146                                           onclick="addSelectedApps(this,'pocket');mo_openid_enable_share('mo_openid_pocket_share_enable');" <?php checked( get_option( 'mo_openid_pocket_share_enable' ) == 1 ); ?> />
     147                                    <span class="mo_openid_checkbox_checkmark"></span>
     148                                </label>
     149
     150
     151
     152
     153
     154                            </td>
     155                        </tr>
     156                        <tr>
     157                            <td style="width:20%">
     158
     159
     160                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Digg' ) ); ?>
     161                                    <input type="checkbox" id="mo_openid_digg_share_enable" class="app_enable"
     162                                           name="mo_openid_digg_share_enable" value="1"
     163                                           onclick="addSelectedApps(this,'digg');mo_openid_enable_share('mo_openid_digg_share_enable');" <?php checked( get_option( 'mo_openid_digg_share_enable' ) == 1 ); ?> />
     164                                    <span class="mo_openid_checkbox_checkmark"></span>
     165                                </label>
     166
     167                            <td style="width:20%">
     168
     169                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Email' ) ); ?>
     170                                    <input type="checkbox" id="mo_openid_mail_share_enable" class="app_enable"
     171                                           name="mo_openid_mail_share_enable" value="1"
     172                                           onclick="addSelectedApps(this,'mail');mo_openid_enable_share('mo_openid_mail_share_enable');" <?php checked( get_option( 'mo_openid_mail_share_enable' ) == 1 ); ?> />
     173                                    <span class="mo_openid_checkbox_checkmark"></span>
     174                                </label>
     175
     176
     177
     178                            </td>
     179                            <td style="width:20%">
     180
     181                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Print' ) ); ?>
     182                                    <input type="checkbox" id="mo_openid_print_share_enable" class="app_enable"
     183                                           name="mo_openid_print_share_enable" value="1"
     184                                           onclick="addSelectedApps(this,'print');mo_openid_enable_share('mo_openid_print_share_enable');" <?php checked( get_option( 'mo_openid_print_share_enable' ) == 1 ); ?> />
     185                                    <span class="mo_openid_checkbox_checkmark"></span>
     186                                </label>
     187
     188
     189                            </td>
     190                            <td style="width:20%">
     191
     192                                <label class="mo_openid_checkbox_container"><?php echo esc_attr( mo_sl( 'Whatsapp' ) ); ?>
     193                                    <input type="checkbox" id="mo_openid_whatsapp_share_enable" class="app_enable"
     194                                           name="mo_openid_whatsapp_share_enable" value="1"
     195                                           onclick="addSelectedApps(this,'whatsapp');mo_openid_enable_share('mo_openid_whatsapp_share_enable');" <?php checked( get_option( 'mo_openid_whatsapp_share_enable' ) == 1 ); ?> />
     196                                    <span class="mo_openid_checkbox_checkmark"></span>
     197                                </label>
     198
     199
     200                            </td>
     201                            <td style="width:20%">
     202
     203
     204                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Amazon_wishlist' ) ); ?>
     205                                    <input type="checkbox" id="mo_openid_amazon_wishlist_share_enable" disabled/>
     206                                    <span class="mo_openid_checkbox_checkmark"></span>
     207                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     208                                </label>
     209
     210
     211                            </td>
     212                        </tr>
     213                        <tr>
     214                            <td style="width:20%">
     215
     216
     217                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Telegram' ) ); ?>
     218                                    <input type="checkbox" id="mo_openid_telegram_share_enable"  disabled/>
     219                                    <span class="mo_openid_checkbox_checkmark"></span>
     220                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     221                                </label>
     222
     223
     224                            </td>
     225                            <td style="width:20%">
     226
     227
     228                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Line' ) ); ?>
     229                                    <input type="checkbox" id="mo_openid_line_share_enable"  disabled/>
     230                                    <span class="mo_openid_checkbox_checkmark"></span>
     231                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     232                                </label>
     233
     234
     235                            </td>
     236                            <td style="width:20%">
     237
     238
     239                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Yahoo' ) ); ?>
     240                                    <input type="checkbox" id="mo_openid_yahoo_mail_share_enable" disabled/>
     241                                    <span class="mo_openid_checkbox_checkmark"></span>
     242                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     243                                </label>
     244
     245
     246                            </td>
     247                             <td style="width:20%">
     248
     249
     250                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Renren' ) ); ?>
     251                                    <input type="checkbox" id="mo_openid_renren_share_enable"  disabled/>
     252                                    <span class="mo_openid_checkbox_checkmark"></span>
     253                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     254                                </label>
     255
     256
     257                            </td>
     258                            <td style="width:20%">
     259
     260
     261                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Buffer' ) ); ?>
     262                                    <input type="checkbox" id="mo_openid_buffer_share_enable"  disabled/>
     263                                    <span class="mo_openid_checkbox_checkmark"></span>
     264                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     265                                </label>
     266
     267                        </tr>
     268                        <tr>
     269                            <td style="width:20%">
     270
     271
     272                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Instapaper' ) ); ?>
     273                                    <input type="checkbox" id="mo_openid_instapaper_share_enable" disabled/>
     274                                    <span class="mo_openid_checkbox_checkmark"></span>
     275                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     276                                </label>
     277
     278
     279                            </td>
     280                            <td style="width:20%">
     281
     282
     283                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Mewe' ) ); ?>
     284                                    <input type="checkbox" id="mo_openid_mewe_share_enable" disabled/>
     285                                    <span class="mo_openid_checkbox_checkmark"></span>
     286                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     287                                </label>
     288
     289
     290                            </td>
     291                            <td style="width:20%">
     292
     293
     294                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Livejournal' ) ); ?>
     295                                    <input type="checkbox" id="mo_openid_livejournal_share_enable" disabled/>
     296                                    <span class="mo_openid_checkbox_checkmark"></span>
     297                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     298                                </label>
     299
     300
     301                            </td>
     302                            <td style="width:20%">
     303
     304
     305                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Mix' ) ); ?>
     306                                    <input type="checkbox" id="mo_openid_mix_share_enable" disabled/>
     307                                    <span class="mo_openid_checkbox_checkmark"></span>
     308                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     309                                </label>
     310
     311
     312                            </td>
     313                            <td style="width:20%">
     314
     315
     316                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Aol_mail' ) ); ?>
     317                                    <input type="checkbox" id="mo_openid_aol_mail_share_enable" disabled/>
     318                                    <span class="mo_openid_checkbox_checkmark"></span>
     319                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     320                                </label>
     321
     322
     323                            </td>
     324                        </tr>
     325                        <tr>
     326                            <td style="width:20%">
     327
     328
     329                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Qzone' ) ); ?>
     330                                    <input type="checkbox" id="mo_openid_qzone_share_enable" disabled/>
     331                                    <span class="mo_openid_checkbox_checkmark"></span>
     332                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     333                                </label>
     334
     335
     336                            </td>
     337                            <td style="width:20%">
     338
     339
     340                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Gmail' ) ); ?>
     341                                    <input type="checkbox" id="mo_openid_gmail_share_enable" disabled/>
     342                                    <span class="mo_openid_checkbox_checkmark"></span>
     343                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     344                                </label>
     345
     346
     347                            </td>
     348                            <td style="width:20%">
     349
     350
     351                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Typepad_post' ) ); ?>
     352                                    <input type="checkbox" id="mo_openid_typepad_post_share_enable"  disabled/>
     353                                    <span class="mo_openid_checkbox_checkmark"></span>
     354                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     355                                </label>
     356
     357
     358                            </td>
     359                            <td style="width:20%">
     360
     361
     362                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Fark' ) ); ?>
     363                                    <input type="checkbox" id="mo_openid_fark_share_enable"  disabled/>
     364                                    <span class="mo_openid_checkbox_checkmark"></span>
     365                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     366                                </label>
     367
     368
     369                            </td>
     370                            <td style="width:20%">
     371
     372
     373                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Bookmark' ) ); ?>
     374                                    <input type="checkbox" id="mo_openid_bookmark_share_enable"  disabled/>
     375                                    <span class="mo_openid_checkbox_checkmark"></span>
     376                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     377                                </label>
     378
     379
     380                            </td>
     381                        </tr>
     382                        <tr>
     383                            <td style="width:20%">
     384
     385
     386                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Fintel' ) ); ?>
     387                                    <input type="checkbox" id="mo_openid_fintel_share_enable"  disabled/>
     388                                    <span class="mo_openid_checkbox_checkmark"></span>
     389                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     390                                </label>
     391
     392
     393                            </td>
     394                            <td style="width:20%">
     395
     396
     397                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Mendeley' ) ); ?>
     398                                    <input type="checkbox" id="mo_openid_mendeley_share_enable"  disabled/>
     399                                    <span class="mo_openid_checkbox_checkmark"></span>
     400                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     401                                </label>
     402
     403
     404                            </td>
     405                            <td style="width:20%">
     406
     407
     408                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Slashdot' ) ); ?>
     409                                    <input type="checkbox" id="mo_openid_slashdot_share_enable"
     410                                            disabled/>
     411                                    <span class="mo_openid_checkbox_checkmark"></span>
     412                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     413                                </label>
     414
     415
     416                            </td>
     417                            <td style="width:20%">
     418
     419
     420                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Wanelo' ) ); ?>
     421                                    <input type="checkbox" id="mo_openid_wanelo_share_enable" disabled/>
     422                                    <span class="mo_openid_checkbox_checkmark"></span>
     423                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     424                                </label>
     425
     426
     427                            </td>
     428                            <td style="width:20%">
     429
     430
     431                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Classroom' ) ); ?>
     432                                    <input type="checkbox" id="mo_openid_google_classroom_share_enable"  disabled/>
     433                                    <span class="mo_openid_checkbox_checkmark"></span>
     434                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     435                                </label>
     436
     437
     438                            </td>
     439                        </tr>
     440                        <tr>
     441                            <td style="width:20%">
     442
     443
     444                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Yummly' ) ); ?>
     445                                    <input type="checkbox" id="mo_openid_yummly_share_enable"  disabled/>
     446                                    <span class="mo_openid_checkbox_checkmark"></span>
     447                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     448                                </label>
     449
     450
     451                            </td>
     452                            <td style="width:20%">
     453
     454
     455                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Hacker_news' ) ); ?>
     456                                    <input type="checkbox" id="mo_openid_hacker_news_share_enable"  disabled/>
     457                                    <span class="mo_openid_checkbox_checkmark"></span>
     458                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     459                                </label>
     460
     461
     462                            </td>
     463                            <td style="width:20%">
     464
     465
     466                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Kakao' ) ); ?>
     467                                    <input type="checkbox" id="mo_openid_kakao_share_enable" disabled/>
     468                                    <span class="mo_openid_checkbox_checkmark"></span>
     469                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     470                                </label>
     471
     472
     473                            </td>
     474                            <td style="width:20%">
     475
     476
     477                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Plurk' ) ); ?>
     478                                    <input type="checkbox" id="mo_openid_plurk_share_enable"  disabled/>
     479                                    <span class="mo_openid_checkbox_checkmark"></span>
     480                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     481                                </label>
     482
     483
     484                            </td>
     485                            <td style="width:20%">
     486
     487
     488                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Trello' ) ); ?>
     489                                    <input type="checkbox" id="mo_openid_trello_share_enable" disabled/>
     490                                    <span class="mo_openid_checkbox_checkmark"></span>
     491                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     492                                </label>
     493
     494
     495                            </td>
     496                        </tr>
     497                        <tr>
     498                            <td style="width:20%">
     499
     500
     501                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Wykop' ) ); ?>
     502                                    <input type="checkbox" id="mo_openid_wykop_share_enable"  disabled/>
     503                                    <span class="mo_openid_checkbox_checkmark"></span>
     504                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     505                                </label>
     506
     507
     508                            </td>
     509                            <td style="width:20%">
     510
     511
     512                                <label class="mo_openid_checkbox_container_disable"><?php echo esc_attr( mo_sl( 'Weibo' ) ); ?>
     513                                    <input type="checkbox" id="mo_openid_weibo_share_enable" disabled/>
     514                                    <span class="mo_openid_checkbox_checkmark"></span>
     515                                    <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a>
     516                                </label>
     517
     518
     519                            </td>
     520
     521                            </td>
     522                        </tr>
     523
     524                        </td>
     525                        </tr>
     526
     527                        </td>
     528                        </tr>
     529                    </table>
     530
     531            <tr><td>&nbsp;</td></tr>
     532
     533            <tr>
     534                <td><b>Preview: </b><br/><span hidden id="no_apps_text"><?php echo esc_attr( mo_sl( 'No apps selected' ) ); ?></span></td>
     535            </tr>
     536
     537            <tr>
     538                <td>
     539
     540                    <div>
     541                        <?php
     542                        $default_color = array(
     543                            'facebook'      => '#1877F2',
     544                            'google'        => '#DB4437',
     545                            'vk'            => '#466482',
     546                            'twitter'       => '#2795e9',
     547                            'digg'          => '#000000',
     548                            'yahoo'         => '#430297',
     549                            'yandex'        => '#2795e9',
     550                            'linkedin'      => '#007bb6',
     551                            'pocket'        => '#ee4056',
     552                            'print'         => '#ee4056',
     553                            'whatsapp'      => '#25D366',
     554                            'mail'          => '#787878',
     555                            'amazon'        => '#ff9900',
     556                            'paypal'        => '#0d127a',
     557                            'stumble'       => '#f74425',
     558                            'salesforce'    => '#1ab7ea',
     559                            'apple'         => '#000000',
     560                            'steam'         => '#000000',
     561                            'wordpress'     => '#587ea3',
     562                            'pinterest'     => '#cb2027',
     563                            'spotify'       => '#19bf61',
     564                            'tumblr'        => '#2c4762',
     565                            'twitch'        => '#720e9e',
     566                            'github'        => '#000000',
     567                            'dribbble'      => '#ee66aa',
     568                            'flickr'        => '#ff0084',
     569                            'stackexchange' => '0000ff',
     570                            'snapchat'      => '#fffc00',
     571                            'reddit'        => '#ff4301',
     572                            'odnoklassniki' => '#f97400',
     573                            'foursquare'    => '#f94877',
     574                            'wechat'        => '#00c300',
     575                            'vimeo'         => '#1ab7ea',
     576                            'line'          => '#00c300',
     577                            'hubspot'       => '#fa7820',
     578                            'discord'       => '#7289da',
     579                            'meetup'        => '#e51937',
     580                            'stackexchange' => '#0000FF',
     581                            'wiebo'         => '#df2029',
     582                            'kakao'         => '#ffe812',
     583                            'livejournal'   => '#3c1361',
     584                            'naver'         => '#3EAF0E',
     585                            'teamsnap'      => '#ff9a1a',
     586                        );
     587
     588                        $share_app = get_option( 'share_app' );
     589
     590                        $share_app = explode( '#', $share_app );
     591                        foreach ( $share_app as $active_app ) {
     592                            $icon = $active_app;
     593                            if ( $active_app == 'vkontakte' ) {
     594                                $icon = 'vk';
     595                            }
     596                            if ( $active_app == 'mail' ) {
     597                                $icon = 'envelope';
     598                            }
     599                            if ( $active_app == 'pocket' ) {
     600                                $icon = 'get-pocket';
     601                            }
     602                            if ( $active_app == 'print' ) {
     603                                $icon = 'file-alt';
     604                            }
     605                            if ( $active_app == 'stumble' ) {
     606                                $icon = 'stumbleupon';
     607                            }
     608                            if ( $active_app == 'pocket' || $active_app == 'stumble' ) {
     609
     610                                ?>
     611
     612                                <i class="mo_sharing_icon_preview fab fa-<?php echo esc_attr( $icon ); ?>" style="display: none;text-align:center;background: <?php echo esc_attr( $default_color[ $active_app ] ); ?>;color: #ffffff"
     613                                   id="mo_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"></i>
     614                                <i class="mo_custom_sharing_icon_preview fab fa-<?php echo esc_attr( $icon ); ?>"
     615                                   id="mo_custom_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"
     616                                   style="color:#ffffff;text-align:center;margin-top:5px;"></i>
     617                                <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo esc_attr( $icon ); ?>"
     618                                   id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr( $active_app ); ?>"
     619                                   style="text-align:center;margin-top:5px;"></i>
     620
     621
     622                                <?php
     623                            } elseif ( $active_app == 'print' || $active_app == 'mail' ) {
     624
     625                                ?>
     626
     627                                <i class="mo_sharing_icon_preview far fa-<?php echo esc_attr( $icon ); ?>" style="display: none;text-align:center;background: <?php echo esc_attr( $default_color[ $active_app ] ); ?>;color: #ffffff"
     628                                     id="mo_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"></i>
     629                                <i class="mo_custom_sharing_icon_preview far fa-<?php echo esc_attr( $icon ); ?>"
     630                                   id="mo_custom_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"
     631                                   style="color:#ffffff;text-align:center;margin-top:5px;"></i>
     632                                <i class="mo_custom_sharing_icon_font_preview far fa-<?php echo esc_attr( $icon ); ?>"
     633                                   id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr( $active_app ); ?>"
     634                                   style="text-align:center;margin-top:5px;"></i>
     635
     636
     637                                <?php
     638                            } else {
     639
     640                                ?>
     641                                    <i class="mo_sharing_icon_preview fab fa-<?php echo esc_attr( $icon ); ?>" style="display: none;text-align:center;background: <?php echo esc_attr( $default_color[ $icon ] ); ?>;color: #ffffff"
     642                                       id="mo_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"></i>
     643
     644                                    <i class="mo_custom_sharing_icon_preview fab fa-<?php echo esc_attr( $active_app ); ?>"
     645                                       id="mo_custom_sharing_icon_preview_<?php echo esc_attr( $active_app ); ?>"
     646                                       style="color:#ffffff;text-align:center;margin-top:5px;"></i>
     647
     648                                    <i class="mo_custom_sharing_icon_font_preview fab fa-<?php echo esc_attr( $active_app ); ?>"
     649                                       id="mo_custom_sharing_icon_font_preview_<?php echo esc_attr( $active_app ); ?>"
     650                                       style="text-align:center;margin-top:5px;"></i>
     651
     652                                    <?php
     653                            }
     654                        }
     655
     656                        ?>
     657                        <script>
     658                            var radio = "<?php echo esc_attr( get_option( 'mo_openid_share_custom_theme' ) ); ?>";
     659
     660                            var application = ["facebook","twitter","google","vkontakte","tumblr","stumble","linkedin","reddit","pinterest","pocket","digg","delicious","odnoklassniki","mail","print","whatsapp"];
     661                            jQuery(document).ready(function () {
     662                                application.forEach(myFunction);
     663                                check_sharing_enable_apps();
     664                            });
     665                            function myFunction(item) {
     666
     667                                var b = '#mo_sharing_icon_preview_' + item;
     668                                var c='#mo_custom_sharing_icon_preview_'+item;
     669                                var d='#mo_custom_sharing_icon_font_preview_'+item;
     670                                jQuery(d).toggle(0.00000000000000000000000000000000000000000000000000000001);
     671                                jQuery(c).toggle(0.00000000000000000000000000000000000000000000000000000001);
     672
     673                                jQuery(b).toggle(0.00000000000000000000000000000000000000000000000000000001);
     674                                if(radio !== "default"){
     675                                    jQuery(b).toggle(0.00000000000000000000000000000000000000000000000000000001);
     676
     677                                }
     678                                if(radio !=="custom") {
     679                                    jQuery(c).toggle(0.00000000000000000000000000000000000000000000000000000001);
     680                                }
     681                                if(radio !=="customFont") {
     682                                    jQuery(d).toggle(0.00000000000000000000000000000000000000000000000000000001);
     683                                }
     684                            }
     685
     686                            function check_sharing_enable_apps() {
     687                                var mo_openid_sharing_app_value_nonce = '<?php echo esc_attr( wp_create_nonce( 'mo-openid-sharing-app-value-nonce' ) ); ?>';
     688                                jQuery.ajax({
     689                                    url: "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", //the page containing php script
     690                                    method: "POST", //request type,
     691                                    data: {
     692                                        action: 'mo_sharing_app_value',
     693                                        app_name: application,
     694                                        'mo_openid_sharing_app_value_nonce' : mo_openid_sharing_app_value_nonce,
     695                                    },
     696                                    success: function (result){
     697                                        var strArray = result.split("#");
     698                                        strArray.forEach(show_apps);
     699
     700                                    }
     701                                });
     702                            }
     703                            function show_apps(apps) {
     704
     705                                if(radio=="default") {
     706                                    jQuery('#mo_sharing_icon_preview_' + apps).show();
     707                                }
     708                                if(radio=="custom") {
     709                                    jQuery('#mo_custom_sharing_icon_preview_' + apps).show();
     710                                }
     711                                if(radio=="customFont") {
     712                                    jQuery('#mo_custom_sharing_icon_font_preview_' + apps).show();
     713                                }
     714                            }
     715
     716                        </script>
     717                    </div>
     718
     719                </td>
     720            </tr>
     721
     722
     723
     724            </td>
     725            </tr>
     726
     727            <script>
     728                var tempHorSize = '<?php echo esc_attr( get_option( 'mo_sharing_icon_custom_size' ) ); ?>';
     729                var tempHorShape = '<?php echo esc_attr( get_option( 'mo_openid_share_theme' ) ); ?>';
     730                var tempHorTheme = '<?php echo esc_attr( get_option( 'mo_openid_share_custom_theme' ) ); ?>';
     731                var tempbackColor = '<?php echo esc_attr( get_option( 'mo_sharing_icon_custom_color' ) ); ?>';
     732                var tempHorSpace = '<?php echo esc_attr( get_option( 'mo_sharing_icon_space' ) ); ?>';
     733                var tempHorFontColor = '<?php echo esc_attr( get_option( 'mo_sharing_icon_custom_font' ) ); ?>';
     734
     735            </script>
     736
     737
     738            <script type="text/javascript">
     739                var selectedApps = [];
     740
     741
     742                function addSelectedApps(e,app_name) {
     743                    var radio = "<?php echo esc_attr( get_option( 'mo_openid_share_custom_theme' ) ); ?>";
     744                    var flag = jQuery("#sel_apps .app_enable:checked").length + 1;
     745                    var value_of_app_default= ("#mo_sharing_icon_preview_" + app_name);
     746                    var value_of_app_custom=("#mo_custom_sharing_icon_preview_"+app_name);
     747                    var value_of_app_no=("#mo_custom_sharing_icon_font_preview_"+app_name);
     748
     749
     750                    if (e.checked) {
     751
     752                        flag++;
     753                        if (radio== 'default') {
     754
     755                            jQuery(value_of_app_default).show();
     756                        }
     757                        if (radio== 'custom') {
     758
     759                            jQuery(value_of_app_custom).show();
     760                        }
     761                        if (radio=='customFont') {
     762
     763                            jQuery(value_of_app_no).show();
     764                        }
     765                    } else if (!e.checked) {
     766
     767
     768                        flag--;
     769                        jQuery(value_of_app_default).hide();
     770                        jQuery(value_of_app_custom).hide();
     771                        jQuery(value_of_app_no).hide();
     772                    }
     773
     774                    if (flag) {
     775
     776                        jQuery("#no_apps_text").hide();
     777                    } else {
     778                        jQuery("#no_apps_text").show();
     779                    }
     780
     781                }
     782
     783                function moSharingPreview(e,t,r,w,h,n,x){
     784
     785
     786                    if("default"==w){
     787                        var a="mo_sharing_icon_preview";
     788                        jQuery('.mo_sharing_icon_preview').show();
     789                        jQuery('.mo_custom_sharing_icon_preview').hide();
     790                        jQuery('.mo_custom_sharing_icon_font_preview').hide();
     791                        jQuery("."+a).css({height:t-8,width:t});
     792                        jQuery("."+a).css("font-size",(t-16)+"px");
     793                        jQuery("."+a).css("padding-top","8px");
     794
     795
     796                        if(r=="circle"){
     797                            jQuery("."+a).css("borderRadius","999px");
     798                        }else if(r=="oval"){
     799                            jQuery("."+a).css("borderRadius","5px");
     800                        }else if(r=="square"){
     801                            jQuery("."+a).css("borderRadius","0px");
     802                        }
     803
     804                    }
     805                    else if(w == "custom"){
     806                        var a="mo_custom_sharing_icon_preview";
     807                        jQuery('.mo_sharing_icon_preview').hide();
     808                        jQuery('.mo_custom_sharing_icon_font_preview').hide();
     809                        jQuery('.mo_custom_sharing_icon_preview').show();
     810                        jQuery("."+a).css("background","#"+h);
     811                        jQuery("."+a).css("padding-top","8px");
     812                        jQuery("."+a).css({height:t-8,width:t});
     813                        jQuery("."+a).css("font-size",(t-16)+"px");
     814
     815                        if(r=="circle"){
     816                            jQuery("."+a).css("borderRadius","999px");
     817                        }else if(r=="oval"){
     818                            jQuery("."+a).css("borderRadius","5px");
     819                        }else if(r=="square"){
     820                            jQuery("."+a).css("borderRadius","0px");
     821                        }
     822
     823                        jQuery("."+a).css("margin-left",(n-4)+"px");
     824                    }
     825
     826                    else if("customFont"==w){
     827
     828                        var a="mo_custom_sharing_icon_font_preview";
     829                        jQuery('.mo_sharing_icon_preview').hide();
     830                        jQuery('.mo_custom_sharing_icon_preview').hide();
     831                        jQuery('.mo_custom_sharing_icon_font_preview').show();
     832                        jQuery("."+a).css("font-size",t+"px");
     833                        jQuery('.mo_custom_sharing_icon_font_preview').css("color","#"+x);
     834                        jQuery("."+a).css("margin-left",(n-4)+"px");
     835
     836                        if(r=="circle"){
     837                            jQuery("."+a).css("borderRadius","999px");
     838
     839                        }else if(r=="oval"){
     840                            jQuery("."+a).css("borderRadius","5px");
     841                        }else if(r=="square"){
     842                            jQuery("."+a).css("borderRadius","0px");
     843                        }
     844
     845                    }
     846                    //addSelectedApps();
     847
     848
     849
     850                }
     851                moSharingPreview('horizontal', tempHorSize, tempHorShape, tempHorTheme, tempbackColor, tempHorSpace, tempHorFontColor);
     852
     853
     854
     855                function mo_openid_enable_share(id_name) {
     856
     857                    id=document.getElementById(id_name);
     858
     859                    var mo_openid_share_nonce = '<?php echo esc_attr( wp_create_nonce( 'mo-openid-share' ) ); ?>';
     860                    jQuery.ajax({
     861                        type: "POST",
     862                        url: '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>',
     863                        data: {
     864                            'mo_openid_share_nonce': mo_openid_share_nonce,
     865                            id_name: id_name,
     866                            action:'mo_openid_share',
     867                            enabled:id.checked,
     868                        },
     869                        success: function(data) {
     870
     871                        },
     872                        error: function (data){}
     873                    });
     874                }
     875
     876            </script>
     877
     878            <tr>
     879                <td>
     880                    <br/>
     881                    <p class="mo_openid_note_style"><strong>*<?php echo esc_attr( mo_sl( 'NOTE' ) ); ?>:</strong><br/>
     882                                                                        <?php
     883                                                                        echo esc_attr(
     884                                                                            mo_sl(
     885                                                                                'Custom background: This will
     886                        change the background color of sharing icons'
     887                                                                            )
     888                                                                        );
     889                                                                        ?>
     890                                                                .
     891                        <br/><?php echo esc_attr( mo_sl( 'No background: This will change the font color of icons without background' ) ); ?>.
     892                    </p>
     893                </td>
     894            </tr>
     895
     896
     897
     898        </table>
     899
     900    </div>
     901    <script>
     902        //to set heading name
     903        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr( mo_sl( 'Social Sharing' ) ); ?>');
     904    </script>
     905    <?php
     906}
     907?>
  • miniorange-login-openid/trunk/view/soc_sha/soc_med_cust/mo_openid_social_media_cust.php

    r2560192 r2853010  
    11<?php
    22
    3 function mo_openid_social_icons_customization(){
    4   ?>
    5   <script>jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Customize Icons');?>');
    6    var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
    7                     jQuery("#mo_openid_page_heading").append(temp);</script>
     3function mo_openid_social_icons_customization() {
     4    ?>
     5  <script>jQuery('#mo_openid_page_heading').text('<?php echo esc_attr( mo_sl( 'Social Customize Icons' ) ); ?>');
     6   var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>\">PRO</a>");
     7                    jQuery("#mo_openid_page_heading").append(temp);</script>
    88
    99  <form id="social_media_cust" name="social_media_cust" method="post" action="">
    10         <input type="hidden" name="option" value="mo_openid_social_media_cust" />
    11         <input type="hidden" name="mo_openid_social_media_cust_nonce"
    12                value="<?php echo wp_create_nonce( 'mo-openid-social-media-cust-nonce' ); ?>"/>
    13     <div style="height: auto; padding: 20px 20px 20px 20px; "><table style="width:60%">
    14         <tr><td>
    15           <h2>Hover Icons <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h2>
    16           <?php  echo Cursor_icon_hover(); ?>
    17                 <br><br>Use this <b>[hover-icon]</b> shortcode to display mouse hover icons.
    18         </td></tr>
    19         </table>
    20     </div>
     10        <input type="hidden" name="option" value="mo_openid_social_media_cust" />
     11        <input type="hidden" name="mo_openid_social_media_cust_nonce"
     12               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-social-media-cust-nonce' ) ); ?>"/>
     13    <div style="height: auto; padding: 20px 20px 20px 20px; "><table style="width:60%">
     14        <tr><td>
     15          <h2>Hover Icons <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h2>
     16          <?php echo esc_attr( Cursor_icon_hover() ); ?>
     17                <br><br>Use this <b>[hover-icon]</b> shortcode to display mouse hover icons.
     18        </td></tr>
     19        </table>
     20    </div>
    2121</form>
    2222<div class="mo_openid_table_layout" style="height: auto; padding: 20px 20px 20px 20px;">
    23             <form method='post' action='' name='myform' enctype='multipart/form-data'>
    24                 <h3>Upload image <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h3>
    25                 <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo mo_sl('<b> Unlock this feature if you want to setup your own customize social sharing app</b>');?>.</label><br>
    26                 <input type='file' name='file' disabled>
    27                 <input type='submit' name='image_submit' value='Submit' disabled>
    28                 </form>
    29                 <br><br>
    30                
    31             <form method="post">
    32             <input type="hidden" name="option" value="mo_openid_custom_social_sharing" />
    33             <table id="custom_attr" style="width:100%">
    34                 <?php
    35                 // $user_id=get_current_user_id();
    36                 // $user_info = get_userdata($user_id);
    37                 if(get_option('mo_openid_custom_social_sharing')) {
    38                     $custom_attr = get_option('mo_openid_custom_social_sharing');
    39                     $k=count($custom_attr);
    40                     $a=0;
    41                     foreach($custom_attr as $x)
    42                     {
    43                         foreach($x as $xx => $x_value)
    44                             ?>
    45                             <tr>
    46                             <td>
    47                             <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo $a ?>_name" value="<?php echo $xx; ?>" required style="width:80%;"/>
    48                         </td>
    49                         <td>
    50                           <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo $a ?>_value" value="<?php echo $x_value[0]; ?>" required style="width:80%;"/>
    51                           </td><td>
    52                           <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo $a ?>_image" value="<?php echo $x_value[1]; ?>" required style="width:80%;"/>
    53                           </td><td>
    54                           <input name="<?php echo $a ?>" type="submit" value="<?php echo mo_sl("Delete");?>" class="button button-primary button-large"/></td>
    55                         </tr>
    56                         <?php
    57                         $a++;
    58                     }
    59                 }?>
    60                 <tr>
    61                     <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_name" placeholder="Custom Share Name" style="width:80%;" disabled/></td>
     23            <form method='post' action='' name='myform' enctype='multipart/form-data'>
     24                <h3>Upload image <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h3>
     25                <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo esc_attr( mo_sl( '<b> Unlock this feature if you want to setup your own customize social sharing app</b>' ) ); ?>.</label><br>
     26                <input type='file' name='file' disabled>
     27                <input type='submit' name='image_submit' value='Submit' disabled>
     28                </form>
     29                <br><br>
     30               
     31            <form method="post">
     32            <input type="hidden" name="option" value="mo_openid_custom_social_sharing" />
     33            <table id="custom_attr" style="width:100%">
     34                <?php
     35                // $user_id=get_current_user_id();
     36                // $user_info = get_userdata($user_id);
     37                if ( get_option( 'mo_openid_custom_social_sharing' ) ) {
     38                    $custom_attr = get_option( 'mo_openid_custom_social_sharing' );
     39                    $k           = count( $custom_attr );
     40                    $a           = 0;
     41                    foreach ( $custom_attr as $x ) {
     42                        foreach ( $x as $xx => $x_value ) {
     43                            ;
     44                        }
     45                        ?>
     46                            <tr>
     47                            <td>
     48                            <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo esc_attr( $a ); ?>_name" value="<?php echo esc_attr( $xx ); ?>" required style="width:80%;"/>
     49                        </td>
     50                        <td>
     51                          <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo esc_attr( $a ); ?>_value" value="<?php echo esc_attr( $x_value[0] ); ?>" required style="width:80%;"/>
     52                          </td><td>
     53                          <input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2"  name="mo_openid_custom_set_attribute_<?php echo esc_attr( $a ); ?>_image" value="<?php echo esc_attr( $x_value[1] ); ?>" required style="width:80%;"/>
     54                          </td><td>
     55                          <input name="<?php echo esc_attr( $a ); ?>" type="submit" value="<?php echo esc_attr( mo_sl( 'Delete' ) ); ?>" class="button button-primary button-large"/></td>
     56                        </tr>
     57                        <?php
     58                        $a++;
     59                    }
     60                }
     61                ?>
     62                <tr>
     63                    <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_name" placeholder="Custom Share Name" style="width:80%;" disabled/></td>
    6264
    63                     <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_value" placeholder="Custom Share Link" style="width:80%;" disabled/></td>
     65                    <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_value" placeholder="Custom Share Link" style="width:80%;" disabled/></td>
    6466
    65                     <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_image" placeholder="Custom Share Image" style="width:80%;" disabled/></td>
     67                    <td><br><input type="text" class="mo_openid_textfield_css" style="border: 1px solid ;border-color: #0867b2" name="mo_openid_custom_attribute_1_image" placeholder="Custom Share Image" style="width:80%;" disabled/></td>
    6668
    67                     <td> <br><input type="button" name="mo_add_attribute" value="+" onclick="add_custom_attribute();" class=" button-primary" disabled/>&nbsp;
    68                         <input type="button" name="mo_remove_attribute" value="-" onclick="remove_custom_attribute();" class=" button-primary" disabled/>
    69                     </td> </tr>
    70                 <tr id="mo_openid_custom_attribute"><td></td></tr>
    71                 <tr>
    72                     <td align="center"colspan="3"><br>
    73                         <input type="hidden" name="mo_openid_custom_social_sharing_nonce"
    74                                value="<?php echo wp_create_nonce( 'mo-openid-custom-social-sharing-nonce' ); ?>" />
    75                         <input name="mo_openid_save_config_element" type="submit" value="Save Attributes"  class="button button-primary button-large" disabled/>
    76                         &nbsp &nbsp <a  href="" class="button button-primary button-large" disabled><?php echo mo_sl("Cancel");?></a>
    77                     </td>
    78                 </tr>
    79             </table>
    80         </form>
    81       </div>
     69                    <td> <br><input type="button" name="mo_add_attribute" value="+" onclick="add_custom_attribute();" class=" button-primary" disabled/>&nbsp;
     70                        <input type="button" name="mo_remove_attribute" value="-" onclick="remove_custom_attribute();" class=" button-primary" disabled/>
     71                    </td> </tr>
     72                <tr id="mo_openid_custom_attribute"><td></td></tr>
     73                <tr>
     74                    <td align="center"colspan="3"><br>
     75                        <input type="hidden" name="mo_openid_custom_social_sharing_nonce"
     76                               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-custom-social-sharing-nonce' ) ); ?>" />
     77                        <input name="mo_openid_save_config_element" type="submit" value="Save Attributes"  class="button button-primary button-large" disabled/>
     78                        &nbsp &nbsp <a  href="" class="button button-primary button-large" disabled><?php echo esc_attr( mo_sl( 'Cancel' ) ); ?></a>
     79                    </td>
     80                </tr>
     81            </table>
     82        </form>
     83      </div>
    8284
    83         <br>
    84     <?php
     85        <br>
     86    <?php
    8587}
    8688
    8789function Cursor_icon_hover() {
    8890
     91    $apparr = array(
     92        'facebook' => '#46629e',
     93        'twitter'  => '#00acee',
     94        'google'   => '#dd4b39',
     95    );
    8996
    90   $apparr = array("facebook"=>"#46629e", "twitter"=>"#00acee", "google"=>"#dd4b39");
     97    $hovericon = "<section class='social'>";
    9198
    92   $hovericon = "<section class='social'>";
    93  
    94           foreach($apparr as $x => $y) {
    95                   if(1==1){ $hovericon.= "<a class='icon ".$x."'><i class='fab fa-".$x."'  width='30px' height:'30px' style='margin-top: 5px;'></i></a>";
     99    foreach ( $apparr as $x => $y ) {
     100        if ( 1 == 1 ) {
     101            $hovericon .= "<a class='icon " . $x . "'><i class='fab fa-" . $x . "'  width='30px' height:'30px' style='margin-top: 5px;'></i></a>";
    96102
    97                   $hovericon.= '<style>
    98                         .social .'.$x.' {
    99                       background: '.$y.';
     103            $hovericon .= '<style>
     104                        .social .' . $x . ' {
     105                      background: ' . $y . ';
    100106                    }
    101                     .social .'.$x.':before,
    102                     .social .'.$x.':after {
    103                       border-color: '.$y.';
     107                    .social .' . $x . ':before,
     108                    .social .' . $x . ':after {
     109                      border-color: ' . $y . ';
    104110                    }
    105111                    </style>';
    106                 };
    107           }   
     112        };
     113    }
    108114
    109     $hovericon.= '
     115    $hovericon .= '
    110116        <style>
    111117        @font-face {
     
    164170        ';
    165171
    166     return $hovericon;
     172    return $hovericon;
    167173}
    168174
  • miniorange-login-openid/trunk/view/soc_sha/soc_med_ser/mo_openid_social_media_services.php

    r2500378 r2853010  
    11<?php
    2 function  mo_openid_social_media_services(){
    3  ?>
    4  <script>jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Social Media Service');?>');
    5   var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
    6                     jQuery("#mo_openid_page_heading").append(temp);</script>
     2function mo_openid_social_media_services() {
     3    ?>
     4 <script>jQuery('#mo_openid_page_heading').text('<?php echo esc_attr( mo_sl( 'Social Media Service' ) ); ?>');
     5  var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>\">PRO</a>");
     6                    jQuery("#mo_openid_page_heading").append(temp);</script>
    77 <form id="social_media_services" name="social_media_services" method="post" action="">
    8         <input type="hidden" name="option" value="mo_openid_social_media_services" />
    9         <input type="hidden" name="mo_openid_social_media_services_nonce"
    10                value="<?php echo wp_create_nonce( 'mo-openid-social-media-services-nonce' ); ?>"/>
    11     <div style="height: auto; padding: 20px 20px 20px 20px; "><table style="width:60%">
     8        <input type="hidden" name="option" value="mo_openid_social_media_services" />
     9        <input type="hidden" name="mo_openid_social_media_services_nonce"
     10               value="<?php echo esc_attr( wp_create_nonce( 'mo-openid-social-media-services-nonce' ) ); ?>"/>
     11    <div style="height: auto; padding: 20px 20px 20px 20px; "><table style="width:60%">
    1212
    13         <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo mo_sl('Enable this feature to users will get option for like, recommend and pin your website page on facebook and pinterest');?>.</label>
    14            <h2>Social Sharing Services <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h2><br>
    15         <tr>
    16             <td><input type="checkbox" class="app_enable" id="mo_openid_facebook_like" name="mo_openid_facebook_like" <?php checked(get_option('mo_openid_facebook_like') == 'on'); ?> disabled><img src="<?php echo plugin_url . 'share_icons/facebook_like.png' ?>"
    17             ></td>
    18             <td><input type="checkbox" id="mo_openid_facebook_recommend" name="mo_openid_facebook_recommend" <?php checked(get_option('mo_openid_facebook_recommend') == 'on'); ?> disabled><img src="<?php echo plugin_url . 'share_icons/facebook_recommend.png' ?>" ></td>
    19             <td><input type="checkbox" id="mo_openid_pinterest_pin" name="mo_openid_pinterest_pin" <?php checked(get_option('mo_openid_pinterest_pin') == 'on'); ?> disabled><img src="<?php echo plugin_url . 'share_icons/pinterest_pin.png' ?>" ></td>
    20         </tr></table>
    21         <p>Copy and paste this <b>[social-share-service]</b> shortcode in page for social sharing feature</p>
    22     </div>
    23     <div>
    24         <table style="width:100%; padding: 20px 20px 20px 20px;">
    25         <tr><td>
    26             <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo mo_sl('Enable this feature to to give user an option to E-amil subcribe on your website.');?>.</label>
    27             <h2>E-mail Subcribe <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo add_query_arg( array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI'] ); ?>"><?php echo mo_sl('PRO');?></a></h2>
    28             <input type="email" name="email" id="email" required placeholder="Enter your email address" disabled>
    29             <input class="mo_btn mo_btn-primary" value="Join Now" type="submit" id="submit" >
    30             <br><br>E-mail subscribe from <b>[mail-subcribe]</b>
    31         </td></tr>
    32         <tr><td><br/><br><b><input type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" disabled/>
    33         </b></td></tr>
    34         </table>
    35     </div>
     13        <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo esc_attr( mo_sl( 'Enable this feature to users will get option for like, recommend and pin your website page on facebook and pinterest' ) ); ?>.</label>
     14           <h2>Social Sharing Services <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h2><br>
     15        <tr>
     16            <td><input type="checkbox" class="app_enable" id="mo_openid_facebook_like" name="mo_openid_facebook_like" <?php checked( get_option( 'mo_openid_facebook_like' ) == 'on' ); ?> disabled><img src="<?php echo esc_url( PLUGIN_URL ) . 'share_icons/facebook_like.png'; ?>"
     17            ></td>
     18            <td><input type="checkbox" id="mo_openid_facebook_recommend" name="mo_openid_facebook_recommend" <?php checked( get_option( 'mo_openid_facebook_recommend' ) == 'on' ); ?> disabled><img src="<?php echo esc_url( PLUGIN_URL ) . 'share_icons/facebook_recommend.png'; ?>" ></td>
     19            <td><input type="checkbox" id="mo_openid_pinterest_pin" name="mo_openid_pinterest_pin" <?php checked( get_option( 'mo_openid_pinterest_pin' ) == 'on' ); ?> disabled><img src="<?php echo esc_url( PLUGIN_URL ) . 'share_icons/pinterest_pin.png'; ?>" ></td>
     20        </tr></table>
     21        <p>Copy and paste this <b>[social-share-service]</b> shortcode in page for social sharing feature</p>
     22    </div>
     23    <div>
     24        <table style="width:100%; padding: 20px 20px 20px 20px;">
     25        <tr><td>
     26            <label style="cursor: auto" class="mo_openid_note_style">&nbsp;&nbsp;&nbsp;<?php echo esc_attr( mo_sl( 'Enable this feature to to give user an option to E-amil subcribe on your website.' ) ); ?>.</label>
     27            <h2>E-mail Subcribe <a style="left: 1%; position: relative; text-decoration: none" class="mo-openid-premium" href="<?php echo esc_attr( add_query_arg( array( 'tab' => 'licensing_plans' ), sanitize_text_field($_SERVER['REQUEST_URI']) ) ); ?>"><?php echo esc_attr( mo_sl( 'PRO' ) ); ?></a></h2>
     28            <input type="email" name="email" id="email" required placeholder="Enter your email address" disabled>
     29            <input class="mo_btn mo_btn-primary" value="Join Now" type="submit" id="submit" >
     30            <br><br>E-mail subscribe from <b>[mail-subcribe]</b>
     31        </td></tr>
     32        <tr><td><br/><br><b><input type="submit" name="submit" value="<?php echo esc_attr( mo_sl( 'Save' ) ); ?>" style="width:150px;background-color:#0867b2;color:white;box-shadow:none;text-shadow: none;"  class="button button-primary button-large" disabled/>
     33        </b></td></tr>
     34        </table>
     35    </div>
    3636</form>
    37     <?php
     37    <?php
    3838}
    3939
    40 function mail_service_func() {
    41 
    42     $my_var = '
    43         <form action="" method="post">
    44         <input type="email" name="email" id="email" required placeholder="Enter your email address ">
    45         <input class="mo_btn-primary" value="Join Now" type="submit" id="submit">
    46         </form>';
    47 
    48     if(isset($_POST['email'])){
    49        
    50         $to = "me@example.com"; // Your Brand Mail ID
    51         $from = "no-reply@example.com"; // Replace it with your From Mail ID
    52 
    53         $headers = "From: " . $from . "rn";
    54 
    55         $subject = "New subscription";
    56         $body = "New user subscription: " . $_POST['email'];
    57         if( filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) )
    58         {
    59         if (wp_mail($to, $subject, $body, $headers, "-f " . $from))
    60         {
    61         echo 'Your e-mail (' . $_POST['email'] . ') has been added to our mailing list!';
    62         }
    63         else{
    64         echo 'There was a problem with your e-mail (' . $_POST['email'] . ')';
    65           }
    66         }
    67  }
    68     return $my_var;
    69 }
  • miniorange-login-openid/trunk/view/soc_sha/twitter_btn/mo_twitter_btn.php

    r2500378 r2853010  
    44    <form id="mo_openid_twitter_button" name="mo_openid_twitter_button" method="post" action="">
    55        <input type="hidden" name="option" value="mo_openid_twitter_button" />
    6         <input type="hidden" name="mo_openid_twitter_button_nonce" value="<?php echo wp_create_nonce( 'mo-openid-twitter-button-nonce' ); ?>"/>
     6        <input type="hidden" name="mo_openid_twitter_button_nonce" value="<?php echo esc_attr(wp_create_nonce( 'mo-openid-twitter-button-nonce' )); ?>"/>
    77
    88        <div class="mo_openid_table_layout">
     
    1212
    1313                <label class="mo_openid_checkbox_container_disable">
    14                     <input disabled type="checkbox" id="mo_openid_twitter_mo_btn" /><?php echo mo_sl("Enable Twitter Follow Button");?>
     14                    <input disabled type="checkbox" id="mo_openid_twitter_mo_btn" /><?php echo esc_attr(mo_sl("Enable Twitter Follow Button"));?>
    1515                    <span class="mo_openid_checkbox_checkmark"></span>
    1616                </label>
     
    2828
    2929                    <td>Custom CSS for &lt;div&gt; (i.e. float: right;):</td>
    30                     <td><input disabled id="own_css" name="mo_openid_twitter_follow_own_css" value="<?php echo get_option('mo_openid_twitter_follow_own_css');?>";></td>
     30                    <td><input disabled id="own_css" name="mo_openid_twitter_follow_own_css" value="<?php echo esc_attr(get_option('mo_openid_twitter_follow_own_css'));?>";></td>
    3131                    </td>
    3232                </tr>
     
    3434                <tr >
    3535                    <td>What's your user name?</td>
    36                     <td><input disabled size="32" id="screen_name" name="mo_openid_twitter_follow_screen_name" value="<?php echo get_option('mo_openid_twitter_follow_screen_name');?>"></td>
     36                    <td><input disabled size="32" id="screen_name" name="mo_openid_twitter_follow_screen_name" value="<?php echo esc_attr(get_option('mo_openid_twitter_follow_screen_name'));?>"></td>
    3737                    </td>
    3838                </tr>
     
    5050                <tr>
    5151                    <td>Text color?</td>
    52                     <td><input disabled size="10" id="text_color" name="mo_openid_twitter_follow_data_text_color" value="<?php echo get_option('mo_openid_twitter_follow_data_text_color');?>"></td>
     52                    <td><input disabled size="10" id="text_color" name="mo_openid_twitter_follow_data_text_color" value="<?php echo esc_attr(get_option('mo_openid_twitter_follow_data_text_color'));?>"></td>
    5353                    </td>
    5454                </tr>
     
    5656                <tr>
    5757                    <td>Link color?</td>
    58                     <td><input disabled size="10" id="link_color" name="mo_openid_twitter_follow_data_link_color" value="<?php echo get_option('mo_openid_twitter_follow_data_link_color');?>"></td>
     58                    <td><input disabled size="10" id="link_color" name="mo_openid_twitter_follow_data_link_color" value="<?php echo esc_attr(get_option('mo_openid_twitter_follow_data_link_color'));?>"></td>
    5959                    </td>
    6060                </tr>
     
    9898            </table>
    9999
    100             <br/><b><input disabled type="submit" name="submit" value="<?php echo mo_sl('Save');?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
     100            <br/><b><input disabled type="submit" name="submit" value="<?php echo esc_attr(mo_sl('Save'));?>" style="width:150px;text-shadow: none;background-color:#0867b2;color:white;box-shadow:none;"  class="button button-primary button-large" /></b>
    101101        </div>
    102102    </form>
    103103    <script>
    104104        //to set heading name
    105         jQuery('#mo_openid_page_heading').text('<?php echo mo_sl('Twitter Follow Button');?>');
    106         var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo add_query_arg(array('tab' => 'licensing_plans'), $_SERVER['REQUEST_URI']); ?>\">PRO</a>");
     105        jQuery('#mo_openid_page_heading').text('<?php echo esc_attr(mo_sl('Twitter Follow Button'));?>');
     106        var temp = jQuery("<a style=\"left: 1%; padding:4px; position: relative; text-decoration: none\" class=\"mo-openid-premium\" href=\"<?php echo esc_attr(add_query_arg(array('tab' => 'licensing_plans'), sanitize_text_field($_SERVER['REQUEST_URI']))); ?>\">PRO</a>");
    107107        jQuery("#mo_openid_page_heading").append(temp);
    108108        var win_height = jQuery('#mo_openid_menu_height').height();
  • miniorange-login-openid/trunk/view/support_form/miniorange_openid_support_form.php

    r2627087 r2853010  
    5454            <form id="myForm" method="post" action="">
    5555                <input type="hidden" name="option" value="mo_openid_contact_us_query_option" />
    56                 <input type="hidden" name="mo_openid_contact_us_nonce" value="'. wp_create_nonce( "mo-openid-contact-us-nonce" ).'"/>
     56                <input type="hidden" name="mo_openid_contact_us_nonce" value="'. esc_attr(wp_create_nonce( "mo-openid-contact-us-nonce" )).'"/>
    5757                <table class="mo_openid_settings_table ">
    5858                    <tr style="width: 50%;float: left;">
    5959                        <td >
    60                             <input style="padding:2%;border:none;box-shadow:none;border-bottom-style: solid;border-bottom-color: cornflowerblue;" type="email"  required placeholder="Enter your Email" name="mo_openid_contact_us_email" value="'.get_option("mo_openid_admin_email").'"></td>
     60                            <input style="padding:2%;border:none;box-shadow:none;border-bottom-style: solid;border-bottom-color: cornflowerblue;" type="email"  required placeholder="Enter your Email" name="mo_openid_contact_us_email" value="'.esc_attr(get_option("mo_openid_admin_email")).'"></td>
    6161                    </tr>
    6262                    <tr style="width: 50%;float: left;">
    63                         <td><input style="height: 39px;border:none;box-shadow:none;border-bottom-style: solid;border-bottom-color: cornflowerblue;" type="tel" id="contact_us_phone" placeholder="Enter your phone number with country code (+1)" class="mo_openid_table_contact" name="mo_openid_contact_us_phone" value="'.get_option('mo_openid_admin_phone').'"></td>
     63                        <td><input style="height: 39px;border:none;box-shadow:none;border-bottom-style: solid;border-bottom-color: cornflowerblue;" type="tel" id="contact_us_phone" placeholder="Enter your phone number with country code (+1)" class="mo_openid_table_contact" name="mo_openid_contact_us_phone" value="'.esc_attr(get_option('mo_openid_admin_phone')).'"></td>
    6464                    </tr>
    6565                   
Note: See TracChangeset for help on using the changeset viewer.