protected function isTaxonomyValid($content, $slug, array $taxonomy)
    {
        if ($taxonomy['behaves_like'] === 'tags' && !$content) {
            return false;
        }

        $isNotTag = in_array($taxonomy['behaves_like'], ['categories', 'grouping']);
        $options = isset($taxonomy['options']) ? array_keys($taxonomy['options']) : [];
        $isTax = in_array($slug, $options);
        if ($isNotTag && !$isTax) {
            return false;
        }

        return true;
    }
protected function isTaxonomyValid($content, $slug, array $taxonomy)
    {
        if ($taxonomy['behaves_like'] === 'tags' && !$content) {
            return false;
        }

        $isNotTag = in_array($taxonomy['behaves_like'], ['categories', 'grouping']);
        $options = isset($taxonomy['options']) ? array_keys($taxonomy['options']) : [];
        $isTax = in_array($slug, $options);
        if ($isNotTag && !$isTax) {
            return false;
        }

        return true;
    }
protected function isTaxonomyValid ( $ content , $ slug , array $ taxonomy ) { if ( $ taxonomy [ 'behaves_like' ] === 'tags' && ! $ content ) { return false ; } $ isNotTag = in_array ( $ taxonomy [ 'behaves_like' ] , [ 'categories' , 'grouping' ] ) ; $ options = isset ( $ taxonomy [ 'options' ] ) ? array_keys ( $ taxonomy [ 'options' ] ) : [ ] ; $ isTax = in_array ( $ slug , $ options ) ; if ( $ isNotTag && ! $ isTax ) { return false ; } return true ; }
Check if the taxonomy is valid.

@see https://github.com/bolt/bolt/pull/2310

@param array|false $content
@param string      $slug
@param array       $taxonomy

@return bool
Check if the taxonomy is valid .