Created
March 23, 2017 15:19
-
-
Save bwente/42a328aebfc708b88ef08ad1f42eb8f9 to your computer and use it in GitHub Desktop.
MODX output filter for finding matching strings
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 | |
$parameters = explode(',',$options); | |
$test = $parameters[0]; | |
$success = $parameters[1]; | |
$output = " "; // needed a space to make this work | |
if (stristr($input, $test) !== false) { | |
$output = $success; | |
} | |
return $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment