Created
September 4, 2019 22:43
-
-
Save beaverbuilder/d238c0939d7f5a97041d29e66d6fba55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line, start from line 3 onwards | |
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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment