Changeset 1900640
- Timestamp:
- 06/28/2018 02:54:21 PM (8 years ago)
- Location:
- cometchat/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
cometchat.php (modified) (2 diffs)
-
includes/cometchat_cloud.php (modified) (1 diff)
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 === 2 2 Contributors: cometchat 3 3 Tags: 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 4 4 Requires at least: 3.5.1 5 Tested up to: 4.9. 46 Stable tag: 7. 0.55 Tested up to: 4.9.6 6 Stable tag: 7.2.1 7 7 License: GNU General Public License v2.0 or later 8 8 … … 163 163 * Added feature to synchronization BuddyPress groups in CometChat 164 164 * Miscellaneous Bug fixes 165 166 = 7.2.1 = 167 * Miscellaneous bug fixes -
cometchat/trunk/cometchat.php
r1859511 r1900640 4 4 * Plugin Name: CometChat 5 5 * Description: Voice, video & text chat for your WordPress site 6 * Version: 7. 0.57 * Author: Com etChat6 * Version: 7.2.1 7 * Author: ComtChat 8 8 * Author URI: https://www.cometchat.com/ 9 9 */ … … 41 41 global $cc_clientid; 42 42 43 $accessKey = 'flGBNxeq8Mgu5bynUhS5w3S2CJ7dfo3latMTxDNa'; 44 $cc_license_key = get_option('cc_license_key'); 43 $cc_clientid_temp = get_option('cc_clientid'); 45 44 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 { 49 48 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; 54 59 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 56 63 57 64 return $cc_clientid; 58 } 65 } 59 66 60 67 /** -
cometchat/trunk/includes/cometchat_cloud.php
r1879151 r1900640 96 96 $user_name = $current_user->user_login; 97 97 $display_name = $current_user->display_name; 98 $role = wp_get_current_user()->roles[0];98 $role = reset($current_user->roles); 99 99 if(!empty($display_name)){ 100 100 $user_name = $display_name; 101 101 } 102 preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', get_avatar($user_id), $matches);103 $avatar = $matches[1]; 102 $avatar = get_avatar_url($user_id); 103 104 104 if(function_exists('bp_loggedin_user_domain')) { 105 105 $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 109 117 $user_info = array( 110 118 "id" => $user_id,
Note: See TracChangeset
for help on using the changeset viewer.