add support for using curl if available
This commit is contained in:
parent
4d7ec077e3
commit
fb723778fb
@ -18,7 +18,15 @@ class PluginWonderful {
|
||||
* Wrapper around file_get_contents for testing purposes.
|
||||
*/
|
||||
function _retrieve_url($url) {
|
||||
return @file_get_contents($url);
|
||||
if (extension_loaded('curl')) {
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return $result;
|
||||
} else {
|
||||
return @file_get_contents($url);
|
||||
}
|
||||
}
|
||||
|
||||
function _setup_actions() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
Plugin Name: Plugin Wonderful
|
||||
Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
|
||||
Description: Easily embed a Project Wonderful publisher's advertisements.
|
||||
Version: 0.5.1
|
||||
Version: 0.5.2
|
||||
Author: John Bintz
|
||||
Author URI: http://www.coswellproductions.com/wordpress/
|
||||
|
||||
|
@ -3,7 +3,7 @@ Contributors: johncoswell
|
||||
Tags: ads, sidebar, widget
|
||||
Requires at least: 2.7
|
||||
Tested up to: 2.8
|
||||
Stable tag: 0.5.1
|
||||
Stable tag: 0.5.2
|
||||
Donate link: http://www.coswellproductions.com/wordpress/wordpress-plugins/
|
||||
|
||||
Plugin Wonderful lets Project Wonderful publishers quickly and easily add their adboxes to thier WordPress site.
|
||||
|
Loading…
Reference in New Issue
Block a user