source/php/Parser/Xcap.php
/**
     * Filter, if add or not to add
     * @param  array $categories All categories
     * @return bool
     */
Filter, if add or not to add
@param  array $categories All categories
@return bool
Filter if add or not to add @param array $categories All categories @return bool
public function filter($categories)
    {
        $passes = true;
        if (get_field('xcap_filter_categories', 'options')) {
            $filters = array_map('trim', explode(',', get_field('xcap_filter_categories', 'options')));
            $categoriesLower = array_map('strtolower', $categories);
            $passes = false;
            foreach ($filters as $filter) {
                if (in_array(strtolower($filter), $categoriesLower)) {
                    $passes = true;
                }
            }
        }
        return $passes;
    }
public function filter ( $ categories ) { $ passes = true ; if ( get_field ( 'xcap_filter_categories' , 'options' ) ) { $ filters = array_map ( 'trim' , explode ( ',' , get_field ( 'xcap_filter_categories' , 'options' ) ) ) ; $ categoriesLower = array_map ( 'strtolower' , $ categories ) ; $ passes = false ; foreach ( $ filters as $ filter ) { if ( in_array ( strtolower ( $ filter ) , $ categoriesLower ) ) { $ passes = true ; } } } return $ passes ; }
Filter, if add or not to add
 @param  array $categories All categories
 @return bool
Filter if add or not to add @param array $categories All categories @return bool