>
>
$expected_numeric; } } elseif ( $operator === 'is_smaller_than' ) { if ( $actual_numeric !== null && $expected_numeric !== null ) { $dependency_ok = $actual_numeric < $expected_numeric; } } elseif ( $operator === 'is_one_of' ) { if ( is_array( $expected_value ) ) { $expected_strings = array_map( 'strval', $expected_value ); $dependency_ok = in_array( (string) $actual_value, $expected_strings, true ); } } elseif ( $operator === 'is_not_one_of' ) { if ( is_array( $expected_value ) ) { $expected_strings = array_map( 'strval', $expected_value ); $dependency_ok = ! in_array( (string) $actual_value, $expected_strings, true ); } } elseif ( $operator === 'is_checked' ) { $dependency_ok = (string) $actual_value === '1'; } elseif ( $operator === 'not_empty' ) { $dependency_ok = $actual_value !== null && $actual_value !== ''; } if ( ! $dependency_ok ) { $visible = false; break; // One dependency isn't met, no need to check further. } } if ( ! $visible ) { $wrapper_classes[] = 'adpresso-field-hidden-by-dependency'; } return $wrapper_classes; } }