Last active
August 29, 2015 14:01
-
-
Save jeremysexton/19bb23459fd2f914b6b0 to your computer and use it in GitHub Desktop.
Dummy Proof URLs for Statamic
This file contains 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 Modifier_urldummy extends Modifier { | |
public function index($value) { | |
if (strpos($value, 'http') !== false) { | |
$output = $value; | |
} else { | |
$output = 'http://'.$value; | |
} | |
return $output; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Updated it to get it all streamlined-like.