# themify-builder/trunk/themify/plugin-compat/wpviews.php

Themify Builder, version trunk. 34 lines.

- Page: https://pluginprobe.com/plugins/themify-builder/trunk/code/themify/plugin-compat/wpviews.php
- Raw: https://pluginprobe.com/plugins/themify-builder/trunk/raw/themify/plugin-compat/wpviews.php
- Modified: 2024-05-27T20:18:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/themify-builder/trunk/code/themify/plugin-compat/wpviews.php#L10-L20`.

```php
<?php
/**
 * Themify Compatibility Code
 *
 * @package Themify
 */

/**
 * Toolset Views
 * @link https://toolset.com
 */
class Themify_Compat_wpviews {

    static function init() {
        if ( function_exists( 'has_blocks' ) ) {
            add_filter( 'themify_deq_css', [ __CLASS__, 'themify_deq_css' ] );
        }
    }

    /*
     * @ref #9540
     */
    public static function themify_deq_css( $css ) {
        if ( ( $key = array_search( 'wp-block-library', $css ) ) !== false ) {
            global $wp_query, $WPV_settings;
            $queried_term = $wp_query->get_queried_object();
            if ( has_blocks( $WPV_settings[ 'view_taxonomy_loop_' . $queried_term->taxonomy ] ) ) {
                unset( $css[ $key ] );
            }
        }

        return $css;
    }
}
```
