Plugin Directory

Changeset 1900640


Ignore:
Timestamp:
06/28/2018 02:54:21 PM (8 years ago)
Author:
cometchat
Message:

minor changes and updated version

Location:
cometchat/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cometchat/trunk/README.txt

    r1859511 r1900640  
    1 === Voice, Video & Text Chat by CometChat - Best WordPress Chat Plugin ===
     1=== Voice, Video & Text Chat by CometChat - Best WordPress Chat Plugin ===
    22Contributors: cometchat
    33Tags: wordpress chat, chat, wp chat, buddypress chat, buddypress, wordpress, webrtc, video chat, audio chat, voice chat, stickers, emojis, real time translation, translation, games, hangouts, gtalk, embedded chat
    44Requires at least: 3.5.1
    5 Tested up to: 4.9.4
    6 Stable tag: 7.0.5
     5Tested up to: 4.9.6
     6Stable tag: 7.2.1
    77License: GNU General Public License v2.0 or later
    88
     
    163163* Added feature to synchronization BuddyPress groups in CometChat
    164164* Miscellaneous Bug fixes
     165
     166= 7.2.1 =
     167* Miscellaneous bug fixes
  • cometchat/trunk/cometchat.php

    r1859511 r1900640  
    44* Plugin Name: CometChat
    55* Description: Voice, video & text chat for your WordPress site
    6 * Version: 7.0.5
    7 * Author: CometChat
     6* Version: 7.2.1
     7* Author: ComtChat
    88* Author URI: https://www.cometchat.com/
    99*/
     
    4141    global $cc_clientid;
    4242
    43     $accessKey = 'flGBNxeq8Mgu5bynUhS5w3S2CJ7dfo3latMTxDNa';
    44     $cc_license_key = get_option('cc_license_key');
     43  $cc_clientid_temp = get_option('cc_clientid');
    4544
    46     if(!empty($cc_license_key)){
    47         $url = "https://secure.cometchat.com/api-software/subscription?accessKey=".$accessKey;
    48         $url .= "&licenseKey=".$cc_license_key;
     45  if (!empty($cc_clientid_temp)) {
     46    $cc_clientid = $cc_clientid_temp;
     47  } else {
    4948
    50         $response = wp_remote_get( $url );
    51         $body = wp_remote_retrieve_body( $response );
    52     }
    53     $licenseinfo = !empty($body) ? json_decode($body): '';
     49    $accessKey = 'flGBNxeq8Mgu5bynUhS5w3S2CJ7dfo3latMTxDNa';
     50    $cc_license_key = get_option('cc_license_key');
     51    if(!empty($cc_license_key)){
     52        $url = "https://secure.cometchat.com/api-software/subscription?accessKey=".$accessKey;
     53        $url .= "&licenseKey=".$cc_license_key;
     54        $response = wp_remote_get( $url );
     55          $body = wp_remote_retrieve_body( $response );
     56    }
     57    $licenseinfo = !empty($body) ? json_decode($body): '';
     58    $cc_clientid = (!empty($licenseinfo) && is_object($licenseinfo) && property_exists($licenseinfo, 'success') && $licenseinfo->success == 1 && property_exists($licenseinfo, 'cloud') && $licenseinfo->cloud != 0) ? $licenseinfo->cloud : 0;
    5459
    55     $cc_clientid = (!empty($licenseinfo) && is_object($licenseinfo) && property_exists($licenseinfo, 'success') && $licenseinfo->success == 1 && property_exists($licenseinfo, 'cloud') && $licenseinfo->cloud != 0) ? $licenseinfo->cloud : 0;
     60    add_option('cc_clientid',$cc_clientid,'','no');
     61  }
     62
    5663
    5764    return $cc_clientid;
    58 }
     65} 
    5966
    6067/**
  • cometchat/trunk/includes/cometchat_cloud.php

    r1879151 r1900640  
    9696        $user_name = $current_user->user_login;
    9797        $display_name = $current_user->display_name;
    98         $role = wp_get_current_user()->roles[0];
     98        $role = reset($current_user->roles);
    9999        if(!empty($display_name)){
    100100            $user_name = $display_name;
    101101        }
    102         preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', get_avatar($user_id), $matches);
    103         $avatar = $matches[1];
     102        $avatar = get_avatar_url($user_id);
     103
    104104        if(function_exists('bp_loggedin_user_domain')) {
    105105            $link = bp_loggedin_user_domain();
    106         }else {
    107             $link = get_edit_user_link($user_id);
    108         }
     106        } else {
     107           
     108            $link_temp = get_userdata($user_id)->user_url;
     109           
     110            if (!empty($link_temp)) {
     111                $link = $link_temp;
     112            } else {
     113                $link = '';
     114            }   
     115        }
     116       
    109117        $user_info = array(
    110118            "id"    => $user_id,
Note: See TracChangeset for help on using the changeset viewer.