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 | |
function jimson_encode($a=false) { | |
// Some basic debugging to ensure we have something returned | |
if (is_null($a)) return 'null'; | |
if ($a === false) return 'false'; | |
if ($a === true) return 'true'; | |
if (is_scalar($a)) { | |
if (is_float($a)) { | |
// Always use '.' for floats. |
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 | |
isAppropriate($article) { | |
$audience = $article->field_intended_audience['und'][0]['value']; | |
// Use the code from the views filter to return either true or false | |
// !!! You'll need to flip it though, so return true means I should see it | |
} |