Changeset 2256704
- Timestamp:
- 03/08/2020 09:33:15 AM (6 years ago)
- Location:
- hyvor-talk/trunk
- Files:
-
- 5 edited
-
hyvor-talk.php (modified) (2 diffs)
-
inc/class-hyvor-talk-webpage.php (modified) (1 diff)
-
inc/class-hyvor-talk.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
static/admin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hyvor-talk/trunk/hyvor-talk.php
r2251819 r2256704 7 7 Plugin URI: https://talk.hyvor.com 8 8 Description: The official WordPress plugin for Hyvor Talk, The Best Commenting Platform For Your Website 9 Version: 1.2. 09 Version: 1.2.1 10 10 Author: Hyvor 11 11 Author URI: https://hyvor.com … … 73 73 74 74 75 76 /* add_action( 'plugins_loaded', function() {77 $user = wp_get_current_user();78 var_dump($user);79 die;80 }); */81 82 83 84 75 /** 85 76 * Used Options -
hyvor-talk/trunk/inc/class-hyvor-talk-webpage.php
r2251818 r2256704 216 216 global $post; 217 217 218 // a trick to make it really unique 219 return $post -> ID . ':' . $post -> guid; 218 $type = defined('HYVOR_TALK_ID_TYPE') ? HYVOR_TALK_ID_TYPE : 'default'; 219 220 /** 221 * After importing from other third party, 222 * HYVOR_TALK_ID_TYPE should be set to URL 223 * Then, the permalink is used 224 */ 225 switch ($type) { 226 case 'url': 227 $id = get_permalink($post); 228 break; 229 default: 230 // a trick to make it really unique 231 $id = $post -> ID . ':' . $post -> guid; 232 break; 233 } 234 235 236 return $id; 220 237 } 221 238 -
hyvor-talk/trunk/inc/class-hyvor-talk.php
r2251818 r2256704 169 169 170 170 // Updates the website ID 171 public static function setWebsiteId( int$websiteId) {171 public static function setWebsiteId($websiteId) { 172 172 update_option( self::WEBSITE_ID_OPTION_NAME, $websiteId ); 173 173 } 174 174 // Updates the loading mode 175 public static function setLoadingMode( string$mode) {175 public static function setLoadingMode($mode) { 176 176 update_option( self::LOADING_MODE_OPTION_NAME, $mode ); 177 177 } 178 178 // updates the sso ID 179 public static function setSSOId( int$ssoId) {179 public static function setSSOId($ssoId) { 180 180 update_option( self::SSO_ID_OPTION_NAME, $ssoId ); 181 181 } 182 182 // updates the SSO Private Key 183 public static function setSSOPrivateKey( string$key) {183 public static function setSSOPrivateKey($key) { 184 184 update_option( self::SSO_PRIVATE_KEY_OPTION_NAME, $key ); 185 185 } -
hyvor-talk/trunk/readme.txt
r2251818 r2256704 5 5 Requires at least: 4.6 6 6 Tested up to: 5.3.2 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 Requires PHP: 5.4 9 9 License: GPLv2 … … 174 174 == Change Log == 175 175 176 = 1.2.1 = 177 * Custom identifiers added (To support third-party importing) 178 176 179 = 1.2.0 = 177 180 * SSO support added -
hyvor-talk/trunk/static/admin.js
r2251818 r2256704 28 28 // sso 29 29 var ssoId = $.trim($("#talk-sso-id-input").val()); 30 if (ssoId) 31 data.ssoId = ssoId; 30 data.ssoId = ssoId; 32 31 var ssoPrivateKey = $.trim($("#talk-sso-private-key-input").val()); 33 if (ssoPrivateKey) 34 data.ssoPrivateKey = ssoPrivateKey; 32 data.ssoPrivateKey = ssoPrivateKey; 35 33 36 34 // nothing to update
Note: See TracChangeset
for help on using the changeset viewer.