Conditional Placeholder – Category Images
-
I have had some previous success in obtaining code for conditional placeholders for some location attributes. I’ve included the code below for reference. What I need to do now is either rewrite, or obtain newly, code to do exactly the same thing for category images, or #_CATEGORYIMAGE. I have no idea where to start. Any help would appreciated.
function filterLocationOutputCondition($replacement, $condition, $match, $EM_Location){ if (is_object($EM_Location)) { switch ($condition) { // #_LATT{Website} case 'has_latt_website': if (is_array($EM_Location->location_attributes) && !empty($EM_Location->location_attributes['Website'])) $replacement = preg_replace('/\{\/?has_latt_website\}/', '', $match); else $replacement = ''; break; } } return $replacement; } add_filter('em_location_output_condition', 'filterLocationOutputCondition', 10, 4);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional Placeholder – Category Images’ is closed to new replies.