Code Duplication    Length = 3-5 lines in 2 locations

includes/admin/register-settings.php 1 location

@@ 1308-1312 (lines=5) @@
1305
		$placeholder = '';
1306
	}
1307
    
1308
    if( !empty( $args['onchange'] ) ) {
1309
        $onchange = ' onchange="' . esc_attr( $args['onchange'] ) . '"';
1310
    } else {
1311
        $onchange = '';
1312
    }
1313
1314
    $class = !empty( $args['class'] ) ? ' ' . esc_attr( $args['class'] ) : '';
1315

includes/wpinv-template-functions.php 1 location

@@ 401-403 (lines=3) @@
398
    }
399
    
400
    $options = '';
401
    if( !empty( $args['onchange'] ) ) {
402
        $options .= ' onchange="' . esc_attr( $args['onchange'] ) . '"';
403
    }
404
    
405
    if( !empty( $args['required'] ) ) {
406
        $options .= ' required="required"';