diff --git a/inc/admin/views/meta-boxes/fields/duration.php b/inc/admin/views/meta-boxes/fields/duration.php index 0e0e7c94d0..4c5b8c481c 100644 --- a/inc/admin/views/meta-boxes/fields/duration.php +++ b/inc/admin/views/meta-boxes/fields/duration.php @@ -62,13 +62,22 @@ public function output( $thepostid ) { $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $custom_attribute ) . '"'; } } + + $dependency_check = $field['dependency'] ?? []; + if ( ! empty( $dependency_check ) ) { + if ( $dependency_check['is_disable'] ) { + $field['wrapper_class'] .= ' lp-option-disabled'; + } + $field['wrapper_attr'][] = 'data-dependency=' . $dependency_check['name']; + } + $html_option = ''; foreach ( $duration as $k => $v ) { $html_option .= sprintf( '', $k, selected( $k, $a2, false ), $v ); } - echo '