Changeset 334054
- Timestamp:
- 01/18/2011 11:01:56 AM (15 years ago)
- Location:
- wp-googl/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
wpgoogl.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-googl/trunk/readme.txt
r333634 r334054 22 22 == Changelog == 23 23 24 = 1.2 = 25 Fixed minor bug that was causing plugin to fail. 26 24 27 = 1.1 = 25 28 Fixed readme.txt file formatting. -
wp-googl/trunk/wpgoogl.php
r333634 r334054 6 6 Author: Hameedullah Khan 7 7 Author URI: http://hameedullah.com 8 Version: 1. 18 Version: 1.2 9 9 */ 10 10 … … 13 13 14 14 // authentication URLs 15 private $google_auth_url= 'https://www.google.com/accounts/AuthSubRequest';16 private $google_session_url= 'https://www.google.com/accounts/AuthSubSessionToken';17 private $google_revoke_url= 'https://www.google.com/accounts/AuthSubRevokeToken';15 const GOOGLE_AUTH_URL = 'https://www.google.com/accounts/AuthSubRequest'; 16 const google_session_URL = 'https://www.google.com/accounts/AuthSubSessionToken'; 17 const GOOGLE_REVOKE_URL = 'https://www.google.com/accounts/AuthSubRevokeToken'; 18 18 19 19 // Googl URL Shortener API URLs 20 private $googl_scope_url= 'https://www.googleapis.com/auth/urlshortener';21 private $googl_api_url= 'https://www.googleapis.com/urlshortener/v1/url';20 const GOOGL_SCOPE_URL = 'https://www.googleapis.com/auth/urlshortener'; 21 const GOOGL_API_URL = 'https://www.googleapis.com/urlshortener/v1/url'; 22 22 23 23 function WPGoogl() { … … 60 60 61 61 $http = new WP_Http(); 62 $result = $http->request( $this->googl_api_url, $params );62 $result = $http->request( self::GOOGL_API_URL, $params ); 63 63 $result = json_decode( $result[ 'body' ] ); 64 64 … … 90 90 $params = array( 'method' => 'GET', 'body' => $body, 'headers' => $headers ); 91 91 $http = new WP_Http(); 92 $result = $http->request( $this->google_revoke_url, $params );92 $result = $http->request( self::GOOGLE_REVOKE_URL, $params ); 93 93 delete_option( 'wpgoogl_token' ); 94 94 } … … 136 136 // lets get the session token 137 137 $http = new WP_Http(); 138 $result = $http->request( $this->google_session_url, $params );138 $result = $http->request( self::GOOGLE_SESSION_URL, $params ); 139 139 140 140 $matches = array(); … … 150 150 array( 151 151 'next' => $this->settings_url(), 152 'scope' => $this->googl_scope_url,152 'scope' => self::GOOGL_SCOPE_URL, 153 153 'session' => 1 154 154 ) 155 155 ); 156 $google_auth_url = $this->google_auth_url. '?' . $query_str;156 $google_auth_url = self::GOOGLE_AUTH_URL . '?' . $query_str; 157 157 } 158 158 }
Note: See TracChangeset
for help on using the changeset viewer.