Changeset 1276710
- Timestamp:
- 10/31/2015 02:10:24 AM (10 years ago)
- Location:
- iterative-headlines/trunk
- Files:
-
- 3 edited
-
headlines.php (modified) (1 diff)
-
headlines_api.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
iterative-headlines/trunk/headlines.php
r1257579 r1276710 15 15 require_once dirname(__FILE__) . "/headlines_advice.php"; 16 16 require_once dirname(__FILE__) . "/headlines_api.php"; 17 require_once dirname(__FILE__) . "/headlines_dashboard.php"; 17 18 require_once dirname(__FILE__) . "/headlines_pointer.php"; 18 19 require_once dirname(__FILE__) . "/headlines_options.php"; -
iterative-headlines/trunk/headlines_api.php
r1257579 r1276710 27 27 private static $request_age = 6400; 28 28 private static $variant_length = 8; 29 29 public static $isOOS = false; 30 30 public static function getURL($page) { 31 31 return self::$api_endpoint . $page; 32 32 } 33 33 34 public static function checkOOS() { 35 if(self::$isOOS) 36 return true; 37 $result = self::makeRequest("oos", array("unique_id" => self::getGUID())); 38 39 return (self::$isOOS); 40 } 34 41 public static function getEndpoint() { return self::$api_endpoint; } 35 42 … … 37 44 $url_parameters = http_build_query($blob); 38 45 $url = self::getEndpoint() . "{$endpoint}?" . $url_parameters . "&v=" . self::$api_version . "&cangz=" . (function_exists("gzdecode") ? "yes" : "no"); 39 46 if(self::$isOOS) 47 return; 48 40 49 $request = wp_remote_get($url, array("timeout" => 20)); 41 50 $response = json_decode(wp_remote_retrieve_body( $request ), true); … … 56 65 } else if($response['special'] == "DELIVER" && is_admin()) { 57 66 echo "<p>" . $response['error'] . "</p>"; 67 } else if($response['special'] == "OOS") { 68 self::$isOOS = true; 58 69 } 59 70 } -
iterative-headlines/trunk/readme.txt
r1257579 r1276710 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.3 6 Stable tag: 1.5. 26 Stable tag: 1.5.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 * Support for PHP 5.2, 5.3. 81 81 82 = 1.5 .0=82 = 1.5 = 83 83 * Synchronizing UI with pro version's UI. 84 85 = 1.5.2 =86 84 * Fixing draft saving behavior. 87 85 … … 98 96 99 97 = 1.5.0 = 100 Updating all material for the recent release of the pro version. New functionality on basic version. Support for the new API. 98 Updating all material for the recent release of the pro version. New functionality on basic version. Support for the new API. Updating API support to provide notices when things go wrong. 101 99
Note: See TracChangeset
for help on using the changeset viewer.