Timber\TermGetter::correct_taxonomy_names PHP Méthode

correct_taxonomy_names() private static méthode

private static correct_taxonomy_names ( string | array $taxs ) : array
$taxs string | array
Résultat array
    private static function correct_taxonomy_names($taxs)
    {
        if (is_string($taxs)) {
            $taxs = array($taxs);
        }
        foreach ($taxs as &$tax) {
            if ($tax == 'tags' || $tax == 'tag') {
                $tax = 'post_tag';
            } else {
                if ($tax == 'categories') {
                    $tax = 'category';
                }
            }
        }
        return $taxs;
    }