Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Created July 29, 2012 14:54
Show Gist options
  • Save ringmaster/3199354 to your computer and use it in GitHub Desktop.
Save ringmaster/3199354 to your computer and use it in GitHub Desktop.
Exclude posts with info debate != 0 from the home display
public function filter_posts_get_update_preset($preset_parameters, $presetname, $paramarray) {
switch($presetname) {
case 'home':
$notallinfo = isset($preset_parameters['not:all:info']) ? Utils::single_array($preset_parameters['not:all:info']) : array();
$notallinfo['debate'] = 0;
$preset_parameters['not:all:info'] = $notallinfo;
break;
}
return $preset_parameters;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment