This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//if the file doesn't exist, we'll try to copy it. | |
if (!file_exists($imagepath)) { | |
//Get the file | |
if ($content = file_get_contents($m[1])) { | |
if (!empty($content)) { | |
//Store in the filesystem. | |
$fp = fopen($imagepath, "w"); | |
fwrite($fp, $content); | |
fclose($fp); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wpBanners = new wpBanners(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wpBanners -> ad($ad_id = 7, $output = true); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wpBanners -> size($size_id = 4, $output = true); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wpBanners -> zone($zone_id = 2, $output = true); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wpBanners -> sizezone($size_id = 2, $zone_id = 3, $output = true); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CurrencyConvertComponent extends Object { | |
function startup($controller = null) { | |
$this -> controller = $controller; | |
} | |
function get_rate($from = null, $to = null, $amount = 1) { | |
//make HttpSocket connection here to make a remote request and fetch an exchange rate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AppController extends Controller { | |
var $components = array('CurrencyConvert'); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ModelController extends AppController { | |
function index() { | |
$rate = $this -> CurrencyConvert -> get_rate('USD', 'EUR', 1); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function replace_content($body = null) { | |
// You can define your own $body content here | |
return $body; | |
} | |
add_filter('wpml_wpmlcontent_after_replace', 'replace_content', 10, 1); |