PluginProbe
Themify Builder / trunk
Themify Builder vtrunk
7.8.1 7.8.0 7.7.9 7.7.8 7.7.7 7.7.6 7.7.5 7.7.4 7.7.3 7.7.2 trunk 7.6.0 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.6.6 7.6.7 7.6.8 7.6.9 7.7.0 7.7.1
themify-builder / themify / plugin-compat / wpviews.php

wpviews.php in Themify Builder trunk, at themify/plugin-compat/wpviews.php

34 lines 791 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Themify Compatibility Code
4 *
5 * @package Themify
6 */
7
8 /**
9 * Toolset Views
10 * @link https://toolset.com
11 */
12 class Themify_Compat_wpviews {
13
14 static function init() {
15 if ( function_exists( 'has_blocks' ) ) {
16 add_filter( 'themify_deq_css', [ __CLASS__, 'themify_deq_css' ] );
17 }
18 }
19
20 /*
21 * @ref #9540
22 */
23 public static function themify_deq_css( $css ) {
24 if ( ( $key = array_search( 'wp-block-library', $css ) ) !== false ) {
25 global $wp_query, $WPV_settings;
26 $queried_term = $wp_query->get_queried_object();
27 if ( has_blocks( $WPV_settings[ 'view_taxonomy_loop_' . $queried_term->taxonomy ] ) ) {
28 unset( $css[ $key ] );
29 }
30 }
31
32 return $css;
33 }
34 }