php 在Beaver Themer中隐藏空行和模块

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 在Beaver Themer中隐藏空行和模块相关的知识,希望对你有一定的参考价值。

<?php
function check_field_connections( $is_visible, $node ) {
	
	if ( isset( $node->settings->connections ) ) {
		foreach ( $node->settings->connections as $key => $connection ) {
			if ( ! empty( $connection ) && empty( $node->settings->$key ) ) {
				return false;
			}
		}
	}
	
	return $is_visible;
}

add_filter( 'fl_builder_is_node_visible', 'check_field_connections', 10, 2 );

以上是关于php 在Beaver Themer中隐藏空行和模块的主要内容,如果未能解决你的问题,请参考以下文章