Changeset 2502362
- Timestamp:
- 03/24/2021 08:49:15 AM (5 years ago)
- Location:
- request-io
- Files:
-
- 2 added
- 2 edited
-
tags/1.0/debug.log (added)
-
tags/1.0/request-io.php (modified) (3 diffs)
-
trunk/debug.log (added)
-
trunk/request-io.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
request-io/tags/1.0/request-io.php
r2501781 r2502362 15 15 16 16 protected function handle() { 17 17 18 $url = esc_url_raw($_POST['api_url']); 18 19 $home_url = esc_url_raw($_POST['home_url']); 20 21 $pluginlog = plugin_dir_path(__FILE__).'debug.log'; 22 $message = 'API URL:'.$url; 23 error_log($message, 3, $pluginlog); 24 25 $message2 = 'HOME URL:'.$home_url; 26 error_log($message2, 3, $pluginlog); 19 27 20 28 wp_remote_get("{$home_url}/wp-json/requestio/v1/update-cache?api_url={$url}"); … … 263 271 264 272 public function create_background_request() { 265 global $async_request; 266 $async_request = new Request_IO_Background_Process(); 273 $this->update_cache_request = new Request_IO_Background_Process(); 267 274 } 268 275 … … 294 301 strpos($_SERVER['REQUEST_URI'], '.xml') === false 295 302 ) { 296 global $async_request; 297 $async_request->data(array('api_url' => $api_url, 'home_url' => $this->siteUrl())); 298 $async_request->dispatch(); 303 304 // LOGGING 305 306 $pluginlog = plugin_dir_path(__FILE__).'debug.log'; 307 $message = 'ELIGABLE'; 308 error_log($message, 3, $pluginlog); 309 310 $this->update_cache_request->data(array('api_url' => $api_url, 'home_url' => $this->siteUrl())); 311 $this->update_cache_request->dispatch(); 299 312 } 300 313 -
request-io/trunk/request-io.php
r2501781 r2502362 15 15 16 16 protected function handle() { 17 17 18 $url = esc_url_raw($_POST['api_url']); 18 19 $home_url = esc_url_raw($_POST['home_url']); 20 21 $pluginlog = plugin_dir_path(__FILE__).'debug.log'; 22 $message = 'API URL:'.$url; 23 error_log($message, 3, $pluginlog); 24 25 $message2 = 'HOME URL:'.$home_url; 26 error_log($message2, 3, $pluginlog); 19 27 20 28 wp_remote_get("{$home_url}/wp-json/requestio/v1/update-cache?api_url={$url}"); … … 263 271 264 272 public function create_background_request() { 265 global $async_request; 266 $async_request = new Request_IO_Background_Process(); 273 $this->update_cache_request = new Request_IO_Background_Process(); 267 274 } 268 275 … … 294 301 strpos($_SERVER['REQUEST_URI'], '.xml') === false 295 302 ) { 296 global $async_request; 297 $async_request->data(array('api_url' => $api_url, 'home_url' => $this->siteUrl())); 298 $async_request->dispatch(); 303 304 // LOGGING 305 306 $pluginlog = plugin_dir_path(__FILE__).'debug.log'; 307 $message = 'ELIGABLE'; 308 error_log($message, 3, $pluginlog); 309 310 $this->update_cache_request->data(array('api_url' => $api_url, 'home_url' => $this->siteUrl())); 311 $this->update_cache_request->dispatch(); 299 312 } 300 313
Note: See TracChangeset
for help on using the changeset viewer.