Created
December 14, 2017 19:08
-
-
Save paullacey78/92d839e6522cd7eae43fbd78c9b8dd4a to your computer and use it in GitHub Desktop.
This file contains 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 | |
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