Skip to content

Instantly share code, notes, and snippets.

View lithiumlab's full-sized avatar

Pablo Liz lithiumlab

View GitHub Profile
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@lithiumlab
lithiumlab / sf-pro-filter-input-object.php
Created March 16, 2018 13:03 — forked from rmorse/sf-pro-filter-input-object.php
Search & Filter Pro - Filter Input Object
<?php
function filter_input_object($input_object, $sfid)
{
//ensure we are only filtering the correct field name - in this case the field we want to filter has the name `_sfm_colours`
//we also want to make sure its a `select` input type we're filtering
if(($input_object['name']!='_sfm_colours')||($input_object['type']!='select'))
{
return $input_object;
}