Changeset 1453020
- Timestamp:
- 07/11/2016 11:16:46 PM (10 years ago)
- Location:
- insticator/tags/8.3
- Files:
-
- 1 added
- 3 edited
-
Insticator_function.php (added)
-
README.txt (modified) (1 diff)
-
js/admin.js (modified) (1 diff)
-
plugin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
insticator/tags/8.3/README.txt
r1450918 r1453020 19 19 1. Sign up for an account with Insticator- http://www.insticator.com 20 20 1. Verify your account from your email inbox. 21 1. Install the Insticator plugin either via the WordPress.org plugin directory or by downloading( https://wordpress.org/plugins/insticator/installation/ ) and uploading the plugin to your server.21 1. Install the Insticator plugin either via the WordPress.org plugin directory or by downloading( https://wordpress.org/plugins/insticator/installation/ ) and uploading the plugin to your server. 22 22 1. Activate the plugin through the 'Plugins' menu in WordPress. 23 23 1. Visit 'Appearance > Widgets', drag & drop the plugin in your preferred menu. -
insticator/tags/8.3/js/admin.js
r1305782 r1453020 2 2 "use strict"; 3 3 $(function () { 4 }); 4 5 5 }); 6 6 }(jQuery)); -
insticator/tags/8.3/plugin.php
r1450918 r1453020 30 30 } 31 31 32 require('Insticator_function.php'); 33 32 34 register_activation_hook( __FILE__ , array( 'Insticator_Embed', 'activate' ) ); 33 35 … … 155 157 */ 156 158 public function getUUIDFromAPI() { 157 $siteurl = get_option('siteurl'); 158 $siteurl = preg_replace("(^https?://)", "" ,$siteurl); 159 $url = $this->getCombinedURL($siteurl, $this->getSiteInfoApiUrl); 160 161 $prefix = "www."; 162 163 $result = $this->callAPI($url); 164 if (empty($result)) { 165 if (strpos($siteurl, $prefix) === false) { 166 $siteurl = $prefix.$siteurl; 167 } else { 168 $siteurl = substr($siteurl, 4); 169 } 170 $url = $this->getCombinedURL($siteurl, $this->getSiteInfoApiUrl); 171 $result = $this->callAPI($url); 172 } 173 $jsonEmbedList = json_encode($result['embedList']); 174 $result['siteURL'] = $siteurl; 175 176 update_option('Insticator_clientUUID', $result['clientUUID']); 177 update_option('Insticator_siteUUID', $result['siteUUID']); 178 update_option('Insticator_embedList', addslashes($jsonEmbedList)); 179 180 return $result; 159 $siteurl = get_option('siteurl'); 160 $url = $this->getCombinedURL($siteurl, $this->getSiteInfoApiUrl); 161 $result = $this->callAPI($url); 162 163 if (empty($result)) { 164 $result = $this->callAPI($this->getCombinedURL(getUrlForSpecialCase($siteurl), $this->getSiteInfoApiUrl)); 165 } 166 $jsonEmbedList = json_encode($result['embedList']); 167 $result['siteURL'] = $siteurl; 168 169 update_option('Insticator_clientUUID', $result['clientUUID']); 170 update_option('Insticator_siteUUID', $result['siteUUID']); 171 update_option('Insticator_embedList', addslashes($jsonEmbedList)); 172 173 return $result; 181 174 } 182 175 /** … … 204 197 $result = $this->callAPI($url); 205 198 update_option('Insticator_headerCode', $result['headerCode']); 206 update_option('Insticator_bodyCode', $result['bodyCode']);199 update_option('Insticator_bodyCode', $result['bodyCode']); 207 200 return $result; 208 201 }
Note: See TracChangeset
for help on using the changeset viewer.