Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save beaverbuilder/d238c0939d7f5a97041d29e66d6fba55 to your computer and use it in GitHub Desktop.
Save beaverbuilder/d238c0939d7f5a97041d29e66d6fba55 to your computer and use it in GitHub Desktop.
<?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